Prompt Details
Model
Chat - (gpt-5.6)
Token size
1,374
Example input
[e.g. "EHR extract," "randomized trial CRF data," "cross-sectional survey," "disease registry," "claims data," or "not specified"]: EHR extract from 4 hospitals
[list the main variables/fields you have — types, units, approximate n, and anything you already suspect might be messy]: n=18,000 patients. Variables: creatinine, glucose, HbA1c, weight, mortality yes/no
[anything you've already noticed — e.g. "some dates look inconsistent," "multiple sites entered data differently," "not sure yet"]: Some sites recorded creatinine in µmol/L and others in mg/dL, but the unit column is incomplete — not every record has a unit specified
[what you plan to do with the cleaned data, if known — e.g. "logistic regression for a mortality outcome," "descriptive summary only," "not specified"]: not specified
[DESCRIBE YOUR DATASET HERE]: This is an EHR extract from 4 hospitals with n=18,000 patients. Key variables include creatinine, glucose, HbA1c, weight, and mortality (yes/no). Some sites recorded creatinine in µmol/L and others in mg/dL, but the unit column is incomplete — not every record has a unit specified. Intended analysis is not specified.
Example output
SAMPLE 1 — EHR data, cross-site unit mixing
Input:
DATA SOURCE/TYPE: EHR extract from 4 hospitals KEY VARIABLES AND SAMPLE SIZE: n=18,000 patients. Variables: creatinine, glucose, HbA1c, weight, mortality (yes/no) KNOWN OR SUSPECTED ISSUES: Some sites recorded creatinine in µmol/L and others in mg/dL, but the unit column is incomplete — not every record has a unit specified INTENDED ANALYSIS: not specified
Output:
Priority issues specific to this dataset:
Creatinine unit mixing with incomplete unit metadata is the most severe issue here. Because the unit column is incomplete, you can't simply convert based on a known label for every record — you need a distributional/plausibility-based detection strategy. Plot the raw creatinine value distribution per hospital: µmol/L values will cluster roughly 80-90x higher numerically than mg/dL for the same physiological range (normal creatinine is roughly 0.6-1.2 mg/dL, or about 53-106 µmol/L). If one hospital's distribution clusters around 0.5-2 and another clusters around 50-150, that's a strong signal of which unit was used, even without an explicit label. Records with values falling in an ambiguous overlapping range should be flagged as indeterminate rather than guessed.
Glucose and HbA1c may have the same undocumented unit-mixing risk. You only mentioned creatinine explicitly, but glucose (mg/dL vs. mmol/L) commonly has the same cross-site unit problem in multi-site EHR extracts. Don't assume only creatinine is affected — check the numeric distributions of glucose and HbA1c by site as well.
Mortality as an outcome combined with unresolved unit issues creates a serious downstream risk. An unresolved creatinine unit error is one of the most well-known ways to catastrophically bias a clinical prediction or association model, since it makes the same clinical severity look wildly different across hospitals.
Full checklist (key items):
Before applying a single plausibility range to all creatinine values, first determine each record's likely unit via the distributional approach above.
Reconstruct or verify the unit field per record where possible (e.g. cross-check against hospital-level system defaults) rather than relying solely on the incomplete unit column.
Check for duplicate patient records across the 4 hospitals.
What NOT to do:
Don't assume a single global conversion factor applies uniformly without first confirming which records are actually in which unit.
Don't drop records with ambiguous/indeterminate units without documenting how many were dropped and why.
Documentation reminder: Log the number of records affected by each unit correction, by site, so the derivation is reproducible.
By purchasing this prompt, you agree to our terms of service
GPT-5.6
Describe your dataset (type, variables, source, known issues) and get a tailored, prioritized data-cleaning checklist — not a generic template, but one built around the specific risks of your data type (EHR, trial data, survey, registry) and variables. Flags what's likely to break downstream analysis if skipped.
...more
Added 2 weeks ago
