/*map "http://jembi.org/fhir/StructureMap/CHTPatientToFHIRR4Patient" = "CHTPatientToFHIRR4Patient" /// status = 'active' uses "http://jembi.org/fhir/StructureDefinition/CHTPatientLogicalModel" as source uses "http://hl7.org/fhir/StructureDefinition/Patient" as target group CHTPatientToFHIRR4Patient(source src : CHTPatientLogicalModel, target tgt : Patient) { src.`_id` as srcID -> tgt.id = srcID "SetPatientResourceId"; src.name as srcName -> tgt.name as pName then { srcName -> pName.text = srcName "SetPatientFullName"; }; src.phone as srcPhoneNumber -> tgt.telecom as pTelecom then { srcPhoneNumber -> pTelecom.system = 'phone' "SetPatientTelecomCodeAsPhone"; srcPhoneNumber -> pTelecom.value = srcPhoneNumber "SetPatientTelecomValue"; }; src.date_of_birth as dob -> tgt.birthDate = dob "SetPatientBirthDate"; src.sex as sex -> tgt.gender = sex "SetPatientGender"; src.patient_id as srcBusinessID -> tgt.identifier as tgtBusinessID then { //srcBusinessID -> tgtBusinessID.system = 'http://some.identifier.namespace' "SetBusinessIDNamespace"; srcBusinessID -> tgtBusinessID.value = srcBusinessID "SetBusinessIDValue"; }; src.nationality as nationality -> tgt.extension = create('Extension') as nationalityExt then { nationality -> nationalityExt.url = 'http://hl7.org/fhir/StructureDefinition/patient-nationality' "SetNationalityUrl"; nationality -> nationalityExt.extension = create('Extension') as countryCodeExtension then { nationality -> countryCodeExtension.url = 'code' "SetCountryCodeUrl"; nationality -> countryCodeExtension.value = create('CodeableConcept') as countryCode then { nationality -> countryCode.coding = create('Coding') as coding then { nationality -> coding.system = 'urn:iso:std:iso:3166' "SetCountryCodeSystem"; nationality -> coding.code = nationality "SetCountryCodeCode"; } "SetCountryCodeCoding"; } "ProcessCountryCodeCodeableConcept"; } "ProcessCountryCode"; }; }*/