German Practice Management FHIR Profiles (R4)
0.90.0 - STU1 Germany

German Practice Management FHIR Profiles (R4) - Local Development build (v0.90.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

: Upper-arm injection Job StructureMap (example) - TTL Representation

Active as of 2026-07-29

Raw ttl | Download

@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

<http://hl7.org/fhir/StructureMap/map-upper-arm-injection> a fhir:StructureMap ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:Resource.id [ fhir:value "map-upper-arm-injection"] ;
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "generated" ] ;
     fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: StructureMap map-upper-arm-injection</b></p><a name=\"map-upper-arm-injection\"> </a><a name=\"hcmap-upper-arm-injection\"> </a><pre class=\"fml\">#xD;\n<b>map</b><span style=\"color: navy\"> \"</span>https://fhir.cognovis.de/praxis/StructureMap/map-upper-arm-injection<span style=\"color: navy\">\" = \"</span>MapUpperArmInjection<span style=\"color: navy\">\"#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">EXAMPLE-ONLY worked StructureMap for the upper-arm injection Job (GOÄ 252). Not a curated production binding discovery artifact. Executed by the bounded R4 StructureMap rule-tree interpreter. Composition/Condition/Observation/Procedure/ChargeItem candidates. QR.subject/.encounter/.author/.authored supply Composition context (never fabricated). ChargeItem.code is Job-fixed GOÄ 252 (http://fhir.de/CodeSystem/bäk/goä#252); definitionCanonical from cid.primary answer.valueUri only. Procedure carries instantiatesCanonical to the Job; basedOn only when a real ServiceRequest exists (separate fixture, not this map). Binding identity: (job-upper-arm-injection|0.90.0, q-upper-arm-injection|0.90.0, map-upper-arm-injection|0.90.0).</span>#xD;\n#xD;\n<b>uses</b><span style=\"color: navy\"> \"</span><a href=\"http://hl7.org/fhir/R4/questionnaireresponse.html\" title=\"QuestionnaireResponse\">http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse</a><span style=\"color: navy\">\" </span><b>alias </b>qr <b>as </b><b>source</b>#xD;\n<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>bundle <b>as </b><b>target</b>#xD;\n#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">Bind QuestionnaireResponse.subject/.encounter/.author/.authored (standard QR fields; not duplicated Questionnaire items), then invoke fillCondition / fillDocumentation / fillProcedure / fillChargeItems / fillComposition.</span>#xD;\n<b>group </b>main<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">qr</span><span style=\"color: navy\"> : </span>QuestionnaireResponse, <b>target</b> <span style=\"color: maroon\">bundle</span><span style=\"color: navy\"> : </span>Bundle<span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span>  qr<span style=\"color: navy\"><b> -&gt; </b></span>bundle.type = <span style=\"color: blue\">'collection'</span> <i>\"bundleType\"</i><span style=\"color: navy\">;</span>#xD;\n  qr.subject<b> as </b><span style=\"color: maroon\">subjectRef</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    qr.encounter<b> as </b><span style=\"color: maroon\">encRef</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>      qr.author<b> as </b><span style=\"color: maroon\">authorRef</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>        qr.authored<b> as </b><span style=\"color: maroon\">authoredDt</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>          qr.item<b> as </b><span style=\"color: maroon\">diagCodingItem</span><b> where </b><span style=\"color: navy\">(</span>linkId = 'diag.icd'<span style=\"color: navy\">)</span><b> then </b>fillCondition<span style=\"color: navy\">(</span><span style=\"color: maroon\">diagCodingItem</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">bundle</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">subjectRef</span><span style=\"color: navy\">)</span> <i>\"invokeFillCondition\"</i><span style=\"color: navy\">;</span>#xD;\n          qr.item<b> as </b><span style=\"color: maroon\">noteItem</span><b> where </b><span style=\"color: navy\">(</span>linkId = 'doc.note'<span style=\"color: navy\">)</span><b> then </b>fillDocumentation<span style=\"color: navy\">(</span><span style=\"color: maroon\">noteItem</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">bundle</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">subjectRef</span><span style=\"color: navy\">)</span> <i>\"invokeFillDocumentation\"</i><span style=\"color: navy\">;</span>#xD;\n          qr.item<b> as </b><span style=\"color: maroon\">perfItem</span><b> where </b><span style=\"color: navy\">(</span>linkId = 'svc.performed' and answer.valueBoolean = true<span style=\"color: navy\">)</span><b> then </b>fillProcedure<span style=\"color: navy\">(</span><span style=\"color: maroon\">qr</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">bundle</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">subjectRef</span><span style=\"color: navy\">)</span> <i>\"invokeFillProcedure\"</i><span style=\"color: navy\">;</span>#xD;\n          qr<b> as </b><span style=\"color: maroon\">qrForCharges</span><b> then </b>fillChargeItems<span style=\"color: navy\">(</span><span style=\"color: maroon\">qrForCharges</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">bundle</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">subjectRef</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">encRef</span><span style=\"color: navy\">)</span> <i>\"invokeFillChargeItems\"</i><span style=\"color: navy\">;</span>#xD;\n          qr<b> as </b><span style=\"color: maroon\">qrForComp</span><b> then </b>fillComposition<span style=\"color: navy\">(</span><span style=\"color: maroon\">qrForComp</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">bundle</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">subjectRef</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">encRef</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">authorRef</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">authoredDt</span><span style=\"color: navy\">)</span> <i>\"invokeFillComposition\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">}</span> <i>\"bindAuthoredFromQr\"</i><span style=\"color: navy\">;</span>#xD;\n      <span style=\"color: navy\">}</span> <i>\"bindAuthorFromQr\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"bindEncounterFromQr\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"bindSubjectFromQr\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">diag.icd answer.valueCoding -&gt; Condition; verificationStatus=unconfirmed; subject from QR.subject.</span>#xD;\n<b>group </b>fillCondition<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">diagItem</span>, <b>target</b> <span style=\"color: maroon\">bundle</span><span style=\"color: navy\"> : </span>Bundle, <b>source</b> <span style=\"color: maroon\">subjectRef</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span>  diagItem.answer<b> as </b><span style=\"color: maroon\">ans</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    ans.value<span style=\"color: navy\"> : </span>Coding<b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\"><b> -&gt; </b></span> bundle.entry = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">condEntry</span><span style=\"color: navy\">, </span> condEntry.fullUrl = <span style=\"color: blue\">'urn:uuid:00000000-0000-4000-8000-000000000001'</span><span style=\"color: navy\">, </span> condEntry.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\">cond</span><span style=\"color: navy\">, </span> cond.code = <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\">condCode</span><span style=\"color: navy\">, </span> condCode.coding = <span style=\"color: maroon\">coding</span><span style=\"color: navy\">, </span> cond.verificationStatus = <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\">ver</span><span style=\"color: navy\">, </span> ver.coding = <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\">verCoding</span><span style=\"color: navy\">, </span> verCoding.system = <span style=\"color: blue\">'http://terminology.hl7.org/CodeSystem/condition-ver-status'</span><span style=\"color: navy\">, </span> verCoding.code = <span style=\"color: blue\">'unconfirmed'</span><span style=\"color: navy\">, </span> cond.clinicalStatus = <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\">clin</span><span style=\"color: navy\">, </span> clin.coding = <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\">clinCoding</span><span style=\"color: navy\">, </span> clinCoding.system = <span style=\"color: blue\">'http://terminology.hl7.org/CodeSystem/condition-clinical'</span><span style=\"color: navy\">, </span> clinCoding.code = <span style=\"color: blue\">'active'</span><span style=\"color: navy\">, </span> cond.subject = <span style=\"color: maroon\">subjectRef</span> <i>\"codingValue\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"conditionFromValueCoding\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">doc.note answer.valueString -&gt; Observation.value (serialized as valueString) status=preliminary.</span>#xD;\n<b>group </b>fillDocumentation<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">noteItem</span>, <b>target</b> <span style=\"color: maroon\">bundle</span><span style=\"color: navy\"> : </span>Bundle, <b>source</b> <span style=\"color: maroon\">subjectRef</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span>  noteItem.answer<b> as </b><span style=\"color: maroon\">ans</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    ans.value<span style=\"color: navy\"> : </span>string<b> as </b><span style=\"color: maroon\">text</span><span style=\"color: navy\"><b> -&gt; </b></span> bundle.entry = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">obsEntry</span><span style=\"color: navy\">, </span> obsEntry.fullUrl = <span style=\"color: blue\">'urn:uuid:00000000-0000-4000-8000-000000000002'</span><span style=\"color: navy\">, </span> obsEntry.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\">obs</span><span style=\"color: navy\">, </span> obs.status = <span style=\"color: blue\">'preliminary'</span><span style=\"color: navy\">, </span> obs.code = <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\">obsCode</span><span style=\"color: navy\">, </span> obsCode.coding = <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\">obsCoding</span><span style=\"color: navy\">, </span> obsCoding.system = <span style=\"color: blue\">'http://snomed.info/sct'</span><span style=\"color: navy\">, </span> obsCoding.code = <span style=\"color: blue\">'371524004'</span><span style=\"color: navy\">, </span> obs.value = <span style=\"color: maroon\">text</span><span style=\"color: navy\">, </span> obs.subject = <span style=\"color: maroon\">subjectRef</span> <i>\"stringValue\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"obsFromValueString\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">bodySiteFromValueCoding + SNOMED laterality; status=preparation; reasonReference from diag.condition.</span>#xD;\n<b>group </b>fillProcedure<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">qr</span><span style=\"color: navy\"> : </span>QuestionnaireResponse, <b>target</b> <span style=\"color: maroon\">bundle</span><span style=\"color: navy\"> : </span>Bundle, <b>source</b> <span style=\"color: maroon\">subjectRef</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span>  qr.item<b> as </b><span style=\"color: maroon\">siteItem</span><b> where </b><span style=\"color: navy\">(</span>linkId = 'site.bodySite'<span style=\"color: navy\">)</span><span style=\"color: navy\">, </span>qr.item<b> as </b><span style=\"color: maroon\">latItem</span><b> where </b><span style=\"color: navy\">(</span>linkId = 'site.laterality'<span style=\"color: navy\">)</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    siteItem.answer<b> as </b><span style=\"color: maroon\">siteAns</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>      siteAns.value<span style=\"color: navy\"> : </span>Coding<b> as </b><span style=\"color: maroon\">siteCoding</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>        latItem.answer<b> as </b><span style=\"color: maroon\">latAns</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>          latAns.value<span style=\"color: navy\"> : </span>Coding<b> as </b><span style=\"color: maroon\">latCoding</span><span style=\"color: navy\"><b> -&gt; </b></span> bundle.entry = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">procEntry</span><span style=\"color: navy\">, </span> procEntry.fullUrl = <span style=\"color: blue\">'urn:uuid:00000000-0000-4000-8000-000000000003'</span><span style=\"color: navy\">, </span> procEntry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Procedure'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">proc</span><span style=\"color: navy\">, </span> proc.status = <span style=\"color: blue\">'preparation'</span><span style=\"color: navy\">, </span> proc.code = <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\">procCode</span><span style=\"color: navy\">, </span> procCode.coding = <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\">procCoding</span><span style=\"color: navy\">, </span> procCoding.system = <span style=\"color: blue\">'http://snomed.info/sct'</span><span style=\"color: navy\">, </span> procCoding.code = <span style=\"color: blue\">'59108006'</span><span style=\"color: navy\">, </span> proc.subject = <span style=\"color: maroon\">subjectRef</span><span style=\"color: navy\">, </span> proc.instantiatesCanonical = <span style=\"color: blue\">'https://fhir.cognovis.de/praxis/PlanDefinition/job-upper-arm-injection|0.90.0'</span><span style=\"color: navy\">, </span> proc.bodySite = <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\">bs</span><span style=\"color: navy\">, </span> bs.coding = <span style=\"color: maroon\">siteCoding</span><span style=\"color: navy\">, </span> bs.coding = <span style=\"color: maroon\">latCoding</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>            qr.item<b> as </b><span style=\"color: maroon\">diagRefItem</span><b> where </b><span style=\"color: navy\">(</span>linkId = 'diag.condition'<span style=\"color: navy\">)</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>              diagRefItem.answer<b> as </b><span style=\"color: maroon\">drAns</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>                drAns.value<span style=\"color: navy\"> : </span>Reference<b> as </b><span style=\"color: maroon\">reasonRef</span><span style=\"color: navy\"><b> -&gt; </b></span>proc.reasonReference = <span style=\"color: maroon\">reasonRef</span> <i>\"diagRefValue\"</i><span style=\"color: navy\">;</span>#xD;\n              <span style=\"color: navy\">}</span> <i>\"diagRefAnswer\"</i><span style=\"color: navy\">;</span>#xD;\n            <span style=\"color: navy\">}</span> <i>\"reasonFromConditionRef\"</i><span style=\"color: navy\">;</span>#xD;\n          <span style=\"color: navy\">}</span> <i>\"latValue\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">}</span> <i>\"latAnswer\"</i><span style=\"color: navy\">;</span>#xD;\n      <span style=\"color: navy\">}</span> <i>\"siteValue\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"siteAnswer\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"bodySiteFromValueCoding\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">One ChargeItem per runtime contract (cid.primary answer.valueUri). ChargeItem.code is the Job-fixed GOÄ 252 Coding (http://fhir.de/CodeSystem/bäk/goä), never derived from CID identity or service codes. context from QR.encounter; subject from QR.subject; 1:n service lineage when performed; supportingInformation from diag.condition.</span>#xD;\n<b>group </b>fillChargeItems<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">qr</span><span style=\"color: navy\"> : </span>QuestionnaireResponse, <b>target</b> <span style=\"color: maroon\">bundle</span><span style=\"color: navy\"> : </span>Bundle, <b>source</b> <span style=\"color: maroon\">subjectRef</span>, <b>source</b> <span style=\"color: maroon\">encRef</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span>  qr.item<b> as </b><span style=\"color: maroon\">cidItem</span><b> where </b><span style=\"color: navy\">(</span>linkId = 'cid.primary'<span style=\"color: navy\">)</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    cidItem.answer<b> as </b><span style=\"color: maroon\">cidAns</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>      cidAns.value<span style=\"color: navy\"> : </span>uri<b> as </b><span style=\"color: maroon\">primaryCid</span><span style=\"color: navy\"><b> -&gt; </b></span> bundle.entry = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">chg1Entry</span><span style=\"color: navy\">, </span> chg1Entry.fullUrl = <span style=\"color: blue\">'urn:uuid:00000000-0000-4000-8000-000000000004'</span><span style=\"color: navy\">, </span> chg1Entry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'ChargeItem'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">chg1</span><span style=\"color: navy\">, </span> chg1.status = <span style=\"color: blue\">'planned'</span><span style=\"color: navy\">, </span> chg1.subject = <span style=\"color: maroon\">subjectRef</span><span style=\"color: navy\">, </span> chg1.context = <span style=\"color: maroon\">encRef</span><span style=\"color: navy\">, </span> chg1.code = <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\">chgCode</span><span style=\"color: navy\">, </span> chgCode.coding = <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\">fixedCoding</span><span style=\"color: navy\">, </span> fixedCoding.system = <span style=\"color: blue\">'http://fhir.de/CodeSystem/bäk/goä'</span><span style=\"color: navy\">, </span> fixedCoding.code = <span style=\"color: blue\">'252'</span><span style=\"color: navy\">, </span> fixedCoding.display = <span style=\"color: blue\">'Injektion, s.c./s.m./i.c./i.m.'</span><span style=\"color: navy\">, </span> chg1.definitionCanonical = <span style=\"color: maroon\">primaryCid</span><span style=\"color: navy\">, </span> chg1.quantity = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Quantity'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">qty</span><span style=\"color: navy\">, </span> qty.value = <span style=\"color: blue\">1</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>        qr.item<b> as </b><span style=\"color: maroon\">amtItem</span><b> where </b><span style=\"color: navy\">(</span>linkId = 'fee.amount'<span style=\"color: navy\">)</span><span style=\"color: navy\">, </span>qr.item<b> as </b><span style=\"color: maroon\">curItem</span><b> where </b><span style=\"color: navy\">(</span>linkId = 'fee.currency'<span style=\"color: navy\">)</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>          amtItem.answer<b> as </b><span style=\"color: maroon\">amtAns</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>            amtAns.value<span style=\"color: navy\"> : </span>decimal<b> as </b><span style=\"color: maroon\">amount</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>              curItem.answer<b> as </b><span style=\"color: maroon\">curAns</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>                curAns.value<span style=\"color: navy\"> : </span>Coding<b> as </b><span style=\"color: maroon\">curCoding</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>                  curCoding.code<b> as </b><span style=\"color: maroon\">currencyCode</span><span style=\"color: navy\"><b> -&gt; </b></span> chg1.priceOverride = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Money'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">money</span><span style=\"color: navy\">, </span> money.value = <span style=\"color: maroon\">amount</span><span style=\"color: navy\">, </span> money.currency = <span style=\"color: maroon\">currencyCode</span> <i>\"currencyCode\"</i><span style=\"color: navy\">;</span>#xD;\n                <span style=\"color: navy\">}</span> <i>\"currencyValue\"</i><span style=\"color: navy\">;</span>#xD;\n              <span style=\"color: navy\">}</span> <i>\"currencyAnswer\"</i><span style=\"color: navy\">;</span>#xD;\n            <span style=\"color: navy\">}</span> <i>\"amountValue\"</i><span style=\"color: navy\">;</span>#xD;\n          <span style=\"color: navy\">}</span> <i>\"amountAnswer\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">}</span> <i>\"moneyFromParts\"</i><span style=\"color: navy\">;</span>#xD;\n        qr.item<b> as </b><span style=\"color: maroon\">perfItem</span><b> where </b><span style=\"color: navy\">(</span>linkId = 'svc.performed' and answer.valueBoolean = true<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span> chg1.service = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">svcProc</span><span style=\"color: navy\">, </span> svcProc.reference = <span style=\"color: blue\">'urn:uuid:00000000-0000-4000-8000-000000000003'</span><span style=\"color: navy\">, </span> chg1.service = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">svcObs</span><span style=\"color: navy\">, </span> svcObs.reference = <span style=\"color: blue\">'urn:uuid:00000000-0000-4000-8000-000000000002'</span> <i>\"serviceWhenPerformedPrimary\"</i><span style=\"color: navy\">;</span>#xD;\n        qr.item<b> as </b><span style=\"color: maroon\">diagRefItem2</span><b> where </b><span style=\"color: navy\">(</span>linkId = 'diag.condition'<span style=\"color: navy\">)</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>          diagRefItem2.answer<b> as </b><span style=\"color: maroon\">dr2Ans</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>            dr2Ans.value<span style=\"color: navy\"> : </span>Reference<b> as </b><span style=\"color: maroon\">reasonRef2</span><span style=\"color: navy\"><b> -&gt; </b></span>chg1.supportingInformation = <span style=\"color: maroon\">reasonRef2</span> <i>\"dr2Value\"</i><span style=\"color: navy\">;</span>#xD;\n          <span style=\"color: navy\">}</span> <i>\"dr2Answer\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">}</span> <i>\"supportingInfoFromConditionRef\"</i><span style=\"color: navy\">;</span>#xD;\n      <span style=\"color: navy\">}</span> <i>\"cidValue\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"cidAnswer\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"primaryFromValueUri\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">Composition proposal (status=preliminary). subject/encounter/author/date from QR.subject/.encounter/.author/.authored only — never fabricated. Sections Reference generated Observation/ChargeItem UUIDs; optional Procedure/Condition sections when those outputs are produced.</span>#xD;\n<b>group </b>fillComposition<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">qr</span><span style=\"color: navy\"> : </span>QuestionnaireResponse, <b>target</b> <span style=\"color: maroon\">bundle</span><span style=\"color: navy\"> : </span>Bundle, <b>source</b> <span style=\"color: maroon\">subjectRef</span>, <b>source</b> <span style=\"color: maroon\">encRef</span>, <b>source</b> <span style=\"color: maroon\">authorRef</span>, <b>source</b> <span style=\"color: maroon\">authoredDt</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span>  qr<span style=\"color: navy\"><b> -&gt; </b></span> bundle.entry = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">compEntry</span><span style=\"color: navy\">, </span> compEntry.fullUrl = <span style=\"color: blue\">'urn:uuid:00000000-0000-4000-8000-000000000006'</span><span style=\"color: navy\">, </span> compEntry.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\">comp</span><span style=\"color: navy\">, </span> comp.status = <span style=\"color: blue\">'preliminary'</span><span style=\"color: navy\">, </span> comp.type = <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\">compType</span><span style=\"color: navy\">, </span> compType.coding = <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\">compTypeCoding</span><span style=\"color: navy\">, </span> compTypeCoding.system = <span style=\"color: blue\">'http://loinc.org'</span><span style=\"color: navy\">, </span> compTypeCoding.code = <span style=\"color: blue\">'11506-3'</span><span style=\"color: navy\">, </span> compTypeCoding.display = <span style=\"color: blue\">'Progress note'</span><span style=\"color: navy\">, </span> comp.title = <span style=\"color: blue\">'Upper-arm injection visit - pre-approval proposal'</span><span style=\"color: navy\">, </span> comp.subject = <span style=\"color: maroon\">subjectRef</span><span style=\"color: navy\">, </span> comp.encounter = <span style=\"color: maroon\">encRef</span><span style=\"color: navy\">, </span> comp.author = <span style=\"color: maroon\">authorRef</span><span style=\"color: navy\">, </span> comp.date = <span style=\"color: maroon\">authoredDt</span><span style=\"color: navy\">, </span> comp.section = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">secDoc</span><span style=\"color: navy\">, </span> secDoc.title = <span style=\"color: blue\">'Documentation'</span><span style=\"color: navy\">, </span> secDoc.entry = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">docEntry</span><span style=\"color: navy\">, </span> docEntry.reference = <span style=\"color: blue\">'urn:uuid:00000000-0000-4000-8000-000000000002'</span><span style=\"color: navy\">, </span> comp.section = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">secBill</span><span style=\"color: navy\">, </span> secBill.title = <span style=\"color: blue\">'Billing proposal'</span><span style=\"color: navy\">, </span> secBill.entry = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">billEntry</span><span style=\"color: navy\">, </span> billEntry.reference = <span style=\"color: blue\">'urn:uuid:00000000-0000-4000-8000-000000000004'</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    qr.item<b> as </b><span style=\"color: maroon\">perfItem</span><b> where </b><span style=\"color: navy\">(</span>linkId = 'svc.performed' and answer.valueBoolean = true<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span> comp.section = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">secProc</span><span style=\"color: navy\">, </span> secProc.title = <span style=\"color: blue\">'Procedure proposal'</span><span style=\"color: navy\">, </span> secProc.entry = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">procEntryRef</span><span style=\"color: navy\">, </span> procEntryRef.reference = <span style=\"color: blue\">'urn:uuid:00000000-0000-4000-8000-000000000003'</span> <i>\"sectionProcedureWhenPerformed\"</i><span style=\"color: navy\">;</span>#xD;\n    qr.item<b> as </b><span style=\"color: maroon\">diagCodingItem</span><b> where </b><span style=\"color: navy\">(</span>linkId = 'diag.icd'<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span> comp.section = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">secDx</span><span style=\"color: navy\">, </span> secDx.title = <span style=\"color: blue\">'Diagnosis proposal'</span><span style=\"color: navy\">, </span> secDx.entry = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">dxEntry</span><span style=\"color: navy\">, </span> dxEntry.reference = <span style=\"color: blue\">'urn:uuid:00000000-0000-4000-8000-000000000001'</span> <i>\"sectionDiagnosisWhenCoding\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"compositionShell\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span></pre></div>"
  ] ;
  fhir:StructureMap.url [ fhir:value "https://fhir.cognovis.de/praxis/StructureMap/map-upper-arm-injection"] ;
  fhir:StructureMap.identifier [
     fhir:index 0 ;
     fhir:Identifier.system [ fhir:value "urn:ietf:rfc:3986" ] ;
     fhir:Identifier.value [ fhir:value "urn:oid:2.16.840.1.113883.3.7985.43.1" ]
  ] ;
  fhir:StructureMap.version [ fhir:value "0.90.0"] ;
  fhir:StructureMap.name [ fhir:value "MapUpperArmInjection"] ;
  fhir:StructureMap.title [ fhir:value "Upper-arm injection Job — QuestionnaireResponse to pre-approval candidate Bundle"] ;
  fhir:StructureMap.status [ fhir:value "active"] ;
  fhir:StructureMap.experimental [ fhir:value "true"^^xsd:boolean] ;
  fhir:StructureMap.date [ fhir:value "2026-07-29T13:00:36+02:00"^^xsd:dateTime] ;
  fhir:StructureMap.publisher [ fhir:value "cognovis GmbH"] ;
  fhir:StructureMap.contact [
     fhir:index 0 ;
     fhir:ContactDetail.name [ fhir:value "cognovis GmbH" ] ;
     fhir:ContactDetail.telecom [
       fhir:index 0 ;
       fhir:ContactPoint.system [ fhir:value "url" ] ;
       fhir:ContactPoint.value [ fhir:value "https://www.cognovis.de" ]
     ], [
       fhir:index 1 ;
       fhir:ContactPoint.system [ fhir:value "email" ] ;
       fhir:ContactPoint.value [ fhir:value "info@cognovis.de" ]
     ]
  ] ;
  fhir:StructureMap.description [ fhir:value "EXAMPLE-ONLY worked StructureMap for the upper-arm injection Job (GOÄ 252). Not a curated production binding discovery artifact. Executed by the bounded R4 StructureMap rule-tree interpreter. Composition/Condition/Observation/Procedure/ChargeItem candidates. QR.subject/.encounter/.author/.authored supply Composition context (never fabricated). ChargeItem.code is Job-fixed GOÄ 252 (http://fhir.de/CodeSystem/bäk/goä#252); definitionCanonical from cid.primary answer.valueUri only. Procedure carries instantiatesCanonical to the Job; basedOn only when a real ServiceRequest exists (separate fixture, not this map). Binding identity: (job-upper-arm-injection|0.90.0, q-upper-arm-injection|0.90.0, map-upper-arm-injection|0.90.0)."] ;
  fhir:StructureMap.jurisdiction [
     fhir:index 0 ;
     fhir:CodeableConcept.coding [
       fhir:index 0 ;
       fhir:Coding.system [ fhir:value "urn:iso:std:iso:3166" ] ;
       fhir:Coding.code [ fhir:value "DE" ] ;
       fhir:Coding.display [ fhir:value "Germany" ]
     ]
  ] ;
  fhir:StructureMap.structure [
     fhir:index 0 ;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" ;
       fhir:link <http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse>
     ] ;
     fhir:StructureMap.structure.mode [ fhir:value "source" ] ;
     fhir:StructureMap.structure.alias [ fhir:value "qr" ]
  ], [
     fhir:index 1 ;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/StructureDefinition/Bundle" ;
       fhir:link <http://hl7.org/fhir/StructureDefinition/Bundle>
     ] ;
     fhir:StructureMap.structure.mode [ fhir:value "target" ] ;
     fhir:StructureMap.structure.alias [ fhir:value "bundle" ]
  ] ;
  fhir:StructureMap.group [
     fhir:index 0 ;
     fhir:StructureMap.group.name [ fhir:value "main" ] ;
     fhir:StructureMap.group.typeMode [ fhir:value "none" ] ;
     fhir:StructureMap.group.documentation [ fhir:value "Bind QuestionnaireResponse.subject/.encounter/.author/.authored (standard QR fields; not duplicated Questionnaire items), then invoke fillCondition / fillDocumentation / fillProcedure / fillChargeItems / fillComposition." ] ;
     fhir:StructureMap.group.input [
       fhir:index 0 ;
       fhir:StructureMap.group.input.name [ fhir:value "qr" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "QuestionnaireResponse" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ], [
       fhir:index 1 ;
       fhir:StructureMap.group.input.name [ fhir:value "bundle" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "Bundle" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]
     ] ;
     fhir:StructureMap.group.rule [
       fhir:index 0 ;
       fhir:StructureMap.group.rule.name [ fhir:value "bundleType" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "type" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "collection" ]
         ]
       ]
     ], [
       fhir:index 1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "bindSubjectFromQr" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "subject" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "subjectRef" ]
       ] ;
       fhir:StructureMap.group.rule.rule [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.name [ fhir:value "bindEncounterFromQr" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
           fhir:StructureMap.group.rule.source.element [ fhir:value "encounter" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "encRef" ]
         ] ;
         fhir:StructureMap.group.rule.rule [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.name [ fhir:value "bindAuthorFromQr" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
             fhir:StructureMap.group.rule.source.element [ fhir:value "author" ] ;
             fhir:StructureMap.group.rule.source.variable [ fhir:value "authorRef" ]
           ] ;
           fhir:StructureMap.group.rule.rule [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.name [ fhir:value "bindAuthoredFromQr" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
               fhir:StructureMap.group.rule.source.element [ fhir:value "authored" ] ;
               fhir:StructureMap.group.rule.source.variable [ fhir:value "authoredDt" ]
             ] ;
             fhir:StructureMap.group.rule.rule [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.name [ fhir:value "invokeFillCondition" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
                 fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ;
                 fhir:StructureMap.group.rule.source.variable [ fhir:value "diagCodingItem" ] ;
                 fhir:StructureMap.group.rule.source.condition [ fhir:value "linkId = 'diag.icd'" ]
               ] ;
               fhir:StructureMap.group.rule.dependent [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.dependent.name [ fhir:value "fillCondition" ] ;
                 fhir:StructureMap.group.rule.dependent.variable [
                   fhir:value "diagCodingItem" ;
                   fhir:index 0
                 ], [
                   fhir:value "bundle" ;
                   fhir:index 1
                 ], [
                   fhir:value "subjectRef" ;
                   fhir:index 2
                 ]
               ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.name [ fhir:value "invokeFillDocumentation" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
                 fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ;
                 fhir:StructureMap.group.rule.source.variable [ fhir:value "noteItem" ] ;
                 fhir:StructureMap.group.rule.source.condition [ fhir:value "linkId = 'doc.note'" ]
               ] ;
               fhir:StructureMap.group.rule.dependent [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.dependent.name [ fhir:value "fillDocumentation" ] ;
                 fhir:StructureMap.group.rule.dependent.variable [
                   fhir:value "noteItem" ;
                   fhir:index 0
                 ], [
                   fhir:value "bundle" ;
                   fhir:index 1
                 ], [
                   fhir:value "subjectRef" ;
                   fhir:index 2
                 ]
               ]
             ], [
               fhir:index 2 ;
               fhir:StructureMap.group.rule.name [ fhir:value "invokeFillProcedure" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
                 fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ;
                 fhir:StructureMap.group.rule.source.variable [ fhir:value "perfItem" ] ;
                 fhir:StructureMap.group.rule.source.condition [ fhir:value "linkId = 'svc.performed' and answer.valueBoolean = true" ]
               ] ;
               fhir:StructureMap.group.rule.dependent [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.dependent.name [ fhir:value "fillProcedure" ] ;
                 fhir:StructureMap.group.rule.dependent.variable [
                   fhir:value "qr" ;
                   fhir:index 0
                 ], [
                   fhir:value "bundle" ;
                   fhir:index 1
                 ], [
                   fhir:value "subjectRef" ;
                   fhir:index 2
                 ]
               ]
             ], [
               fhir:index 3 ;
               fhir:StructureMap.group.rule.name [ fhir:value "invokeFillChargeItems" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
                 fhir:StructureMap.group.rule.source.variable [ fhir:value "qrForCharges" ]
               ] ;
               fhir:StructureMap.group.rule.dependent [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.dependent.name [ fhir:value "fillChargeItems" ] ;
                 fhir:StructureMap.group.rule.dependent.variable [
                   fhir:value "qrForCharges" ;
                   fhir:index 0
                 ], [
                   fhir:value "bundle" ;
                   fhir:index 1
                 ], [
                   fhir:value "subjectRef" ;
                   fhir:index 2
                 ], [
                   fhir:value "encRef" ;
                   fhir:index 3
                 ]
               ]
             ], [
               fhir:index 4 ;
               fhir:StructureMap.group.rule.name [ fhir:value "invokeFillComposition" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
                 fhir:StructureMap.group.rule.source.variable [ fhir:value "qrForComp" ]
               ] ;
               fhir:StructureMap.group.rule.dependent [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.dependent.name [ fhir:value "fillComposition" ] ;
                 fhir:StructureMap.group.rule.dependent.variable [
                   fhir:value "qrForComp" ;
                   fhir:index 0
                 ], [
                   fhir:value "bundle" ;
                   fhir:index 1
                 ], [
                   fhir:value "subjectRef" ;
                   fhir:index 2
                 ], [
                   fhir:value "encRef" ;
                   fhir:index 3
                 ], [
                   fhir:value "authorRef" ;
                   fhir:index 4
                 ], [
                   fhir:value "authoredDt" ;
                   fhir:index 5
                 ]
               ]
             ]
           ]
         ]
       ]
     ]
  ], [
     fhir:index 1 ;
     fhir:StructureMap.group.name [ fhir:value "fillCondition" ] ;
     fhir:StructureMap.group.typeMode [ fhir:value "none" ] ;
     fhir:StructureMap.group.documentation [ fhir:value "diag.icd answer.valueCoding -> Condition; verificationStatus=unconfirmed; subject from QR.subject." ] ;
     fhir:StructureMap.group.input [
       fhir:index 0 ;
       fhir:StructureMap.group.input.name [ fhir:value "diagItem" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ], [
       fhir:index 1 ;
       fhir:StructureMap.group.input.name [ fhir:value "bundle" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "Bundle" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]
     ], [
       fhir:index 2 ;
       fhir:StructureMap.group.input.name [ fhir:value "subjectRef" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ] ;
     fhir:StructureMap.group.rule [
       fhir:index 0 ;
       fhir:StructureMap.group.rule.name [ fhir:value "conditionFromValueCoding" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "diagItem" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "answer" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "ans" ]
       ] ;
       fhir:StructureMap.group.rule.rule [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.name [ fhir:value "codingValue" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "ans" ] ;
           fhir:StructureMap.group.rule.source.type [ fhir:value "Coding" ] ;
           fhir:StructureMap.group.rule.source.element [ fhir:value "value" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "coding" ]
         ] ;
         fhir:StructureMap.group.rule.target [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ] ;
           fhir:StructureMap.group.rule.target.variable [ fhir:value "condEntry" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ]
         ], [
           fhir:index 1 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "condEntry" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "fullUrl" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:00000000-0000-4000-8000-000000000001" ]
           ]
         ], [
           fhir:index 2 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "condEntry" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ;
           fhir:StructureMap.group.rule.target.variable [ fhir:value "cond" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Condition" ]
           ]
         ], [
           fhir:index 3 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "cond" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ;
           fhir:StructureMap.group.rule.target.variable [ fhir:value "condCode" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "CodeableConcept" ]
           ]
         ], [
           fhir:index 4 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "condCode" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "coding" ]
           ]
         ], [
           fhir:index 5 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "cond" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "verificationStatus" ] ;
           fhir:StructureMap.group.rule.target.variable [ fhir:value "ver" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "CodeableConcept" ]
           ]
         ], [
           fhir:index 6 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "ver" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ;
           fhir:StructureMap.group.rule.target.variable [ fhir:value "verCoding" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Coding" ]
           ]
         ], [
           fhir:index 7 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "verCoding" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://terminology.hl7.org/CodeSystem/condition-ver-status" ]
           ]
         ], [
           fhir:index 8 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "verCoding" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "unconfirmed" ]
           ]
         ], [
           fhir:index 9 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "cond" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "clinicalStatus" ] ;
           fhir:StructureMap.group.rule.target.variable [ fhir:value "clin" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "CodeableConcept" ]
           ]
         ], [
           fhir:index 10 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "clin" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ;
           fhir:StructureMap.group.rule.target.variable [ fhir:value "clinCoding" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Coding" ]
           ]
         ], [
           fhir:index 11 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "clinCoding" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://terminology.hl7.org/CodeSystem/condition-clinical" ]
           ]
         ], [
           fhir:index 12 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "clinCoding" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "active" ]
           ]
         ], [
           fhir:index 13 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "cond" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "subjectRef" ]
           ]
         ]
       ]
     ]
  ], [
     fhir:index 2 ;
     fhir:StructureMap.group.name [ fhir:value "fillDocumentation" ] ;
     fhir:StructureMap.group.typeMode [ fhir:value "none" ] ;
     fhir:StructureMap.group.documentation [ fhir:value "doc.note answer.valueString -> Observation.value (serialized as valueString) status=preliminary." ] ;
     fhir:StructureMap.group.input [
       fhir:index 0 ;
       fhir:StructureMap.group.input.name [ fhir:value "noteItem" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ], [
       fhir:index 1 ;
       fhir:StructureMap.group.input.name [ fhir:value "bundle" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "Bundle" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]
     ], [
       fhir:index 2 ;
       fhir:StructureMap.group.input.name [ fhir:value "subjectRef" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ] ;
     fhir:StructureMap.group.rule [
       fhir:index 0 ;
       fhir:StructureMap.group.rule.name [ fhir:value "obsFromValueString" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "noteItem" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "answer" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "ans" ]
       ] ;
       fhir:StructureMap.group.rule.rule [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.name [ fhir:value "stringValue" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "ans" ] ;
           fhir:StructureMap.group.rule.source.type [ fhir:value "string" ] ;
           fhir:StructureMap.group.rule.source.element [ fhir:value "value" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "text" ]
         ] ;
         fhir:StructureMap.group.rule.target [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ] ;
           fhir:StructureMap.group.rule.target.variable [ fhir:value "obsEntry" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ]
         ], [
           fhir:index 1 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "obsEntry" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "fullUrl" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:00000000-0000-4000-8000-000000000002" ]
           ]
         ], [
           fhir:index 2 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "obsEntry" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ;
           fhir:StructureMap.group.rule.target.variable [ fhir:value "obs" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Observation" ]
           ]
         ], [
           fhir:index 3 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "obs" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "status" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "preliminary" ]
           ]
         ], [
           fhir:index 4 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "obs" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ;
           fhir:StructureMap.group.rule.target.variable [ fhir:value "obsCode" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "CodeableConcept" ]
           ]
         ], [
           fhir:index 5 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "obsCode" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ;
           fhir:StructureMap.group.rule.target.variable [ fhir:value "obsCoding" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Coding" ]
           ]
         ], [
           fhir:index 6 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "obsCoding" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://snomed.info/sct" ]
           ]
         ], [
           fhir:index 7 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "obsCoding" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "371524004" ]
           ]
         ], [
           fhir:index 8 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "obs" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "text" ]
           ]
         ], [
           fhir:index 9 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "obs" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "subjectRef" ]
           ]
         ]
       ]
     ]
  ], [
     fhir:index 3 ;
     fhir:StructureMap.group.name [ fhir:value "fillProcedure" ] ;
     fhir:StructureMap.group.typeMode [ fhir:value "none" ] ;
     fhir:StructureMap.group.documentation [ fhir:value "bodySiteFromValueCoding + SNOMED laterality; status=preparation; reasonReference from diag.condition." ] ;
     fhir:StructureMap.group.input [
       fhir:index 0 ;
       fhir:StructureMap.group.input.name [ fhir:value "qr" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "QuestionnaireResponse" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ], [
       fhir:index 1 ;
       fhir:StructureMap.group.input.name [ fhir:value "bundle" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "Bundle" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]
     ], [
       fhir:index 2 ;
       fhir:StructureMap.group.input.name [ fhir:value "subjectRef" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ] ;
     fhir:StructureMap.group.rule [
       fhir:index 0 ;
       fhir:StructureMap.group.rule.name [ fhir:value "bodySiteFromValueCoding" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "siteItem" ] ;
         fhir:StructureMap.group.rule.source.condition [ fhir:value "linkId = 'site.bodySite'" ]
       ], [
         fhir:index 1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "latItem" ] ;
         fhir:StructureMap.group.rule.source.condition [ fhir:value "linkId = 'site.laterality'" ]
       ] ;
       fhir:StructureMap.group.rule.rule [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.name [ fhir:value "siteAnswer" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "siteItem" ] ;
           fhir:StructureMap.group.rule.source.element [ fhir:value "answer" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "siteAns" ]
         ] ;
         fhir:StructureMap.group.rule.rule [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.name [ fhir:value "siteValue" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "siteAns" ] ;
             fhir:StructureMap.group.rule.source.type [ fhir:value "Coding" ] ;
             fhir:StructureMap.group.rule.source.element [ fhir:value "value" ] ;
             fhir:StructureMap.group.rule.source.variable [ fhir:value "siteCoding" ]
           ] ;
           fhir:StructureMap.group.rule.rule [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.name [ fhir:value "latAnswer" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "latItem" ] ;
               fhir:StructureMap.group.rule.source.element [ fhir:value "answer" ] ;
               fhir:StructureMap.group.rule.source.variable [ fhir:value "latAns" ]
             ] ;
             fhir:StructureMap.group.rule.rule [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.name [ fhir:value "latValue" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "latAns" ] ;
                 fhir:StructureMap.group.rule.source.type [ fhir:value "Coding" ] ;
                 fhir:StructureMap.group.rule.source.element [ fhir:value "value" ] ;
                 fhir:StructureMap.group.rule.source.variable [ fhir:value "latCoding" ]
               ] ;
               fhir:StructureMap.group.rule.target [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ] ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ] ;
                 fhir:StructureMap.group.rule.target.variable [ fhir:value "procEntry" ] ;
                 fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "procEntry" ] ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.element [ fhir:value "fullUrl" ] ;
                 fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
                 fhir:StructureMap.group.rule.target.parameter [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:00000000-0000-4000-8000-000000000003" ]
                 ]
               ], [
                 fhir:index 2 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "procEntry" ] ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ;
                 fhir:StructureMap.group.rule.target.variable [ fhir:value "proc" ] ;
                 fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
                 fhir:StructureMap.group.rule.target.parameter [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Procedure" ]
                 ]
               ], [
                 fhir:index 3 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "proc" ] ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.element [ fhir:value "status" ] ;
                 fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
                 fhir:StructureMap.group.rule.target.parameter [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "preparation" ]
                 ]
               ], [
                 fhir:index 4 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "proc" ] ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ;
                 fhir:StructureMap.group.rule.target.variable [ fhir:value "procCode" ] ;
                 fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
                 fhir:StructureMap.group.rule.target.parameter [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "CodeableConcept" ]
                 ]
               ], [
                 fhir:index 5 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "procCode" ] ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ;
                 fhir:StructureMap.group.rule.target.variable [ fhir:value "procCoding" ] ;
                 fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
                 fhir:StructureMap.group.rule.target.parameter [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Coding" ]
                 ]
               ], [
                 fhir:index 6 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "procCoding" ] ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ;
                 fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
                 fhir:StructureMap.group.rule.target.parameter [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://snomed.info/sct" ]
                 ]
               ], [
                 fhir:index 7 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "procCoding" ] ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ;
                 fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
                 fhir:StructureMap.group.rule.target.parameter [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "59108006" ]
                 ]
               ], [
                 fhir:index 8 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "proc" ] ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ] ;
                 fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
                 fhir:StructureMap.group.rule.target.parameter [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "subjectRef" ]
                 ]
               ], [
                 fhir:index 9 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "proc" ] ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.element [ fhir:value "instantiatesCanonical" ] ;
                 fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
                 fhir:StructureMap.group.rule.target.parameter [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "https://fhir.cognovis.de/praxis/PlanDefinition/job-upper-arm-injection|0.90.0" ]
                 ]
               ], [
                 fhir:index 10 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "proc" ] ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.element [ fhir:value "bodySite" ] ;
                 fhir:StructureMap.group.rule.target.variable [ fhir:value "bs" ] ;
                 fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
                 fhir:StructureMap.group.rule.target.parameter [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "CodeableConcept" ]
                 ]
               ], [
                 fhir:index 11 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "bs" ] ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ;
                 fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
                 fhir:StructureMap.group.rule.target.parameter [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "siteCoding" ]
                 ]
               ], [
                 fhir:index 12 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "bs" ] ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ;
                 fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
                 fhir:StructureMap.group.rule.target.parameter [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "latCoding" ]
                 ]
               ] ;
               fhir:StructureMap.group.rule.rule [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.name [ fhir:value "reasonFromConditionRef" ] ;
                 fhir:StructureMap.group.rule.source [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
                   fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ;
                   fhir:StructureMap.group.rule.source.variable [ fhir:value "diagRefItem" ] ;
                   fhir:StructureMap.group.rule.source.condition [ fhir:value "linkId = 'diag.condition'" ]
                 ] ;
                 fhir:StructureMap.group.rule.rule [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.name [ fhir:value "diagRefAnswer" ] ;
                   fhir:StructureMap.group.rule.source [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.source.context [ fhir:value "diagRefItem" ] ;
                     fhir:StructureMap.group.rule.source.element [ fhir:value "answer" ] ;
                     fhir:StructureMap.group.rule.source.variable [ fhir:value "drAns" ]
                   ] ;
                   fhir:StructureMap.group.rule.rule [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.name [ fhir:value "diagRefValue" ] ;
                     fhir:StructureMap.group.rule.source [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.source.context [ fhir:value "drAns" ] ;
                       fhir:StructureMap.group.rule.source.type [ fhir:value "Reference" ] ;
                       fhir:StructureMap.group.rule.source.element [ fhir:value "value" ] ;
                       fhir:StructureMap.group.rule.source.variable [ fhir:value "reasonRef" ]
                     ] ;
                     fhir:StructureMap.group.rule.target [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.target.context [ fhir:value "proc" ] ;
                       fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                       fhir:StructureMap.group.rule.target.element [ fhir:value "reasonReference" ] ;
                       fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
                       fhir:StructureMap.group.rule.target.parameter [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "reasonRef" ]
                       ]
                     ]
                   ]
                 ]
               ]
             ]
           ]
         ]
       ]
     ]
  ], [
     fhir:index 4 ;
     fhir:StructureMap.group.name [ fhir:value "fillChargeItems" ] ;
     fhir:StructureMap.group.typeMode [ fhir:value "none" ] ;
     fhir:StructureMap.group.documentation [ fhir:value "One ChargeItem per runtime contract (cid.primary answer.valueUri). ChargeItem.code is the Job-fixed GOÄ 252 Coding (http://fhir.de/CodeSystem/bäk/goä), never derived from CID identity or service codes. context from QR.encounter; subject from QR.subject; 1:n service lineage when performed; supportingInformation from diag.condition." ] ;
     fhir:StructureMap.group.input [
       fhir:index 0 ;
       fhir:StructureMap.group.input.name [ fhir:value "qr" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "QuestionnaireResponse" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ], [
       fhir:index 1 ;
       fhir:StructureMap.group.input.name [ fhir:value "bundle" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "Bundle" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]
     ], [
       fhir:index 2 ;
       fhir:StructureMap.group.input.name [ fhir:value "subjectRef" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ], [
       fhir:index 3 ;
       fhir:StructureMap.group.input.name [ fhir:value "encRef" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ] ;
     fhir:StructureMap.group.rule [
       fhir:index 0 ;
       fhir:StructureMap.group.rule.name [ fhir:value "primaryFromValueUri" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "cidItem" ] ;
         fhir:StructureMap.group.rule.source.condition [ fhir:value "linkId = 'cid.primary'" ]
       ] ;
       fhir:StructureMap.group.rule.rule [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.name [ fhir:value "cidAnswer" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "cidItem" ] ;
           fhir:StructureMap.group.rule.source.element [ fhir:value "answer" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "cidAns" ]
         ] ;
         fhir:StructureMap.group.rule.rule [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.name [ fhir:value "cidValue" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "cidAns" ] ;
             fhir:StructureMap.group.rule.source.type [ fhir:value "uri" ] ;
             fhir:StructureMap.group.rule.source.element [ fhir:value "value" ] ;
             fhir:StructureMap.group.rule.source.variable [ fhir:value "primaryCid" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ] ;
             fhir:StructureMap.group.rule.target.variable [ fhir:value "chg1Entry" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ]
           ], [
             fhir:index 1 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "chg1Entry" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "fullUrl" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:00000000-0000-4000-8000-000000000004" ]
             ]
           ], [
             fhir:index 2 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "chg1Entry" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ;
             fhir:StructureMap.group.rule.target.variable [ fhir:value "chg1" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "ChargeItem" ]
             ]
           ], [
             fhir:index 3 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "chg1" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "status" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "planned" ]
             ]
           ], [
             fhir:index 4 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "chg1" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "subjectRef" ]
             ]
           ], [
             fhir:index 5 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "chg1" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "context" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "encRef" ]
             ]
           ], [
             fhir:index 6 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "chg1" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ;
             fhir:StructureMap.group.rule.target.variable [ fhir:value "chgCode" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "CodeableConcept" ]
             ]
           ], [
             fhir:index 7 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "chgCode" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ;
             fhir:StructureMap.group.rule.target.variable [ fhir:value "fixedCoding" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Coding" ]
             ]
           ], [
             fhir:index 8 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "fixedCoding" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://fhir.de/CodeSystem/bäk/goä" ]
             ]
           ], [
             fhir:index 9 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "fixedCoding" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "252" ]
             ]
           ], [
             fhir:index 10 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "fixedCoding" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "display" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Injektion, s.c./s.m./i.c./i.m." ]
             ]
           ], [
             fhir:index 11 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "chg1" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "definitionCanonical" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "primaryCid" ]
             ]
           ], [
             fhir:index 12 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "chg1" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "quantity" ] ;
             fhir:StructureMap.group.rule.target.variable [ fhir:value "qty" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Quantity" ]
             ]
           ], [
             fhir:index 13 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "qty" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueDecimal [ fhir:value "1"^^xsd:decimal ]
             ]
           ] ;
           fhir:StructureMap.group.rule.rule [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.name [ fhir:value "moneyFromParts" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
               fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ;
               fhir:StructureMap.group.rule.source.variable [ fhir:value "amtItem" ] ;
               fhir:StructureMap.group.rule.source.condition [ fhir:value "linkId = 'fee.amount'" ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
               fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ;
               fhir:StructureMap.group.rule.source.variable [ fhir:value "curItem" ] ;
               fhir:StructureMap.group.rule.source.condition [ fhir:value "linkId = 'fee.currency'" ]
             ] ;
             fhir:StructureMap.group.rule.rule [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.name [ fhir:value "amountAnswer" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "amtItem" ] ;
                 fhir:StructureMap.group.rule.source.element [ fhir:value "answer" ] ;
                 fhir:StructureMap.group.rule.source.variable [ fhir:value "amtAns" ]
               ] ;
               fhir:StructureMap.group.rule.rule [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.name [ fhir:value "amountValue" ] ;
                 fhir:StructureMap.group.rule.source [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.source.context [ fhir:value "amtAns" ] ;
                   fhir:StructureMap.group.rule.source.type [ fhir:value "decimal" ] ;
                   fhir:StructureMap.group.rule.source.element [ fhir:value "value" ] ;
                   fhir:StructureMap.group.rule.source.variable [ fhir:value "amount" ]
                 ] ;
                 fhir:StructureMap.group.rule.rule [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.name [ fhir:value "currencyAnswer" ] ;
                   fhir:StructureMap.group.rule.source [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.source.context [ fhir:value "curItem" ] ;
                     fhir:StructureMap.group.rule.source.element [ fhir:value "answer" ] ;
                     fhir:StructureMap.group.rule.source.variable [ fhir:value "curAns" ]
                   ] ;
                   fhir:StructureMap.group.rule.rule [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.name [ fhir:value "currencyValue" ] ;
                     fhir:StructureMap.group.rule.source [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.source.context [ fhir:value "curAns" ] ;
                       fhir:StructureMap.group.rule.source.type [ fhir:value "Coding" ] ;
                       fhir:StructureMap.group.rule.source.element [ fhir:value "value" ] ;
                       fhir:StructureMap.group.rule.source.variable [ fhir:value "curCoding" ]
                     ] ;
                     fhir:StructureMap.group.rule.rule [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.name [ fhir:value "currencyCode" ] ;
                       fhir:StructureMap.group.rule.source [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.source.context [ fhir:value "curCoding" ] ;
                         fhir:StructureMap.group.rule.source.element [ fhir:value "code" ] ;
                         fhir:StructureMap.group.rule.source.variable [ fhir:value "currencyCode" ]
                       ] ;
                       fhir:StructureMap.group.rule.target [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.target.context [ fhir:value "chg1" ] ;
                         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                         fhir:StructureMap.group.rule.target.element [ fhir:value "priceOverride" ] ;
                         fhir:StructureMap.group.rule.target.variable [ fhir:value "money" ] ;
                         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
                         fhir:StructureMap.group.rule.target.parameter [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Money" ]
                         ]
                       ], [
                         fhir:index 1 ;
                         fhir:StructureMap.group.rule.target.context [ fhir:value "money" ] ;
                         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                         fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ;
                         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
                         fhir:StructureMap.group.rule.target.parameter [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "amount" ]
                         ]
                       ], [
                         fhir:index 2 ;
                         fhir:StructureMap.group.rule.target.context [ fhir:value "money" ] ;
                         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                         fhir:StructureMap.group.rule.target.element [ fhir:value "currency" ] ;
                         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
                         fhir:StructureMap.group.rule.target.parameter [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "currencyCode" ]
                         ]
                       ]
                     ]
                   ]
                 ]
               ]
             ]
           ], [
             fhir:index 1 ;
             fhir:StructureMap.group.rule.name [ fhir:value "serviceWhenPerformedPrimary" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
               fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ;
               fhir:StructureMap.group.rule.source.variable [ fhir:value "perfItem" ] ;
               fhir:StructureMap.group.rule.source.condition [ fhir:value "linkId = 'svc.performed' and answer.valueBoolean = true" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "chg1" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "service" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "svcProc" ] ;
               fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ]
               ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "svcProc" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ] ;
               fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:00000000-0000-4000-8000-000000000003" ]
               ]
             ], [
               fhir:index 2 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "chg1" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "service" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "svcObs" ] ;
               fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ]
               ]
             ], [
               fhir:index 3 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "svcObs" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ] ;
               fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:00000000-0000-4000-8000-000000000002" ]
               ]
             ]
           ], [
             fhir:index 2 ;
             fhir:StructureMap.group.rule.name [ fhir:value "supportingInfoFromConditionRef" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
               fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ;
               fhir:StructureMap.group.rule.source.variable [ fhir:value "diagRefItem2" ] ;
               fhir:StructureMap.group.rule.source.condition [ fhir:value "linkId = 'diag.condition'" ]
             ] ;
             fhir:StructureMap.group.rule.rule [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.name [ fhir:value "dr2Answer" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "diagRefItem2" ] ;
                 fhir:StructureMap.group.rule.source.element [ fhir:value "answer" ] ;
                 fhir:StructureMap.group.rule.source.variable [ fhir:value "dr2Ans" ]
               ] ;
               fhir:StructureMap.group.rule.rule [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.name [ fhir:value "dr2Value" ] ;
                 fhir:StructureMap.group.rule.source [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.source.context [ fhir:value "dr2Ans" ] ;
                   fhir:StructureMap.group.rule.source.type [ fhir:value "Reference" ] ;
                   fhir:StructureMap.group.rule.source.element [ fhir:value "value" ] ;
                   fhir:StructureMap.group.rule.source.variable [ fhir:value "reasonRef2" ]
                 ] ;
                 fhir:StructureMap.group.rule.target [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.context [ fhir:value "chg1" ] ;
                   fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                   fhir:StructureMap.group.rule.target.element [ fhir:value "supportingInformation" ] ;
                   fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
                   fhir:StructureMap.group.rule.target.parameter [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "reasonRef2" ]
                   ]
                 ]
               ]
             ]
           ]
         ]
       ]
     ]
  ], [
     fhir:index 5 ;
     fhir:StructureMap.group.name [ fhir:value "fillComposition" ] ;
     fhir:StructureMap.group.typeMode [ fhir:value "none" ] ;
     fhir:StructureMap.group.documentation [ fhir:value "Composition proposal (status=preliminary). subject/encounter/author/date from QR.subject/.encounter/.author/.authored only — never fabricated. Sections Reference generated Observation/ChargeItem UUIDs; optional Procedure/Condition sections when those outputs are produced." ] ;
     fhir:StructureMap.group.input [
       fhir:index 0 ;
       fhir:StructureMap.group.input.name [ fhir:value "qr" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "QuestionnaireResponse" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ], [
       fhir:index 1 ;
       fhir:StructureMap.group.input.name [ fhir:value "bundle" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "Bundle" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]
     ], [
       fhir:index 2 ;
       fhir:StructureMap.group.input.name [ fhir:value "subjectRef" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ], [
       fhir:index 3 ;
       fhir:StructureMap.group.input.name [ fhir:value "encRef" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ], [
       fhir:index 4 ;
       fhir:StructureMap.group.input.name [ fhir:value "authorRef" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ], [
       fhir:index 5 ;
       fhir:StructureMap.group.input.name [ fhir:value "authoredDt" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ] ;
     fhir:StructureMap.group.rule [
       fhir:index 0 ;
       fhir:StructureMap.group.rule.name [ fhir:value "compositionShell" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "bundle" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "compEntry" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ]
       ], [
         fhir:index 1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "compEntry" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "fullUrl" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:00000000-0000-4000-8000-000000000006" ]
         ]
       ], [
         fhir:index 2 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "compEntry" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "comp" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Composition" ]
         ]
       ], [
         fhir:index 3 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "comp" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "status" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "preliminary" ]
         ]
       ], [
         fhir:index 4 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "comp" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "type" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "compType" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "CodeableConcept" ]
         ]
       ], [
         fhir:index 5 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "compType" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "coding" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "compTypeCoding" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Coding" ]
         ]
       ], [
         fhir:index 6 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "compTypeCoding" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "system" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://loinc.org" ]
         ]
       ], [
         fhir:index 7 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "compTypeCoding" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "code" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "11506-3" ]
         ]
       ], [
         fhir:index 8 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "compTypeCoding" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "display" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Progress note" ]
         ]
       ], [
         fhir:index 9 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "comp" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "title" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Upper-arm injection visit - pre-approval proposal" ]
         ]
       ], [
         fhir:index 10 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "comp" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "subjectRef" ]
         ]
       ], [
         fhir:index 11 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "comp" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "encounter" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "encRef" ]
         ]
       ], [
         fhir:index 12 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "comp" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "author" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "authorRef" ]
         ]
       ], [
         fhir:index 13 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "comp" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "date" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "authoredDt" ]
         ]
       ], [
         fhir:index 14 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "comp" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "section" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "secDoc" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ]
       ], [
         fhir:index 15 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "secDoc" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "title" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Documentation" ]
         ]
       ], [
         fhir:index 16 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "secDoc" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "docEntry" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ]
         ]
       ], [
         fhir:index 17 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "docEntry" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:00000000-0000-4000-8000-000000000002" ]
         ]
       ], [
         fhir:index 18 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "comp" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "section" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "secBill" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ]
       ], [
         fhir:index 19 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "secBill" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "title" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Billing proposal" ]
         ]
       ], [
         fhir:index 20 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "secBill" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "billEntry" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ]
         ]
       ], [
         fhir:index 21 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "billEntry" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:00000000-0000-4000-8000-000000000004" ]
         ]
       ] ;
       fhir:StructureMap.group.rule.rule [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.name [ fhir:value "sectionProcedureWhenPerformed" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
           fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "perfItem" ] ;
           fhir:StructureMap.group.rule.source.condition [ fhir:value "linkId = 'svc.performed' and answer.valueBoolean = true" ]
         ] ;
         fhir:StructureMap.group.rule.target [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "comp" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "section" ] ;
           fhir:StructureMap.group.rule.target.variable [ fhir:value "secProc" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ]
         ], [
           fhir:index 1 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "secProc" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "title" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Procedure proposal" ]
           ]
         ], [
           fhir:index 2 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "secProc" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ] ;
           fhir:StructureMap.group.rule.target.variable [ fhir:value "procEntryRef" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ]
           ]
         ], [
           fhir:index 3 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "procEntryRef" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:00000000-0000-4000-8000-000000000003" ]
           ]
         ]
       ], [
         fhir:index 1 ;
         fhir:StructureMap.group.rule.name [ fhir:value "sectionDiagnosisWhenCoding" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
           fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "diagCodingItem" ] ;
           fhir:StructureMap.group.rule.source.condition [ fhir:value "linkId = 'diag.icd'" ]
         ] ;
         fhir:StructureMap.group.rule.target [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "comp" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "section" ] ;
           fhir:StructureMap.group.rule.target.variable [ fhir:value "secDx" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ]
         ], [
           fhir:index 1 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "secDx" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "title" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Diagnosis proposal" ]
           ]
         ], [
           fhir:index 2 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "secDx" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ] ;
           fhir:StructureMap.group.rule.target.variable [ fhir:value "dxEntry" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Reference" ]
           ]
         ], [
           fhir:index 3 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "dxEntry" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "reference" ] ;
           fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
           fhir:StructureMap.group.rule.target.parameter [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:00000000-0000-4000-8000-000000000001" ]
           ]
         ]
       ]
     ]
  ] .

# - ontology header ------------------------------------------------------------

<http://hl7.org/fhir/StructureMap/map-upper-arm-injection.ttl> a owl:Ontology ;
  owl:imports fhir:fhir.ttl ;
  owl:versionIRI <http://build.fhir.org/StructureMap/map-upper-arm-injection.ttl> .