Starter FHIR Implementation Guide
1.0.1 - draft
Starter FHIR Implementation Guide, published by Jembi Health Systems. This guide is not an authorized publication; it is the continuous build for version 1.0.1 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/jembi/Starter-FHIR-IG/ and changes regularly. See the Directory of published versions
Draft as of 2024-11-08 |
{
"resourceType" : "StructureMap",
"id" : "FHIRR4PatientToCHTPatient",
"text" : {
"status" : "generated",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: StructureMap FHIRR4PatientToCHTPatient</b></p><a name=\"FHIRR4PatientToCHTPatient\"> </a><a name=\"hcFHIRR4PatientToCHTPatient\"> </a><a name=\"FHIRR4PatientToCHTPatient-en-US\"> </a><pre class=\"fml\">\r\n<b>map</b><span style=\"color: navy\"> "</span>http://jembi.org/fhir/StructureMap/FHIRR4PatientToCHTPatient<span style=\"color: navy\">" = "</span>FHIRR4PatientToCHTPatient<span style=\"color: navy\">"\r\n\r\n</span><b>uses</b><span style=\"color: navy\"> "</span><a href=\"http://hl7.org/fhir/R4/patient.html\" title=\"Patient\">http://hl7.org/fhir/StructureDefinition/Patient</a><span style=\"color: navy\">" </span><b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> "</span><a href=\"StructureDefinition-CHTPatientLogicalModel.html\" title=\"CHT Patient Logical Model\">http://jembi.org/fhir/StructureDefinition/CHTPatientLogicalModel</a><span style=\"color: navy\">" </span><b>as </b><b>target</b>\r\n\r\n<b>group </b>FHIRR4PatientToCHTPatient<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>Patient, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>CHTPatientLogicalModel<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span> src.id<b> as </b><span style=\"color: maroon\">srcID</span><span style=\"color: navy\"><b> -> </b></span>tgt._id = <span style=\"color: maroon\">srcID</span> <i>"SetPatientResourceId"</i><span style=\"color: navy\">;</span>\r\n src.name<b> as </b><span style=\"color: maroon\">srcName</span><b> then</b><span style=\"color: navy\"> {\r\n</span> srcName.text<b> as </b><span style=\"color: maroon\">name</span><span style=\"color: navy\"><b> -> </b></span>tgt.name = <span style=\"color: maroon\">name</span> <i>"SetPatientFullName"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n src.telecom<b> as </b><span style=\"color: maroon\">srcPhone</span><b> then</b><span style=\"color: navy\"> {\r\n</span> srcPhone.value<b> as </b><span style=\"color: maroon\">phone</span><span style=\"color: navy\"><b> -> </b></span>tgt.phone = <span style=\"color: maroon\">phone</span> <i>"SetPatientTelecomValue"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n src.birthDate<b> as </b><span style=\"color: maroon\">dob</span><span style=\"color: navy\"><b> -> </b></span>tgt.date_of_birth = <span style=\"color: maroon\">dob</span> <i>"SetPatientBirthDate"</i><span style=\"color: navy\">;</span>\r\n src.gender<b> as </b><span style=\"color: maroon\">gender</span><span style=\"color: navy\"><b> -> </b></span>tgt.sex = <span style=\"color: maroon\">gender</span> <i>"SetPatientGender"</i><span style=\"color: navy\">;</span>\r\n src.identifier<b> as </b><span style=\"color: maroon\">srcBusinessID</span><b> then</b><span style=\"color: navy\"> {\r\n</span> srcBusinessID.value<b> as </b><span style=\"color: maroon\">businessID</span><span style=\"color: navy\"><b> -> </b></span>tgt.patient_id = <span style=\"color: maroon\">businessID</span> <i>"SetBusinessIDValue"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n src.extension<b> as </b><span style=\"color: maroon\">nationalityExt</span><b> where </b>(url = 'http://hl7.org/fhir/StructureDefinition/patient-nationality')<b> then</b><span style=\"color: navy\"> {\r\n</span> nationalityExt.extension<b> as </b><span style=\"color: maroon\">countryCodeExtension</span><b> where </b>(url = 'code')<b> then</b><span style=\"color: navy\"> {\r\n</span> countryCodeExtension.value<span style=\"color: navy\"> : </span>CodeableConcept<b> as </b><span style=\"color: maroon\">codeableConcept</span><b> then</b><span style=\"color: navy\"> {\r\n</span> codeableConcept.coding<b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {\r\n</span> coding.code<b> as </b><span style=\"color: maroon\">code</span><span style=\"color: navy\"><b> -> </b></span>tgt.nationality = <span style=\"color: maroon\">code</span> <i>"SetCountryCode"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
},
"url" : "http://jembi.org/fhir/StructureMap/FHIRR4PatientToCHTPatient",
"version" : "1.0.1",
"name" : "FHIRR4PatientToCHTPatient",
"status" : "draft",
"date" : "2024-11-08T15:08:21+02:00",
"publisher" : "Jembi Health Systems",
"contact" : [
{
"name" : "Jembi Health Systems",
"telecom" : [
{
"system" : "url",
"value" : "https://www.jembi.org/"
},
{
"system" : "email",
"value" : "info@jembi.org"
}
]
},
{
"name" : "Richard Langford",
"telecom" : [
{
"system" : "email",
"value" : "richard.langford@jembi.org",
"use" : "work"
}
]
}
],
"jurisdiction" : [
{
"coding" : [
{
"system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
"code" : "001",
"display" : "World"
}
]
}
],
"structure" : [
{
"url" : "http://hl7.org/fhir/StructureDefinition/Patient",
"mode" : "source"
},
{
"url" : "http://jembi.org/fhir/StructureDefinition/CHTPatientLogicalModel",
"mode" : "target"
}
],
"group" : [
{
"name" : "FHIRR4PatientToCHTPatient",
"typeMode" : "none",
"input" : [
{
"name" : "src",
"type" : "Patient",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "CHTPatientLogicalModel",
"mode" : "target"
}
],
"rule" : [
{
"name" : "SetPatientResourceId",
"source" : [
{
"context" : "src",
"element" : "id",
"variable" : "srcID"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "_id",
"transform" : "copy",
"parameter" : [
{
"valueId" : "srcID"
}
]
}
]
},
{
"name" : "name",
"source" : [
{
"context" : "src",
"element" : "name",
"variable" : "srcName"
}
],
"rule" : [
{
"name" : "SetPatientFullName",
"source" : [
{
"context" : "srcName",
"element" : "text",
"variable" : "name"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "name",
"transform" : "copy",
"parameter" : [
{
"valueId" : "name"
}
]
}
]
}
]
},
{
"name" : "telecom",
"source" : [
{
"context" : "src",
"element" : "telecom",
"variable" : "srcPhone"
}
],
"rule" : [
{
"name" : "SetPatientTelecomValue",
"source" : [
{
"context" : "srcPhone",
"element" : "value",
"variable" : "phone"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "phone",
"transform" : "copy",
"parameter" : [
{
"valueId" : "phone"
}
]
}
]
}
]
},
{
"name" : "SetPatientBirthDate",
"source" : [
{
"context" : "src",
"element" : "birthDate",
"variable" : "dob"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "date_of_birth",
"transform" : "copy",
"parameter" : [
{
"valueId" : "dob"
}
]
}
]
},
{
"name" : "SetPatientGender",
"source" : [
{
"context" : "src",
"element" : "gender",
"variable" : "gender"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "sex",
"transform" : "copy",
"parameter" : [
{
"valueId" : "gender"
}
]
}
]
},
{
"name" : "identifier",
"source" : [
{
"context" : "src",
"element" : "identifier",
"variable" : "srcBusinessID"
}
],
"rule" : [
{
"name" : "SetBusinessIDValue",
"source" : [
{
"context" : "srcBusinessID",
"element" : "value",
"variable" : "businessID"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "patient_id",
"transform" : "copy",
"parameter" : [
{
"valueId" : "businessID"
}
]
}
]
}
]
},
{
"name" : "extension",
"source" : [
{
"context" : "src",
"element" : "extension",
"variable" : "nationalityExt",
"condition" : "(url = 'http://hl7.org/fhir/StructureDefinition/patient-nationality')"
}
],
"rule" : [
{
"name" : "extension",
"source" : [
{
"context" : "nationalityExt",
"element" : "extension",
"variable" : "countryCodeExtension",
"condition" : "(url = 'code')"
}
],
"rule" : [
{
"name" : "valueCodeableConcept",
"source" : [
{
"context" : "countryCodeExtension",
"type" : "CodeableConcept",
"element" : "value",
"variable" : "codeableConcept"
}
],
"rule" : [
{
"name" : "coding",
"source" : [
{
"context" : "codeableConcept",
"element" : "coding",
"variable" : "coding"
}
],
"rule" : [
{
"name" : "SetCountryCode",
"source" : [
{
"context" : "coding",
"element" : "code",
"variable" : "code"
}
],
"target" : [
{
"context" : "tgt",
"contextType" : "variable",
"element" : "nationality",
"transform" : "copy",
"parameter" : [
{
"valueId" : "code"
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}