Skip to content

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:

  1. Click the column
  2. Search or browse standard variables
  3. Select the match
  4. 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 identifier
  • age - Age in years
  • sex - Male/Female/Other
  • race - Race category
  • ethnicity - Hispanic/Non-Hispanic

Clinical

  • height_cm - Height in centimeters
  • weight_kg - Weight in kilograms
  • bmi - Body mass index
  • diabetes - Diabetes mellitus (Yes/No)
  • hypertension - Hypertension (Yes/No)

Cardiac

  • lvef - Left ventricular ejection fraction
  • nyha_class - NYHA functional class
  • euroscore - EuroSCORE II
  • sts_score - STS predicted risk

Outcomes

  • mortality_30d - 30-day mortality
  • mortality_hospital - In-hospital mortality
  • los_days - Length of stay (days)
  • readmission_30d - 30-day readmission

Custom Variables

For variables not in the standard schema:

  1. Select "Custom Variable"
  2. Define the variable type:
  3. Continuous
  4. Categorical
  5. Binary
  6. Date/Time
  7. 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:

  1. Each site maps to the same standard schema
  2. Combined analyses use harmonized variables
  3. 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

  1. Review AI suggestions—they're right ~90% of the time
  2. Document custom variables clearly
  3. Use consistent mappings across related projects
  4. Keep unmapped columns if you might need them later

Next Steps