Data Mapping
Data mapping connects your column names to Medtwin's canonical schema for standardized analysis.
Why Mapping?
Different datasets use different names for the same concepts:
| Your Column | Standard Name |
|---|---|
pt_age |
age |
died_30d |
mortality_30d |
proc_type |
procedure_type |
Mapping enables:
- Consistent analysis across datasets
- Pre-built analysis templates
- Multi-site data harmonization
Mapping Process
Step 1: AI Suggestions
After upload, Medtwin suggests mappings:
Your Column → Standard Variable Confidence
────────────────────────────────────────────────────────
patient_id → patient_id 98% ✓
age → age 99% ✓
gender → sex 95% ✓
died_in_hospital → mortality_hospital 87% ?
ejection_frac → lvef 92% ✓
Step 2: Review
For each suggestion:
- ✓ Accept: Mapping is correct
- ✗ Reject: Suggest something else
- 🔧 Edit: Manually select mapping
Step 3: Unmapped Columns
Columns without suggestions need manual mapping:
- Click the column
- Search or browse standard variables
- Select the match
- Or mark as "Custom" to keep as-is
Step 4: Confirm
Review all mappings and click Confirm Mappings.
You Can Change Later
Mappings can be updated anytime. Re-run analyses to use new mappings.
Standard Variables
Medtwin's schema includes:
Demographics
patient_id- Unique identifierage- Age in yearssex- Male/Female/Otherrace- Race categoryethnicity- Hispanic/Non-Hispanic
Clinical
height_cm- Height in centimetersweight_kg- Weight in kilogramsbmi- Body mass indexdiabetes- Diabetes mellitus (Yes/No)hypertension- Hypertension (Yes/No)
Cardiac
lvef- Left ventricular ejection fractionnyha_class- NYHA functional classeuroscore- EuroSCORE IIsts_score- STS predicted risk
Outcomes
mortality_30d- 30-day mortalitymortality_hospital- In-hospital mortalitylos_days- Length of stay (days)readmission_30d- 30-day readmission
Custom Variables
For variables not in the standard schema:
- Select "Custom Variable"
- Define the variable type:
- Continuous
- Categorical
- Binary
- Date/Time
- Add description (optional)
Value Mappings
Some variables need value transformation:
Example: Gender to Sex
| Your Value | Standard Value |
|---|---|
M |
Male |
F |
Female |
1 |
Male |
2 |
Female |
Medtwin suggests common transformations automatically.
Multi-Site Studies
For harmonizing data across sites:
- Each site maps to the same standard schema
- Combined analyses use harmonized variables
- Site-specific variations are documented
Mapping Report
After mapping, review the report:
- Mapped: Columns successfully mapped
- Custom: Non-standard variables kept
- Unmapped: Columns excluded from analysis
Best Practices
Mapping Tips
- Review AI suggestions—they're right ~90% of the time
- Document custom variables clearly
- Use consistent mappings across related projects
- Keep unmapped columns if you might need them later