diff --git a/input/maps/MetaDataTypesHelper.fml b/input/maps/MetaDataTypesHelper.fml new file mode 100644 index 000000000..384d3c867 --- /dev/null +++ b/input/maps/MetaDataTypesHelper.fml @@ -0,0 +1,9 @@ +/// url = 'http://openhie.org/fhir/zambia-immunizations/StructureMap/MetaDataTypesHelper' +/// name = 'MetaDataTypesHelper' +/// description = 'Structure maps helper.' +/// title = 'Structure Maps Helper' +/// status = 'active' + +group mapCodingtoCodeableConcept (source coding: Coding, target codeableConcept : CodeableConcept) { + coding -> codeableConcept.coding = coding "set coding"; +} \ No newline at end of file diff --git a/input/maps/PropietaryEducationLevelToLOINCEducationLevel.fml b/input/maps/PropietaryEducationLevelToLOINCEducationLevel.fml index 3d4f368c1..21bb71456 100644 --- a/input/maps/PropietaryEducationLevelToLOINCEducationLevel.fml +++ b/input/maps/PropietaryEducationLevelToLOINCEducationLevel.fml @@ -7,6 +7,8 @@ uses "http://openhie.org/fhir/zambia-immunizations/StructureDefinition/patient-educational-level" alias srcObservation as source uses "http://openhie.org/fhir/zambia-immunizations/StructureDefinition/patient-educational-level" alias tgtObservation as target +imports "http://openhie.org/fhir/zambia-immunizations/StructureMap/MetaDataTypesHelper" + group SetPatientEducationalLevel(source obs : srcObservation, target observation : tgtObservation) { /*obs.value -> observation.value = create('CodeableConcept') as value then { obs.value -> value.coding = create('Coding') as coding then { @@ -21,8 +23,9 @@ group SetPatientEducationalLevel(source obs : srcObservation, target observation // coding -> educationLevel.coding = translate(coding, 'http://openhie.org/fhir/zambia-immunizations/ConceptMap/ProprietaryEducationLevelToLOINCEducationLevel', 'code') "SetPatientEducation"; //} "SetEducationalLevelCode"; - obs.value as srcValue -> observation.value as tgtValue, tgtValue.coding as coding then { - srcValue.system as system -> coding.system = system "set vaccine code system"; - srcValue.code as code -> coding.code = code "set vaccine code"; - } "set vaccine"; + /*obs.value first as valueCodeableConcept then { + valueCodeableConcept -> observation.value as educationalLevel then { + valueCodeableConcept -> valueCodeableConcept then mapCodingtoCodeableConcept(valueCodeableConcept) "set code"; + } "set code"; + } "set";*/ } \ No newline at end of file