WHO SMART Guideline: Surveillance and Outbreak Toolkit
0.2.1 - CI Build
WHO SMART Guideline: Surveillance and Outbreak Toolkit, published by WHO. This is not an authorized publication; it is the continuous build for version 0.2.1. This version is based on the current content of https://github.com/WorldHealthOrganization/smart-ot and changes regularly. See the Directory of published versions
| Draft as of 2023-11-07 |
<StructureMap xmlns="http://hl7.org/fhir">
<id value="MeaslesLogicalModelToResources"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml"><pre class="fml">
<b>map</b><span style="color: navy"> "</span>http://worldhealthorganization.github.io/smart-ot/StructureMap/MeaslesLogicalModelToResources<span style="color: navy">" = "</span>MeaslesLogicalModelToResources<span style="color: navy">"
</span><b>uses</b><span style="color: navy"> "</span>http://worldhealthorganization.github.io/smart-ot/StructureDefinition/SOTMeaslesF<span style="color: navy">" </span><b>alias </b>MeaslesLogicalModel <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> "</span><a href="http://hl7.org/fhir/R4/bundle.html" title="Bundle">http://hl7.org/fhir/StructureDefinition/Bundle</a><span style="color: navy">" </span><b>alias </b>MeaslesCIFBundle <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> "</span><a href="StructureDefinition-MeaslesCIFComposition.html" title="Measles Case Investigation Form Composition">http://worldhealthorganization.github.io/smart-ot/StructureDefinition/MeaslesCIFComposition</a><span style="color: navy">" </span><b>alias </b>MeaslesCIFComposition <b>as </b><b>target</b>
<b>imports</b><span style="color: navy"> "</span><a href="StructureMap-MetaDataTypesHelper.html" title="MetaDataTypesHelper">http://worldhealthorganization.github.io/smart-ot/StructureMap/MetaDataTypesHelper</a><span style="color: navy">"
</span>
<b>group </b>MeaslesLogicalModelToResources<span style="color: navy">(</span><b>source</b> <span style="color: maroon">lm</span><span style="color: navy"> : </span>SOTMeasles, <b>target</b> <span style="color: maroon">bundle</span><span style="color: navy"> : </span>Bundle<span style="color: navy">)</span><span style="color: navy"> {
</span> lm<span style="color: navy"><b> -> </b></span>bundle.type = <span style="color: blue">'document'</span> <i>"set bundle type"</i><span style="color: navy">;</span>
<span style="color: #b36b00" title="This element was not defined prior to R5">// lm.ReportingSource as reportingSource then { reportingSource.DateReportedNational as date -> bundle.timestamp = date "set date"; } "set timestamp";</span>
lm<span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">bid</span><span style="color: navy">, </span> bundle.id = <span style="color: maroon">bid</span> <i>"set id"</i><span style="color: navy">;</span>
lm<span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">cid</span><span style="color: navy">, </span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">pid</span><span style="color: navy">, </span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">prid</span><span style="color: navy">, </span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">oid</span><span style="color: navy">, </span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">eid</span><b> then</b><span style="color: navy"> {
</span> lm<span style="color: navy"><b> -> </b></span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Composition'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">composition</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">cid</span><span style="color: navy">)</span><b> then</b><span style="color: navy"> {
</span> lm<span style="color: navy"><b> -> </b></span><span style="color: maroon">lm</span><b> then </b>LmToComposition<span style="color: navy">(</span><span style="color: maroon">lm</span><span style="color: navy">, </span><span style="color: maroon">composition</span><span style="color: navy">, </span><span style="color: maroon">cid</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">, </span><span style="color: maroon">prid</span><span style="color: navy">, </span><span style="color: maroon">oid</span><span style="color: navy">, </span><span style="color: maroon">eid</span><span style="color: navy">)</span> <i>"set"</i><span style="color: navy">;</span>
lm<span style="color: navy"><b> -> </b></span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span><span style="color: navy">, </span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Patient'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">patient</span><b> then</b><span style="color: navy"> {
</span> lm.Demographics<b> as </b><span style="color: maroon">demographics</span><span style="color: navy"><b> -> </b></span><span style="color: maroon">demographics</span><b> then </b>DemographicsToPatient<span style="color: navy">(</span><span style="color: maroon">demographics</span><span style="color: navy">, </span><span style="color: maroon">patient</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"create patient"</i><span style="color: navy">;</span>
lm<span style="color: navy"><b> -> </b></span>entry.resource = <span style="color: maroon">patient</span> <i>"set patient as entry"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"map patient resource"</i><span style="color: navy">;</span>
lm<span style="color: navy"><b> -> </b></span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">prid</span><span style="color: navy">)</span><span style="color: navy">, </span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Practitioner'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">practitioner</span><b> then</b><span style="color: navy"> {
</span> lm.ReportingSource<b> as </b><span style="color: maroon">reportingSource</span><span style="color: navy"><b> -> </b></span><span style="color: maroon">reportingSource</span><b> then </b>ReportingSourceToPractitioner<span style="color: navy">(</span><span style="color: maroon">reportingSource</span><span style="color: navy">, </span><span style="color: maroon">practitioner</span><span style="color: navy">, </span><span style="color: maroon">prid</span><span style="color: navy">)</span> <i>"create practitioner"</i><span style="color: navy">;</span>
lm<span style="color: navy"><b> -> </b></span>entry.resource = <span style="color: maroon">practitioner</span> <i>"set practitioner as entry"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"map practitioner resource"</i><span style="color: navy">;</span>
lm<span style="color: navy"><b> -> </b></span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">oid</span><span style="color: navy">)</span><span style="color: navy">, </span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Organization'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">organization</span><b> then</b><span style="color: navy"> {
</span> lm.ReportingSource<b> as </b><span style="color: maroon">reportingSource</span><span style="color: navy"><b> -> </b></span><span style="color: maroon">reportingSource</span><b> then </b>ReportingSourceToOrganization<span style="color: navy">(</span><span style="color: maroon">reportingSource</span><span style="color: navy">, </span><span style="color: maroon">organization</span><span style="color: navy">, </span><span style="color: maroon">oid</span><span style="color: navy">)</span> <i>"create organization"</i><span style="color: navy">;</span>
lm<span style="color: navy"><b> -> </b></span>entry.resource = <span style="color: maroon">organization</span> <i>"set organization as entry"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"map organization resource"</i><span style="color: navy">;</span>
lm<span style="color: navy"><b> -> </b></span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">eid</span><span style="color: navy">)</span><span style="color: navy">, </span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Encounter'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">encounter</span><b> then</b><span style="color: navy"> {
</span> lm.ReportingSource<b> as </b><span style="color: maroon">reportingSource</span><b> then</b><span style="color: navy"> {
</span> reportingSource.DateOfConsultation<b> as </b><span style="color: maroon">date</span><b> then</b><span style="color: navy"> {
</span> date<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">type</span><span style="color: navy">, </span> type.code = <span style="color: blue">'AMB'</span><span style="color: navy">, </span> type.system = <span style="color: blue">'http://terminology.hl7.org/CodeSystem/v3-ActCode'</span><span style="color: navy">, </span> type.display = <span style="color: blue">'ambulatory'</span><b> then </b>createCompositionEncounterResource<span style="color: navy">(</span><span style="color: maroon">date</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">, </span><span style="color: maroon">type</span><span style="color: navy">, </span><span style="color: maroon">eid</span><span style="color: navy">, </span><span style="color: maroon">encounter</span><span style="color: navy">)</span> <i>"create encounter"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set encounter"</i><span style="color: navy">;</span>
reportingSource.DateOfHomeVisit<b> as </b><span style="color: maroon">date</span><b> then</b><span style="color: navy"> {
</span> date<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">type</span><span style="color: navy">, </span> type.code = <span style="color: blue">'HH'</span><span style="color: navy">, </span> type.system = <span style="color: blue">'http://terminology.hl7.org/CodeSystem/v3-ActCode'</span><span style="color: navy">, </span> type.display = <span style="color: blue">'home health'</span><b> then </b>createCompositionEncounterResource<span style="color: navy">(</span><span style="color: maroon">date</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">, </span><span style="color: maroon">type</span><span style="color: navy">, </span><span style="color: maroon">eid</span><span style="color: navy">, </span><span style="color: maroon">encounter</span><span style="color: navy">)</span> <i>"create encounter"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set encounter"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set encounter"</i><span style="color: navy">;</span>
lm<span style="color: navy"><b> -> </b></span>entry.resource = <span style="color: maroon">encounter</span> <i>"set encounter as entry"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"map encounter resource"</i><span style="color: navy">;</span>
lm<span style="color: navy"><b> -> </b></span><span style="color: maroon">lm</span><b> then </b>mapClinicalToObservations<span style="color: navy">(</span><span style="color: maroon">lm</span><span style="color: navy">, </span><span style="color: maroon">bundle</span><span style="color: navy">, </span><span style="color: maroon">composition</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set clinical data"</i><span style="color: navy">;</span>
lm<span style="color: navy"><b> -> </b></span><span style="color: maroon">lm</span><b> then </b>mapLabsToDiagnosticReport<span style="color: navy">(</span><span style="color: maroon">lm</span><span style="color: navy">, </span><span style="color: maroon">bundle</span><span style="color: navy">, </span><span style="color: maroon">composition</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set labs data"</i><span style="color: navy">;</span>
lm<span style="color: navy"><b> -> </b></span><span style="color: maroon">lm</span><b> then </b>mapVaccinationStatusToImmunization<span style="color: navy">(</span><span style="color: maroon">lm</span><span style="color: navy">, </span><span style="color: maroon">bundle</span><span style="color: navy">, </span><span style="color: maroon">composition</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set immunization data"</i><span style="color: navy">;</span>
lm<span style="color: navy"><b> -> </b></span><span style="color: maroon">lm</span><b> then </b>mapClassificationToConditions<span style="color: navy">(</span><span style="color: maroon">lm</span><span style="color: navy">, </span><span style="color: maroon">bundle</span><span style="color: navy">, </span><span style="color: maroon">composition</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">, </span><span style="color: maroon">eid</span><span style="color: navy">)</span> <i>"set classification"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"map composition resource"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set entries"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>mapClassificationToConditions<span style="color: navy">(</span><b>source</b> <span style="color: maroon">lm</span><span style="color: navy"> : </span>MeaslesLogicalModel, <b>target</b> <span style="color: maroon">bundle</span><span style="color: navy"> : </span>Bundle, <b>target</b> <span style="color: maroon">composition</span><span style="color: navy"> : </span>MeaslesCIFComposition, <b>source</b> <span style="color: maroon">pid</span>, <b>source</b> <span style="color: maroon">eid</span><span style="color: navy">)</span><span style="color: navy"> {
</span> lm<span style="color: navy"><b> -> </b></span> composition.section<b> as </b><span style="color: maroon">section</span><span style="color: navy">, </span> section.title = <span style="color: blue">'Classification'</span><b> then</b><span style="color: navy"> {
</span> lm.Classification<b> as </b><span style="color: maroon">classification</span><span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">id</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">id</span><span style="color: navy">)</span><span style="color: navy">, </span> section.entry<b> as </b><span style="color: maroon">sectionEntry</span><span style="color: navy">, </span> sectionEntry.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Condition/'</span><span style="color: navy">, </span><span style="color: maroon">id</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Condition'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">condition</span><b> then</b><span style="color: navy"> {
</span> classification<span style="color: navy"><b> -> </b></span>condition.id = <span style="color: maroon">id</span> <i>"set id"</i><span style="color: navy">;</span>
classification<span style="color: navy"><b> -> </b></span> condition.verificationStatus<b> as </b><span style="color: maroon">tgtStatus</span><span style="color: navy">, </span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">status</span><span style="color: navy">, </span> status.code = <span style="color: blue">'confirmed'</span><span style="color: navy">, </span> status.system = <span style="color: blue">'http://terminology.hl7.org/CodeSystem/condition-ver-status'</span><span style="color: navy">, </span> status.display = <span style="color: blue">'Confirmed'</span><b> then </b>mapCodingtoCodeableConcept<span style="color: navy">(</span><span style="color: maroon">status</span><span style="color: navy">, </span><span style="color: maroon">tgtStatus</span><span style="color: navy">)</span> <i>"set"</i><span style="color: navy">;</span>
classification<span style="color: navy"><b> -> </b></span> condition.subject<b> as </b><span style="color: maroon">subject</span><span style="color: navy">, </span> subject.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Patient/'</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set subject"</i><span style="color: navy">;</span>
classification.FinalClassification<b> as </b><span style="color: maroon">coding</span><span style="color: navy"><b> -> </b></span>condition.code<b> as </b><span style="color: maroon">code</span><b> then </b>mapCodingtoCodeableConcept<span style="color: navy">(</span><span style="color: maroon">coding</span><span style="color: navy">, </span><span style="color: maroon">code</span><span style="color: navy">)</span> <i>"set code"</i><span style="color: navy">;</span>
classification<span style="color: navy"><b> -> </b></span> condition.encounter<b> as </b><span style="color: maroon">encounter</span><span style="color: navy">, </span> encounter.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Encounter/'</span><span style="color: navy">, </span><span style="color: maroon">eid</span><span style="color: navy">)</span> <i>"set subject"</i><span style="color: navy">;</span>
classification<span style="color: navy"><b> -> </b></span> condition.category<b> as </b><span style="color: maroon">tgt</span><span style="color: navy">, </span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">status</span><span style="color: navy">, </span> status.code = <span style="color: blue">'encounter-diagnosis'</span><span style="color: navy">, </span> status.system = <span style="color: blue">'http://terminology.hl7.org/CodeSystem/condition-category'</span><span style="color: navy">, </span> status.display = <span style="color: blue">'Encounter Diagnosis'</span><b> then </b>mapCodingtoCodeableConcept<span style="color: navy">(</span><span style="color: maroon">status</span><span style="color: navy">, </span><span style="color: maroon">tgt</span><span style="color: navy">)</span> <i>"set"</i><span style="color: navy">;</span>
classification.ClassificationDate<b> as </b><span style="color: maroon">date</span><span style="color: navy"><b> -> </b></span>condition.recordedDate = <span style="color: maroon">date</span> <i>"set"</i><span style="color: navy">;</span>
classification.ClassifiedBy<b> as </b><span style="color: maroon">person</span><span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">rpid</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">rpid</span><span style="color: navy">)</span><span style="color: navy">, </span> section.entry<b> as </b><span style="color: maroon">sectionEntry</span><span style="color: navy">, </span> sectionEntry.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'RelatedPerson/'</span><span style="color: navy">, </span><span style="color: maroon">rpid</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'RelatedPerson'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">recorder</span><b> then</b><span style="color: navy"> {
</span> person<span style="color: navy"><b> -> </b></span>recorder.id = <span style="color: maroon">rpid</span> <i>"set id"</i><span style="color: navy">;</span>
person<span style="color: navy"><b> -> </b></span> recorder.name<b> as </b><span style="color: maroon">targetName</span><span style="color: navy">, </span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'HumanName'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">name</span><span style="color: navy">, </span> name.text = <span style="color: maroon">person</span><b> then </b>humanNameToHumanName<span style="color: navy">(</span><span style="color: maroon">name</span><span style="color: navy">, </span><span style="color: maroon">targetName</span><span style="color: navy">)</span> <i>"set"</i><span style="color: navy">;</span>
person<span style="color: navy"><b> -> </b></span> recorder.patient<b> as </b><span style="color: maroon">patient</span><span style="color: navy">, </span> patient.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Patient/'</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set patient"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set person"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"Set classification"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set section"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>mapContactTracing<span style="color: navy">(</span><b>source</b> <span style="color: maroon">lm</span><span style="color: navy"> : </span>MeaslesLogicalModel, <b>target</b> <span style="color: maroon">bundle</span><span style="color: navy"> : </span>Bundle, <b>target</b> <span style="color: maroon">composition</span><span style="color: navy"> : </span>MeaslesCIFComposition, <b>source</b> <span style="color: maroon">pid</span><span style="color: navy">)</span><span style="color: navy"> {
</span> lm<span style="color: navy"><b> -> </b></span> composition.section<b> as </b><span style="color: maroon">section</span><span style="color: navy">, </span> section.title = <span style="color: blue">'Contact Tracing'</span> <i>"set"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>mapClinicalToObservations<span style="color: navy">(</span><b>source</b> <span style="color: maroon">lm</span><span style="color: navy"> : </span>SOTMeasles, <b>target</b> <span style="color: maroon">bundle</span><span style="color: navy"> : </span>Bundle, <b>target</b> <span style="color: maroon">composition</span><span style="color: navy"> : </span>Composition, <b>source</b> <span style="color: maroon">pid</span><span style="color: navy">)</span><span style="color: navy"> {
</span> lm<span style="color: navy"><b> -> </b></span> composition.section<b> as </b><span style="color: maroon">section</span><span style="color: navy">, </span> section.title = <span style="color: blue">'Clinical Data, Follow up and Treatment'</span><b> then</b><span style="color: navy"> {
</span> lm.Clinical<b> as </b><span style="color: maroon">clinical</span><span style="color: navy"><b> -> </b></span><span style="color: maroon">clinical</span><b> then</b><span style="color: navy"> {
</span> clinical.Fever<b> as </b><span style="color: maroon">fever</span><span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">obsid</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> section.entry<b> as </b><span style="color: maroon">sectionEntry</span><span style="color: navy">, </span> sectionEntry.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Observation/'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Observation'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">observation</span><b> then</b><span style="color: navy"> {
</span> fever<span style="color: navy"><b> -> </b></span>observation.id = <span style="color: maroon">obsid</span> <i>"set obsid"</i><span style="color: navy">;</span>
fever<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">coding</span><span style="color: navy">, </span> coding.code = <span style="color: blue">'DE66'</span><span style="color: navy">, </span> coding.system = <span style="color: blue">'http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF'</span><span style="color: navy">, </span> coding.display = <span style="color: blue">'Fever'</span><b> then</b><span style="color: navy"> {
</span> fever<span style="color: navy"><b> -> </b></span><span style="color: maroon">fever</span><b> then </b>createObservationResource<span style="color: navy">(</span><span style="color: maroon">fever</span><span style="color: navy">, </span><span style="color: maroon">coding</span><span style="color: navy">, </span><span style="color: maroon">observation</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set obs"</i><span style="color: navy">;</span>
clinical.FeverOnsetDate<b> as </b><span style="color: maroon">onsetDate</span><span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Period'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">period</span><span style="color: navy">, </span> period.start = <span style="color: maroon">onsetDate</span><span style="color: navy">, </span> observation.effective = <span style="color: maroon">period</span> <i>"set start date"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set fever"</i><span style="color: navy">;</span>
clinical.Temperature<b> as </b><span style="color: maroon">temperature</span><span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">obsid</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> section.entry<b> as </b><span style="color: maroon">sectionEntry</span><span style="color: navy">, </span> sectionEntry.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Observation/'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Observation'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">observation</span><b> then</b><span style="color: navy"> {
</span> temperature<span style="color: navy"><b> -> </b></span>observation.id = <span style="color: maroon">obsid</span> <i>"set obsid"</i><span style="color: navy">;</span>
temperature<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">coding</span><span style="color: navy">, </span> coding.code = <span style="color: blue">'DE70'</span><span style="color: navy">, </span> coding.system = <span style="color: blue">'http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF'</span><span style="color: navy">, </span> coding.display = <span style="color: blue">'Temperature'</span><b> then</b><span style="color: navy"> {
</span> temperature<span style="color: navy"><b> -> </b></span><span style="color: maroon">temperature</span><b> then </b>createObservationResource<span style="color: navy">(</span><span style="color: maroon">temperature</span><span style="color: navy">, </span><span style="color: maroon">coding</span><span style="color: navy">, </span><span style="color: maroon">observation</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set Temperature"</i><span style="color: navy">;</span>
clinical.Rash<b> as </b><span style="color: maroon">rash</span><b> where </b>code != 'Yes'<span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">obsid</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> section.entry<b> as </b><span style="color: maroon">sectionEntry</span><span style="color: navy">, </span> sectionEntry.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Observation/'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Observation'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">observation</span><b> then</b><span style="color: navy"> {
</span> rash<span style="color: navy"><b> -> </b></span>observation.id = <span style="color: maroon">obsid</span> <i>"set obsid"</i><span style="color: navy">;</span>
rash<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">coding</span><span style="color: navy">, </span> coding.code = <span style="color: blue">'DE72'</span><span style="color: navy">, </span> coding.system = <span style="color: blue">'http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF'</span><span style="color: navy">, </span> coding.display = <span style="color: blue">'Rash'</span><b> then</b><span style="color: navy"> {
</span> rash<span style="color: navy"><b> -> </b></span><span style="color: maroon">rash</span><b> then </b>createObservationResource<span style="color: navy">(</span><span style="color: maroon">rash</span><span style="color: navy">, </span><span style="color: maroon">coding</span><span style="color: navy">, </span><span style="color: maroon">observation</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set Rash"</i><span style="color: navy">;</span>
clinical.TypeOfRash<b> as </b><span style="color: maroon">haemorrhagic</span><b> where </b>code = 'Haemorrhagic'<span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">obsid</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> section.entry<b> as </b><span style="color: maroon">sectionEntry</span><span style="color: navy">, </span> sectionEntry.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Observation/'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Observation'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">observation</span><b> then</b><span style="color: navy"> {
</span> haemorrhagic<span style="color: navy"><b> -> </b></span>observation.id = <span style="color: maroon">obsid</span> <i>"set obsid"</i><span style="color: navy">;</span>
haemorrhagic<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">coding</span><span style="color: navy">, </span> coding.code = <span style="color: blue">'Haemorrhagic'</span><span style="color: navy">, </span> coding.system = <span style="color: blue">'http://worldhealthorganization.github.io/smart-ot/RashType'</span><span style="color: navy">, </span> coding.display = <span style="color: blue">'Haemorrhagic'</span><b> then</b><span style="color: navy"> {
</span> haemorrhagic<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">ValueCoding</span><span style="color: navy">, </span> ValueCoding.code = <span style="color: blue">'Yes'</span><span style="color: navy">, </span> ValueCoding.system = <span style="color: blue">'http://ritikarawlani.github.io/smart-outbreak-measles/YesNoUnknown'</span><span style="color: navy">, </span> ValueCoding.display = <span style="color: blue">'Yes'</span><b> then</b><span style="color: navy"> {
</span> haemorrhagic<span style="color: navy"><b> -> </b></span><span style="color: maroon">haemorrhagic</span><b> then </b>createObservationResource<span style="color: navy">(</span><span style="color: maroon">ValueCoding</span><span style="color: navy">, </span><span style="color: maroon">coding</span><span style="color: navy">, </span><span style="color: maroon">observation</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set value"</i><span style="color: navy">;</span>
clinical.RashOnsetDate<b> as </b><span style="color: maroon">onsetDate</span><span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Period'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">period</span><span style="color: navy">, </span> period.start = <span style="color: maroon">onsetDate</span><span style="color: navy">, </span> observation.effective = <span style="color: maroon">period</span> <i>"set start date"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set haemorrhagic"</i><span style="color: navy">;</span>
clinical.TypeOfRash<b> as </b><span style="color: maroon">erythematous</span><b> where </b>code = 'Erythematous'<span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">obsid</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> section.entry<b> as </b><span style="color: maroon">sectionEntry</span><span style="color: navy">, </span> sectionEntry.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Observation/'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Observation'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">observation</span><b> then</b><span style="color: navy"> {
</span> erythematous<span style="color: navy"><b> -> </b></span>observation.id = <span style="color: maroon">obsid</span> <i>"set obsid"</i><span style="color: navy">;</span>
erythematous<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">coding</span><span style="color: navy">, </span> coding.code = <span style="color: blue">'Erythematous'</span><span style="color: navy">, </span> coding.system = <span style="color: blue">'http://worldhealthorganization.github.io/smart-ot/RashType'</span><span style="color: navy">, </span> coding.display = <span style="color: blue">'Erythematous'</span><b> then</b><span style="color: navy"> {
</span> erythematous<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">ValueCoding</span><span style="color: navy">, </span> ValueCoding.code = <span style="color: blue">'Yes'</span><span style="color: navy">, </span> ValueCoding.system = <span style="color: blue">'http://ritikarawlani.github.io/smart-outbreak-measles/YesNoUnknown'</span><span style="color: navy">, </span> ValueCoding.display = <span style="color: blue">'Yes'</span><b> then</b><span style="color: navy"> {
</span> erythematous<span style="color: navy"><b> -> </b></span><span style="color: maroon">erythematous</span><b> then </b>createObservationResource<span style="color: navy">(</span><span style="color: maroon">ValueCoding</span><span style="color: navy">, </span><span style="color: maroon">coding</span><span style="color: navy">, </span><span style="color: maroon">observation</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set value"</i><span style="color: navy">;</span>
clinical.RashOnsetDate<b> as </b><span style="color: maroon">onsetDate</span><span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Period'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">period</span><span style="color: navy">, </span> period.start = <span style="color: maroon">onsetDate</span><span style="color: navy">, </span> observation.effective = <span style="color: maroon">period</span> <i>"set start date"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set erythematous"</i><span style="color: navy">;</span>
clinical.TypeOfRash<b> as </b><span style="color: maroon">vesicularPustular</span><b> where </b>code = 'VesicularPustular'<span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">obsid</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> section.entry<b> as </b><span style="color: maroon">sectionEntry</span><span style="color: navy">, </span> sectionEntry.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Observation/'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Observation'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">observation</span><b> then</b><span style="color: navy"> {
</span> vesicularPustular<span style="color: navy"><b> -> </b></span>observation.id = <span style="color: maroon">obsid</span> <i>"set obsid"</i><span style="color: navy">;</span>
vesicularPustular<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">coding</span><span style="color: navy">, </span> coding.code = <span style="color: blue">'Vesicular-pustular'</span><span style="color: navy">, </span> coding.system = <span style="color: blue">'http://worldhealthorganization.github.io/smart-ot/RashType'</span><span style="color: navy">, </span> coding.display = <span style="color: blue">'Vesicular Pustular'</span><b> then</b><span style="color: navy"> {
</span> vesicularPustular<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">ValueCoding</span><span style="color: navy">, </span> ValueCoding.code = <span style="color: blue">'Yes'</span><span style="color: navy">, </span> ValueCoding.system = <span style="color: blue">'http://ritikarawlani.github.io/smart-outbreak-measles/YesNoUnknown'</span><span style="color: navy">, </span> ValueCoding.display = <span style="color: blue">'Yes'</span><b> then</b><span style="color: navy"> {
</span> vesicularPustular<span style="color: navy"><b> -> </b></span><span style="color: maroon">vesicularPustular</span><b> then </b>createObservationResource<span style="color: navy">(</span><span style="color: maroon">ValueCoding</span><span style="color: navy">, </span><span style="color: maroon">coding</span><span style="color: navy">, </span><span style="color: maroon">observation</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set value"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set obs"</i><span style="color: navy">;</span>
clinical.RashOnsetDate<b> as </b><span style="color: maroon">onsetDate</span><span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Period'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">period</span><span style="color: navy">, </span> period.start = <span style="color: maroon">onsetDate</span><span style="color: navy">, </span> observation.effective = <span style="color: maroon">period</span> <i>"set start date"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set vesicularPustular"</i><span style="color: navy">;</span>
clinical.TypeOfRash<b> as </b><span style="color: maroon">petechialPurpuric</span><b> where </b>code = 'PetechialPurpuric'<span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">obsid</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> section.entry<b> as </b><span style="color: maroon">sectionEntry</span><span style="color: navy">, </span> sectionEntry.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Observation/'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Observation'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">observation</span><b> then</b><span style="color: navy"> {
</span> petechialPurpuric<span style="color: navy"><b> -> </b></span>observation.id = <span style="color: maroon">obsid</span> <i>"set obsid"</i><span style="color: navy">;</span>
petechialPurpuric<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">coding</span><span style="color: navy">, </span> coding.code = <span style="color: blue">'Petechial-purpuric'</span><span style="color: navy">, </span> coding.system = <span style="color: blue">'http://worldhealthorganization.github.io/smart-ot/RashType'</span><span style="color: navy">, </span> coding.display = <span style="color: blue">'Petechial Purpuric'</span><b> then</b><span style="color: navy"> {
</span> petechialPurpuric<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">ValueCoding</span><span style="color: navy">, </span> ValueCoding.code = <span style="color: blue">'Yes'</span><span style="color: navy">, </span> ValueCoding.system = <span style="color: blue">'http://ritikarawlani.github.io/smart-outbreak-measles/YesNoUnknown'</span><span style="color: navy">, </span> ValueCoding.display = <span style="color: blue">'Yes'</span><b> then</b><span style="color: navy"> {
</span> petechialPurpuric<span style="color: navy"><b> -> </b></span><span style="color: maroon">petechialPurpuric</span><b> then </b>createObservationResource<span style="color: navy">(</span><span style="color: maroon">petechialPurpuric</span><span style="color: navy">, </span><span style="color: maroon">coding</span><span style="color: navy">, </span><span style="color: maroon">observation</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set value"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set obs"</i><span style="color: navy">;</span>
clinical.RashOnsetDate<b> as </b><span style="color: maroon">onsetDate</span><span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Period'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">period</span><span style="color: navy">, </span> period.start = <span style="color: maroon">onsetDate</span><span style="color: navy">, </span> observation.effective = <span style="color: maroon">period</span> <i>"set start date"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set petechialPurpuric"</i><span style="color: navy">;</span>
clinical.TypeOfRash<b> as </b><span style="color: maroon">other</span><b> where </b>code = 'Other'<span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">obsid</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> section.entry<b> as </b><span style="color: maroon">sectionEntry</span><span style="color: navy">, </span> sectionEntry.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Observation/'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Observation'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">observation</span><b> then</b><span style="color: navy"> {
</span> other<span style="color: navy"><b> -> </b></span>observation.id = <span style="color: maroon">obsid</span> <i>"set obsid"</i><span style="color: navy">;</span>
other<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">coding</span><span style="color: navy">, </span> coding.code = <span style="color: blue">'Other'</span><span style="color: navy">, </span> coding.system = <span style="color: blue">'http://worldhealthorganization.github.io/smart-ot/RashType'</span><span style="color: navy">, </span> coding.display = <span style="color: blue">'Rash'</span><b> then</b><span style="color: navy"> {
</span> other<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">ValueCoding</span><span style="color: navy">, </span> ValueCoding.code = <span style="color: blue">'Yes'</span><span style="color: navy">, </span> ValueCoding.system = <span style="color: blue">'http://ritikarawlani.github.io/smart-outbreak-measles/YesNoUnknown'</span><span style="color: navy">, </span> ValueCoding.display = <span style="color: blue">'Yes'</span><b> then</b><span style="color: navy"> {
</span> other<span style="color: navy"><b> -> </b></span><span style="color: maroon">other</span><b> then </b>createObservationResource<span style="color: navy">(</span><span style="color: maroon">ValueCoding</span><span style="color: navy">, </span><span style="color: maroon">coding</span><span style="color: navy">, </span><span style="color: maroon">observation</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set value"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set other"</i><span style="color: navy">;</span>
clinical.Cough<b> as </b><span style="color: maroon">cough</span><span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">obsid</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> section.entry<b> as </b><span style="color: maroon">sectionEntry</span><span style="color: navy">, </span> sectionEntry.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Observation/'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Observation'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">observation</span><b> then</b><span style="color: navy"> {
</span> cough<span style="color: navy"><b> -> </b></span>observation.id = <span style="color: maroon">obsid</span> <i>"set obsid"</i><span style="color: navy">;</span>
cough<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">coding</span><span style="color: navy">, </span> coding.code = <span style="color: blue">'DE84'</span><span style="color: navy">, </span> coding.system = <span style="color: blue">'http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF'</span><span style="color: navy">, </span> coding.display = <span style="color: blue">'Cough'</span><b> then</b><span style="color: navy"> {
</span> cough<span style="color: navy"><b> -> </b></span><span style="color: maroon">cough</span><b> then </b>createObservationResource<span style="color: navy">(</span><span style="color: maroon">cough</span><span style="color: navy">, </span><span style="color: maroon">coding</span><span style="color: navy">, </span><span style="color: maroon">observation</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set cough"</i><span style="color: navy">;</span>
clinical.Conjunctivitis<b> as </b><span style="color: maroon">conjunctivitis</span><span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">obsid</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> section.entry<b> as </b><span style="color: maroon">sectionEntry</span><span style="color: navy">, </span> sectionEntry.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Observation/'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Observation'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">observation</span><b> then</b><span style="color: navy"> {
</span> conjunctivitis<span style="color: navy"><b> -> </b></span>observation.id = <span style="color: maroon">obsid</span> <i>"set obsid"</i><span style="color: navy">;</span>
conjunctivitis<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">coding</span><span style="color: navy">, </span> coding.code = <span style="color: blue">'DE88'</span><span style="color: navy">, </span> coding.system = <span style="color: blue">'http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF'</span><span style="color: navy">, </span> coding.display = <span style="color: blue">'Conjunctivitis'</span><b> then</b><span style="color: navy"> {
</span> conjunctivitis<span style="color: navy"><b> -> </b></span><span style="color: maroon">conjunctivitis</span><b> then </b>createObservationResource<span style="color: navy">(</span><span style="color: maroon">conjunctivitis</span><span style="color: navy">, </span><span style="color: maroon">coding</span><span style="color: navy">, </span><span style="color: maroon">observation</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set conjunctivitis"</i><span style="color: navy">;</span>
clinical.Coryza<b> as </b><span style="color: maroon">coryza</span><span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">obsid</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> section.entry<b> as </b><span style="color: maroon">sectionEntry</span><span style="color: navy">, </span> sectionEntry.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Observation/'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Observation'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">observation</span><b> then</b><span style="color: navy"> {
</span> coryza<span style="color: navy"><b> -> </b></span>observation.id = <span style="color: maroon">obsid</span> <i>"set obsid"</i><span style="color: navy">;</span>
coryza<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">coding</span><span style="color: navy">, </span> coding.code = <span style="color: blue">'DE92'</span><span style="color: navy">, </span> coding.system = <span style="color: blue">'http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF'</span><span style="color: navy">, </span> coding.display = <span style="color: blue">'Coryza'</span><b> then</b><span style="color: navy"> {
</span> coryza<span style="color: navy"><b> -> </b></span><span style="color: maroon">coryza</span><b> then </b>createObservationResource<span style="color: navy">(</span><span style="color: maroon">coryza</span><span style="color: navy">, </span><span style="color: maroon">coding</span><span style="color: navy">, </span><span style="color: maroon">observation</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set coryza"</i><span style="color: navy">;</span>
clinical.KoplikSpots<b> as </b><span style="color: maroon">koplikSpots</span><span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">obsid</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> section.entry<b> as </b><span style="color: maroon">sectionEntry</span><span style="color: navy">, </span> sectionEntry.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Observation/'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Observation'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">observation</span><b> then</b><span style="color: navy"> {
</span> koplikSpots<span style="color: navy"><b> -> </b></span>observation.id = <span style="color: maroon">obsid</span> <i>"set obsid"</i><span style="color: navy">;</span>
koplikSpots<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">coding</span><span style="color: navy">, </span> coding.code = <span style="color: blue">'DE96'</span><span style="color: navy">, </span> coding.system = <span style="color: blue">'http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF'</span><span style="color: navy">, </span> coding.display = <span style="color: blue">'Koplik Spots'</span><b> then</b><span style="color: navy"> {
</span> koplikSpots<span style="color: navy"><b> -> </b></span><span style="color: maroon">koplikSpots</span><b> then </b>createObservationResource<span style="color: navy">(</span><span style="color: maroon">koplikSpots</span><span style="color: navy">, </span><span style="color: maroon">coding</span><span style="color: navy">, </span><span style="color: maroon">observation</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set koplikSpots"</i><span style="color: navy">;</span>
clinical.Lymphadenopathy<b> as </b><span style="color: maroon">lymphadenopathy</span><span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">obsid</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> section.entry<b> as </b><span style="color: maroon">sectionEntry</span><span style="color: navy">, </span> sectionEntry.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Observation/'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Observation'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">observation</span><b> then</b><span style="color: navy"> {
</span> lymphadenopathy<span style="color: navy"><b> -> </b></span>observation.id = <span style="color: maroon">obsid</span> <i>"set obsid"</i><span style="color: navy">;</span>
lymphadenopathy<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">coding</span><span style="color: navy">, </span> coding.code = <span style="color: blue">'DE100'</span><span style="color: navy">, </span> coding.system = <span style="color: blue">'http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF'</span><span style="color: navy">, </span> coding.display = <span style="color: blue">'Lymphadenopathy'</span><b> then</b><span style="color: navy"> {
</span> lymphadenopathy<span style="color: navy"><b> -> </b></span><span style="color: maroon">lymphadenopathy</span><b> then </b>createObservationResource<span style="color: navy">(</span><span style="color: maroon">lymphadenopathy</span><span style="color: navy">, </span><span style="color: maroon">coding</span><span style="color: navy">, </span><span style="color: maroon">observation</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set lymphadenopathy"</i><span style="color: navy">;</span>
clinical.JointPain<b> as </b><span style="color: maroon">jointPain</span><span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">obsid</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> section.entry<b> as </b><span style="color: maroon">sectionEntry</span><span style="color: navy">, </span> sectionEntry.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Observation/'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Observation'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">observation</span><b> then</b><span style="color: navy"> {
</span> jointPain<span style="color: navy"><b> -> </b></span>observation.id = <span style="color: maroon">obsid</span> <i>"set obsid"</i><span style="color: navy">;</span>
jointPain<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">coding</span><span style="color: navy">, </span> coding.code = <span style="color: blue">'DE104'</span><span style="color: navy">, </span> coding.system = <span style="color: blue">'http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF'</span><span style="color: navy">, </span> coding.display = <span style="color: blue">'Joint Pain'</span><b> then</b><span style="color: navy"> {
</span> jointPain<span style="color: navy"><b> -> </b></span><span style="color: maroon">jointPain</span><b> then </b>createObservationResource<span style="color: navy">(</span><span style="color: maroon">jointPain</span><span style="color: navy">, </span><span style="color: maroon">coding</span><span style="color: navy">, </span><span style="color: maroon">observation</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set jointPain"</i><span style="color: navy">;</span>
clinical.PregnancyStatus<b> as </b><span style="color: maroon">pregnancy</span><span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">obsid</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> section.entry<b> as </b><span style="color: maroon">sectionEntry</span><span style="color: navy">, </span> sectionEntry.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Observation/'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Observation'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">observation</span><b> then</b><span style="color: navy"> {
</span> pregnancy<span style="color: navy"><b> -> </b></span>observation.id = <span style="color: maroon">obsid</span> <i>"set obsid"</i><span style="color: navy">;</span>
pregnancy<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">coding</span><span style="color: navy">, </span> coding.code = <span style="color: blue">'DE108'</span><span style="color: navy">, </span> coding.system = <span style="color: blue">'http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF'</span><span style="color: navy">, </span> coding.display = <span style="color: blue">'Pregnancy'</span><b> then</b><span style="color: navy"> {
</span> pregnancy<span style="color: navy"><b> -> </b></span><span style="color: maroon">pregnancy</span><b> then </b>createObservationResource<span style="color: navy">(</span><span style="color: maroon">pregnancy</span><span style="color: navy">, </span><span style="color: maroon">coding</span><span style="color: navy">, </span><span style="color: maroon">observation</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set pregnancy"</i><span style="color: navy">;</span>
clinical.PregnancyStatus<b> as </b><span style="color: maroon">pregnancy</span><b> where </b>code = 'Yes'<span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">obsid</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> section.entry<b> as </b><span style="color: maroon">sectionEntry</span><span style="color: navy">, </span> sectionEntry.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Observation/'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Observation'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">observation</span><b> then</b><span style="color: navy"> {
</span> pregnancy<span style="color: navy"><b> -> </b></span>observation.id = <span style="color: maroon">obsid</span> <i>"set obsid"</i><span style="color: navy">;</span>
clinical.GestationWeeks<b> as </b><span style="color: maroon">weeks</span><span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">coding</span><span style="color: navy">, </span> coding.code = <span style="color: blue">'DE112'</span><span style="color: navy">, </span> coding.system = <span style="color: blue">'http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF'</span><span style="color: navy">, </span> coding.display = <span style="color: blue">'Weeks Pregnant'</span><b> then</b><span style="color: navy"> {
</span> weeks<span style="color: navy"><b> -> </b></span><span style="color: maroon">weeks</span><b> then </b>createObservationResource<span style="color: navy">(</span><span style="color: maroon">weeks</span><span style="color: navy">, </span><span style="color: maroon">coding</span><span style="color: navy">, </span><span style="color: maroon">observation</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set pregnancy weeks"</i><span style="color: navy">;</span>
clinical.Outcome<b> as </b><span style="color: maroon">outcome</span><span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">obsid</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> section.entry<b> as </b><span style="color: maroon">sectionEntry</span><span style="color: navy">, </span> sectionEntry.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Observation/'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Observation'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">observation</span><b> then</b><span style="color: navy"> {
</span> outcome<span style="color: navy"><b> -> </b></span>observation.id = <span style="color: maroon">obsid</span> <i>"set obsid"</i><span style="color: navy">;</span>
outcome<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">coding</span><span style="color: navy">, </span> coding.code = <span style="color: blue">'DE121'</span><span style="color: navy">, </span> coding.system = <span style="color: blue">'http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF'</span><span style="color: navy">, </span> coding.display = <span style="color: blue">'Outcome'</span><b> then</b><span style="color: navy"> {
</span> outcome<span style="color: navy"><b> -> </b></span><span style="color: maroon">outcome</span><b> then </b>createObservationResource<span style="color: navy">(</span><span style="color: maroon">outcome</span><span style="color: navy">, </span><span style="color: maroon">coding</span><span style="color: navy">, </span><span style="color: maroon">observation</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set obs"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set obs"</i><span style="color: navy">;</span>
clinical.DateOfDeath<b> as </b><span style="color: maroon">onsetDate</span><span style="color: navy"><b> -> </b></span>observation.effective = <span style="color: maroon">onsetDate</span> <i>"set start date"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set outcome"</i><span style="color: navy">;</span>
clinical<span style="color: navy"><b> -> </b></span><span style="color: maroon">clinical</span><b> then </b>mapEncounters<span style="color: navy">(</span><span style="color: maroon">clinical</span><span style="color: navy">, </span><span style="color: maroon">bundle</span><span style="color: navy">, </span><span style="color: maroon">section</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set encounter"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set clinical"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set section"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>createObservationResource<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span>, <b>source</b> <span style="color: maroon">coding</span><span style="color: navy"> : </span>Coding, <b>target</b> <span style="color: maroon">observation</span><span style="color: navy"> : </span>Observation, <b>source</b> <span style="color: maroon">pid</span><span style="color: navy">)</span><span style="color: navy"> {
</span> src<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'CodeableConcept'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">code</span><span style="color: navy">, </span> code.coding = <span style="color: maroon">coding</span><span style="color: navy">, </span> observation.code = <span style="color: maroon">code</span> <i>"set code"</i><span style="color: navy">;</span>
src<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'CodeableConcept'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">value</span><span style="color: navy">, </span> value.coding = <span style="color: maroon">src</span><span style="color: navy">, </span> observation.value = <span style="color: maroon">value</span> <i>"set value"</i><span style="color: navy">;</span>
src<span style="color: navy"><b> -> </b></span>observation.status = <span style="color: blue">'registered'</span> <i>"set status"</i><span style="color: navy">;</span>
src<span style="color: navy"><b> -> </b></span>observation.subject<b> as </b><span style="color: maroon">subject</span><b> then</b><span style="color: navy"> {
</span> src<span style="color: navy"><b> -> </b></span>subject.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Patient/'</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set subject"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set subject"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>mapLabsToDiagnosticReport<span style="color: navy">(</span><b>source</b> <span style="color: maroon">lm</span><span style="color: navy"> : </span>MeaslesLogicalModel, <b>target</b> <span style="color: maroon">bundle</span><span style="color: navy"> : </span>Bundle, <b>target</b> <span style="color: maroon">composition</span><span style="color: navy"> : </span>MeaslesCIFComposition, <b>source</b> <span style="color: maroon">pid</span><span style="color: navy">)</span><span style="color: navy"> {
</span> lm<span style="color: navy"><b> -> </b></span> composition.section<b> as </b><span style="color: maroon">section</span><span style="color: navy">, </span> section.title = <span style="color: blue">'Specimens & Laboratory Testing'</span><b> then</b><span style="color: navy"> {
</span> lm.LaboratoryResults<b> as </b><span style="color: maroon">labs</span><span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">id</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">id</span><span style="color: navy">)</span><span style="color: navy">, </span> section.entry<b> as </b><span style="color: maroon">sectionEntry</span><span style="color: navy">, </span> sectionEntry.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'DiagnosticReport/'</span><span style="color: navy">, </span><span style="color: maroon">id</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'DiagnosticReport'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">diagnosticReport</span><b> then</b><span style="color: navy"> {
</span> labs<span style="color: navy"><b> -> </b></span>diagnosticReport.id = <span style="color: maroon">id</span> <i>"set id"</i><span style="color: navy">;</span>
labs<span style="color: navy"><b> -> </b></span>diagnosticReport.status = <span style="color: blue">'registered'</span> <i>"set status"</i><span style="color: navy">;</span>
labs<span style="color: navy"><b> -> </b></span> diagnosticReport.subject<b> as </b><span style="color: maroon">subject</span><span style="color: navy">, </span> subject.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Patient/'</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set subject"</i><span style="color: navy">;</span>
labs.Antigen<b> as </b><span style="color: maroon">antigen</span><span style="color: navy"><b> -> </b></span>diagnosticReport.code<b> as </b><span style="color: maroon">code</span><b> then </b>mapCodingtoCodeableConcept<span style="color: navy">(</span><span style="color: maroon">antigen</span><span style="color: navy">, </span><span style="color: maroon">code</span><span style="color: navy">)</span> <i>"set code"</i><span style="color: navy">;</span>
labs<span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">id</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">id</span><span style="color: navy">)</span><span style="color: navy">, </span> diagnosticReport.specimen<b> as </b><span style="color: maroon">refSpecimen</span><span style="color: navy">, </span> refSpecimen.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Specimen/'</span><span style="color: navy">, </span><span style="color: maroon">id</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Specimen'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">specimen</span><b> then</b><span style="color: navy"> {
</span> labs<span style="color: navy"><b> -> </b></span>specimen.id = <span style="color: maroon">id</span> <i>"Set idn"</i><span style="color: navy">;</span>
labs.SpecimenCollectionDate<b> as </b><span style="color: maroon">collectDate</span><span style="color: navy"><b> -> </b></span> specimen.collection<b> as </b><span style="color: maroon">collection</span><span style="color: navy">, </span> collection.collected = <span style="color: maroon">collectDate</span> <i>"set date"</i><span style="color: navy">;</span>
<span style="color: navy">// </span><span style="color: green">labs.SpecimenSentDate as sentDate -></span>
labs.SpecimenRecdDate<b> as </b><span style="color: maroon">recdDate</span><span style="color: navy"><b> -> </b></span>specimen.receivedTime = <span style="color: maroon">recdDate</span> <i>"set date"</i><span style="color: navy">;</span>
labs.SampleId<b> as </b><span style="color: maroon">sampleId</span><span style="color: navy"><b> -> </b></span> specimen.identifier<b> as </b><span style="color: maroon">identifier</span><span style="color: navy">, </span> identifier.value = <span style="color: maroon">sampleId</span> <i>"set identifier"</i><span style="color: navy">;</span>
labs.SampleType<b> as </b><span style="color: maroon">sampleType</span><span style="color: navy"><b> -> </b></span>specimen.type = <span style="color: maroon">sampleType</span> <i>"set type"</i><span style="color: navy">;</span>
labs.SpecimenNumber<b> as </b><span style="color: maroon">number</span><b> then</b><span style="color: navy"> {
</span> number.display<b> as </b><span style="color: maroon">text</span><span style="color: navy"><b> -> </b></span> specimen.note<b> as </b><span style="color: maroon">note</span><span style="color: navy">, </span> note.text = <span style="color: maroon">text</span> <i>"set note"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set note"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set specimen"</i><span style="color: navy">;</span>
labs<span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">id</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">id</span><span style="color: navy">)</span><span style="color: navy">, </span> diagnosticReport.performer<b> as </b><span style="color: maroon">performer</span><span style="color: navy">, </span> performer.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Organization/'</span><span style="color: navy">, </span><span style="color: maroon">id</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Organization'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">perfOrg</span><b> then</b><span style="color: navy"> {
</span> labs.LabName<b> as </b><span style="color: maroon">labName</span><span style="color: navy"><b> -> </b></span>perfOrg.name = <span style="color: maroon">labName</span> <i>"set name"</i><span style="color: navy">;</span>
labs<span style="color: navy"><b> -> </b></span>perfOrg.id = <span style="color: maroon">id</span> <i>"set id"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set performer"</i><span style="color: navy">;</span>
labs<span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">obsid</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> diagnosticReport.result<b> as </b><span style="color: maroon">result</span><span style="color: navy">, </span> result.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Observation/'</span><span style="color: navy">, </span><span style="color: maroon">obsid</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Observation'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">observation</span><b> then</b><span style="color: navy"> {
</span> labs<span style="color: navy"><b> -> </b></span>observation.id = <span style="color: maroon">obsid</span> <i>"set obsid"</i><span style="color: navy">;</span>
labs.Antigen<b> as </b><span style="color: maroon">antigen</span><span style="color: navy"><b> -> </b></span><span style="color: maroon">antigen</span><b> then</b><span style="color: navy"> {
</span> labs.Results<b> as </b><span style="color: maroon">result</span><span style="color: navy"><b> -> </b></span><span style="color: maroon">result</span><b> then </b>createObservationResource<span style="color: navy">(</span><span style="color: maroon">result</span><span style="color: navy">, </span><span style="color: maroon">antigen</span><span style="color: navy">, </span><span style="color: maroon">observation</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set obs"</i><span style="color: navy">;</span>
labs.LabResultsDate<b> as </b><span style="color: maroon">resultDate</span><span style="color: navy"><b> -> </b></span>observation.effective = <span style="color: maroon">resultDate</span> <i>"set start date"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set antigen"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set results"</i><span style="color: navy">;</span>
labs.Antigen<b> as </b><span style="color: maroon">antigen</span><span style="color: navy"><b> -> </b></span>diagnosticReport.code = <span style="color: maroon">antigen</span> <i>"set code"</i><span style="color: navy">;</span>
labs.LabResultsDate<b> as </b><span style="color: maroon">resultDate</span><span style="color: navy"><b> -> </b></span>diagnosticReport.effective = <span style="color: maroon">resultDate</span> <i>"set date"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set diagnosticReport"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set section"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>createImmunizationResource<span style="color: navy">(</span><b>source</b> <span style="color: maroon">vax</span><span style="color: navy"> : </span>SOTMeaslesVaccinationStatus, <b>target</b> <span style="color: maroon">bundle</span><span style="color: navy"> : </span>Bundle, <b>target</b> <span style="color: maroon">section</span><span style="color: navy"> : </span>Element, <b>source</b> <span style="color: maroon">pid</span><span style="color: navy">)</span><span style="color: navy"> {
</span> vax<span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">id</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">id</span><span style="color: navy">)</span><span style="color: navy">, </span> section.entry<b> as </b><span style="color: maroon">sectionEntry</span><span style="color: navy">, </span> sectionEntry.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Immunization/'</span><span style="color: navy">, </span><span style="color: maroon">id</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Immunization'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">immunization</span><b> then</b><span style="color: navy"> {
</span> vax<span style="color: navy"><b> -> </b></span>immunization.id = <span style="color: maroon">id</span> <i>"set id"</i><span style="color: navy">;</span>
vax<span style="color: navy"><b> -> </b></span>immunization.status = <span style="color: blue">'completed'</span> <i>"set status"</i><span style="color: navy">;</span>
vax<span style="color: navy"><b> -> </b></span>immunization.vaccineCode<b> as </b><span style="color: maroon">code</span><b> then</b><span style="color: navy"> {
</span> vax.VaccineType<b> as </b><span style="color: maroon">vaccineType</span><span style="color: navy"><b> -> </b></span><span style="color: maroon">vaccineType</span><b> then </b>mapCodingtoCodeableConcept<span style="color: navy">(</span><span style="color: maroon">vaccineType</span><span style="color: navy">, </span><span style="color: maroon">code</span><span style="color: navy">)</span> <i>"set code"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set"</i><span style="color: navy">;</span>
vax.Source<b> as </b><span style="color: maroon">source</span><span style="color: navy"><b> -> </b></span>immunization.reportOrigin<b> as </b><span style="color: maroon">origin</span><b> then</b><span style="color: navy"> {
</span> source<span style="color: navy"><b> -> </b></span><span style="color: maroon">source</span><b> then </b>mapCodingtoCodeableConcept<span style="color: navy">(</span><span style="color: maroon">source</span><span style="color: navy">, </span><span style="color: maroon">origin</span><span style="color: navy">)</span> <i>"set report origin"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set"</i><span style="color: navy">;</span>
vax.LastDoseDate<b> as </b><span style="color: maroon">date</span><span style="color: navy"><b> -> </b></span>immunization.occurrence = <span style="color: maroon">date</span> <i>"set date"</i><span style="color: navy">;</span>
vax.NumberOfDoses<b> as </b><span style="color: maroon">doses</span><b> then</b><span style="color: navy"> {
</span> doses.display<b> as </b><span style="color: maroon">seriesDose</span><span style="color: navy"><b> -> </b></span> immunization.protocolApplied<b> as </b><span style="color: maroon">protocol</span><span style="color: navy">, </span> protocol.series = <span style="color: maroon">seriesDose</span> <i>"set"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set dosenumber"</i><span style="color: navy">;</span>
vax<span style="color: navy"><b> -> </b></span> immunization.patient<b> as </b><span style="color: maroon">subject</span><span style="color: navy">, </span> subject.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Patient/'</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set subject"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"ad"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>mapVaccinationStatusToImmunization<span style="color: navy">(</span><b>source</b> <span style="color: maroon">lm</span><span style="color: navy"> : </span>MeaslesLogicalModel, <b>target</b> <span style="color: maroon">bundle</span><span style="color: navy"> : </span>Bundle, <b>target</b> <span style="color: maroon">composition</span><span style="color: navy"> : </span>MeaslesCIFComposition, <b>source</b> <span style="color: maroon">pid</span><span style="color: navy">)</span><span style="color: navy"> {
</span> lm<span style="color: navy"><b> -> </b></span> composition.section<b> as </b><span style="color: maroon">section</span><span style="color: navy">, </span> section.title = <span style="color: blue">'Vaccination History'</span><b> then</b><span style="color: navy"> {
</span> lm.VaccinationStatus<b> as </b><span style="color: maroon">vax</span><b> then</b><span style="color: navy"> {
</span> vax.NumberOfDoses<b> as </b><span style="color: maroon">doses</span><b> where </b>code = '99'<span style="color: navy"><b> -> </b></span><span style="color: maroon">doses</span><b> then </b>createImmunizationResource<span style="color: navy">(</span><span style="color: maroon">vax</span><span style="color: navy">, </span><span style="color: maroon">bundle</span><span style="color: navy">, </span><span style="color: maroon">section</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"do"</i><span style="color: navy">;</span>
vax.NumberOfDoses<b> as </b><span style="color: maroon">doses</span><b> where </b>code = '1'<span style="color: navy"><b> -> </b></span><span style="color: maroon">doses</span><b> then</b><span style="color: navy"> {
</span> vax.LastDoseDate<b> as </b><span style="color: maroon">date</span><span style="color: navy"><b> -> </b></span><span style="color: maroon">date</span><b> then </b>createImmunizationResource<span style="color: navy">(</span><span style="color: maroon">vax</span><span style="color: navy">, </span><span style="color: maroon">bundle</span><span style="color: navy">, </span><span style="color: maroon">section</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"do1"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set"</i><span style="color: navy">;</span>
vax.NumberOfDoses<b> as </b><span style="color: maroon">doses</span><b> where </b>code = '2'<b> then</b><span style="color: navy"> {
</span> doses<span style="color: navy"><b> -> </b></span><span style="color: maroon">doses</span><b> then </b>createImmunizationResource<span style="color: navy">(</span><span style="color: maroon">vax</span><span style="color: navy">, </span><span style="color: maroon">bundle</span><span style="color: navy">, </span><span style="color: maroon">section</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"do2"</i><span style="color: navy">;</span>
vax.LastDoseDate<b> as </b><span style="color: maroon">date</span><span style="color: navy"><b> -> </b></span><span style="color: maroon">date</span><b> then </b>createImmunizationResource<span style="color: navy">(</span><span style="color: maroon">vax</span><span style="color: navy">, </span><span style="color: maroon">bundle</span><span style="color: navy">, </span><span style="color: maroon">section</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"do"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set doses"</i><span style="color: navy">;</span>
vax.NumberOfDoses<b> as </b><span style="color: maroon">doses</span><b> where </b>code = '3'<b> then</b><span style="color: navy"> {
</span> vax<span style="color: navy"><b> -> </b></span><span style="color: maroon">doses</span><b> then </b>createImmunizationResource<span style="color: navy">(</span><span style="color: maroon">vax</span><span style="color: navy">, </span><span style="color: maroon">bundle</span><span style="color: navy">, </span><span style="color: maroon">section</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"do"</i><span style="color: navy">;</span>
vax<span style="color: navy"><b> -> </b></span><span style="color: maroon">doses</span><b> then </b>createImmunizationResource<span style="color: navy">(</span><span style="color: maroon">vax</span><span style="color: navy">, </span><span style="color: maroon">bundle</span><span style="color: navy">, </span><span style="color: maroon">section</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"do"</i><span style="color: navy">;</span>
vax.LastDoseDate<b> as </b><span style="color: maroon">date</span><span style="color: navy"><b> -> </b></span><span style="color: maroon">date</span><b> then </b>createImmunizationResource<span style="color: navy">(</span><span style="color: maroon">vax</span><span style="color: navy">, </span><span style="color: maroon">bundle</span><span style="color: navy">, </span><span style="color: maroon">section</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"do"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set doses"</i><span style="color: navy">;</span>
vax.NumberOfDoses<b> as </b><span style="color: maroon">doses</span><b> where </b>code = '4'<b> then</b><span style="color: navy"> {
</span> vax<span style="color: navy"><b> -> </b></span><span style="color: maroon">doses</span><b> then </b>createImmunizationResource<span style="color: navy">(</span><span style="color: maroon">vax</span><span style="color: navy">, </span><span style="color: maroon">bundle</span><span style="color: navy">, </span><span style="color: maroon">section</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"do"</i><span style="color: navy">;</span>
vax<span style="color: navy"><b> -> </b></span><span style="color: maroon">doses</span><b> then </b>createImmunizationResource<span style="color: navy">(</span><span style="color: maroon">vax</span><span style="color: navy">, </span><span style="color: maroon">bundle</span><span style="color: navy">, </span><span style="color: maroon">section</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"do"</i><span style="color: navy">;</span>
vax<span style="color: navy"><b> -> </b></span><span style="color: maroon">doses</span><b> then </b>createImmunizationResource<span style="color: navy">(</span><span style="color: maroon">vax</span><span style="color: navy">, </span><span style="color: maroon">bundle</span><span style="color: navy">, </span><span style="color: maroon">section</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"do"</i><span style="color: navy">;</span>
vax.LastDoseDate<b> as </b><span style="color: maroon">date</span><span style="color: navy"><b> -> </b></span><span style="color: maroon">date</span><b> then </b>createImmunizationResource<span style="color: navy">(</span><span style="color: maroon">vax</span><span style="color: navy">, </span><span style="color: maroon">bundle</span><span style="color: navy">, </span><span style="color: maroon">section</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"do"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set doses"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set status"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set section"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>LmToComposition<span style="color: navy">(</span><b>source</b> <span style="color: maroon">lm</span><span style="color: navy"> : </span>SOTMeasles, <b>target</b> <span style="color: maroon">composition</span><span style="color: navy"> : </span>Composition, <b>source</b> <span style="color: maroon">cid</span>, <b>source</b> <span style="color: maroon">pid</span>, <b>source</b> <span style="color: maroon">prid</span>, <b>source</b> <span style="color: maroon">oid</span>, <b>source</b> <span style="color: maroon">eid</span><span style="color: navy">)</span><span style="color: navy"> {
</span> cid<span style="color: navy"><b> -> </b></span>composition.id = <span style="color: maroon">cid</span> <i>"set id"</i><span style="color: navy">;</span>
lm<span style="color: navy"><b> -> </b></span>composition.status = <span style="color: blue">'final'</span> <i>"set status"</i><span style="color: navy">;</span>
lm<span style="color: navy"><b> -> </b></span>composition.title = <span style="color: blue">'PAHO Measles Case Investigation Form'</span> <i>"set title"</i><span style="color: navy">;</span>
lm<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">coding</span><span style="color: navy">, </span> coding.code = <span style="color: blue">'55751-2'</span><span style="color: navy">, </span> coding.system = <span style="color: blue">'http://loinc.org'</span><span style="color: navy">, </span> coding.display = <span style="color: blue">'Public health Case report'</span><span style="color: navy">, </span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'CodeableConcept'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">code</span><span style="color: navy">, </span> code.coding = <span style="color: maroon">coding</span><span style="color: navy">, </span> composition.type = <span style="color: maroon">code</span> <i>"set type"</i><span style="color: navy">;</span>
lm.ReportingSource<b> as </b><span style="color: maroon">reportingSource</span><span style="color: navy"><b> -> </b></span><span style="color: maroon">reportingSource</span><b> then</b><span style="color: navy"> {
</span> reportingSource.DateReportedLocal<b> as </b><span style="color: maroon">date</span><span style="color: navy"><b> -> </b></span>composition.date = <span style="color: maroon">date</span> <i>"set date"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set date reported local"</i><span style="color: navy">;</span>
lm<span style="color: navy"><b> -> </b></span>composition.subject<b> as </b><span style="color: maroon">subject</span><b> then</b><span style="color: navy"> {
</span> lm<span style="color: navy"><b> -> </b></span>subject.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Patient/'</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set subject"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set subject"</i><span style="color: navy">;</span>
lm<span style="color: navy"><b> -> </b></span>composition.author<b> as </b><span style="color: maroon">practitioner</span><b> then</b><span style="color: navy"> {
</span> lm<span style="color: navy"><b> -> </b></span>practitioner.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Practitioner/'</span><span style="color: navy">, </span><span style="color: maroon">prid</span><span style="color: navy">)</span> <i>"set author practitioner"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set author practitioner"</i><span style="color: navy">;</span>
lm<span style="color: navy"><b> -> </b></span>composition.author<b> as </b><span style="color: maroon">institution</span><b> then</b><span style="color: navy"> {
</span> lm<span style="color: navy"><b> -> </b></span>institution.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Organization/'</span><span style="color: navy">, </span><span style="color: maroon">oid</span><span style="color: navy">)</span> <i>"set author institution"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set author org"</i><span style="color: navy">;</span>
lm<span style="color: navy"><b> -> </b></span>composition.encounter<b> as </b><span style="color: maroon">encounter</span><b> then</b><span style="color: navy"> {
</span> lm<span style="color: navy"><b> -> </b></span>encounter.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Encounter/'</span><span style="color: navy">, </span><span style="color: maroon">eid</span><span style="color: navy">)</span> <i>"set encounter"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set encounter"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>DemographicsToPatient<span style="color: navy">(</span><b>source</b> <span style="color: maroon">demographics</span><span style="color: navy"> : </span>DemographicsLogicalModel, <b>target</b> <span style="color: maroon">patient</span><span style="color: navy"> : </span>MeaslesPatient, <b>source</b> <span style="color: maroon">pid</span><span style="color: navy">)</span><span style="color: navy"> {
</span> pid<span style="color: navy"><b> -> </b></span>patient.id = <span style="color: maroon">pid</span> <i>"set patient id"</i><span style="color: navy">;</span>
demographics.Name<b> as </b><span style="color: maroon">sourceName</span><span style="color: navy"><b> -> </b></span>patient.name<b> as </b><span style="color: maroon">targetName</span><b> then</b><span style="color: navy"> {
</span> sourceName<span style="color: navy"><b> -> </b></span><span style="color: maroon">sourceName</span><b> then </b>humanNameToHumanName<span style="color: navy">(</span><span style="color: maroon">sourceName</span><span style="color: navy">, </span><span style="color: maroon">targetName</span><span style="color: navy">)</span> <i>"Copy name"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"Set name"</i><span style="color: navy">;</span>
demographics.DateOfBirth<b> as </b><span style="color: maroon">dob</span><span style="color: navy"><b> -> </b></span>patient.birthDate = <span style="color: maroon">dob</span> <i>"set date of birth"</i><span style="color: navy">;</span>
demographics.Sex<b> as </b><span style="color: maroon">sex</span><span style="color: navy"><b> -> </b></span>patient.gender = <span style="color: maroon">sex</span> <i>"set sex"</i><span style="color: navy">;</span>
demographics.CountryOfBirth<b> as </b><span style="color: maroon">cob</span><span style="color: navy"><b> -> </b></span>patient.CountryOfBirth = <span style="color: maroon">cob</span> <i>"set CountryOfBirth"</i><span style="color: navy">;</span>
demographics.Landmark<b> as </b><span style="color: maroon">landmark</span><span style="color: navy"><b> -> </b></span>patient.extension<b> as </b><span style="color: maroon">ext</span><b> then</b><span style="color: navy"> {
</span> landmark<span style="color: navy"><b> -> </b></span> ext.url = <span style="color: blue">'http://worldhealthorganization.github.io/smart-ot/StructureDefinition/Landmark'</span><span style="color: navy">, </span> ext.value = <span style="color: maroon">landmark</span> <i>"set landmark value"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set landmark"</i><span style="color: navy">;</span>
demographics.Guardian<b> as </b><span style="color: maroon">guardian</span><span style="color: navy"><b> -> </b></span>patient.extension<b> as </b><span style="color: maroon">ext</span><b> then</b><span style="color: navy"> {
</span> guardian<span style="color: navy"><b> -> </b></span> ext.url = <span style="color: blue">'http://worldhealthorganization.github.io/smart-ot/StructureDefinition/Guardian'</span><span style="color: navy">, </span> ext.value = <span style="color: maroon">guardian</span> <i>"set guardian value"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set guardian"</i><span style="color: navy">;</span>
demographics.Telephone<b> as </b><span style="color: maroon">sourcePhone</span><span style="color: navy"><b> -> </b></span>patient.telecom<b> as </b><span style="color: maroon">targetPhone</span><b> then</b><span style="color: navy"> {
</span> sourcePhone<span style="color: navy"><b> -> </b></span><span style="color: maroon">sourcePhone</span><b> then </b>contactPointToContactPoint<span style="color: navy">(</span><span style="color: maroon">sourcePhone</span><span style="color: navy">, </span><span style="color: maroon">targetPhone</span><span style="color: navy">)</span> <i>"Copy contact"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"Set contact"</i><span style="color: navy">;</span>
demographics.PlaceOfResidence<b> as </b><span style="color: maroon">sourceAddress</span><span style="color: navy"><b> -> </b></span>patient.address<b> as </b><span style="color: maroon">targetAddress</span><b> then</b><span style="color: navy"> {
</span> sourceAddress<span style="color: navy"><b> -> </b></span><span style="color: maroon">sourceAddress</span><b> then </b>addressToAddress<span style="color: navy">(</span><span style="color: maroon">sourceAddress</span><span style="color: navy">, </span><span style="color: maroon">targetAddress</span><span style="color: navy">)</span> <i>"Copy Address"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set address"</i><span style="color: navy">;</span>
demographics.Occupation<b> as </b><span style="color: maroon">occupation</span><span style="color: navy"><b> -> </b></span>patient.extension<b> as </b><span style="color: maroon">ext</span><b> then</b><span style="color: navy"> {
</span> occupation<span style="color: navy"><b> -> </b></span> ext.url = <span style="color: blue">'http://worldhealthorganization.github.io/smart-ot/StructureDefinition/Occupation'</span><span style="color: navy">, </span> ext.value = <span style="color: maroon">occupation</span> <i>"set occupation value"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set occupation"</i><span style="color: navy">;</span>
demographics.WorkAddress<b> as </b><span style="color: maroon">workAddress</span><span style="color: navy"><b> -> </b></span>patient.extension<b> as </b><span style="color: maroon">ext</span><b> then</b><span style="color: navy"> {
</span> workAddress<span style="color: navy"><b> -> </b></span> ext.url = <span style="color: blue">'http://worldhealthorganization.github.io/smart-ot/StructureDefinition/WorkAddress'</span><span style="color: navy">, </span> ext.value = <span style="color: maroon">workAddress</span> <i>"set work address value"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set work address"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>ReportingSourceToPractitioner<span style="color: navy">(</span><b>source</b> <span style="color: maroon">reportingSource</span><span style="color: navy"> : </span>ReportingSourceLogicalModel, <b>target</b> <span style="color: maroon">practitioner</span><span style="color: navy"> : </span>Practitioner, <b>source</b> <span style="color: maroon">prid</span><span style="color: navy">)</span><span style="color: navy"> {
</span> prid<span style="color: navy"><b> -> </b></span>practitioner.id = <span style="color: maroon">prid</span> <i>"set id"</i><span style="color: navy">;</span>
reportingSource.ReportedBy<b> as </b><span style="color: maroon">name</span><span style="color: navy"><b> -> </b></span> practitioner.name<b> as </b><span style="color: maroon">humanName</span><span style="color: navy">, </span> humanName.text = <span style="color: maroon">name</span> <i>"set name"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>ReportingSourceToOrganization<span style="color: navy">(</span><b>source</b> <span style="color: maroon">reportingSource</span><span style="color: navy"> : </span>ReportingSourceLogicalModel, <b>target</b> <span style="color: maroon">organization</span><span style="color: navy"> : </span>Organization, <b>source</b> <span style="color: maroon">oid</span><span style="color: navy">)</span><span style="color: navy"> {
</span> oid<span style="color: navy"><b> -> </b></span>organization.id = <span style="color: maroon">oid</span> <i>"set id"</i><span style="color: navy">;</span>
reportingSource.HealthServiceName<b> as </b><span style="color: maroon">name</span><span style="color: navy"><b> -> </b></span>organization.name = <span style="color: maroon">name</span> <i>"set name"</i><span style="color: navy">;</span>
reportingSource.HealthServiceTelephone<b> as </b><span style="color: maroon">phoneSource</span><span style="color: navy"><b> -> </b></span> organization.contact<b> as </b><span style="color: maroon">contactDetails</span><span style="color: navy">, </span> contactDetails.telecom<b> as </b><span style="color: maroon">phoneTarget</span><b> then</b><span style="color: navy"> {
</span> phoneSource<span style="color: navy"><b> -> </b></span><span style="color: maroon">phoneSource</span><b> then </b>contactPointToContactPoint<span style="color: navy">(</span><span style="color: maroon">phoneSource</span><span style="color: navy">, </span><span style="color: maroon">phoneTarget</span><span style="color: navy">)</span> <i>"set org contact"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set phone"</i><span style="color: navy">;</span>
reportingSource.PlaceOfReporting<b> as </b><span style="color: maroon">locationSource</span><span style="color: navy"><b> -> </b></span> organization.contact<b> as </b><span style="color: maroon">contactDetails</span><span style="color: navy">, </span> contactDetails.address<b> as </b><span style="color: maroon">locationTarget</span><b> then</b><span style="color: navy"> {
</span> locationSource<span style="color: navy"><b> -> </b></span><span style="color: maroon">locationSource</span><b> then </b>contactPointToContactPoint<span style="color: navy">(</span><span style="color: maroon">locationSource</span><span style="color: navy">, </span><span style="color: maroon">locationTarget</span><span style="color: navy">)</span> <i>"set org address"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"set address"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>mapEncounters<span style="color: navy">(</span><b>source</b> <span style="color: maroon">clinical</span><span style="color: navy"> : </span>SOTMeaslesClinical, <b>target</b> <span style="color: maroon">bundle</span><span style="color: navy"> : </span>Bundle, <b>target</b> <span style="color: maroon">section</span><span style="color: navy"> : </span>Element, <b>source</b> <span style="color: maroon">pid</span><span style="color: navy">)</span><span style="color: navy"> {
</span> clinical.HistoryOfHospitalization<b> where </b>code = 'Yes'<b> then</b><span style="color: navy"> {
</span> clinical.DateOfAdmission<b> as </b><span style="color: maroon">date</span><b> then</b><span style="color: navy"> {
</span> date<span style="color: navy"><b> -> </b></span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">type</span><span style="color: navy">, </span> type.code = <span style="color: blue">'IMP'</span><span style="color: navy">, </span> type.system = <span style="color: blue">'http://terminology.hl7.org/CodeSystem/v3-ActCode'</span><span style="color: navy">, </span> type.display = <span style="color: blue">'inpatient encounter'</span><b> then </b>createEncounterResource<span style="color: navy">(</span><span style="color: maroon">date</span><span style="color: navy">, </span><span style="color: maroon">bundle</span><span style="color: navy">, </span><span style="color: maroon">section</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">, </span><span style="color: maroon">type</span><span style="color: navy">)</span> <i>"create"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"d"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"dff"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>createEncounterResource<span style="color: navy">(</span><b>source</b> <span style="color: maroon">date</span>, <b>target</b> <span style="color: maroon">bundle</span><span style="color: navy"> : </span>Bundle, <b>target</b> <span style="color: maroon">section</span><span style="color: navy"> : </span>Element, <b>source</b> <span style="color: maroon">pid</span>, <b>source</b> <span style="color: maroon">type</span><span style="color: navy"> : </span>Coding<span style="color: navy">)</span><span style="color: navy"> {
</span> date<span style="color: navy"><b> -> </b></span> <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">eid</span><span style="color: navy">, </span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.fullUrl = <b>append</b><span style="color: navy">(</span><span style="color: blue">'urn:uuid:'</span><span style="color: navy">, </span><span style="color: maroon">eid</span><span style="color: navy">)</span><span style="color: navy">, </span> section.entry<b> as </b><span style="color: maroon">sectionEntry</span><span style="color: navy">, </span> sectionEntry.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Encounter/'</span><span style="color: navy">, </span><span style="color: maroon">eid</span><span style="color: navy">)</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Encounter'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">encounter</span><b> then</b><span style="color: navy"> {
</span> date<span style="color: navy"><b> -> </b></span>encounter.id = <span style="color: maroon">eid</span> <i>"set id"</i><span style="color: navy">;</span>
date<span style="color: navy"><b> -> </b></span>encounter.status = <span style="color: blue">'finished'</span> <i>"set status"</i><span style="color: navy">;</span>
pid<span style="color: navy"><b> -> </b></span> encounter.subject<b> as </b><span style="color: maroon">subject</span><span style="color: navy">, </span> subject.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Patient/'</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set subject"</i><span style="color: navy">;</span>
date<span style="color: navy"><b> -> </b></span> encounter.period<b> as </b><span style="color: maroon">period</span><span style="color: navy">, </span> period.start = <span style="color: maroon">date</span> <i>"set date"</i><span style="color: navy">;</span>
type<span style="color: navy"><b> -> </b></span>encounter.class = <span style="color: maroon">type</span> <i>"set type"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"dssd"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>createCompositionEncounterResource<span style="color: navy">(</span><b>source</b> <span style="color: maroon">date</span>, <b>source</b> <span style="color: maroon">pid</span>, <b>source</b> <span style="color: maroon">type</span><span style="color: navy"> : </span>Coding, <b>source</b> <span style="color: maroon">eid</span>, <b>target</b> <span style="color: maroon">encounter</span><span style="color: navy"> : </span>Encounter<span style="color: navy">)</span><span style="color: navy"> {
</span> date<span style="color: navy"><b> -> </b></span>encounter.id = <span style="color: maroon">eid</span> <i>"set id"</i><span style="color: navy">;</span>
date<span style="color: navy"><b> -> </b></span>encounter.status = <span style="color: blue">'finished'</span> <i>"set status"</i><span style="color: navy">;</span>
pid<span style="color: navy"><b> -> </b></span> encounter.subject<b> as </b><span style="color: maroon">subject</span><span style="color: navy">, </span> subject.reference = <b>append</b><span style="color: navy">(</span><span style="color: blue">'Patient/'</span><span style="color: navy">, </span><span style="color: maroon">pid</span><span style="color: navy">)</span> <i>"set subject"</i><span style="color: navy">;</span>
date<span style="color: navy"><b> -> </b></span> encounter.period<b> as </b><span style="color: maroon">period</span><span style="color: navy">, </span> period.start = <span style="color: maroon">date</span> <i>"set date"</i><span style="color: navy">;</span>
type<span style="color: navy"><b> -> </b></span>encounter.class = <span style="color: maroon">type</span> <i>"set type"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span></pre></div>
</text>
<url
value="http://worldhealthorganization.github.io/smart-ot/StructureMap/MeaslesLogicalModelToResources"/>
<version value="0.2.1"/>
<name value="MeaslesLogicalModelToResources"/>
<status value="draft"/>
<date value="2023-11-07T05:59:29+00:00"/>
<publisher value="WHO"/>
<contact>
<name value="WHO"/>
<telecom>
<system value="url"/>
<value value="http://who.int"/>
</telecom>
</contact>
<jurisdiction>
<coding>
<system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
<code value="001"/>
</coding>
</jurisdiction>
<structure>
<url
value="http://worldhealthorganization.github.io/smart-ot/StructureDefinition/SOTMeaslesF"/>
<mode value="source"/>
<alias value="MeaslesLogicalModel"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/StructureDefinition/Bundle"/>
<mode value="target"/>
<alias value="MeaslesCIFBundle"/>
</structure>
<structure>
<url
value="http://worldhealthorganization.github.io/smart-ot/StructureDefinition/MeaslesCIFComposition"/>
<mode value="target"/>
<alias value="MeaslesCIFComposition"/>
</structure>
<import
value="http://worldhealthorganization.github.io/smart-ot/StructureMap/MetaDataTypesHelper"/>
<group>
<name value="MeaslesLogicalModelToResources"/>
<typeMode value="none"/>
<input>
<name value="lm"/>
<type value="SOTMeasles"/>
<mode value="source"/>
</input>
<input>
<name value="bundle"/>
<type value="Bundle"/>
<mode value="target"/>
</input>
<rule>
<name value="set bundle type"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="type"/>
<transform value="copy"/>
<parameter>
<valueString value="document"/>
</parameter>
</target>
</rule>
<rule>
<name value="set id"/>
<source>
<context value="lm"/>
</source>
<target>
<contextType value="variable"/>
<variable value="bid"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="bid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set entries"/>
<source>
<context value="lm"/>
</source>
<target>
<contextType value="variable"/>
<variable value="cid"/>
<transform value="uuid"/>
</target>
<target>
<contextType value="variable"/>
<variable value="pid"/>
<transform value="uuid"/>
</target>
<target>
<contextType value="variable"/>
<variable value="prid"/>
<transform value="uuid"/>
</target>
<target>
<contextType value="variable"/>
<variable value="oid"/>
<transform value="uuid"/>
</target>
<target>
<contextType value="variable"/>
<variable value="eid"/>
<transform value="uuid"/>
</target>
<rule>
<name value="map composition resource"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="composition"/>
<transform value="create"/>
<parameter>
<valueString value="Composition"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="cid"/>
</parameter>
</target>
<rule>
<name value="set"/>
<source>
<context value="lm"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="lm"/>
</parameter>
</target>
<dependent>
<name value="LmToComposition"/>
<variable value="lm"/>
<variable value="composition"/>
<variable value="cid"/>
<variable value="pid"/>
<variable value="prid"/>
<variable value="oid"/>
<variable value="eid"/>
</dependent>
</rule>
<rule>
<name value="map patient resource"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="pid"/>
</parameter>
</target>
<target>
<contextType value="variable"/>
<variable value="patient"/>
<transform value="create"/>
<parameter>
<valueString value="Patient"/>
</parameter>
</target>
<rule>
<name value="create patient"/>
<source>
<context value="lm"/>
<element value="Demographics"/>
<variable value="demographics"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="demographics"/>
</parameter>
</target>
<dependent>
<name value="DemographicsToPatient"/>
<variable value="demographics"/>
<variable value="patient"/>
<variable value="pid"/>
</dependent>
</rule>
<rule>
<name value="set patient as entry"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<transform value="copy"/>
<parameter>
<valueId value="patient"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="map practitioner resource"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="prid"/>
</parameter>
</target>
<target>
<contextType value="variable"/>
<variable value="practitioner"/>
<transform value="create"/>
<parameter>
<valueString value="Practitioner"/>
</parameter>
</target>
<rule>
<name value="create practitioner"/>
<source>
<context value="lm"/>
<element value="ReportingSource"/>
<variable value="reportingSource"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="reportingSource"/>
</parameter>
</target>
<dependent>
<name value="ReportingSourceToPractitioner"/>
<variable value="reportingSource"/>
<variable value="practitioner"/>
<variable value="prid"/>
</dependent>
</rule>
<rule>
<name value="set practitioner as entry"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<transform value="copy"/>
<parameter>
<valueId value="practitioner"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="map organization resource"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="oid"/>
</parameter>
</target>
<target>
<contextType value="variable"/>
<variable value="organization"/>
<transform value="create"/>
<parameter>
<valueString value="Organization"/>
</parameter>
</target>
<rule>
<name value="create organization"/>
<source>
<context value="lm"/>
<element value="ReportingSource"/>
<variable value="reportingSource"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="reportingSource"/>
</parameter>
</target>
<dependent>
<name value="ReportingSourceToOrganization"/>
<variable value="reportingSource"/>
<variable value="organization"/>
<variable value="oid"/>
</dependent>
</rule>
<rule>
<name value="set organization as entry"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<transform value="copy"/>
<parameter>
<valueId value="organization"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="map encounter resource"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="eid"/>
</parameter>
</target>
<target>
<contextType value="variable"/>
<variable value="encounter"/>
<transform value="create"/>
<parameter>
<valueString value="Encounter"/>
</parameter>
</target>
<rule>
<name value="set encounter"/>
<source>
<context value="lm"/>
<element value="ReportingSource"/>
<variable value="reportingSource"/>
</source>
<rule>
<name value="set encounter"/>
<source>
<context value="reportingSource"/>
<element value="DateOfConsultation"/>
<variable value="date"/>
</source>
<rule>
<name value="create encounter"/>
<source>
<context value="date"/>
</source>
<target>
<contextType value="variable"/>
<variable value="type"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="type"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="AMB"/>
</parameter>
</target>
<target>
<context value="type"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
</parameter>
</target>
<target>
<context value="type"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="ambulatory"/>
</parameter>
</target>
<dependent>
<name value="createCompositionEncounterResource"/>
<variable value="date"/>
<variable value="pid"/>
<variable value="type"/>
<variable value="eid"/>
<variable value="encounter"/>
</dependent>
</rule>
</rule>
<rule>
<name value="set encounter"/>
<source>
<context value="reportingSource"/>
<element value="DateOfHomeVisit"/>
<variable value="date"/>
</source>
<rule>
<name value="create encounter"/>
<source>
<context value="date"/>
</source>
<target>
<contextType value="variable"/>
<variable value="type"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="type"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="HH"/>
</parameter>
</target>
<target>
<context value="type"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
</parameter>
</target>
<target>
<context value="type"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="home health"/>
</parameter>
</target>
<dependent>
<name value="createCompositionEncounterResource"/>
<variable value="date"/>
<variable value="pid"/>
<variable value="type"/>
<variable value="eid"/>
<variable value="encounter"/>
</dependent>
</rule>
</rule>
</rule>
<rule>
<name value="set encounter as entry"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<transform value="copy"/>
<parameter>
<valueId value="encounter"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="set clinical data"/>
<source>
<context value="lm"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="lm"/>
</parameter>
</target>
<dependent>
<name value="mapClinicalToObservations"/>
<variable value="lm"/>
<variable value="bundle"/>
<variable value="composition"/>
<variable value="pid"/>
</dependent>
</rule>
<rule>
<name value="set labs data"/>
<source>
<context value="lm"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="lm"/>
</parameter>
</target>
<dependent>
<name value="mapLabsToDiagnosticReport"/>
<variable value="lm"/>
<variable value="bundle"/>
<variable value="composition"/>
<variable value="pid"/>
</dependent>
</rule>
<rule>
<name value="set immunization data"/>
<source>
<context value="lm"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="lm"/>
</parameter>
</target>
<dependent>
<name value="mapVaccinationStatusToImmunization"/>
<variable value="lm"/>
<variable value="bundle"/>
<variable value="composition"/>
<variable value="pid"/>
</dependent>
</rule>
<rule>
<name value="set classification"/>
<source>
<context value="lm"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="lm"/>
</parameter>
</target>
<dependent>
<name value="mapClassificationToConditions"/>
<variable value="lm"/>
<variable value="bundle"/>
<variable value="composition"/>
<variable value="pid"/>
<variable value="eid"/>
</dependent>
</rule>
</rule>
</rule>
</group>
<group>
<name value="mapClassificationToConditions"/>
<typeMode value="none"/>
<input>
<name value="lm"/>
<type value="MeaslesLogicalModel"/>
<mode value="source"/>
</input>
<input>
<name value="bundle"/>
<type value="Bundle"/>
<mode value="target"/>
</input>
<input>
<name value="composition"/>
<type value="MeaslesCIFComposition"/>
<mode value="target"/>
</input>
<input>
<name value="pid"/>
<mode value="source"/>
</input>
<input>
<name value="eid"/>
<mode value="source"/>
</input>
<rule>
<name value="set section"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="section"/>
<variable value="section"/>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="title"/>
<transform value="copy"/>
<parameter>
<valueString value="Classification"/>
</parameter>
</target>
<rule>
<name value="Set classification"/>
<source>
<context value="lm"/>
<element value="Classification"/>
<variable value="classification"/>
</source>
<target>
<contextType value="variable"/>
<variable value="id"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="id"/>
</parameter>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="sectionEntry"/>
</target>
<target>
<context value="sectionEntry"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Condition/"/>
</parameter>
<parameter>
<valueId value="id"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="condition"/>
<transform value="create"/>
<parameter>
<valueString value="Condition"/>
</parameter>
</target>
<rule>
<name value="set id"/>
<source>
<context value="classification"/>
</source>
<target>
<context value="condition"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="id"/>
</parameter>
</target>
</rule>
<rule>
<name value="set"/>
<source>
<context value="classification"/>
</source>
<target>
<context value="condition"/>
<contextType value="variable"/>
<element value="verificationStatus"/>
<variable value="tgtStatus"/>
</target>
<target>
<contextType value="variable"/>
<variable value="status"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="status"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="confirmed"/>
</parameter>
</target>
<target>
<context value="status"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
</parameter>
</target>
<target>
<context value="status"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Confirmed"/>
</parameter>
</target>
<dependent>
<name value="mapCodingtoCodeableConcept"/>
<variable value="status"/>
<variable value="tgtStatus"/>
</dependent>
</rule>
<rule>
<name value="set subject"/>
<source>
<context value="classification"/>
</source>
<target>
<context value="condition"/>
<contextType value="variable"/>
<element value="subject"/>
<variable value="subject"/>
</target>
<target>
<context value="subject"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Patient/"/>
</parameter>
<parameter>
<valueId value="pid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set code"/>
<source>
<context value="classification"/>
<element value="FinalClassification"/>
<variable value="coding"/>
</source>
<target>
<context value="condition"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="code"/>
</target>
<dependent>
<name value="mapCodingtoCodeableConcept"/>
<variable value="coding"/>
<variable value="code"/>
</dependent>
</rule>
<rule>
<name value="set subject"/>
<source>
<context value="classification"/>
</source>
<target>
<context value="condition"/>
<contextType value="variable"/>
<element value="encounter"/>
<variable value="encounter"/>
</target>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Encounter/"/>
</parameter>
<parameter>
<valueId value="eid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set"/>
<source>
<context value="classification"/>
</source>
<target>
<context value="condition"/>
<contextType value="variable"/>
<element value="category"/>
<variable value="tgt"/>
</target>
<target>
<contextType value="variable"/>
<variable value="status"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="status"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="encounter-diagnosis"/>
</parameter>
</target>
<target>
<context value="status"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://terminology.hl7.org/CodeSystem/condition-category"/>
</parameter>
</target>
<target>
<context value="status"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Encounter Diagnosis"/>
</parameter>
</target>
<dependent>
<name value="mapCodingtoCodeableConcept"/>
<variable value="status"/>
<variable value="tgt"/>
</dependent>
</rule>
<rule>
<name value="set"/>
<source>
<context value="classification"/>
<element value="ClassificationDate"/>
<variable value="date"/>
</source>
<target>
<context value="condition"/>
<contextType value="variable"/>
<element value="recordedDate"/>
<transform value="copy"/>
<parameter>
<valueId value="date"/>
</parameter>
</target>
</rule>
<rule>
<name value="set person"/>
<source>
<context value="classification"/>
<element value="ClassifiedBy"/>
<variable value="person"/>
</source>
<target>
<contextType value="variable"/>
<variable value="rpid"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="rpid"/>
</parameter>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="sectionEntry"/>
</target>
<target>
<context value="sectionEntry"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="RelatedPerson/"/>
</parameter>
<parameter>
<valueId value="rpid"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="recorder"/>
<transform value="create"/>
<parameter>
<valueString value="RelatedPerson"/>
</parameter>
</target>
<rule>
<name value="set id"/>
<source>
<context value="person"/>
</source>
<target>
<context value="recorder"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="rpid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set"/>
<source>
<context value="person"/>
</source>
<target>
<context value="recorder"/>
<contextType value="variable"/>
<element value="name"/>
<variable value="targetName"/>
</target>
<target>
<contextType value="variable"/>
<variable value="name"/>
<transform value="create"/>
<parameter>
<valueString value="HumanName"/>
</parameter>
</target>
<target>
<context value="name"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="person"/>
</parameter>
</target>
<dependent>
<name value="humanNameToHumanName"/>
<variable value="name"/>
<variable value="targetName"/>
</dependent>
</rule>
<rule>
<name value="set patient"/>
<source>
<context value="person"/>
</source>
<target>
<context value="recorder"/>
<contextType value="variable"/>
<element value="patient"/>
<variable value="patient"/>
</target>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Patient/"/>
</parameter>
<parameter>
<valueId value="pid"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</rule>
</group>
<group>
<name value="mapContactTracing"/>
<typeMode value="none"/>
<input>
<name value="lm"/>
<type value="MeaslesLogicalModel"/>
<mode value="source"/>
</input>
<input>
<name value="bundle"/>
<type value="Bundle"/>
<mode value="target"/>
</input>
<input>
<name value="composition"/>
<type value="MeaslesCIFComposition"/>
<mode value="target"/>
</input>
<input>
<name value="pid"/>
<mode value="source"/>
</input>
<rule>
<name value="set"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="section"/>
<variable value="section"/>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="title"/>
<transform value="copy"/>
<parameter>
<valueString value="Contact Tracing"/>
</parameter>
</target>
</rule>
</group>
<group>
<name value="mapClinicalToObservations"/>
<typeMode value="none"/>
<input>
<name value="lm"/>
<type value="SOTMeasles"/>
<mode value="source"/>
</input>
<input>
<name value="bundle"/>
<type value="Bundle"/>
<mode value="target"/>
</input>
<input>
<name value="composition"/>
<type value="Composition"/>
<mode value="target"/>
</input>
<input>
<name value="pid"/>
<mode value="source"/>
</input>
<rule>
<name value="set section"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="section"/>
<variable value="section"/>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="title"/>
<transform value="copy"/>
<parameter>
<valueString value="Clinical Data, Follow up and Treatment"/>
</parameter>
</target>
<rule>
<name value="set clinical"/>
<source>
<context value="lm"/>
<element value="Clinical"/>
<variable value="clinical"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="clinical"/>
</parameter>
</target>
<rule>
<name value="set fever"/>
<source>
<context value="clinical"/>
<element value="Fever"/>
<variable value="fever"/>
</source>
<target>
<contextType value="variable"/>
<variable value="obsid"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="sectionEntry"/>
</target>
<target>
<context value="sectionEntry"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Observation/"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<rule>
<name value="set obsid"/>
<source>
<context value="fever"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set obs"/>
<source>
<context value="fever"/>
</source>
<target>
<contextType value="variable"/>
<variable value="coding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="DE66"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Fever"/>
</parameter>
</target>
<rule>
<name value="set obs"/>
<source>
<context value="fever"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="fever"/>
</parameter>
</target>
<dependent>
<name value="createObservationResource"/>
<variable value="fever"/>
<variable value="coding"/>
<variable value="observation"/>
<variable value="pid"/>
</dependent>
</rule>
<rule>
<name value="set start date"/>
<source>
<context value="clinical"/>
<element value="FeverOnsetDate"/>
<variable value="onsetDate"/>
</source>
<target>
<contextType value="variable"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<target>
<context value="period"/>
<contextType value="variable"/>
<element value="start"/>
<transform value="copy"/>
<parameter>
<valueId value="onsetDate"/>
</parameter>
</target>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="effective"/>
<transform value="copy"/>
<parameter>
<valueId value="period"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="set Temperature"/>
<source>
<context value="clinical"/>
<element value="Temperature"/>
<variable value="temperature"/>
</source>
<target>
<contextType value="variable"/>
<variable value="obsid"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="sectionEntry"/>
</target>
<target>
<context value="sectionEntry"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Observation/"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<rule>
<name value="set obsid"/>
<source>
<context value="temperature"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set obs"/>
<source>
<context value="temperature"/>
</source>
<target>
<contextType value="variable"/>
<variable value="coding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="DE70"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Temperature"/>
</parameter>
</target>
<rule>
<name value="set obs"/>
<source>
<context value="temperature"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="temperature"/>
</parameter>
</target>
<dependent>
<name value="createObservationResource"/>
<variable value="temperature"/>
<variable value="coding"/>
<variable value="observation"/>
<variable value="pid"/>
</dependent>
</rule>
</rule>
</rule>
<rule>
<name value="set Rash"/>
<source>
<context value="clinical"/>
<element value="Rash"/>
<variable value="rash"/>
<condition value="code != 'Yes'"/>
</source>
<target>
<contextType value="variable"/>
<variable value="obsid"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="sectionEntry"/>
</target>
<target>
<context value="sectionEntry"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Observation/"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<rule>
<name value="set obsid"/>
<source>
<context value="rash"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set obs"/>
<source>
<context value="rash"/>
</source>
<target>
<contextType value="variable"/>
<variable value="coding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="DE72"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Rash"/>
</parameter>
</target>
<rule>
<name value="set obs"/>
<source>
<context value="rash"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="rash"/>
</parameter>
</target>
<dependent>
<name value="createObservationResource"/>
<variable value="rash"/>
<variable value="coding"/>
<variable value="observation"/>
<variable value="pid"/>
</dependent>
</rule>
</rule>
</rule>
<rule>
<name value="set haemorrhagic"/>
<source>
<context value="clinical"/>
<element value="TypeOfRash"/>
<variable value="haemorrhagic"/>
<condition value="code = 'Haemorrhagic'"/>
</source>
<target>
<contextType value="variable"/>
<variable value="obsid"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="sectionEntry"/>
</target>
<target>
<context value="sectionEntry"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Observation/"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<rule>
<name value="set obsid"/>
<source>
<context value="haemorrhagic"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set obs"/>
<source>
<context value="haemorrhagic"/>
</source>
<target>
<contextType value="variable"/>
<variable value="coding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="Haemorrhagic"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://worldhealthorganization.github.io/smart-ot/RashType"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Haemorrhagic"/>
</parameter>
</target>
<rule>
<name value="set value"/>
<source>
<context value="haemorrhagic"/>
</source>
<target>
<contextType value="variable"/>
<variable value="ValueCoding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="ValueCoding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="Yes"/>
</parameter>
</target>
<target>
<context value="ValueCoding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://ritikarawlani.github.io/smart-outbreak-measles/YesNoUnknown"/>
</parameter>
</target>
<target>
<context value="ValueCoding"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Yes"/>
</parameter>
</target>
<rule>
<name value="set obs"/>
<source>
<context value="haemorrhagic"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="haemorrhagic"/>
</parameter>
</target>
<dependent>
<name value="createObservationResource"/>
<variable value="ValueCoding"/>
<variable value="coding"/>
<variable value="observation"/>
<variable value="pid"/>
</dependent>
</rule>
</rule>
<rule>
<name value="set start date"/>
<source>
<context value="clinical"/>
<element value="RashOnsetDate"/>
<variable value="onsetDate"/>
</source>
<target>
<contextType value="variable"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<target>
<context value="period"/>
<contextType value="variable"/>
<element value="start"/>
<transform value="copy"/>
<parameter>
<valueId value="onsetDate"/>
</parameter>
</target>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="effective"/>
<transform value="copy"/>
<parameter>
<valueId value="period"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="set erythematous"/>
<source>
<context value="clinical"/>
<element value="TypeOfRash"/>
<variable value="erythematous"/>
<condition value="code = 'Erythematous'"/>
</source>
<target>
<contextType value="variable"/>
<variable value="obsid"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="sectionEntry"/>
</target>
<target>
<context value="sectionEntry"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Observation/"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<rule>
<name value="set obsid"/>
<source>
<context value="erythematous"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set obs"/>
<source>
<context value="erythematous"/>
</source>
<target>
<contextType value="variable"/>
<variable value="coding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="Erythematous"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://worldhealthorganization.github.io/smart-ot/RashType"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Erythematous"/>
</parameter>
</target>
<rule>
<name value="set value"/>
<source>
<context value="erythematous"/>
</source>
<target>
<contextType value="variable"/>
<variable value="ValueCoding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="ValueCoding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="Yes"/>
</parameter>
</target>
<target>
<context value="ValueCoding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://ritikarawlani.github.io/smart-outbreak-measles/YesNoUnknown"/>
</parameter>
</target>
<target>
<context value="ValueCoding"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Yes"/>
</parameter>
</target>
<rule>
<name value="set obs"/>
<source>
<context value="erythematous"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="erythematous"/>
</parameter>
</target>
<dependent>
<name value="createObservationResource"/>
<variable value="ValueCoding"/>
<variable value="coding"/>
<variable value="observation"/>
<variable value="pid"/>
</dependent>
</rule>
</rule>
<rule>
<name value="set start date"/>
<source>
<context value="clinical"/>
<element value="RashOnsetDate"/>
<variable value="onsetDate"/>
</source>
<target>
<contextType value="variable"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<target>
<context value="period"/>
<contextType value="variable"/>
<element value="start"/>
<transform value="copy"/>
<parameter>
<valueId value="onsetDate"/>
</parameter>
</target>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="effective"/>
<transform value="copy"/>
<parameter>
<valueId value="period"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="set vesicularPustular"/>
<source>
<context value="clinical"/>
<element value="TypeOfRash"/>
<variable value="vesicularPustular"/>
<condition value="code = 'VesicularPustular'"/>
</source>
<target>
<contextType value="variable"/>
<variable value="obsid"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="sectionEntry"/>
</target>
<target>
<context value="sectionEntry"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Observation/"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<rule>
<name value="set obsid"/>
<source>
<context value="vesicularPustular"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set obs"/>
<source>
<context value="vesicularPustular"/>
</source>
<target>
<contextType value="variable"/>
<variable value="coding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="Vesicular-pustular"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://worldhealthorganization.github.io/smart-ot/RashType"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Vesicular Pustular"/>
</parameter>
</target>
<rule>
<name value="set value"/>
<source>
<context value="vesicularPustular"/>
</source>
<target>
<contextType value="variable"/>
<variable value="ValueCoding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="ValueCoding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="Yes"/>
</parameter>
</target>
<target>
<context value="ValueCoding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://ritikarawlani.github.io/smart-outbreak-measles/YesNoUnknown"/>
</parameter>
</target>
<target>
<context value="ValueCoding"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Yes"/>
</parameter>
</target>
<rule>
<name value="set obs"/>
<source>
<context value="vesicularPustular"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="vesicularPustular"/>
</parameter>
</target>
<dependent>
<name value="createObservationResource"/>
<variable value="ValueCoding"/>
<variable value="coding"/>
<variable value="observation"/>
<variable value="pid"/>
</dependent>
</rule>
</rule>
</rule>
<rule>
<name value="set start date"/>
<source>
<context value="clinical"/>
<element value="RashOnsetDate"/>
<variable value="onsetDate"/>
</source>
<target>
<contextType value="variable"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<target>
<context value="period"/>
<contextType value="variable"/>
<element value="start"/>
<transform value="copy"/>
<parameter>
<valueId value="onsetDate"/>
</parameter>
</target>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="effective"/>
<transform value="copy"/>
<parameter>
<valueId value="period"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="set petechialPurpuric"/>
<source>
<context value="clinical"/>
<element value="TypeOfRash"/>
<variable value="petechialPurpuric"/>
<condition value="code = 'PetechialPurpuric'"/>
</source>
<target>
<contextType value="variable"/>
<variable value="obsid"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="sectionEntry"/>
</target>
<target>
<context value="sectionEntry"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Observation/"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<rule>
<name value="set obsid"/>
<source>
<context value="petechialPurpuric"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set obs"/>
<source>
<context value="petechialPurpuric"/>
</source>
<target>
<contextType value="variable"/>
<variable value="coding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="Petechial-purpuric"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://worldhealthorganization.github.io/smart-ot/RashType"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Petechial Purpuric"/>
</parameter>
</target>
<rule>
<name value="set value"/>
<source>
<context value="petechialPurpuric"/>
</source>
<target>
<contextType value="variable"/>
<variable value="ValueCoding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="ValueCoding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="Yes"/>
</parameter>
</target>
<target>
<context value="ValueCoding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://ritikarawlani.github.io/smart-outbreak-measles/YesNoUnknown"/>
</parameter>
</target>
<target>
<context value="ValueCoding"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Yes"/>
</parameter>
</target>
<rule>
<name value="set obs"/>
<source>
<context value="petechialPurpuric"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="petechialPurpuric"/>
</parameter>
</target>
<dependent>
<name value="createObservationResource"/>
<variable value="petechialPurpuric"/>
<variable value="coding"/>
<variable value="observation"/>
<variable value="pid"/>
</dependent>
</rule>
</rule>
</rule>
<rule>
<name value="set start date"/>
<source>
<context value="clinical"/>
<element value="RashOnsetDate"/>
<variable value="onsetDate"/>
</source>
<target>
<contextType value="variable"/>
<variable value="period"/>
<transform value="create"/>
<parameter>
<valueString value="Period"/>
</parameter>
</target>
<target>
<context value="period"/>
<contextType value="variable"/>
<element value="start"/>
<transform value="copy"/>
<parameter>
<valueId value="onsetDate"/>
</parameter>
</target>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="effective"/>
<transform value="copy"/>
<parameter>
<valueId value="period"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="set other"/>
<source>
<context value="clinical"/>
<element value="TypeOfRash"/>
<variable value="other"/>
<condition value="code = 'Other'"/>
</source>
<target>
<contextType value="variable"/>
<variable value="obsid"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="sectionEntry"/>
</target>
<target>
<context value="sectionEntry"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Observation/"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<rule>
<name value="set obsid"/>
<source>
<context value="other"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set obs"/>
<source>
<context value="other"/>
</source>
<target>
<contextType value="variable"/>
<variable value="coding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="Other"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://worldhealthorganization.github.io/smart-ot/RashType"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Rash"/>
</parameter>
</target>
<rule>
<name value="set value"/>
<source>
<context value="other"/>
</source>
<target>
<contextType value="variable"/>
<variable value="ValueCoding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="ValueCoding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="Yes"/>
</parameter>
</target>
<target>
<context value="ValueCoding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://ritikarawlani.github.io/smart-outbreak-measles/YesNoUnknown"/>
</parameter>
</target>
<target>
<context value="ValueCoding"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Yes"/>
</parameter>
</target>
<rule>
<name value="set obs"/>
<source>
<context value="other"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="other"/>
</parameter>
</target>
<dependent>
<name value="createObservationResource"/>
<variable value="ValueCoding"/>
<variable value="coding"/>
<variable value="observation"/>
<variable value="pid"/>
</dependent>
</rule>
</rule>
</rule>
</rule>
<rule>
<name value="set cough"/>
<source>
<context value="clinical"/>
<element value="Cough"/>
<variable value="cough"/>
</source>
<target>
<contextType value="variable"/>
<variable value="obsid"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="sectionEntry"/>
</target>
<target>
<context value="sectionEntry"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Observation/"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<rule>
<name value="set obsid"/>
<source>
<context value="cough"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set obs"/>
<source>
<context value="cough"/>
</source>
<target>
<contextType value="variable"/>
<variable value="coding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="DE84"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Cough"/>
</parameter>
</target>
<rule>
<name value="set obs"/>
<source>
<context value="cough"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="cough"/>
</parameter>
</target>
<dependent>
<name value="createObservationResource"/>
<variable value="cough"/>
<variable value="coding"/>
<variable value="observation"/>
<variable value="pid"/>
</dependent>
</rule>
</rule>
</rule>
<rule>
<name value="set conjunctivitis"/>
<source>
<context value="clinical"/>
<element value="Conjunctivitis"/>
<variable value="conjunctivitis"/>
</source>
<target>
<contextType value="variable"/>
<variable value="obsid"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="sectionEntry"/>
</target>
<target>
<context value="sectionEntry"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Observation/"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<rule>
<name value="set obsid"/>
<source>
<context value="conjunctivitis"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set obs"/>
<source>
<context value="conjunctivitis"/>
</source>
<target>
<contextType value="variable"/>
<variable value="coding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="DE88"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Conjunctivitis"/>
</parameter>
</target>
<rule>
<name value="set obs"/>
<source>
<context value="conjunctivitis"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="conjunctivitis"/>
</parameter>
</target>
<dependent>
<name value="createObservationResource"/>
<variable value="conjunctivitis"/>
<variable value="coding"/>
<variable value="observation"/>
<variable value="pid"/>
</dependent>
</rule>
</rule>
</rule>
<rule>
<name value="set coryza"/>
<source>
<context value="clinical"/>
<element value="Coryza"/>
<variable value="coryza"/>
</source>
<target>
<contextType value="variable"/>
<variable value="obsid"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="sectionEntry"/>
</target>
<target>
<context value="sectionEntry"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Observation/"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<rule>
<name value="set obsid"/>
<source>
<context value="coryza"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set obs"/>
<source>
<context value="coryza"/>
</source>
<target>
<contextType value="variable"/>
<variable value="coding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="DE92"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Coryza"/>
</parameter>
</target>
<rule>
<name value="set obs"/>
<source>
<context value="coryza"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="coryza"/>
</parameter>
</target>
<dependent>
<name value="createObservationResource"/>
<variable value="coryza"/>
<variable value="coding"/>
<variable value="observation"/>
<variable value="pid"/>
</dependent>
</rule>
</rule>
</rule>
<rule>
<name value="set koplikSpots"/>
<source>
<context value="clinical"/>
<element value="KoplikSpots"/>
<variable value="koplikSpots"/>
</source>
<target>
<contextType value="variable"/>
<variable value="obsid"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="sectionEntry"/>
</target>
<target>
<context value="sectionEntry"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Observation/"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<rule>
<name value="set obsid"/>
<source>
<context value="koplikSpots"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set obs"/>
<source>
<context value="koplikSpots"/>
</source>
<target>
<contextType value="variable"/>
<variable value="coding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="DE96"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Koplik Spots"/>
</parameter>
</target>
<rule>
<name value="set obs"/>
<source>
<context value="koplikSpots"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="koplikSpots"/>
</parameter>
</target>
<dependent>
<name value="createObservationResource"/>
<variable value="koplikSpots"/>
<variable value="coding"/>
<variable value="observation"/>
<variable value="pid"/>
</dependent>
</rule>
</rule>
</rule>
<rule>
<name value="set lymphadenopathy"/>
<source>
<context value="clinical"/>
<element value="Lymphadenopathy"/>
<variable value="lymphadenopathy"/>
</source>
<target>
<contextType value="variable"/>
<variable value="obsid"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="sectionEntry"/>
</target>
<target>
<context value="sectionEntry"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Observation/"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<rule>
<name value="set obsid"/>
<source>
<context value="lymphadenopathy"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set obs"/>
<source>
<context value="lymphadenopathy"/>
</source>
<target>
<contextType value="variable"/>
<variable value="coding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="DE100"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Lymphadenopathy"/>
</parameter>
</target>
<rule>
<name value="set obs"/>
<source>
<context value="lymphadenopathy"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="lymphadenopathy"/>
</parameter>
</target>
<dependent>
<name value="createObservationResource"/>
<variable value="lymphadenopathy"/>
<variable value="coding"/>
<variable value="observation"/>
<variable value="pid"/>
</dependent>
</rule>
</rule>
</rule>
<rule>
<name value="set jointPain"/>
<source>
<context value="clinical"/>
<element value="JointPain"/>
<variable value="jointPain"/>
</source>
<target>
<contextType value="variable"/>
<variable value="obsid"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="sectionEntry"/>
</target>
<target>
<context value="sectionEntry"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Observation/"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<rule>
<name value="set obsid"/>
<source>
<context value="jointPain"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set obs"/>
<source>
<context value="jointPain"/>
</source>
<target>
<contextType value="variable"/>
<variable value="coding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="DE104"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Joint Pain"/>
</parameter>
</target>
<rule>
<name value="set obs"/>
<source>
<context value="jointPain"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="jointPain"/>
</parameter>
</target>
<dependent>
<name value="createObservationResource"/>
<variable value="jointPain"/>
<variable value="coding"/>
<variable value="observation"/>
<variable value="pid"/>
</dependent>
</rule>
</rule>
</rule>
<rule>
<name value="set pregnancy"/>
<source>
<context value="clinical"/>
<element value="PregnancyStatus"/>
<variable value="pregnancy"/>
</source>
<target>
<contextType value="variable"/>
<variable value="obsid"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="sectionEntry"/>
</target>
<target>
<context value="sectionEntry"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Observation/"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<rule>
<name value="set obsid"/>
<source>
<context value="pregnancy"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set obs"/>
<source>
<context value="pregnancy"/>
</source>
<target>
<contextType value="variable"/>
<variable value="coding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="DE108"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Pregnancy"/>
</parameter>
</target>
<rule>
<name value="set obs"/>
<source>
<context value="pregnancy"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="pregnancy"/>
</parameter>
</target>
<dependent>
<name value="createObservationResource"/>
<variable value="pregnancy"/>
<variable value="coding"/>
<variable value="observation"/>
<variable value="pid"/>
</dependent>
</rule>
</rule>
</rule>
<rule>
<name value="set pregnancy weeks"/>
<source>
<context value="clinical"/>
<element value="PregnancyStatus"/>
<variable value="pregnancy"/>
<condition value="code = 'Yes'"/>
</source>
<target>
<contextType value="variable"/>
<variable value="obsid"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="sectionEntry"/>
</target>
<target>
<context value="sectionEntry"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Observation/"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<rule>
<name value="set obsid"/>
<source>
<context value="pregnancy"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set obs"/>
<source>
<context value="clinical"/>
<element value="GestationWeeks"/>
<variable value="weeks"/>
</source>
<target>
<contextType value="variable"/>
<variable value="coding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="DE112"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Weeks Pregnant"/>
</parameter>
</target>
<rule>
<name value="set obs"/>
<source>
<context value="weeks"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="weeks"/>
</parameter>
</target>
<dependent>
<name value="createObservationResource"/>
<variable value="weeks"/>
<variable value="coding"/>
<variable value="observation"/>
<variable value="pid"/>
</dependent>
</rule>
</rule>
</rule>
<rule>
<name value="set outcome"/>
<source>
<context value="clinical"/>
<element value="Outcome"/>
<variable value="outcome"/>
</source>
<target>
<contextType value="variable"/>
<variable value="obsid"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="sectionEntry"/>
</target>
<target>
<context value="sectionEntry"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Observation/"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<rule>
<name value="set obsid"/>
<source>
<context value="outcome"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set obs"/>
<source>
<context value="outcome"/>
</source>
<target>
<contextType value="variable"/>
<variable value="coding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="DE121"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Outcome"/>
</parameter>
</target>
<rule>
<name value="set obs"/>
<source>
<context value="outcome"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="outcome"/>
</parameter>
</target>
<dependent>
<name value="createObservationResource"/>
<variable value="outcome"/>
<variable value="coding"/>
<variable value="observation"/>
<variable value="pid"/>
</dependent>
</rule>
</rule>
<rule>
<name value="set start date"/>
<source>
<context value="clinical"/>
<element value="DateOfDeath"/>
<variable value="onsetDate"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="effective"/>
<transform value="copy"/>
<parameter>
<valueId value="onsetDate"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="set encounter"/>
<source>
<context value="clinical"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="clinical"/>
</parameter>
</target>
<dependent>
<name value="mapEncounters"/>
<variable value="clinical"/>
<variable value="bundle"/>
<variable value="section"/>
<variable value="pid"/>
</dependent>
</rule>
</rule>
</rule>
</group>
<group>
<name value="createObservationResource"/>
<typeMode value="none"/>
<input>
<name value="src"/>
<mode value="source"/>
</input>
<input>
<name value="coding"/>
<type value="Coding"/>
<mode value="source"/>
</input>
<input>
<name value="observation"/>
<type value="Observation"/>
<mode value="target"/>
</input>
<input>
<name value="pid"/>
<mode value="source"/>
</input>
<rule>
<name value="set code"/>
<source>
<context value="src"/>
</source>
<target>
<contextType value="variable"/>
<variable value="code"/>
<transform value="create"/>
<parameter>
<valueString value="CodeableConcept"/>
</parameter>
</target>
<target>
<context value="code"/>
<contextType value="variable"/>
<element value="coding"/>
<transform value="copy"/>
<parameter>
<valueId value="coding"/>
</parameter>
</target>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueId value="code"/>
</parameter>
</target>
</rule>
<rule>
<name value="set value"/>
<source>
<context value="src"/>
</source>
<target>
<contextType value="variable"/>
<variable value="value"/>
<transform value="create"/>
<parameter>
<valueString value="CodeableConcept"/>
</parameter>
</target>
<target>
<context value="value"/>
<contextType value="variable"/>
<element value="coding"/>
<transform value="copy"/>
<parameter>
<valueId value="src"/>
</parameter>
</target>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="value"/>
</parameter>
</target>
</rule>
<rule>
<name value="set status"/>
<source>
<context value="src"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="registered"/>
</parameter>
</target>
</rule>
<rule>
<name value="set subject"/>
<source>
<context value="src"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="subject"/>
<variable value="subject"/>
</target>
<rule>
<name value="set subject"/>
<source>
<context value="src"/>
</source>
<target>
<context value="subject"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Patient/"/>
</parameter>
<parameter>
<valueId value="pid"/>
</parameter>
</target>
</rule>
</rule>
</group>
<group>
<name value="mapLabsToDiagnosticReport"/>
<typeMode value="none"/>
<input>
<name value="lm"/>
<type value="MeaslesLogicalModel"/>
<mode value="source"/>
</input>
<input>
<name value="bundle"/>
<type value="Bundle"/>
<mode value="target"/>
</input>
<input>
<name value="composition"/>
<type value="MeaslesCIFComposition"/>
<mode value="target"/>
</input>
<input>
<name value="pid"/>
<mode value="source"/>
</input>
<rule>
<name value="set section"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="section"/>
<variable value="section"/>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="title"/>
<transform value="copy"/>
<parameter>
<valueString value="Specimens & Laboratory Testing"/>
</parameter>
</target>
<rule>
<name value="set diagnosticReport"/>
<source>
<context value="lm"/>
<element value="LaboratoryResults"/>
<variable value="labs"/>
</source>
<target>
<contextType value="variable"/>
<variable value="id"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="id"/>
</parameter>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="sectionEntry"/>
</target>
<target>
<context value="sectionEntry"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="DiagnosticReport/"/>
</parameter>
<parameter>
<valueId value="id"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="diagnosticReport"/>
<transform value="create"/>
<parameter>
<valueString value="DiagnosticReport"/>
</parameter>
</target>
<rule>
<name value="set id"/>
<source>
<context value="labs"/>
</source>
<target>
<context value="diagnosticReport"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="id"/>
</parameter>
</target>
</rule>
<rule>
<name value="set status"/>
<source>
<context value="labs"/>
</source>
<target>
<context value="diagnosticReport"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="registered"/>
</parameter>
</target>
</rule>
<rule>
<name value="set subject"/>
<source>
<context value="labs"/>
</source>
<target>
<context value="diagnosticReport"/>
<contextType value="variable"/>
<element value="subject"/>
<variable value="subject"/>
</target>
<target>
<context value="subject"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Patient/"/>
</parameter>
<parameter>
<valueId value="pid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set code"/>
<source>
<context value="labs"/>
<element value="Antigen"/>
<variable value="antigen"/>
</source>
<target>
<context value="diagnosticReport"/>
<contextType value="variable"/>
<element value="code"/>
<variable value="code"/>
</target>
<dependent>
<name value="mapCodingtoCodeableConcept"/>
<variable value="antigen"/>
<variable value="code"/>
</dependent>
</rule>
<rule>
<name value="set specimen"/>
<source>
<context value="labs"/>
</source>
<target>
<contextType value="variable"/>
<variable value="id"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="id"/>
</parameter>
</target>
<target>
<context value="diagnosticReport"/>
<contextType value="variable"/>
<element value="specimen"/>
<variable value="refSpecimen"/>
</target>
<target>
<context value="refSpecimen"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Specimen/"/>
</parameter>
<parameter>
<valueId value="id"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="specimen"/>
<transform value="create"/>
<parameter>
<valueString value="Specimen"/>
</parameter>
</target>
<rule>
<name value="Set idn"/>
<source>
<context value="labs"/>
</source>
<target>
<context value="specimen"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="id"/>
</parameter>
</target>
</rule>
<rule>
<name value="set date"/>
<source>
<context value="labs"/>
<element value="SpecimenCollectionDate"/>
<variable value="collectDate"/>
</source>
<target>
<context value="specimen"/>
<contextType value="variable"/>
<element value="collection"/>
<variable value="collection"/>
</target>
<target>
<context value="collection"/>
<contextType value="variable"/>
<element value="collected"/>
<transform value="copy"/>
<parameter>
<valueId value="collectDate"/>
</parameter>
</target>
</rule>
<rule>
<name value="set date"/>
<source>
<context value="labs"/>
<element value="SpecimenRecdDate"/>
<variable value="recdDate"/>
</source>
<target>
<context value="specimen"/>
<contextType value="variable"/>
<element value="receivedTime"/>
<transform value="copy"/>
<parameter>
<valueId value="recdDate"/>
</parameter>
</target>
</rule>
<rule>
<name value="set identifier"/>
<source>
<context value="labs"/>
<element value="SampleId"/>
<variable value="sampleId"/>
</source>
<target>
<context value="specimen"/>
<contextType value="variable"/>
<element value="identifier"/>
<variable value="identifier"/>
</target>
<target>
<context value="identifier"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="sampleId"/>
</parameter>
</target>
</rule>
<rule>
<name value="set type"/>
<source>
<context value="labs"/>
<element value="SampleType"/>
<variable value="sampleType"/>
</source>
<target>
<context value="specimen"/>
<contextType value="variable"/>
<element value="type"/>
<transform value="copy"/>
<parameter>
<valueId value="sampleType"/>
</parameter>
</target>
</rule>
<rule>
<name value="set note"/>
<source>
<context value="labs"/>
<element value="SpecimenNumber"/>
<variable value="number"/>
</source>
<rule>
<name value="set note"/>
<source>
<context value="number"/>
<element value="display"/>
<variable value="text"/>
</source>
<target>
<context value="specimen"/>
<contextType value="variable"/>
<element value="note"/>
<variable value="note"/>
</target>
<target>
<context value="note"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="text"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="set performer"/>
<source>
<context value="labs"/>
</source>
<target>
<contextType value="variable"/>
<variable value="id"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="id"/>
</parameter>
</target>
<target>
<context value="diagnosticReport"/>
<contextType value="variable"/>
<element value="performer"/>
<variable value="performer"/>
</target>
<target>
<context value="performer"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Organization/"/>
</parameter>
<parameter>
<valueId value="id"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="perfOrg"/>
<transform value="create"/>
<parameter>
<valueString value="Organization"/>
</parameter>
</target>
<rule>
<name value="set name"/>
<source>
<context value="labs"/>
<element value="LabName"/>
<variable value="labName"/>
</source>
<target>
<context value="perfOrg"/>
<contextType value="variable"/>
<element value="name"/>
<transform value="copy"/>
<parameter>
<valueId value="labName"/>
</parameter>
</target>
</rule>
<rule>
<name value="set id"/>
<source>
<context value="labs"/>
</source>
<target>
<context value="perfOrg"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="id"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="set results"/>
<source>
<context value="labs"/>
</source>
<target>
<contextType value="variable"/>
<variable value="obsid"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="diagnosticReport"/>
<contextType value="variable"/>
<element value="result"/>
<variable value="result"/>
</target>
<target>
<context value="result"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Observation/"/>
</parameter>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="observation"/>
<transform value="create"/>
<parameter>
<valueString value="Observation"/>
</parameter>
</target>
<rule>
<name value="set obsid"/>
<source>
<context value="labs"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="obsid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set antigen"/>
<source>
<context value="labs"/>
<element value="Antigen"/>
<variable value="antigen"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="antigen"/>
</parameter>
</target>
<rule>
<name value="set obs"/>
<source>
<context value="labs"/>
<element value="Results"/>
<variable value="result"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="result"/>
</parameter>
</target>
<dependent>
<name value="createObservationResource"/>
<variable value="result"/>
<variable value="antigen"/>
<variable value="observation"/>
<variable value="pid"/>
</dependent>
</rule>
<rule>
<name value="set start date"/>
<source>
<context value="labs"/>
<element value="LabResultsDate"/>
<variable value="resultDate"/>
</source>
<target>
<context value="observation"/>
<contextType value="variable"/>
<element value="effective"/>
<transform value="copy"/>
<parameter>
<valueId value="resultDate"/>
</parameter>
</target>
</rule>
</rule>
</rule>
<rule>
<name value="set code"/>
<source>
<context value="labs"/>
<element value="Antigen"/>
<variable value="antigen"/>
</source>
<target>
<context value="diagnosticReport"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueId value="antigen"/>
</parameter>
</target>
</rule>
<rule>
<name value="set date"/>
<source>
<context value="labs"/>
<element value="LabResultsDate"/>
<variable value="resultDate"/>
</source>
<target>
<context value="diagnosticReport"/>
<contextType value="variable"/>
<element value="effective"/>
<transform value="copy"/>
<parameter>
<valueId value="resultDate"/>
</parameter>
</target>
</rule>
</rule>
</rule>
</group>
<group>
<name value="createImmunizationResource"/>
<typeMode value="none"/>
<input>
<name value="vax"/>
<type value="SOTMeaslesVaccinationStatus"/>
<mode value="source"/>
</input>
<input>
<name value="bundle"/>
<type value="Bundle"/>
<mode value="target"/>
</input>
<input>
<name value="section"/>
<type value="Element"/>
<mode value="target"/>
</input>
<input>
<name value="pid"/>
<mode value="source"/>
</input>
<rule>
<name value="ad"/>
<source>
<context value="vax"/>
</source>
<target>
<contextType value="variable"/>
<variable value="id"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="id"/>
</parameter>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="sectionEntry"/>
</target>
<target>
<context value="sectionEntry"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Immunization/"/>
</parameter>
<parameter>
<valueId value="id"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="immunization"/>
<transform value="create"/>
<parameter>
<valueString value="Immunization"/>
</parameter>
</target>
<rule>
<name value="set id"/>
<source>
<context value="vax"/>
</source>
<target>
<context value="immunization"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="id"/>
</parameter>
</target>
</rule>
<rule>
<name value="set status"/>
<source>
<context value="vax"/>
</source>
<target>
<context value="immunization"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="completed"/>
</parameter>
</target>
</rule>
<rule>
<name value="set"/>
<source>
<context value="vax"/>
</source>
<target>
<context value="immunization"/>
<contextType value="variable"/>
<element value="vaccineCode"/>
<variable value="code"/>
</target>
<rule>
<name value="set code"/>
<source>
<context value="vax"/>
<element value="VaccineType"/>
<variable value="vaccineType"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="vaccineType"/>
</parameter>
</target>
<dependent>
<name value="mapCodingtoCodeableConcept"/>
<variable value="vaccineType"/>
<variable value="code"/>
</dependent>
</rule>
</rule>
<rule>
<name value="set"/>
<source>
<context value="vax"/>
<element value="Source"/>
<variable value="source"/>
</source>
<target>
<context value="immunization"/>
<contextType value="variable"/>
<element value="reportOrigin"/>
<variable value="origin"/>
</target>
<rule>
<name value="set report origin"/>
<source>
<context value="source"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="source"/>
</parameter>
</target>
<dependent>
<name value="mapCodingtoCodeableConcept"/>
<variable value="source"/>
<variable value="origin"/>
</dependent>
</rule>
</rule>
<rule>
<name value="set date"/>
<source>
<context value="vax"/>
<element value="LastDoseDate"/>
<variable value="date"/>
</source>
<target>
<context value="immunization"/>
<contextType value="variable"/>
<element value="occurrence"/>
<transform value="copy"/>
<parameter>
<valueId value="date"/>
</parameter>
</target>
</rule>
<rule>
<name value="set dosenumber"/>
<source>
<context value="vax"/>
<element value="NumberOfDoses"/>
<variable value="doses"/>
</source>
<rule>
<name value="set"/>
<source>
<context value="doses"/>
<element value="display"/>
<variable value="seriesDose"/>
</source>
<target>
<context value="immunization"/>
<contextType value="variable"/>
<element value="protocolApplied"/>
<variable value="protocol"/>
</target>
<target>
<context value="protocol"/>
<contextType value="variable"/>
<element value="series"/>
<transform value="copy"/>
<parameter>
<valueId value="seriesDose"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="set subject"/>
<source>
<context value="vax"/>
</source>
<target>
<context value="immunization"/>
<contextType value="variable"/>
<element value="patient"/>
<variable value="subject"/>
</target>
<target>
<context value="subject"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Patient/"/>
</parameter>
<parameter>
<valueId value="pid"/>
</parameter>
</target>
</rule>
</rule>
</group>
<group>
<name value="mapVaccinationStatusToImmunization"/>
<typeMode value="none"/>
<input>
<name value="lm"/>
<type value="MeaslesLogicalModel"/>
<mode value="source"/>
</input>
<input>
<name value="bundle"/>
<type value="Bundle"/>
<mode value="target"/>
</input>
<input>
<name value="composition"/>
<type value="MeaslesCIFComposition"/>
<mode value="target"/>
</input>
<input>
<name value="pid"/>
<mode value="source"/>
</input>
<rule>
<name value="set section"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="section"/>
<variable value="section"/>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="title"/>
<transform value="copy"/>
<parameter>
<valueString value="Vaccination History"/>
</parameter>
</target>
<rule>
<name value="set status"/>
<source>
<context value="lm"/>
<element value="VaccinationStatus"/>
<variable value="vax"/>
</source>
<rule>
<name value="do"/>
<source>
<context value="vax"/>
<element value="NumberOfDoses"/>
<variable value="doses"/>
<condition value="code = '99'"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="doses"/>
</parameter>
</target>
<dependent>
<name value="createImmunizationResource"/>
<variable value="vax"/>
<variable value="bundle"/>
<variable value="section"/>
<variable value="pid"/>
</dependent>
</rule>
<rule>
<name value="set"/>
<source>
<context value="vax"/>
<element value="NumberOfDoses"/>
<variable value="doses"/>
<condition value="code = '1'"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="doses"/>
</parameter>
</target>
<rule>
<name value="do1"/>
<source>
<context value="vax"/>
<element value="LastDoseDate"/>
<variable value="date"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="date"/>
</parameter>
</target>
<dependent>
<name value="createImmunizationResource"/>
<variable value="vax"/>
<variable value="bundle"/>
<variable value="section"/>
<variable value="pid"/>
</dependent>
</rule>
</rule>
<rule>
<name value="set doses"/>
<source>
<context value="vax"/>
<element value="NumberOfDoses"/>
<variable value="doses"/>
<condition value="code = '2'"/>
</source>
<rule>
<name value="do2"/>
<source>
<context value="doses"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="doses"/>
</parameter>
</target>
<dependent>
<name value="createImmunizationResource"/>
<variable value="vax"/>
<variable value="bundle"/>
<variable value="section"/>
<variable value="pid"/>
</dependent>
</rule>
<rule>
<name value="do"/>
<source>
<context value="vax"/>
<element value="LastDoseDate"/>
<variable value="date"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="date"/>
</parameter>
</target>
<dependent>
<name value="createImmunizationResource"/>
<variable value="vax"/>
<variable value="bundle"/>
<variable value="section"/>
<variable value="pid"/>
</dependent>
</rule>
</rule>
<rule>
<name value="set doses"/>
<source>
<context value="vax"/>
<element value="NumberOfDoses"/>
<variable value="doses"/>
<condition value="code = '3'"/>
</source>
<rule>
<name value="do"/>
<source>
<context value="vax"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="doses"/>
</parameter>
</target>
<dependent>
<name value="createImmunizationResource"/>
<variable value="vax"/>
<variable value="bundle"/>
<variable value="section"/>
<variable value="pid"/>
</dependent>
</rule>
<rule>
<name value="do"/>
<source>
<context value="vax"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="doses"/>
</parameter>
</target>
<dependent>
<name value="createImmunizationResource"/>
<variable value="vax"/>
<variable value="bundle"/>
<variable value="section"/>
<variable value="pid"/>
</dependent>
</rule>
<rule>
<name value="do"/>
<source>
<context value="vax"/>
<element value="LastDoseDate"/>
<variable value="date"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="date"/>
</parameter>
</target>
<dependent>
<name value="createImmunizationResource"/>
<variable value="vax"/>
<variable value="bundle"/>
<variable value="section"/>
<variable value="pid"/>
</dependent>
</rule>
</rule>
<rule>
<name value="set doses"/>
<source>
<context value="vax"/>
<element value="NumberOfDoses"/>
<variable value="doses"/>
<condition value="code = '4'"/>
</source>
<rule>
<name value="do"/>
<source>
<context value="vax"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="doses"/>
</parameter>
</target>
<dependent>
<name value="createImmunizationResource"/>
<variable value="vax"/>
<variable value="bundle"/>
<variable value="section"/>
<variable value="pid"/>
</dependent>
</rule>
<rule>
<name value="do"/>
<source>
<context value="vax"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="doses"/>
</parameter>
</target>
<dependent>
<name value="createImmunizationResource"/>
<variable value="vax"/>
<variable value="bundle"/>
<variable value="section"/>
<variable value="pid"/>
</dependent>
</rule>
<rule>
<name value="do"/>
<source>
<context value="vax"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="doses"/>
</parameter>
</target>
<dependent>
<name value="createImmunizationResource"/>
<variable value="vax"/>
<variable value="bundle"/>
<variable value="section"/>
<variable value="pid"/>
</dependent>
</rule>
<rule>
<name value="do"/>
<source>
<context value="vax"/>
<element value="LastDoseDate"/>
<variable value="date"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="date"/>
</parameter>
</target>
<dependent>
<name value="createImmunizationResource"/>
<variable value="vax"/>
<variable value="bundle"/>
<variable value="section"/>
<variable value="pid"/>
</dependent>
</rule>
</rule>
</rule>
</rule>
</group>
<group>
<name value="LmToComposition"/>
<typeMode value="none"/>
<input>
<name value="lm"/>
<type value="SOTMeasles"/>
<mode value="source"/>
</input>
<input>
<name value="composition"/>
<type value="Composition"/>
<mode value="target"/>
</input>
<input>
<name value="cid"/>
<mode value="source"/>
</input>
<input>
<name value="pid"/>
<mode value="source"/>
</input>
<input>
<name value="prid"/>
<mode value="source"/>
</input>
<input>
<name value="oid"/>
<mode value="source"/>
</input>
<input>
<name value="eid"/>
<mode value="source"/>
</input>
<rule>
<name value="set id"/>
<source>
<context value="cid"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="cid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set status"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="final"/>
</parameter>
</target>
</rule>
<rule>
<name value="set title"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="title"/>
<transform value="copy"/>
<parameter>
<valueString value="PAHO Measles Case Investigation Form"/>
</parameter>
</target>
</rule>
<rule>
<name value="set type"/>
<source>
<context value="lm"/>
</source>
<target>
<contextType value="variable"/>
<variable value="coding"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="55751-2"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString value="http://loinc.org"/>
</parameter>
</target>
<target>
<context value="coding"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="Public health Case report"/>
</parameter>
</target>
<target>
<contextType value="variable"/>
<variable value="code"/>
<transform value="create"/>
<parameter>
<valueString value="CodeableConcept"/>
</parameter>
</target>
<target>
<context value="code"/>
<contextType value="variable"/>
<element value="coding"/>
<transform value="copy"/>
<parameter>
<valueId value="coding"/>
</parameter>
</target>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="type"/>
<transform value="copy"/>
<parameter>
<valueId value="code"/>
</parameter>
</target>
</rule>
<rule>
<name value="set date reported local"/>
<source>
<context value="lm"/>
<element value="ReportingSource"/>
<variable value="reportingSource"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="reportingSource"/>
</parameter>
</target>
<rule>
<name value="set date"/>
<source>
<context value="reportingSource"/>
<element value="DateReportedLocal"/>
<variable value="date"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="date"/>
<transform value="copy"/>
<parameter>
<valueId value="date"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="set subject"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="subject"/>
<variable value="subject"/>
</target>
<rule>
<name value="set subject"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="subject"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Patient/"/>
</parameter>
<parameter>
<valueId value="pid"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="set author practitioner"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="author"/>
<variable value="practitioner"/>
</target>
<rule>
<name value="set author practitioner"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Practitioner/"/>
</parameter>
<parameter>
<valueId value="prid"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="set author org"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="author"/>
<variable value="institution"/>
</target>
<rule>
<name value="set author institution"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="institution"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Organization/"/>
</parameter>
<parameter>
<valueId value="oid"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="set encounter"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="composition"/>
<contextType value="variable"/>
<element value="encounter"/>
<variable value="encounter"/>
</target>
<rule>
<name value="set encounter"/>
<source>
<context value="lm"/>
</source>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Encounter/"/>
</parameter>
<parameter>
<valueId value="eid"/>
</parameter>
</target>
</rule>
</rule>
</group>
<group>
<name value="DemographicsToPatient"/>
<typeMode value="none"/>
<input>
<name value="demographics"/>
<type value="DemographicsLogicalModel"/>
<mode value="source"/>
</input>
<input>
<name value="patient"/>
<type value="MeaslesPatient"/>
<mode value="target"/>
</input>
<input>
<name value="pid"/>
<mode value="source"/>
</input>
<rule>
<name value="set patient id"/>
<source>
<context value="pid"/>
</source>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="pid"/>
</parameter>
</target>
</rule>
<rule>
<name value="Set name"/>
<source>
<context value="demographics"/>
<element value="Name"/>
<variable value="sourceName"/>
</source>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="name"/>
<variable value="targetName"/>
</target>
<rule>
<name value="Copy name"/>
<source>
<context value="sourceName"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="sourceName"/>
</parameter>
</target>
<dependent>
<name value="humanNameToHumanName"/>
<variable value="sourceName"/>
<variable value="targetName"/>
</dependent>
</rule>
</rule>
<rule>
<name value="set date of birth"/>
<source>
<context value="demographics"/>
<element value="DateOfBirth"/>
<variable value="dob"/>
</source>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="birthDate"/>
<transform value="copy"/>
<parameter>
<valueId value="dob"/>
</parameter>
</target>
</rule>
<rule>
<name value="set sex"/>
<source>
<context value="demographics"/>
<element value="Sex"/>
<variable value="sex"/>
</source>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="gender"/>
<transform value="copy"/>
<parameter>
<valueId value="sex"/>
</parameter>
</target>
</rule>
<rule>
<name value="set CountryOfBirth"/>
<source>
<context value="demographics"/>
<element value="CountryOfBirth"/>
<variable value="cob"/>
</source>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="CountryOfBirth"/>
<transform value="copy"/>
<parameter>
<valueId value="cob"/>
</parameter>
</target>
</rule>
<rule>
<name value="set landmark"/>
<source>
<context value="demographics"/>
<element value="Landmark"/>
<variable value="landmark"/>
</source>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="extension"/>
<variable value="ext"/>
</target>
<rule>
<name value="set landmark value"/>
<source>
<context value="landmark"/>
</source>
<target>
<context value="ext"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://worldhealthorganization.github.io/smart-ot/StructureDefinition/Landmark"/>
</parameter>
</target>
<target>
<context value="ext"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="landmark"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="set guardian"/>
<source>
<context value="demographics"/>
<element value="Guardian"/>
<variable value="guardian"/>
</source>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="extension"/>
<variable value="ext"/>
</target>
<rule>
<name value="set guardian value"/>
<source>
<context value="guardian"/>
</source>
<target>
<context value="ext"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://worldhealthorganization.github.io/smart-ot/StructureDefinition/Guardian"/>
</parameter>
</target>
<target>
<context value="ext"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="guardian"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="Set contact"/>
<source>
<context value="demographics"/>
<element value="Telephone"/>
<variable value="sourcePhone"/>
</source>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="telecom"/>
<variable value="targetPhone"/>
</target>
<rule>
<name value="Copy contact"/>
<source>
<context value="sourcePhone"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="sourcePhone"/>
</parameter>
</target>
<dependent>
<name value="contactPointToContactPoint"/>
<variable value="sourcePhone"/>
<variable value="targetPhone"/>
</dependent>
</rule>
</rule>
<rule>
<name value="set address"/>
<source>
<context value="demographics"/>
<element value="PlaceOfResidence"/>
<variable value="sourceAddress"/>
</source>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="address"/>
<variable value="targetAddress"/>
</target>
<rule>
<name value="Copy Address"/>
<source>
<context value="sourceAddress"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="sourceAddress"/>
</parameter>
</target>
<dependent>
<name value="addressToAddress"/>
<variable value="sourceAddress"/>
<variable value="targetAddress"/>
</dependent>
</rule>
</rule>
<rule>
<name value="set occupation"/>
<source>
<context value="demographics"/>
<element value="Occupation"/>
<variable value="occupation"/>
</source>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="extension"/>
<variable value="ext"/>
</target>
<rule>
<name value="set occupation value"/>
<source>
<context value="occupation"/>
</source>
<target>
<context value="ext"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://worldhealthorganization.github.io/smart-ot/StructureDefinition/Occupation"/>
</parameter>
</target>
<target>
<context value="ext"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="occupation"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="set work address"/>
<source>
<context value="demographics"/>
<element value="WorkAddress"/>
<variable value="workAddress"/>
</source>
<target>
<context value="patient"/>
<contextType value="variable"/>
<element value="extension"/>
<variable value="ext"/>
</target>
<rule>
<name value="set work address value"/>
<source>
<context value="workAddress"/>
</source>
<target>
<context value="ext"/>
<contextType value="variable"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://worldhealthorganization.github.io/smart-ot/StructureDefinition/WorkAddress"/>
</parameter>
</target>
<target>
<context value="ext"/>
<contextType value="variable"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="workAddress"/>
</parameter>
</target>
</rule>
</rule>
</group>
<group>
<name value="ReportingSourceToPractitioner"/>
<typeMode value="none"/>
<input>
<name value="reportingSource"/>
<type value="ReportingSourceLogicalModel"/>
<mode value="source"/>
</input>
<input>
<name value="practitioner"/>
<type value="Practitioner"/>
<mode value="target"/>
</input>
<input>
<name value="prid"/>
<mode value="source"/>
</input>
<rule>
<name value="set id"/>
<source>
<context value="prid"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="prid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set name"/>
<source>
<context value="reportingSource"/>
<element value="ReportedBy"/>
<variable value="name"/>
</source>
<target>
<context value="practitioner"/>
<contextType value="variable"/>
<element value="name"/>
<variable value="humanName"/>
</target>
<target>
<context value="humanName"/>
<contextType value="variable"/>
<element value="text"/>
<transform value="copy"/>
<parameter>
<valueId value="name"/>
</parameter>
</target>
</rule>
</group>
<group>
<name value="ReportingSourceToOrganization"/>
<typeMode value="none"/>
<input>
<name value="reportingSource"/>
<type value="ReportingSourceLogicalModel"/>
<mode value="source"/>
</input>
<input>
<name value="organization"/>
<type value="Organization"/>
<mode value="target"/>
</input>
<input>
<name value="oid"/>
<mode value="source"/>
</input>
<rule>
<name value="set id"/>
<source>
<context value="oid"/>
</source>
<target>
<context value="organization"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="oid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set name"/>
<source>
<context value="reportingSource"/>
<element value="HealthServiceName"/>
<variable value="name"/>
</source>
<target>
<context value="organization"/>
<contextType value="variable"/>
<element value="name"/>
<transform value="copy"/>
<parameter>
<valueId value="name"/>
</parameter>
</target>
</rule>
<rule>
<name value="set phone"/>
<source>
<context value="reportingSource"/>
<element value="HealthServiceTelephone"/>
<variable value="phoneSource"/>
</source>
<target>
<context value="organization"/>
<contextType value="variable"/>
<element value="contact"/>
<variable value="contactDetails"/>
</target>
<target>
<context value="contactDetails"/>
<contextType value="variable"/>
<element value="telecom"/>
<variable value="phoneTarget"/>
</target>
<rule>
<name value="set org contact"/>
<source>
<context value="phoneSource"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="phoneSource"/>
</parameter>
</target>
<dependent>
<name value="contactPointToContactPoint"/>
<variable value="phoneSource"/>
<variable value="phoneTarget"/>
</dependent>
</rule>
</rule>
<rule>
<name value="set address"/>
<source>
<context value="reportingSource"/>
<element value="PlaceOfReporting"/>
<variable value="locationSource"/>
</source>
<target>
<context value="organization"/>
<contextType value="variable"/>
<element value="contact"/>
<variable value="contactDetails"/>
</target>
<target>
<context value="contactDetails"/>
<contextType value="variable"/>
<element value="address"/>
<variable value="locationTarget"/>
</target>
<rule>
<name value="set org address"/>
<source>
<context value="locationSource"/>
</source>
<target>
<contextType value="variable"/>
<transform value="copy"/>
<parameter>
<valueId value="locationSource"/>
</parameter>
</target>
<dependent>
<name value="contactPointToContactPoint"/>
<variable value="locationSource"/>
<variable value="locationTarget"/>
</dependent>
</rule>
</rule>
</group>
<group>
<name value="mapEncounters"/>
<typeMode value="none"/>
<input>
<name value="clinical"/>
<type value="SOTMeaslesClinical"/>
<mode value="source"/>
</input>
<input>
<name value="bundle"/>
<type value="Bundle"/>
<mode value="target"/>
</input>
<input>
<name value="section"/>
<type value="Element"/>
<mode value="target"/>
</input>
<input>
<name value="pid"/>
<mode value="source"/>
</input>
<rule>
<name value="dff"/>
<source>
<context value="clinical"/>
<element value="HistoryOfHospitalization"/>
<condition value="code = 'Yes'"/>
</source>
<rule>
<name value="d"/>
<source>
<context value="clinical"/>
<element value="DateOfAdmission"/>
<variable value="date"/>
</source>
<rule>
<name value="create"/>
<source>
<context value="date"/>
</source>
<target>
<contextType value="variable"/>
<variable value="type"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="type"/>
<contextType value="variable"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueString value="IMP"/>
</parameter>
</target>
<target>
<context value="type"/>
<contextType value="variable"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
</parameter>
</target>
<target>
<context value="type"/>
<contextType value="variable"/>
<element value="display"/>
<transform value="copy"/>
<parameter>
<valueString value="inpatient encounter"/>
</parameter>
</target>
<dependent>
<name value="createEncounterResource"/>
<variable value="date"/>
<variable value="bundle"/>
<variable value="section"/>
<variable value="pid"/>
<variable value="type"/>
</dependent>
</rule>
</rule>
</rule>
</group>
<group>
<name value="createEncounterResource"/>
<typeMode value="none"/>
<input>
<name value="date"/>
<mode value="source"/>
</input>
<input>
<name value="bundle"/>
<type value="Bundle"/>
<mode value="target"/>
</input>
<input>
<name value="section"/>
<type value="Element"/>
<mode value="target"/>
</input>
<input>
<name value="pid"/>
<mode value="source"/>
</input>
<input>
<name value="type"/>
<type value="Coding"/>
<mode value="source"/>
</input>
<rule>
<name value="dssd"/>
<source>
<context value="date"/>
</source>
<target>
<contextType value="variable"/>
<variable value="eid"/>
<transform value="uuid"/>
</target>
<target>
<context value="bundle"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="entry"/>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="fullUrl"/>
<transform value="append"/>
<parameter>
<valueString value="urn:uuid:"/>
</parameter>
<parameter>
<valueId value="eid"/>
</parameter>
</target>
<target>
<context value="section"/>
<contextType value="variable"/>
<element value="entry"/>
<variable value="sectionEntry"/>
</target>
<target>
<context value="sectionEntry"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Encounter/"/>
</parameter>
<parameter>
<valueId value="eid"/>
</parameter>
</target>
<target>
<context value="entry"/>
<contextType value="variable"/>
<element value="resource"/>
<variable value="encounter"/>
<transform value="create"/>
<parameter>
<valueString value="Encounter"/>
</parameter>
</target>
<rule>
<name value="set id"/>
<source>
<context value="date"/>
</source>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="eid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set status"/>
<source>
<context value="date"/>
</source>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="finished"/>
</parameter>
</target>
</rule>
<rule>
<name value="set subject"/>
<source>
<context value="pid"/>
</source>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="subject"/>
<variable value="subject"/>
</target>
<target>
<context value="subject"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Patient/"/>
</parameter>
<parameter>
<valueId value="pid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set date"/>
<source>
<context value="date"/>
</source>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="period"/>
<variable value="period"/>
</target>
<target>
<context value="period"/>
<contextType value="variable"/>
<element value="start"/>
<transform value="copy"/>
<parameter>
<valueId value="date"/>
</parameter>
</target>
</rule>
<rule>
<name value="set type"/>
<source>
<context value="type"/>
</source>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="class"/>
<transform value="copy"/>
<parameter>
<valueId value="type"/>
</parameter>
</target>
</rule>
</rule>
</group>
<group>
<name value="createCompositionEncounterResource"/>
<typeMode value="none"/>
<input>
<name value="date"/>
<mode value="source"/>
</input>
<input>
<name value="pid"/>
<mode value="source"/>
</input>
<input>
<name value="type"/>
<type value="Coding"/>
<mode value="source"/>
</input>
<input>
<name value="eid"/>
<mode value="source"/>
</input>
<input>
<name value="encounter"/>
<type value="Encounter"/>
<mode value="target"/>
</input>
<rule>
<name value="set id"/>
<source>
<context value="date"/>
</source>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="id"/>
<transform value="copy"/>
<parameter>
<valueId value="eid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set status"/>
<source>
<context value="date"/>
</source>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="status"/>
<transform value="copy"/>
<parameter>
<valueString value="finished"/>
</parameter>
</target>
</rule>
<rule>
<name value="set subject"/>
<source>
<context value="pid"/>
</source>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="subject"/>
<variable value="subject"/>
</target>
<target>
<context value="subject"/>
<contextType value="variable"/>
<element value="reference"/>
<transform value="append"/>
<parameter>
<valueString value="Patient/"/>
</parameter>
<parameter>
<valueId value="pid"/>
</parameter>
</target>
</rule>
<rule>
<name value="set date"/>
<source>
<context value="date"/>
</source>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="period"/>
<variable value="period"/>
</target>
<target>
<context value="period"/>
<contextType value="variable"/>
<element value="start"/>
<transform value="copy"/>
<parameter>
<valueId value="date"/>
</parameter>
</target>
</rule>
<rule>
<name value="set type"/>
<source>
<context value="type"/>
</source>
<target>
<context value="encounter"/>
<contextType value="variable"/>
<element value="class"/>
<transform value="copy"/>
<parameter>
<valueId value="type"/>
</parameter>
</target>
</rule>
</group>
</StructureMap>
IG © 2021+ WHO. Package fhir.worldhealthorganization.smart-ot#0.2.1 based on FHIR 4.0.1. Generated 2023-11-07
Links: Table of Contents |
QA Report
| Issues
| Version History | License