carepivot-data / README.md
drdavidprivacy's picture
Upload 5 files
3287615 verified
|
Raw History Blame Contribute Delete
30.6 kB
metadata
license: cc-by-4.0
pretty_name: Alderwyn Health CarePivot working file (remediated)
language:
  - en
task_categories:
  - tabular-classification
tags:
  - ai-governance
  - datasheet
  - datasheets-for-datasets
  - healthcare
  - readmission
  - fairness
size_categories:
  - 10K<n<100K

The working file behind CarePivot v2: the extract after the Week 3 remediation, as the AI Governance Practicum (Track 1) uses it. The organization, the system, and the people are fictional. The data is real and public: Diabetes 130-US Hospitals for Years 1999-2008, UCI Machine Learning Repository, id 296 (Clore, Cios, DeShazo, and Strack, 2014), CC BY 4.0.

Where the data is. This repository holds the documents, not a copy of the data. The file itself, alderwyn_encounter_extract_remediated.csv (99,340 rows, 58 columns, MD5 a6b8fed2c97bc71a16a8a1decc094cbc), is in drdavidprivacy/practicum-case-packs, beside its own README with the row and column arithmetic. Every notebook in the course loads it from there by URL: alderwyn_encounter_extract_remediated.csv.

What is in this repository

  • README.md: this page, the dataset datasheet.
  • DATA_REMEDIATION_LOG.md and Data-Remediation-Log.pdf: the modeling team's log of every change made to the extract before the first model was trained (Week 3), the evidence behind sections 2 and 4 of the datasheet.
  • Dataset-Datasheet_Ortiz-exemplar.pdf: the datasheet below as a PDF.

Used by: the model drdavidprivacy/carepivot-model and the Space drdavidprivacy/carepivot.

Datasheet below: the AI Governance Lead's exemplar (Gabriel Ortiz), the answer key to the Week 3 Dataset Datasheet, in the structure of Gebru et al., "Datasheets for Datasets." Students replace it with their own; see "Make this your own" at the end.


Dataset Datasheet: the CarePivot working file (Alderwyn Health)

Analyst: Gabriel Ortiz, AI Governance Lead (exemplar) Organization: Alderwyn Health System: CarePivot Dataset: CarePivot encounter extract (ten years of diabetic inpatient stays across the system's hospitals)

Section 1: Motivation

Objective: Record why the dataset exists. A dataset assembled for one purpose carries that purpose's assumptions into every later use, so the reason it was created is the first thing a reader needs.

Completed by the AI Governance Lead. Read it, but do not rewrite it.

For what purpose was this dataset assembled, and what gap was it meant to fill?

The extract was assembled to build and test CarePivot, the model the system is considering to score each diabetic inpatient at discharge for the risk of an unplanned readmission within thirty days. The gap it was meant to fill is the one the program charter names. The transitional care team can reach about 15 percent of diabetic discharges, it picks those patients today by unit-nurse judgment and a length-of-stay rule, and everyone agrees the rule misses people it should catch. The flagship has been penalized under the Medicare readmission program in each of the last four federal fiscal years, and readmissions concentrate in the neighborhoods our mission names. The extract exists so that the same fixed capacity can be pointed at the patients most likely to come back.

Who assembled it, and on whose behalf?

The clinical informatics team, four analysts under the Chief Medical Information Officer, drew the extract from ten years of the system's encounter records across its hospitals, and built the prototype on it before any governance file existed. They did so on behalf of the CarePivot program, which the Chief AI Officer chartered this year and for which she is the approver of record. The Director of Transitional Care owns the team the model would steer, and the compliance office holds the Section 1557 obligation the extract has to be measured against.

Under what program or budget was it assembled?

Under the CarePivot program, chartered by the Chief AI Officer this year as the system's first predictive model intended to influence care operations. The extract and the prototype were produced within the informatics team's ordinary work on that program. No separate funding was attached to the data, and none is recorded in the program file. The business case the finance office counts in avoided penalties is the reason the program exists, not the reason the extract was drawn, and this datasheet keeps the two apart.

Section 2: Composition

Objective: Describe what is in the dataset as facts with numbers: what one record is, how many there are, what the outcome is, what is missing, and which groups of people the data identifies. This is the section your Week 2 EDA Observation Log was written to feed.

What does one record represent, and how many records and fields are there?

One record is one hospital stay, an encounter, of a diabetic inpatient at one of the system's hospitals, with the readmission outcome recorded for that stay. A record is a stay, not a person. There are 101,766 encounters and 50 fields as loaded, 47 fields, two identifiers, and the outcome as recorded (notebook sections 1 and 2), belonging to 71,518 distinct patients (section 9, check 2). After the clinical informatics team's remediation the working file has 99,340 rows and 58 columns, seven of them added beside their sources: 42 model inputs, 15 fields held out of the inputs, and the outcome column (section 12).

Is the dataset everything, or a sample? If a sample, what is it a sample of, and how was it drawn?

Neither everything nor a drawn sample. The data dictionary describes the extract as ten years of the system's diabetic inpatient encounters across its hospitals, and the team's written response records the five inclusion rules that decided which encounters entered it: an inpatient encounter, a diabetes diagnosis entered for it, a stay of at least 1 day and at most 14, laboratory tests performed, and medications administered (section 11.3). The file shows the three rules it can show, time_in_hospital from 1 to 14 and num_lab_procedures and num_medications never below 1 (sections 5 and 11.3). How many of the system's diabetic inpatient encounters fell outside the rules is not documented, and none of the 50 fields records which hospital an encounter came from or in which year (section 2). So the extract is every encounter that met the rules, and the rules decide who the model learned about.

What is the outcome field, how is it recorded, and what share of records carry the value of interest?

readmitted, recorded three ways: NO, no readmission on record, 54,864 encounters, >30, readmitted after thirty days, 35,545, and <30, readmitted within thirty days, 11,357 (section 3). The working outcome, readmitted_within_30_days, is "yes" where readmitted is <30 and "no" otherwise, and the team has defined it as readmitted within thirty days per the system's record (section 11.1). 11.2 percent of encounters as loaded carry it, 11,357 of 101,766 (section 3), and 11.4 percent after the team's two row removals, 11,314 of 99,340 (section 12). Both are floors: the file has no date field, so encounters discharged near the window's end and patients readmitted outside the system are both recorded as NO (section 11.1).

Is any information missing or unrecorded, and where?

Eight fields as loaded have missing or unrecorded values: weight in 98,569 encounters (96.9 percent), medical_specialty 49,949 (49.08 percent), payer_code 40,256 (39.56 percent), race 2,273 (2.2 percent), diag_3 1,423, diag_2 358, diag_1 21, and gender 3, recorded as Unknown/Invalid (section 4). Three things read like gaps and are not. The value None in max_glu_serum (96,420 encounters) and A1Cresult (84,748) means the test was not performed, which the dictionary treats as recorded information (section 9, check 3, and section 11.9). The codes NULL, Not Available, Not Mapped, and Unknown/Invalid in the three coded fields are the code table's own words, merged by the team into one "unknown" level per field: 10,144 encounters in admission type, 4,680 in discharge disposition, and 6,854 in admission source after the row removals (section 11.10). And the 1,977 patients with no recorded race are counted, not filled: only 144 of their 2,273 rows have a race recorded in another stay, and nothing has been imputed (section 9, check 6, and section 11.5).

Does the dataset identify groups of people by a protected characteristic, directly or through other fields?

Yes, directly and through other fields. Directly: race, with six values including the question mark, gender, and age in ten-year bands (section 7). Among recorded race groups the rates barely differ, Caucasian 11.3 percent on 76,099 encounters and AfricanAmerican 11.2 percent on 19,210, while the unrecorded group is readmitted at 8.3 percent on 2,273 (section 7). Through other fields: gender is partly recoverable from diag_3 at 0.33, age is the group the file knows most about (diag_1 0.28, medical_specialty 0.25, payer_code 0.15), and race is not well recoverable from any single field, the highest being diag_1 at 0.14, which leads partly because the diagnosis codes have over 700 levels (section 8c). One further field stands beside the protected ones: payer_code, a proxy for access to care, which the team has held out of the inputs as a fairness lens (section 11.6). The notebook tests single fields only, so combinations are untested.

Are there known errors, oddities, or redundancies in the data?

Six. Stays are not patients: 16,773 patients (23.5 percent) have more than one stay, those patients account for 47,021 encounters (46.2 percent of rows), one patient has 40, and a first stay in the file is readmitted at 8.8 percent against 16.7 percent for a later stay, with "first" taken as the lowest encounter_id and nothing certifying that the identifiers are in time order (section 9, check 2). Code 1 means emergency in admission type, discharged to home in discharge disposition, and physician referral in admission source (section 6). 123 patients carry more than one race value across their stays (section 9, check 6). 2,423 encounters carry a discharge code meaning death or hospice, 1,652 of them a code meaning the patient died, and all but 43 were "no" under the working outcome (section 9, check 5). Two of the 23 medication fields, examide and citoglipton, take one value in every row (section 2 and section 11.11). And the length of stay stops at exactly 14 days, an inclusion rule rather than a fact about patients (section 5 and section 11.3). There are no duplicate rows and no reused encounter identifier (section 9, check 1).

Does the dataset contain anything that could identify a person, or anything confidential?

Yes. The extract is protected health information under HIPAA (Health Insurance Portability and Accountability Act): two identifiers, encounter_id and patient_nbr, which point at a stay and a person within the system's records (section 2), plus diagnoses, medications, and demographics. It is confidential to the system and held under the system's HIPAA controls and the minimum-necessary standard. There is no name and no date. Whether a record could be re-identified by combining the fields has not been assessed, and for a record that carries a patient identifier the datasheet assumes it could be, and records the assessment as a limitation.

Section 3: Collection process

Objective: Record how the data came to exist, and be honest about what is not known. Most of the answers here come from the data science team's written response. Where the team said a question is open, this section says so in the same words.

How was the data recorded, and by what system or process?

The records were recorded during the care of patients at the system's hospitals over ten years: demographics at registration, admission and discharge codes from the hospitals' code tables, diagnoses in the ICD-9-CM standard (International Classification of Diseases, Ninth Revision, Clinical Modification), laboratory results in bands, medications during the stay, and the readmission outcome from the system's own record of later stays (data dictionary, Code Table Companion). The clinical informatics team drew the extract from those records under the five inclusion rules (section 11.3). How race was captured at registration, by the patient's own report or by staff, and whether the practice was the same at every hospital, is not documented, and the 123 patients with conflicting values show the field was not captured consistently (section 9, check 6).

Over what period, and by whom?

Ten years, per the data dictionary. Which years, which of the system's hospitals contributed which encounters, and the date the extract's window closed are not documented, and the file has no date field and no hospital field (section 2). The team's written response records the close date as open (section 11.1). By whom: the hospitals' clinical and registration staff, as care was given, with the extract drawn by the clinical informatics team.

Were the people the records describe told their information would be used this way?

Not documented. The extract is the system's own record used inside the system, under HIPAA and the system's privacy notices, and the Use Case Assessment recorded HIPAA over the encounter data and the Section 1557 patient care decision support provision as the obligations that attach. Whether those notices tell a patient that their record may be used to develop a scoring tool is a question for the compliance office that the program file does not answer. This datasheet records it as a limitation, not a finding either way.

Which questions about how the data was gathered cannot be answered from the documentation the program holds?

Six, as the team's written response and section 12 of the notebook list them: the date the extract's window closed, and so how many NO encounters were discharged within thirty days of it, readmissions to a hospital outside the system, whether encounter identifiers are assigned in time order, whether the discharge disposition is final at the moment CarePivot would score, why 123 patients carry more than one race value across their stays and who the 1,977 patients with no recorded race are, and the key to the payer codes. Two further things are not documented and are recorded above rather than as open items: which hospitals contributed which encounters in which years, and how many encounters fell outside the inclusion rules.

Section 4: Preprocessing, cleaning, and labeling

Objective: Record what the data science team has now performed on the dataset, before the first model is trained, precisely enough that a reviewer could reproduce it. The data science team's remediation log is the source, and sections 11 and 12 of the notebook are where every number in this section is printed.

Was any cleaning, recoding, or removal performed? Summarize the changes.

Yes, twelve logged rows, printed before and after in notebook section 11. The label was defined as readmitted within thirty days per the system's record, with censoring and out-of-system readmissions recorded as limitations, and the three-way readmitted field held out as the label's ingredient (R-1). No first-versus-later flag was derived and a total-stays count was ruled out for good, with number_inpatient the only history feature (R-2). The five inclusion rules were recorded (R-3). The discharge disposition timing was recorded as open, with two model variants to be built at the modeling stage (R-4). Race was held out of the inputs and kept in the working file with "?" as its own level, never imputed (R-5). No row left the file in that step: the team took the label off the patient, not the patient out of the file. medical_specialty was grouped into eleven families with "not recorded" as its own level, and payer_code was held out as a fairness lens (R-6). The three diagnosis codes were grouped into the nine documented ICD-9-CM chapters, raw codes kept (R-7). The 2,423 death and hospice encounters were removed under a written rule, the base rate moving from 11.2 to 11.4 percent (R-8). weight was held out of the inputs and None was kept as a level in the two lab fields (R-9). The unknown family was merged and the three coded fields grouped into the Code Table Companion's families, raw codes kept (R-10). The 3 Unknown/Invalid gender rows were removed under the second written rule, and the two one-value medication fields left the inputs (R-11). The train/test split rule was recorded for the modeling stage, by patient, stratified where possible, 80 percent of patients for training and 20 percent held back as the test set, with the two identifiers never inputs: 55,990 training patients and 13,997 in the held-back test set expected, not executed (R-12, section 11.12).

Which fields were held out of the model inputs, and why? Are they still in the file?

Fifteen fields are in the working file but out of the model inputs, and all fifteen are still in the working file (section 12). race, a protected characteristic under Section 1557, kept with "?" as its own level for the watch list's error rates by recorded race, never imputed, 47 candidate inputs to 46 (R-5, section 11.5). payer_code, a proxy for access to care, kept as a fairness lens (R-6). weight, unrecorded in about 97 percent of encounters, with only 36 unrecorded rows fillable from another stay (R-9, section 11.9). The raw medical_specialty, the three raw diagnosis codes, and the three raw coded fields, each kept beside the grouped copy that became the input (R-6, R-7, R-10). examide and citoglipton, one value in every row (R-11). The three-way readmitted field, the label's own ingredient (R-1). And the two identifiers, encounter_id and patient_nbr, never inputs, with patient_nbr the key for the split by patient (R-12). Every one of the 69,987 patients in the working file stays with every stay they have in it (section 12). Dr. Marsh's watch list measures error rates by recorded race with the unrecorded group as its own row, and score distributions by race and by payer at equal clinical burden, which is why neither field was deleted.

Which fields were derived or recoded, and is the raw field still available beside each?

Seven fields were added, each beside its source, and the raw field is available beside every one of them (section 12: 50 columns as loaded, the working outcome, and 7 added make 58). medical_specialty_family, eleven families by name with "not recorded" as its own level (49,949 encounters), the whole mapping printed (R-6, section 11.6). diag_1_chapter, diag_2_chapter, and diag_3_chapter, the nine documented ICD-9-CM chapters by code range, with the unrecorded value placed in "other" as the documented approach places it, 21, 358, and 1,423 codes (R-7, section 11.7). admission_type_group, with the unknown family (codes 5, 6, 8) merged into "unknown", discharge_disposition_family (home, facility transfer, death or hospice, still a patient or expected to return, unknown), and admission_source_family (referral, transfer from another facility, emergency room, birth-related, court or law enforcement, unknown), every code in every family printed (R-10, section 11.10). Nothing was recoded in place, and nothing was imputed.

How many records were removed, and under what rule?

2,426, under two written rules and no other. 2,423 encounters whose discharge_disposition_id is one of 11, 13, 14, 19, 20, 21, the code table's death and hospice codes, of which 1,652 carry a code meaning the patient died: 101,766 rows before and 99,343 after, with the outcome re-aligned to the working file and the base rate moving from 11.2 percent (11,357) to 11.4 percent (11,314 of 99,343) (R-8, section 11.8). And 3 encounters whose gender is Unknown/Invalid: 99,343 before and 99,340 after, 11.4 percent (11,314 of 99,340) (R-11, section 11.11). Distinct patients went from 71,518 to 69,987 (section 12). No other row left the file, and no field was deleted from the working file.

Is every change recorded somewhere a reviewer can reproduce it?

Yes. Every change is a numbered row in the clinical informatics team's remediation log, and each row names the notebook subsection where the before and the after are printed (11.1 to 11.12). Section 12 prints the file after remediation: 99,340 rows, 58 columns, the 42 model inputs, the fifteen held-out fields with their reasons, the seven fields added, the base rate as loaded and after the removals, and the six open items. The two rules under which rows left are written so that a reader can re-run them. The notebook runs from the top and reproduces every number, and sections 1 to 10 are unchanged from Week 2.

Section 5: Uses

Objective: Fix what the dataset is for and what it is not for. This section inherits the red lines from the Use Case Assessment and the watch list from the Chief AI Officer's Week 2 memo. It is where the dataset's limits become instructions to whoever uses it next.

What has the dataset been used for so far?

To build the CarePivot prototype the clinical informatics team produced before any governance file existed, on the extract as it came, with the death and hospice encounters in it and the repeat patients unexamined. This week the team has prepared the extract for the next version of the model, which has not yet been trained, and this datasheet documents that preparation. The extract has not been used in any care decision, and no score from the prototype has reached a patient, a nurse, or a worklist.

What is it intended to be used for?

To train and evaluate CarePivot as a ranked worklist for the transitional care team, under the posture Dr. Marsh directed in Week 1: the override stays and is reviewed, and no reliance on the model before an independent review of its performance measured separately across the groups we serve. Evaluation will carry the seven watch-list items from her Week 2 memo, each with its owner and review point in the program file. The model evaluated by patient, never by stay, with the patient split compared against a row split and the gap reported (R-12, section 11.12). Error rates by recorded race with the unrecorded group reported as a row of its own, about 446 of its 2,232 encounters expected in the held-back test set (section 11.12). The prior utilization counts tested for the mechanism the chief of medicine circulated the paper about, by comparing score distributions by race and by payer at equal clinical burden, with the counts removed if the test shows it. "Test not performed" tested as a feature, whether ordering rates differ by group and whether the score follows the flag rather than the result. Per-band miss rate and calibration by age, with the youngest bands flagged as too small to certify (about 32 of the 160 encounters in the youngest band expected in the held-back set, section 11.12). Whether removing the death and hospice encounters changes who lands in the top 15 percent. And the model evaluated at the capacity cutoff, by group, with the count of patients ranked out produced from the first evaluation run by group and by neighborhood. Two decisions recorded this week also belong here: the two discharge-disposition variants (R-4) and the class weighting decision.

What must it never be used for?

Anything outside the transitional care enrollment decision this program assessed. Per the Use Case Assessment's red lines: scores never influence discharge timing, bed management, treatment, or billing, or any decision beyond transitional care enrollment. No patient is removed from care they would otherwise receive because of a score. Scores are never presented to patients or families as a judgment about them. Clinical override is never penalized. No automatic enrollment above a cutoff without a clinician in the loop. From this file: race and payer_code are never model inputs, a total-stays count is never a feature, no evaluation is run by row, no rate from this file is quoted as a share of patients, and the extract is never used to claim a readmission rate for the system, because 11.2 percent is a floor per the system's record (section 11.1). Nothing may be done with the file that closes an open item by assumption.

What about its composition or collection could affect future uses, including fairness and legal obligations?

Six things. The label is a floor: encounters near the window's end and readmissions outside the system are NO, so every miss rate at the evaluation stage is a miss rate against the record, not against what happened to the patient (section 11.1). Stays are not patients: 46.2 percent of rows come from repeat patients, and any evaluation, fairness measure, or reported rate that treats rows as people is wrong by construction (section 9, check 2). Race cannot be measured for 1,977 patients, and the Section 1557 obligation to identify and mitigate discrimination risk from a patient care decision support tool cannot be met for people the system did not record, so the unrecorded group is reported as its own row and the recording gap is a compliance question, not a modeling one (section 9, check 6). The strongest signal in the file is a history of using care, number_inpatient at 0.149 (section 8b), and a history of using care can stand in for having had access to care, which is the mechanism the watch list tests and the reason payer_code is a lens. The inclusion rules mean the longest stays and the stays with no laboratory test were never seen, and the model will still be asked to score them (section 11.3). And the extract spans ten years across hospitals with no field to say which, so whether the patients in it look like the patients at the discharge door this month cannot be checked from the file (section 2).

Section 6: Distribution

Objective: Record whether and how the dataset leaves the organization, and under what terms.

Completed by the AI Governance Lead. Read it, but do not rewrite it.

Will the dataset be shared outside the organization, and how?

No. The extract is protected health information and stays inside the system's environment. It is held in the CarePivot program file and is available to the program team only. Nothing in it leaves the system, and the remediated working file is held beside the extract under the same controls.

Under what terms or restrictions?

Internal use for the CarePivot program, under the system's HIPAA (Health Insurance Portability and Accountability Act) privacy and security controls and the minimum-necessary standard. There is no license because there is no distribution. Any request to use the extract outside the program, for quality reporting, for bed management, for billing, or for any other model, is a new use and requires a new Use Case Assessment.

Are there legal or contractual limits on sharing it?

Yes. The extract is protected health information under HIPAA, and any sharing outside the system would require either a de-identification the program has not performed or an authorization it does not hold. The Use Case Assessment recorded the minimum-necessary and de-identification questions as attaching to any external sharing, and the compliance office owns them. Nothing in the program file permits sharing outside the system.

Section 7: Maintenance

Objective: Record who looks after the dataset, how errors are reported and corrected, and what happens to it over time.

Completed by the AI Governance Lead. Read it, but do not rewrite it.

Who maintains the dataset, and how are errors reported and corrected?

The clinical informatics team maintains the extract and the remediated working file. Errors, questions about a field's meaning, and requests for corrections go to the team through the AI Governance Office, which records each one in the program file. The written questions Dr. Marsh forwarded after Week 2, and the team's answers, are the first entries.

Will it be updated, and will earlier versions be kept?

The extract as loaded is not changed. Every change is made to the working file beside it, and the remediation log records each change, so an earlier state can always be recovered. If the date the extract's window closed, the order of the encounter identifiers, the timing of the discharge disposition, or the meaning of the payer codes is documented later, this datasheet is the document that changes. The open items in sections 2 and 3 are where. Any later extract that adds a date field, a hospital field, or newer encounters is a new extract and a new datasheet, not a revision of this one.

For how long will it be retained, and what happens to it after that?

Retention follows the system's existing record retention schedule for medical records and for the program file. The specific period for the extract and the working file is not stated in the program file, and this datasheet records that as an open item for the Chief AI Officer's office and the compliance office rather than inventing one.


Make this your own

This page carries the AI Governance Lead's exemplar so that the repository is complete on day one. Your portfolio should carry yours. Three steps, about ten minutes:

  1. On Hugging Face, the + menu, then New Dataset. Owner: your account. Name: carepivot-data. License: cc-by-4.0. Public. Create it.
  2. Export your Dataset Datasheet (your Week 3 deliverable) as a PDF and upload it to the new repository under the name Dataset-Datasheet.pdf (Files, then Contribute, then Upload files).
  3. Upload a README.md: copy README_TEMPLATE.md from this repository, put your name in it, and replace YOUR-ACCOUNT with your Hugging Face account name everywhere it appears (including inside the metadata block at the top, which otherwise stays as it is). The template links to your PDF. If you would rather have your card render as the page itself, paste the text of your Dataset Datasheet below the metadata block instead.

Then add the new repository to your collection beside your Space and your model repository. Do not upload the Lead's exemplar, the memos, the audit briefings, the notebooks, or the data.