fhir-path-examples / validation.csv
mertgencturk's picture
Updating validation.csv
de9b923 verified
id,content,fhirpath,topic
train_0,Name of a patient,Patient.name.given,Patient
train_1,Surname of a patient,Patient.name.family,Patient
train_2,An identifier for this patient,Patient.identifier,Patient
train_3,Administrative gender of a patient,Patient.gender,Patient
train_4,Active patient records,Patient.active,Patient
train_5,Patient's date of birth,Patient.birthDate,Patient
train_6,Patients marked as deceased,Patient.deceased.exists() and Patient.deceased != false,Patient
train_7,Unique patient identifier,Patient.id,Patient
train_8,Sex of a patient,Patient.gender,Patient
train_9,Birth date of a patient,Patient.birthDate,Patient
train_10,Whether patient is died or not,Patient.deceasedDateTime.exists() or Patient.deceasedBoolean,Patient
train_11,Patient's date of death,Patient.deceasedDateTime,Patient
train_12,The age patient died,"utl:getPeriod(Patient.birthDate, Patient.deceasedDateTime, 'years')",Patient
train_13,The city patient is living in,Patient.address.where(use='home').first().city,Patient
train_14,Postal code of patient's home address,Patient.address.where(use='home').first().postalCode,Patient
train_15,Patient's home address,Patient.address.where(use = 'home').first(),Patient
train_16,Patient's work address,Patient.address.where(use = 'work').first(),Patient
train_17,Patient's marital status,Patient.maritalStatus.coding.where(system = 'http://hl7.org/fhir/ValueSet/marital-status' and code.exists()).first().code,Patient
train_18,Married patients,Patient.where(maritalStatus.coding.exists(system = 'http://hl7.org/fhir/ValueSet/marital-status' and code = 'M')),Patient
train_19,Whether this patient's record is in active use,Patient.active,Patient
train_20,Time of a measurement,Observation.effectiveDateTime,Observation
train_21,Value of a panel measurement with code system X and code Y,Observation.component.where(code.coding.exists(system='X' and code='Y')).first().valueQuantity.value,Observation
train_22,Value of a panel measurement with code system Z and code T,Observation.component.where(code.coding.exists(system='Z' and code='T')).first().valueQuantity.value,Observation
train_23,time of assessment,Observation.effectiveDateTime,Observation
train_24,SNOMED-CT code indicating the assessment result,Observation.valueCodeableConcept.coding.where(system='http://snomed.info/sct').first().code,Observation
train_25,identifier of the encounter that this assessment is done,Observation.encounter,Observation
train_26,time of measurement,Observation.effectiveDateTime,Observation
train_27,LOINC code for the lab test,Observation.code.coding.where(system='http://loinc.org').first().code,Observation
train_28,numeric lab result,Observation.valueQuantity.value,Observation
train_29,unit for the lab result,Observation.valueQuantity.code,Observation
train_30,interpretation of the lab result,Observation.interpretation.coding.where(system='http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation').code,Observation
train_31,identifier of the encounter that this assessment is done,Observation.encounter.reference,Observation
train_32,identifier of the surgery episode this phase is part of,Observation.extension('http://hl7.org/fhir/StructureDefinition/workflow-episodeOfCare').valueReference,Observation
train_33,SNOMED-CT code indicating the pregnancy status,Observation.valueCodeableConcept.coding.where(system='http://snomed.info/sct').first().code,Observation
train_34,start time for the risk,Observation.effectivePeriod.start,Observation
train_35,end time of the risk if it is no longer valid,Observation.effectivePeriod.end,Observation
train_36,code indicating the type of the risk,Observation.code.coding.where(system='http://snomed.info/sct').first().code,Observation
train_37,whether patient has the risk or not,Observation.valueBoolean,Observation
train_38,if risk is critical or not,Observation.component.where(code.coding.exists(system='http://snomed.info/sct' and code='246112005')).valueBoolean,Observation
train_39,if risk is permanent or not,Observation.component.where(code.coding.exists(system='http://snomed.info/sct' and code='260868000')).valueBoolean,Observation
train_40,certainty of risk,Observation.component.where(code.coding.exists(system='http://snomed.info/sct' and code='246103008')).valueCodeableConcept.coding.code.first(),Observation
train_41,identifier of the encounter that this assessment is done,Observation.encounter.reference,Observation
train_42,SNOMED-CT code indicating the symptom,Observation.code.coding.where(system='http://snomed.info/sct').first().code,Observation
train_43,whether symptom seen,Observation.valueBoolean,Observation
train_44,Time of a complication,AdverseEvent.date,AdverseEvent
train_45,Code of a complication with code system X,AdverseEvent.event.coding.where(system='X').first().code,AdverseEvent
train_46,Unique identifier of an encounter that the complication occurs,AdverseEvent.encounter.reference,AdverseEvent
train_47,Diagnosis or symptom onset date,Condition.onsetDateTime.toDate(),Condition
train_48,Diagnosis or symptom abatement date,Condition.abatementDateTime.toDate(),Condition
train_49,Code of a condition or symptom with code system X,Condition.code.coding.where(system='X').code.first(),Condition
train_50,identifier of the encounter that this diagnosis is done,Condition.encounter.reference,Condition
train_51,code for the condition (ICD-10 or SNOMED-CT),Condition.code.coding.where(system='http://hl7.org/fhir/sid/icd-10' or system='http://snomed.info/sct').code.first(),Condition
train_52,certainty of diagnosis,Condition.verificationStatus.coding.where(system='http://terminology.hl7.org/CodeSystem/condition-ver-status').code.first(),Condition
train_53,whether condition is patient reported,Condition.asserter.reference.startsWith('Patient/'),Condition
train_54,identifier of the encounter that this diagnosis is done,Condition.encounter.reference,Condition
train_55,episode start time,EpisodeOfCare.period.start,EpisodeOfCare
train_56,episode end time (Patient discharge),EpisodeOfCare.period.end,EpisodeOfCare
train_57,unique identifier for the main episode (OperationEpisode),EpisodeOfCare.id,EpisodeOfCare
train_58,pre operative diagnosis for the episode,EpisodeOfCare.diagnosis.where(role.coding.exists(code='pre-op')).select(condition.resolve().code.coding.where(system='http://hl7.org/fhir/sid/icd-10').first().code).distinct(),EpisodeOfCare
train_59,pre operative diagnosis for the episode,EpisodeOfCare.diagnosis.where(role.coding.exists(code='CM')).select(condition.resolve().code.coding.where(system='http://hl7.org/fhir/sid/icd-10').first().code).distinct(),EpisodeOfCare
train_60,encounter start time,Encounter.period.start,Encounter
train_61,encounter end time,Encounter.period.end,Encounter
train_62,encounter type,Encounter.type.coding.where(system='http://snomed.info/sct').code,Encounter
train_63,identifier of this encounter,Encounter.id,Encounter
train_64,unique identifier for the main episode (OperationEpisode) that this ICU stay takes place,Encounter.episodeOfCare,Encounter
train_65,unique id of the ICU or Ward Unit that this operation takes place,Encounter.location.location.identifier.value,Encounter
train_66,duration in hours in ICU or WARD,"utl:getPeriod(Encounter.period.start, Encounter.period.end, 'hours')",Encounter
train_67,unique id of the ICU Unit that this operation takes place,Encounter.location.location.identifier.value,Encounter
train_68,duration in hours in ICU,"utl:getPeriod(Encounter.period.start, Encounter.period.end, 'hours')",Encounter
train_69,time of the procedure,Procedure.performedPeriod.start,Procedure
train_70,code for the performed procedure,Procedure.code.coding.where(system='http://hl7.org/fhir/sid/ex-icd-10-procedures').first().code,Procedure
train_71,category of the operation in terms of Clinical Classifications Software (CCS) for ICD-10-PCS,Procedure.category.coding.where(system='http://hl7.org/fhir/sid/ex-icd-10-procedures-ccs').first().code,Procedure
train_72,identifier of the surgery encounter this phase is part of,Procedure.encounter.reference,Procedure
train_73,identifier of the surgery episode this phase is part of,Procedure.extension('http://hl7.org/fhir/StructureDefinition/workflow-episodeOfCare').valueReference,Procedure
train_74,start time for surgery phase,Procedure.performedPeriod.start,Procedure
train_75,end time for surgery phase,Procedure.performedPeriod.end,Procedure
train_76,whether this is a main surgery or diagnostic procedure (catheterization or EPS),Procedure.encounter.resolve().serviceType.coding.exists(code='394603008' and system='http://snomed.info/sct'),Procedure
train_77,category of the operation in terms of Clinical Classifications Software (CCS) for ICD-10-PCS,Procedure.category.coding.where(system='http://hl7.org/fhir/sid/ex-icd-10-procedures-ccs').first().code,Procedure
train_78,code for the main procedure for the operation,Procedure.code.coding.where(system='http://hl7.org/fhir/sid/ex-icd-10-procedures').first().code,Procedure
train_79,identifier of the surgeons participated to the surgery,Procedure.performer.where(function.code.coding.exists(system='http://snomed.info/sct' and code='304292004')).actor,Procedure
train_80,identifier of nurses who takes in the surgery,Procedure.performer.where(function.code.coding.exists(system='http://snomed.info/sct' and code='224561008')).actor,Procedure
train_81,site of the surgery,Procedure.bodySite.coding.where(system='http://snomed.info/sct').first().code,Procedure
train_82,identifier of the surgery encounter this phase is part of,Procedure.encounter.reference,Procedure
train_83,identifier of the surgery episode this phase is part of,Procedure.extension('http://hl7.org/fhir/StructureDefinition/workflow-episodeOfCare').valueReference,Procedure
train_84,duration of surgical phase in minutes,"utl:getPeriod(Procedure.performedPeriod.start, Procedure.performedPeriod.end,'min').toInteger()",Procedure
train_85,Aristotle Score of the Surgical Procedure,Procedure.extension('https://aiccelerate.eu/fhir/StructureDefinition/aristotle-score').valueDecimal,Procedure
train_86,STAT risk score for congenital heart disease surgeries,Procedure.extension('https://aiccelerate.eu/fhir/StructureDefinition/sts-score').valueInteger,Procedure
train_87,RACHS-1 risk score for congenital heart disease surgeries,Procedure.extension('https://aiccelerate.eu/fhir/StructureDefinition/rachs1-score').valueInteger,Procedure
train_88,whether the patient was extubated in the operating room (true) or not (false). This only applies to surgeries,%includes.where(Procedure.partOf.reference = 'Procedure/' & %context.id).where(code.coding.exists(code='271280005' and system='http://snomed.info/sct')).status.first(),Procedure
train_89,whether the patient needed to be defibrillated during the surgery or not,%includes.where(Procedure.partOf.reference = 'Procedure/' & %context.id).where(code.coding.exists(code='308842001' and system='http://snomed.info/sct')).status.first(),Procedure
train_90,minimum temperature of the patient during surgery,%includes.where(Observation.partOf.reference = 'Procedure/' & %context.id).where(code.coding.exists(code='276885007' and system='http://snomed.info/sct')).select(valueQuantity.value).first(),Procedure
train_91,time of extracorporeal circulation in minutes,"%includes.where(Procedure.partOf.reference = 'Procedure/' & %context.id).where(code.coding.exists(code='182744004' and system='http://snomed.info/sct')).select(utl:getPeriod($this.performedPeriod.start, $this.performedPeriod.end, 'min')).first()",Procedure
train_92,clamp time in minutes within surgery,"%includes.where(Procedure.partOf.reference = 'Procedure/' & %context.id).where(code.coding.exists(code='301881006' and system='http://snomed.info/sct')).select(utl:getPeriod($this.performedPeriod.start, $this.performedPeriod.end, 'min')).first()",Procedure
train_93,circulatory arrest time in minutes within surgery,"%includes.where(Procedure.partOf.reference = 'Procedure/' & %context.id).where(code.coding.exists(code='1197761000' and system='http://snomed.info/sct')).select(utl:getPeriod($this.performedPeriod.start, $this.performedPeriod.end, 'min')).first()",Procedure
train_94,encounter time (Patient enrollment time),Encounter.period.start,Encounter
train_95,encounter end time (Patient out of operation room),Encounter.period.end,Encounter
train_96,SNOMED-CT code for Surgical operation category e.g. 394603008 -> Cardiac Surgery or 41976001 -> Catheterization etc.,Encounter.serviceType.coding.where(system='http://snomed.info/sct').first().code,Encounter
train_97,SNOMED-CT code for surgical priority e.g. 274075007 -> Elective surgery,Encounter.priority.coding.where(system='http://snomed.info/sct').first().code,Encounter
train_98,identifier of this encounter,Encounter.id,Encounter
train_99,unique identifier for the main episode (OperationEpisode) that this surgery takes place,Encounter.episodeOfCare,Encounter
train_100,unique id of the operating room that this operation takes place,Encounter.location.location.identifier.value,Encounter
train_101,duration in minutes between entry and exit to/from the operation room,Encounter.length.value,Encounter
train_102,time patient arrives operation room,procedure.performedPeriod.start,Procedure
train_103,time when anesthesia procedure is completed,Procedure.performedPeriod.end,Procedure
train_104,type of anesthesia applied,Procedure.code.coding.where(system='http://snomed.info/sct').first().code,Procedure
train_105,detailed procedure code for anesthesia,Procedure.code.coding.where(system != 'http://snomed.info/sct').first().code,Procedure
train_106,identifier of the anesthesiologist,Procedure.performer.where(function.coding.exists(system='http://snomed.info/sct' and code='88189002')).actor.reference,Procedure
train_107,identifier of the surgery episode this phase is part of,Procedure.extension('http://hl7.org/fhir/StructureDefinition/workflow-episodeOfCare').valueReference,Procedure
train_108,identifier of the surgery encounter this phase is part of,Procedure.encounter,Procedure
train_109,duration of anesthesia phase in minutes,"utl:getPeriod(Procedure.performedPeriod.start, Procedure.performedPeriod.end,'min').toInteger()",Procedure
train_110,medication start date,MedicationStatement.effectivePeriod.start,MedicationStatement
train_111,medication end date,MedicationStatement.effectivePeriod.end,MedicationStatement
train_112,ATC code for the medication,MedicationStatement.medicationCodeableConcept.coding.where(system='http://www.whocc.no/atc').code,MedicationStatement
train_113,how many times per day the medication is taken,MedicationStatement.dosage.timing.repeat.frequency,MedicationStatement
train_114,dose per usage,MedicationStatement.dosage.doseAndRate.doseQuantity.value,MedicationStatement
train_115,unit of dose,MedicationStatement.dosage.doseAndRate.doseQuantity.unit,MedicationStatement
train_116,time of assessment,MedicationAdministration.effectiveDateTime.nav:orElse(MedicationAdministration.effectivePeriod.start),MedicationAdministration
train_117,ATC or RxNorm code for the medication,MedicationAdministration.medicationCodeableConcept.coding.where(system='http://www.whocc.no/atc').first().code,MedicationAdministration
train_119,dose administered,MedicationAdministration.dosage.dose.value,MedicationAdministration
train_120,unit for the dose (UCUM code),MedicationAdministration.dosage.dose.code,MedicationAdministration
train_121,identifier of the surgery episode that this medication is given,MedicationAdministration.context.reference,MedicationAdministration