diff --git a/concepts/Adrenaline_dosage.yml b/concepts/Adrenaline_dosage.yml index 2ad54f2..7aa22e3 100644 --- a/concepts/Adrenaline_dosage.yml +++ b/concepts/Adrenaline_dosage.yml @@ -2,7 +2,7 @@ description: '' identifiers: loinc: '' snomed: '' -lower_limit: 0 +lower_limit: '' mapper: - klass: MimicObservationMapper params: @@ -11,7 +11,7 @@ mapper: schema: mimiciv_icu table: inputevents source: mimiciv - unit: '' + unit: mg/time name: Adrenaline_dosage unit: ug/kg/min -upper_limit: 300 +upper_limit: '' diff --git a/concepts/Age.yml b/concepts/Age.yml index 510e27a..d402216 100644 --- a/concepts/Age.yml +++ b/concepts/Age.yml @@ -2,7 +2,7 @@ description: Patient's age identifiers: loinc: '' snomed: '' -lower_limit: 0 +lower_limit: '0' mapper: - klass: MimicObservationMapper params: @@ -11,7 +11,7 @@ mapper: schema: mimiciv_derived table: age source: mimiciv - unit: '' + unit: years name: Age unit: years -upper_limit: 300 +upper_limit: '130' diff --git a/concepts/AirwayPlateauPressure.yml b/concepts/AirwayPlateauPressure.yml index 1eb0426..45dc0e9 100644 --- a/concepts/AirwayPlateauPressure.yml +++ b/concepts/AirwayPlateauPressure.yml @@ -2,7 +2,7 @@ description: Airway Plateau Pressure of a patient identifiers: loinc: '' snomed: '' -lower_limit: 0 +lower_limit: '0' mapper: - klass: MimicObservationMapper params: @@ -11,7 +11,7 @@ mapper: schema: mimiciv_icu table: chartevents source: mimiciv - unit: '' + unit: mmHg name: AirwayPlateauPressure unit: mmHg -upper_limit: 300 +upper_limit: '100' diff --git a/concepts/BodyHeight.yml b/concepts/BodyHeight.yml index 2095017..48bc93f 100644 --- a/concepts/BodyHeight.yml +++ b/concepts/BodyHeight.yml @@ -2,7 +2,7 @@ description: Height of a patient's body identifiers: loinc: 8302-2 snomed: '1153637007' -lower_limit: 0 +lower_limit: '0' mapper: - klass: MimicObservationMapper params: @@ -11,7 +11,7 @@ mapper: schema: mimiciv_icu table: chartevents source: mimiciv - unit: '' + unit: cm name: BodyHeight unit: cm -upper_limit: 300 +upper_limit: '300' diff --git a/concepts/BodyTemperature.yml b/concepts/BodyTemperature.yml index 0a143e6..df4d01a 100644 --- a/concepts/BodyTemperature.yml +++ b/concepts/BodyTemperature.yml @@ -2,7 +2,7 @@ description: Temperature of a patient's body, irrespective of site identifiers: loinc: '' snomed: '' -lower_limit: 0 +lower_limit: '20' mapper: - klass: MimicObservationMapper params: @@ -11,7 +11,7 @@ mapper: schema: mimiciv_icu table: chartevents source: mimiciv - unit: '' + unit: °C name: BodyTemperature -unit: "\xB0C" -upper_limit: 300 +unit: °C +upper_limit: '45' diff --git a/concepts/BodyWeight.yml b/concepts/BodyWeight.yml index dfb341b..88ddf3c 100644 --- a/concepts/BodyWeight.yml +++ b/concepts/BodyWeight.yml @@ -2,7 +2,7 @@ description: Weight of a patien's body identifiers: loinc: 29463-7 snomed: '27113001' -lower_limit: 0 +lower_limit: '0' mapper: - klass: MimicObservationMapper params: @@ -11,7 +11,7 @@ mapper: schema: mimiciv_icu table: chartevents source: mimiciv - unit: '' + unit: kg name: BodyWeight unit: kg -upper_limit: 300 +upper_limit: '500' diff --git a/concepts/BreathingRate.yml b/concepts/BreathingRate.yml index 2776580..2cf2d89 100644 --- a/concepts/BreathingRate.yml +++ b/concepts/BreathingRate.yml @@ -2,7 +2,7 @@ description: Actual breathing rate of patient identifiers: loinc: '' snomed: '' -lower_limit: 0 +lower_limit: '0' mapper: - klass: MimicObservationMapper params: @@ -11,7 +11,7 @@ mapper: schema: mimiciv_icu table: chartevents source: mimiciv - unit: '' + unit: 1/min name: BreathingRate unit: 1/min -upper_limit: 300 +upper_limit: '100' diff --git a/concepts/Creatinine_absolute_serum.yml b/concepts/Creatinine_absolute_serum.yml index 092f65c..3b1cd79 100644 --- a/concepts/Creatinine_absolute_serum.yml +++ b/concepts/Creatinine_absolute_serum.yml @@ -2,7 +2,7 @@ description: '' identifiers: loinc: '' snomed: '' -lower_limit: 0 +lower_limit: '0' mapper: - klass: MimicObservationMapper params: @@ -14,4 +14,4 @@ mapper: unit: '' name: Creatinine_absolute_serum unit: mg/dl -upper_limit: 300 +upper_limit: '1000000' diff --git a/concepts/DiastolicBloodPressue_Arterial_Invasive.yml b/concepts/DiastolicBloodPressue_Arterial_Invasive.yml index bf014cd..a1c8f8a 100644 --- a/concepts/DiastolicBloodPressue_Arterial_Invasive.yml +++ b/concepts/DiastolicBloodPressue_Arterial_Invasive.yml @@ -2,7 +2,7 @@ description: Diastolic arterial pressure of a patient identifiers: loinc: 76213-8 snomed: '251073000' -lower_limit: 0 +lower_limit: '0' mapper: - klass: MimicObservationMapper params: @@ -11,7 +11,7 @@ mapper: schema: mimiciv_icu table: chartevents source: mimiciv - unit: '' + unit: mmHg name: DiastolicBloodPressue_Arterial_Invasive unit: mmHg -upper_limit: 300 +upper_limit: '200' diff --git a/concepts/DiastolicBloodPressue_Arterial_noninvasive.yml b/concepts/DiastolicBloodPressue_Arterial_noninvasive.yml index f6e96bb..41fad79 100644 --- a/concepts/DiastolicBloodPressue_Arterial_noninvasive.yml +++ b/concepts/DiastolicBloodPressue_Arterial_noninvasive.yml @@ -1,8 +1,8 @@ -description: Diastolic venous pressure of a patient +description: Diastolic arterial pressure of a patient identifiers: loinc: '' snomed: '251074006' -lower_limit: 0 +lower_limit: '0' mapper: - klass: MimicObservationMapper params: @@ -11,7 +11,7 @@ mapper: schema: mimiciv_icu table: chartevents source: mimiciv - unit: '' + unit: mmHg name: DiastolicBloodPressue_Arterial_noninvasive unit: mmHg -upper_limit: 300 +upper_limit: '200' diff --git a/concepts/Dobutamine_dosage.yml b/concepts/Dobutamine_dosage.yml index c16f431..687e768 100644 --- a/concepts/Dobutamine_dosage.yml +++ b/concepts/Dobutamine_dosage.yml @@ -2,7 +2,7 @@ description: '' identifiers: loinc: '' snomed: '' -lower_limit: 0 +lower_limit: '' mapper: - klass: MimicObservationMapper params: @@ -11,7 +11,7 @@ mapper: schema: mimiciv_icu table: inputevents source: mimiciv - unit: '' + unit: mg/time name: Dobutamine_dosage unit: ug/kg/min -upper_limit: 300 +upper_limit: '' diff --git a/concepts/FiO2.yml b/concepts/FiO2.yml index b092511..1d96352 100644 --- a/concepts/FiO2.yml +++ b/concepts/FiO2.yml @@ -2,7 +2,7 @@ description: Inspired oxygen concentration of a patient identifiers: loinc: '' snomed: '' -lower_limit: 0 +lower_limit: '0' mapper: - klass: MimicObservationMapper params: @@ -11,7 +11,7 @@ mapper: schema: mimiciv_icu table: chartevents source: mimiciv - unit: '' + unit: '%' name: FiO2 -unit: 1/1 -upper_limit: 300 +unit: '%' +upper_limit: '100' diff --git a/concepts/Gender.yml b/concepts/Gender.yml index 999fdf0..4a5a0d4 100644 --- a/concepts/Gender.yml +++ b/concepts/Gender.yml @@ -2,7 +2,7 @@ description: Patient's gender identifiers: loinc: '' snomed: '' -lower_limit: 0 +lower_limit: '' mapper: - klass: MimicObservationMapper params: @@ -14,4 +14,4 @@ mapper: unit: '' name: Gender unit: '' -upper_limit: 300 +upper_limit: '' diff --git a/concepts/HeartRate.yml b/concepts/HeartRate.yml index 4503621..dc66431 100644 --- a/concepts/HeartRate.yml +++ b/concepts/HeartRate.yml @@ -1,18 +1,17 @@ +description: heart rate of a patient, source agnostic +identifiers: + loinc: 8867-4 + snomed: '364075005' +lower_limit: '0' +mapper: +- klass: MimicObservationMapper + params: + constraints: + itemid: '220045' + schema: mimiciv_icu + table: chartevents + source: mimiciv + unit: bpm name: HeartRate -description: Heart rate is the speed of the heartbeat measured by the number of contractions of the heart per minute (bpm). unit: bpm -upper_limit: 300 -lower_limit: 0 -identifiers: - snomed: "364075005" - loinc: "8867-4" -#schema: FHIRObservation -mapper: - - klass: MimicObservationMapper - source: mimic - unit: bpm - params: - schema: mimiciv_icu - table: chartevents - constraints: - itemid: "220045" \ No newline at end of file +upper_limit: '300' diff --git a/concepts/MeanBloodPressue_Arterial_Invasive.yml b/concepts/MeanBloodPressue_Arterial_Invasive.yml index 483d4ac..a0aa170 100644 --- a/concepts/MeanBloodPressue_Arterial_Invasive.yml +++ b/concepts/MeanBloodPressue_Arterial_Invasive.yml @@ -2,7 +2,7 @@ description: Mean arterial pressure of a patient identifiers: loinc: '' snomed: '251075007' -lower_limit: 0 +lower_limit: '0' mapper: - klass: MimicObservationMapper params: @@ -11,7 +11,7 @@ mapper: schema: mimiciv_icu table: chartevents source: mimiciv - unit: '' + unit: mmHg name: MeanBloodPressue_Arterial_Invasive unit: mmHg -upper_limit: 300 +upper_limit: '200' diff --git a/concepts/MeanBloodPressue_Arterial_Noninvasive.yml b/concepts/MeanBloodPressue_Arterial_Noninvasive.yml index 0a807f5..9f8d9fe 100644 --- a/concepts/MeanBloodPressue_Arterial_Noninvasive.yml +++ b/concepts/MeanBloodPressue_Arterial_Noninvasive.yml @@ -1,8 +1,8 @@ -description: Diastolic venous pressure of a patient +description: Diastolic arterial pressure of a patient identifiers: loinc: '' snomed: '174255007' -lower_limit: 0 +lower_limit: '0' mapper: - klass: MimicObservationMapper params: @@ -11,7 +11,7 @@ mapper: schema: mimiciv_icu table: chartevents source: mimiciv - unit: '' + unit: mmHg name: MeanBloodPressue_Arterial_Noninvasive unit: mmHg -upper_limit: 300 +upper_limit: '200' diff --git a/concepts/Norepinephrine_dosage.yml b/concepts/Norepinephrine_dosage.yml index 72e2e70..c73c2bf 100644 --- a/concepts/Norepinephrine_dosage.yml +++ b/concepts/Norepinephrine_dosage.yml @@ -2,7 +2,7 @@ description: '' identifiers: loinc: '' snomed: '' -lower_limit: 0 +lower_limit: '' mapper: - klass: MimicObservationMapper params: @@ -11,7 +11,7 @@ mapper: schema: mimiciv_icu table: inputevents source: mimiciv - unit: '' + unit: mg/time name: Norepinephrine_dosage unit: ug/kg/min -upper_limit: 300 +upper_limit: '' diff --git a/concepts/OxygenSaturation_Peripheral.yml b/concepts/OxygenSaturation_Peripheral.yml index 648b01a..c3da6a0 100644 --- a/concepts/OxygenSaturation_Peripheral.yml +++ b/concepts/OxygenSaturation_Peripheral.yml @@ -2,7 +2,7 @@ description: Oxygen Saturation, irrespective of sample site identifiers: loinc: '' snomed: '' -lower_limit: 0 +lower_limit: '0' mapper: - klass: MimicObservationMapper params: @@ -11,7 +11,7 @@ mapper: schema: mimiciv_icu table: chartevents source: mimiciv - unit: '' + unit: '%' name: OxygenSaturation_Peripheral unit: '%' -upper_limit: 300 +upper_limit: '100' diff --git a/concepts/PEEP.yml b/concepts/PEEP.yml index 63a250b..67314e2 100644 --- a/concepts/PEEP.yml +++ b/concepts/PEEP.yml @@ -2,7 +2,7 @@ description: Positive end-expiratory pressure identifiers: loinc: '' snomed: '' -lower_limit: 0 +lower_limit: '0' mapper: - klass: MimicObservationMapper params: @@ -11,7 +11,7 @@ mapper: schema: mimiciv_icu table: chartevents source: mimiciv - unit: '' + unit: cm H2O name: PEEP unit: cm H2O -upper_limit: 300 +upper_limit: '40' diff --git a/concepts/SystolicBloodPressure_Arterial_Invasive.yml b/concepts/SystolicBloodPressure_Arterial_Invasive.yml index 214f8e4..714f507 100644 --- a/concepts/SystolicBloodPressure_Arterial_Invasive.yml +++ b/concepts/SystolicBloodPressure_Arterial_Invasive.yml @@ -2,7 +2,7 @@ description: Systolic arterial pressure of a patient identifiers: loinc: 76215-3 snomed: '251071003' -lower_limit: 0 +lower_limit: '0' mapper: - klass: MimicObservationMapper params: @@ -11,7 +11,7 @@ mapper: schema: mimiciv_icu table: chartevents source: mimiciv - unit: '' + unit: mmHg name: SystolicBloodPressure_Arterial_Invasive unit: mmHg -upper_limit: 300 +upper_limit: '300' diff --git a/concepts/SystolicBloodPressure_Arterial_noninvasive.yml b/concepts/SystolicBloodPressure_Arterial_noninvasive.yml index 18f99a3..87bdcd9 100644 --- a/concepts/SystolicBloodPressure_Arterial_noninvasive.yml +++ b/concepts/SystolicBloodPressure_Arterial_noninvasive.yml @@ -1,8 +1,8 @@ -description: Systolic venous pressure of a patient +description: Systolic arterial pressure of a patient identifiers: loinc: '' snomed: '251070002' -lower_limit: 0 +lower_limit: '0' mapper: - klass: MimicObservationMapper params: @@ -11,7 +11,7 @@ mapper: schema: mimiciv_icu table: chartevents source: mimiciv - unit: '' + unit: mmHg name: SystolicBloodPressure_Arterial_noninvasive unit: mmHg -upper_limit: 300 +upper_limit: '200' diff --git a/concepts/TidalVolume.yml b/concepts/TidalVolume.yml index d5bf181..2583e96 100644 --- a/concepts/TidalVolume.yml +++ b/concepts/TidalVolume.yml @@ -2,7 +2,7 @@ description: Actual tidal volume of a patient identifiers: loinc: '' snomed: '' -lower_limit: 0 +lower_limit: '0' mapper: - klass: MimicObservationMapper params: @@ -11,7 +11,7 @@ mapper: schema: mimiciv_icu table: chartevents source: mimiciv - unit: '' + unit: ml name: TidalVolume unit: ml -upper_limit: 300 +upper_limit: '10000' diff --git a/concepts/UrineVolume.yml b/concepts/UrineVolume.yml index 4940d7b..a834e03 100644 --- a/concepts/UrineVolume.yml +++ b/concepts/UrineVolume.yml @@ -2,7 +2,7 @@ description: Urine Volume measured at a certain point in time identifiers: loinc: '' snomed: '' -lower_limit: 0 +lower_limit: '0' mapper: - klass: MimicObservationMapper params: @@ -11,7 +11,7 @@ mapper: schema: mimiciv_derived table: urineoutput source: mimiciv - unit: '' + unit: ml name: UrineVolume unit: ml -upper_limit: 300 +upper_limit: '10000' diff --git a/concepts/Vancomycine_dosage.yml b/concepts/Vancomycine_dosage.yml index 5dfd50f..b9d9fce 100644 --- a/concepts/Vancomycine_dosage.yml +++ b/concepts/Vancomycine_dosage.yml @@ -2,7 +2,7 @@ description: '' identifiers: loinc: '' snomed: '' -lower_limit: 0 +lower_limit: '' mapper: - klass: MimicObservationMapper params: @@ -11,7 +11,7 @@ mapper: schema: mimiciv_icu table: inputevents source: mimiciv - unit: '' + unit: mg name: Vancomycine_dosage unit: mg -upper_limit: 300 +upper_limit: '' diff --git a/concepts/Vasopressine_dosage.yml b/concepts/Vasopressine_dosage.yml index 786757e..21acf64 100644 --- a/concepts/Vasopressine_dosage.yml +++ b/concepts/Vasopressine_dosage.yml @@ -2,7 +2,7 @@ description: '' identifiers: loinc: '' snomed: '' -lower_limit: 0 +lower_limit: '' mapper: - klass: MimicObservationMapper params: @@ -11,7 +11,7 @@ mapper: schema: mimiciv_icu table: inputevents source: mimiciv - unit: '' + unit: IE/time name: Vasopressine_dosage unit: IE/kg/min -upper_limit: 300 +upper_limit: '' diff --git a/example.yml b/example.yml index 0d9e724..4503621 100644 --- a/example.yml +++ b/example.yml @@ -1,18 +1,18 @@ -name: HeartRate # naming according to our naming convention -description: Heart rate is the speed of the heartbeat measured by the number of contractions of the heart per minute (bpm). # human understandable description of the item -unit: bpm # unit that should be used for this item -upper_limit: 300 # upper limit -lower_limit: 0 # lower limit -identifiers: # collection of identifiers, more can be added - snomed: "364075005" # snomed identifications ID - loinc: "8867-4" # loinc identifications CODE -#schema: FHIRObservation # available export schemas -mapper: # mapping on where and how to find the variable in public databases - - klass: MimicObservationMapper # class that is used for extraction +name: HeartRate +description: Heart rate is the speed of the heartbeat measured by the number of contractions of the heart per minute (bpm). +unit: bpm +upper_limit: 300 +lower_limit: 0 +identifiers: + snomed: "364075005" + loinc: "8867-4" +#schema: FHIRObservation +mapper: + - klass: MimicObservationMapper source: mimic - unit: bpm # unit used in the database + unit: bpm params: schema: mimiciv_icu table: chartevents constraints: - itemid: "220045" + itemid: "220045" \ No newline at end of file diff --git a/main_mapping.csv b/main_mapping.csv index edbb130..6f322c3 100644 --- a/main_mapping.csv +++ b/main_mapping.csv @@ -1,59 +1,58 @@ -Concept Name,Description,ready for conversion,Standard Unit,SCT CONEPT ID,SNOMED FSN,SCHEMA,LOINC ID,LOINC Code,MIMIC Mapper,MIMICIV schema,MIMICIV table,MIMICIV IDs,MIMIC Unit,AMDS table,AMDS IDs,eICU table,eICU column,eICU name -HeartRate,"heart rate of a patient, source agnostic",TRUE,bpm,364075005,364075005 |Heart rate (observable entity)|,FHIRObservation,Heart rate,8867-4,MimicObservationMapper,mimiciv_icu,chartevents,220045,,,,,, -SystolicBloodPressure_Arterial_Invasive,Systolic arterial pressure of a patient,TRUE,mmHg,251071003,251071003 |Invasive systolic arterial pressure (observable entity)|,FHIRObservation,Invasive Systolic blood pressure,76215-3,MimicObservationMapper,mimiciv_icu,chartevents,220050,,,,,, -DiastolicBloodPressue_Arterial_Invasive,Diastolic arterial pressure of a patient,TRUE,mmHg,251073000,251073000 |Invasive diastolic arterial pressure (observable entity)|,FHIRObservation,Invasive Diastolic blood pressure,76213-8,MimicObservationMapper,mimiciv_icu,chartevents,220051,,,,,, -MeanBloodPressue_Arterial_Invasive,Mean arterial pressure of a patient,TRUE,mmHg,251075007,251075007 |Invasive mean arterial pressure (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_icu,chartevents,220052,,,,,, -SystolicBloodPressure_Arterial_noninvasive,Systolic venous pressure of a patient,TRUE,mmHg,251070002,251070002 |Non-invasive systolic arterial pressure (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_icu,chartevents,220179,,,,,, -DiastolicBloodPressue_Arterial_noninvasive,Diastolic venous pressure of a patient,TRUE,mmHg,251074006,251074006 |Non-invasive mean arterial pressure (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_icu,chartevents,220180,,,,,, -MeanBloodPressue_Arterial_Noninvasive,Diastolic venous pressure of a patient,TRUE,mmHg,174255007,174255007 |Non-invasive diastolic arterial pressure (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_icu,chartevents,220181,,,,,, -BodyHeight,Height of a patient's body,TRUE,cm,1153637007,1153637007 |Body height (observable entity)|,FHIRObservation,Body height,8302-2,MimicObservationMapper,mimiciv_icu,chartevents,226730,,,,,, -BodyWeight,Weight of a patien's body,TRUE,kg,27113001,27113001 |Body weight (observable entity)|,FHIRObservation,Body weight,29463-7,MimicObservationMapper,mimiciv_icu,chartevents,224639,,,,,, -UrineVolume,Urine Volume measured at a certain point in time,TRUE,ml,,,FHIRObservation,,,MimicObservationMapper,mimiciv_derived,urineoutput,,,,,,, -UrineVolumePerDay,Urine Volume in 24h,,ml/24h,,395060000 |24 hour urine output (observable entity)|,,,,,,,,,,,,, -BodyTemperature,"Temperature of a patient's body, irrespective of site",TRUE,°C,,386725007 |Body temperature (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_icu,chartevents,223762,,,,,, -OxygenSaturation_Peripheral,"Oxygen Saturation, irrespective of sample site",TRUE,%,,103228002 |Hemoglobin saturation with oxygen (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_icu,chartevents,220227,,,,,, -Gender,Patient's gender,TRUE,,,263495000 |Gender (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_icu,chartevents,226228,,,,,, -Age,Patient's age,TRUE,years,,424144002 |Current chronological age (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_derived,age,,,,,,, -FiO2,Inspired oxygen concentration of a patient,TRUE,1/1,,250774007 |Inspired oxygen concentration (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_icu,chartevents,223835,,,,,, -PEEP,Positive end-expiratory pressure,TRUE,cm H2O,,250854009 |Positive end expiratory pressure (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_icu,chartevents,224700,,,,,, -BreathingRate,Actual breathing rate of patient,TRUE,1/min,,86290005 |Respiratory rate (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_icu,chartevents,224690,,,,,, -TidalVolume,Actual tidal volume of a patient,TRUE,ml,,13621006 |Tidal volume (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_icu,chartevents,224685,,,,,, -AirwayPlateauPressure,Airway Plateau Pressure of a patient,TRUE,mmHg,,698822002 |Airway plateau pressure (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_icu,chartevents,224696,,,,,, -Norepinephrine_dosage,,TRUE,ug/kg/min,,,FHIRMedicationStatement,,,MimicMedicationMapper,mimiciv_icu,inputevents,221906,,,,,, -Adrenaline_dosage,,TRUE,ug/kg/min,,,FHIRMedicationStatement,,,MimicMedicationMapper,mimiciv_icu,inputevents,221289,,,,,, -Vasopressine_dosage,,TRUE,IE/kg/min,,,FHIRMedicationStatement,,,MimicMedicationMapper,mimiciv_icu,inputevents,222315,,,,,, -Dobutamine_dosage,,TRUE,ug/kg/min,,,FHIRMedicationStatement,,,MimicMedicationMapper,mimiciv_icu,inputevents,221653,,,,,, -Vancomycine_dosage,,TRUE,mg,,,FHIRMedicationStatement,,,MimicMedicationMapper,mimiciv_icu,inputevents,225798,,,,,, -NaCl_dosage,,,,,,,,,,,,,,,,,, -Norepinephrine_rate_Medication,,,mg/kg/min,,,,,,,,,,,,,,, -Adrenaline_rate_Medication,,,mg/kg/min,,,,,,,,,,,,,,, -Vasopressine_rate_Medication,,,?,,,,,,,,,,,,,,, -Dobutamine_rate_Medication,,,?,,,,,,,,,,,,,,, -Dextrose_rate_Medication,,,?,,,,,,,,,,,,,,, -NaCl_rate_Medication,,,ml/h,,,,,,,,,,,,,,, -Albumine_rate_Medication,,,?,,,,,,,,,,,,,,, -Vancomycine_level_medication,,,?,,,,,,,,,,,,,,, -LeukozyteCount_absolute_blood,,,Gpt/l,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, -PlateletCount_absolute_blood,,,Gpt/l,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, -CRP_absolute_blood,,,mg/l,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, -Glucose_absolute_blood,,,mmol/l,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, -Magnesium_absolute_blood,,,mmol/l,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, -Calcium_absolute_blood,,,mmol/l,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, -Phosphate_absolute_blood,,,mmol/l,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, -Creatinine_absolute_serum,,TRUE,mg/dl,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,220615,,,,,, -Urea_absolute_blood,,,mol/l,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, -Haemoglobin_absolute_lood,,,mmol/l,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, -Lactate_absolute_arterial,,,mmol/l,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, -pO2_absolute_arterial,,,mmHg,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, -pH_absolute_arterial,,,-/-,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, -Bicarbonate_absolute_arterial,,,mmol/l,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, -Sodium_absolute_blood,,,mmol/l,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, -Potassium_absolute_blood,,,mmol/l,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, -Chloride_absolute_blood,,,mmol/l,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, -Bilirubine_absolute_blood,,,mmol/l,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, -GOT_absolute_blood,,,nmol/(s•L),,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, -GPT_absolute_blood,,,nmol/(s•L),,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, -GGT_absolute_blood,,,nmol/(s•L),,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, -LDH_absolute_serum,,,nmol/(s•L),,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, -INR_relative,,,-/-,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, -Dialysis_therapy,,,yes/no,,,FHIRDeviceUsage,,,MimicDeviceMapper,,,,,,,,, \ No newline at end of file +Concept Name,Description,ready for conversion,Standard Unit,Absolute Upper,Absolute Lower,SCT CONEPT ID,SNOMED FSN,SCHEMA,LOINC ID,LOINC Code,MIMIC Mapper,MIMICIV schema,MIMICIV table,MIMICIV IDs,MIMIC Unit,AMDS table,AMDS IDs,eICU table,eICU column,eICU name +HeartRate,"heart rate of a patient, source agnostic",TRUE,bpm,300,0,364075005,364075005 |Heart rate (observable entity)|,FHIRObservation,Heart rate,8867-4,MimicObservationMapper,mimiciv_icu,chartevents,220045,bpm,,,,, +SystolicBloodPressure_Arterial_Invasive,Systolic arterial pressure of a patient,TRUE,mmHg,300,0,251071003,251071003 |Invasive systolic arterial pressure (observable entity)|,FHIRObservation,Invasive Systolic blood pressure,76215-3,MimicObservationMapper,mimiciv_icu,chartevents,220050,mmHg,,,,, +DiastolicBloodPressue_Arterial_Invasive,Diastolic arterial pressure of a patient,TRUE,mmHg,200,0,251073000,251073000 |Invasive diastolic arterial pressure (observable entity)|,FHIRObservation,Invasive Diastolic blood pressure,76213-8,MimicObservationMapper,mimiciv_icu,chartevents,220051,mmHg,,,,, +MeanBloodPressue_Arterial_Invasive,Mean arterial pressure of a patient,TRUE,mmHg,200,0,251075007,251075007 |Invasive mean arterial pressure (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_icu,chartevents,220052,mmHg,,,,, +SystolicBloodPressure_Arterial_noninvasive,Systolic arterial pressure of a patient,TRUE,mmHg,200,0,251070002,251070002 |Non-invasive systolic arterial pressure (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_icu,chartevents,220179,mmHg,,,,, +DiastolicBloodPressue_Arterial_noninvasive,Diastolic arterial pressure of a patient,TRUE,mmHg,200,0,251074006,251074006 |Non-invasive mean arterial pressure (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_icu,chartevents,220180,mmHg,,,,, +MeanBloodPressue_Arterial_Noninvasive,Diastolic arterial pressure of a patient,TRUE,mmHg,200,0,174255007,174255007 |Non-invasive diastolic arterial pressure (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_icu,chartevents,220181,mmHg,,,,, +BodyHeight,Height of a patient's body,TRUE,cm,300,0,1153637007,1153637007 |Body height (observable entity)|,FHIRObservation,Body height,8302-2,MimicObservationMapper,mimiciv_icu,chartevents,226730,cm,,,,, +BodyWeight,Weight of a patien's body,TRUE,kg,500,0,27113001,27113001 |Body weight (observable entity)|,FHIRObservation,Body weight,29463-7,MimicObservationMapper,mimiciv_icu,chartevents,224639,kg,,,,, +UrineVolume,Urine Volume measured at a certain point in time,TRUE,ml,10000,0,,,FHIRObservation,,,MimicObservationMapper,mimiciv_derived,urineoutput,,ml,,,,, +BodyTemperature,"Temperature of a patient's body, irrespective of site",TRUE,°C,45,20,,386725007 |Body temperature (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_icu,chartevents,223762,°C,,,,, +OxygenSaturation_Peripheral,"Oxygen Saturation, irrespective of sample site",TRUE,%,100,0,,103228002 |Hemoglobin saturation with oxygen (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_icu,chartevents,220227,%,,,,, +Gender,Patient's gender,TRUE,,,,,263495000 |Gender (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_icu,chartevents,226228,,,,,, +Age,Patient's age,TRUE,years,130,0,,424144002 |Current chronological age (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_derived,age,,years,,,,, +FiO2,Inspired oxygen concentration of a patient,TRUE,%,100,0,,250774007 |Inspired oxygen concentration (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_icu,chartevents,223835,%,,,,, +PEEP,Positive end-expiratory pressure,TRUE,cm H2O,40,0,,250854009 |Positive end expiratory pressure (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_icu,chartevents,224700,cm H2O,,,,, +BreathingRate,Actual breathing rate of patient,TRUE,1/min,100,0,,86290005 |Respiratory rate (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_icu,chartevents,224690,1/min,,,,, +TidalVolume,Actual tidal volume of a patient,TRUE,ml,10000,0,,13621006 |Tidal volume (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_icu,chartevents,224685,ml,,,,, +AirwayPlateauPressure,Airway Plateau Pressure of a patient,TRUE,mmHg,100,0,,698822002 |Airway plateau pressure (observable entity)|,FHIRObservation,,,MimicObservationMapper,mimiciv_icu,chartevents,224696,mmHg,,,,, +Norepinephrine_dosage,,TRUE,ug/kg/min,,,,,FHIRMedicationStatement,,,MimicMedicationMapper,mimiciv_icu,inputevents,221906,mg/time,,,,, +Adrenaline_dosage,,TRUE,ug/kg/min,,,,,FHIRMedicationStatement,,,MimicMedicationMapper,mimiciv_icu,inputevents,221289,mg/time,,,,, +Vasopressine_dosage,,TRUE,IE/kg/min,,,,,FHIRMedicationStatement,,,MimicMedicationMapper,mimiciv_icu,inputevents,222315,IE/time,,,,, +Dobutamine_dosage,,TRUE,ug/kg/min,,,,,FHIRMedicationStatement,,,MimicMedicationMapper,mimiciv_icu,inputevents,221653,mg/time,,,,, +Vancomycine_dosage,,TRUE,mg,,,,,FHIRMedicationStatement,,,MimicMedicationMapper,mimiciv_icu,inputevents,225798,mg,,,,, +NaCl_dosage,,,,,,,,,,,,,,,,,,,, +Norepinephrine_rate_Medication,,,mg/kg/min,,,,,,,,,,,,,,,,, +Adrenaline_rate_Medication,,,mg/kg/min,,,,,,,,,,,,,,,,, +Vasopressine_rate_Medication,,,?,,,,,,,,,,,,,,,,, +Dobutamine_rate_Medication,,,?,,,,,,,,,,,,,,,,, +Dextrose_rate_Medication,,,?,,,,,,,,,,,,,,,,, +NaCl_rate_Medication,,,ml/h,,,,,,,,,,,,,,,,, +Albumine_rate_Medication,,,?,,,,,,,,,,,,,,,,, +Vancomycine_level_medication,,,?,,,,,,,,,,,,,,,,, +LeukozyteCount_absolute_blood,,,Gpt/l,1000000,0,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, +PlateletCount_absolute_blood,,,Gpt/l,1000000,0,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, +CRP_absolute_blood,,,mg/l,1000000,0,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, +Glucose_absolute_blood,,,mmol/l,1000000,0,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, +Magnesium_absolute_blood,,,mmol/l,1000000,0,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, +Calcium_absolute_blood,,,mmol/l,1000000,0,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, +Phosphate_absolute_blood,,,mmol/l,1000000,0,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, +Creatinine_absolute_serum,,TRUE,mg/dl,1000000,0,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,220615,,,,,, +Urea_absolute_blood,,,mol/l,1000000,0,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, +Haemoglobin_absolute_lood,,,mmol/l,1000000,0,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, +Lactate_absolute_arterial,,,mmol/l,1000000,0,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, +pO2_absolute_arterial,,,mmHg,1000000,0,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, +pH_absolute_arterial,,,-/-,1000000,0,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, +Bicarbonate_absolute_arterial,,,mmol/l,1000000,0,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, +Sodium_absolute_blood,,,mmol/l,1000000,0,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, +Potassium_absolute_blood,,,mmol/l,1000000,0,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, +Chloride_absolute_blood,,,mmol/l,1000000,0,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, +Bilirubine_absolute_blood,,,mmol/l,1000000,0,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, +GOT_absolute_blood,,,nmol/(s•L),1000000,0,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, +GPT_absolute_blood,,,nmol/(s•L),1000000,0,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, +GGT_absolute_blood,,,nmol/(s•L),1000000,0,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, +LDH_absolute_serum,,,nmol/(s•L),1000000,0,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, +INR_relative,,,-/-,1000000,0,,,FHIRObservation,,,MimicObservationMapper,mimic_hosp,labevents,,,,,,, +Dialysis_therapy,,,yes/no,,,,,FHIRDeviceUsage,,,MimicDeviceMapper,,,,,,,,, diff --git a/mapping_to_yaml.py b/mapping_to_yaml.py index 4a6c0ec..afb3802 100644 --- a/mapping_to_yaml.py +++ b/mapping_to_yaml.py @@ -1,31 +1,35 @@ import csv import yaml import os +from copy import deepcopy - -with open('concepts/HeartRate.yml', 'r') as file: +with open('example.yml', 'r') as file: yaml_template = yaml.safe_load(file) def create_yaml_from_template(data, template, output_dir): - new_yaml = template.copy() + # Use deepcopy to ensure the template is not modified + new_yaml = deepcopy(template) + print(data['Concept Name']) + # Directly update the necessary fields new_yaml['name'] = data['Concept Name'] new_yaml['description'] = data['Description'] new_yaml['unit'] = data['Standard Unit'] + new_yaml['upper_limit'] = data['Absolute Upper'] + new_yaml['lower_limit'] = data['Absolute Lower'] new_yaml['identifiers']['snomed'] = data['SCT CONEPT ID'] new_yaml['identifiers']['loinc'] = data['LOINC Code'] - - # Update mapper information new_yaml['mapper'][0]['source'] = 'mimiciv' new_yaml['mapper'][0]['unit'] = data['MIMIC Unit'] new_yaml['mapper'][0]['params']['schema'] = data['MIMICIV schema'] new_yaml['mapper'][0]['params']['table'] = data['MIMICIV table'] new_yaml['mapper'][0]['params']['constraints']['itemid'] = data['MIMICIV IDs'] - # Write to a new YAML file + # Write the updated YAML to a new file output_file = os.path.join(output_dir, f"{data['Concept Name']}.yml") with open(output_file, 'w') as outfile: - yaml.dump(new_yaml, outfile, default_flow_style=False) + yaml.dump(new_yaml, outfile, allow_unicode=True, + default_flow_style=False) # Read the CSV file and process flagged rows