@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 -------------------------------------------------------------------

<https://ips.saude.gov.br/fhir/StructureMap/StructureMapBRIPS> a fhir:StructureMap ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:Resource.id [ fhir:value "StructureMapBRIPS"] ;
  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>Narrativa gerada: StructureMap StructureMapBRIPS</b></p><a name=\"StructureMapBRIPS\"> </a><a name=\"hcStructureMapBRIPS\"> </a><pre class=\"fml\">#xD;\n<b>map</b><span style=\"color: navy\"> \"</span>https://ips.saude.gov.br/fhir/StructureMap/StructureMapBRIPS<span style=\"color: navy\">\" = \"</span>StructureMapBRIPS<span style=\"color: navy\">\"#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">Mapeamento de Bundle da RNDS para o IPS</span>#xD;\n#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>TLeft <b>as </b><b>source</b>#xD;\n<b>uses</b><span style=\"color: navy\"> \"</span><a href=\"http://hl7.org/fhir/uv/ips/STU1.1/StructureDefinition-Bundle-uv-ips.html\" title=\"Bundle - IPS\">http://hl7.org/fhir/uv/ips/StructureDefinition/Bundle-uv-ips</a><span style=\"color: navy\">\" </span><b>alias </b>TRight <b>as </b><b>target</b>#xD;\n#xD;\n<b>group </b>RNDSIPSBundle<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>TLeft, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>TRight<span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span>  src.id<b> as </b><span style=\"color: maroon\">RNDSID</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt<b> as </b><span style=\"color: maroon\">IPS</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    RNDSID<span style=\"color: navy\"><b> -&gt; </b></span>tgt.identifier<b> as </b><span style=\"color: maroon\">IPSIdentifier</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>      RNDSID<span style=\"color: navy\"><b> -&gt; </b></span> IPS.type = <span style=\"color: blue\">'document'</span><span style=\"color: navy\">, </span> IPS.timestamp = <span style=\"color: navy\">(</span>now()<span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> IPSIdentifier.system = <span style=\"color: blue\">'urn:ietf:rfc:3986'</span><span style=\"color: navy\">, </span> <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">uuid</span><span style=\"color: navy\">, </span> IPSIdentifier.value = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">uuid</span><span style=\"color: navy\">)</span> <i>\"SetDocumentTypeAndTimestampAndIdentifier\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"SetMetaData\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"SetBundleMetaData\"</i><span style=\"color: navy\">;</span>#xD;\n  src.entry<b> default </b><span style=\"color: navy\">(</span>'empty'<span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">RNDSEntry</span><span style=\"color: navy\"><b> -&gt; </b></span> tgt.entry<b> as </b><span style=\"color: maroon\">IPSEntry</span><span style=\"color: navy\">, </span> tgt.entry<b> as </b><span style=\"color: maroon\">IPSEntryCondition</span><span style=\"color: navy\">, </span> tgt.entry<b> as </b><span style=\"color: maroon\">IPSEntryAllergyIntolerance</span><span style=\"color: navy\">, </span> tgt.entry<b> as </b><span style=\"color: maroon\">IPSEntryMedicationStatement</span><span style=\"color: navy\">, </span> <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">IPSPatientReference</span><span style=\"color: navy\">, </span> <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">IPSPractitionerReference</span><span style=\"color: navy\">, </span> <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">IPSConditionNoKnownProblemsReference</span><span style=\"color: navy\">, </span> <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">IPSMedicationStatementNoKnownMedicationsReference</span><span style=\"color: navy\">, </span> <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">IPSAllergyIntoleranceNoKnownAllergiesReference</span><span style=\"color: navy\">, </span> <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">IPSVitalSignsNoKnownVitalSignsReference</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    RNDSEntry<b> where </b><span style=\"color: navy\">(</span>RNDSEntry = 'empty'<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span>IPSEntry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>      RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">uuid</span><span style=\"color: navy\">, </span> IPSEntry.fullUrl = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">uuid</span><span style=\"color: navy\">)</span> <i>\"SetFullUrl\"</i><span style=\"color: navy\">;</span>#xD;\n      RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span><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\">IPSComposition</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> IPSComposition.status = <span style=\"color: blue\">'final'</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://loinc.org'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'60591-5'</span><span style=\"color: navy\">, </span> c.display = <span style=\"color: blue\">'Patient Summary Document'</span><span style=\"color: navy\">, </span> cc.coding = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> IPSComposition.type = <span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> IPSComposition.date = <span style=\"color: navy\">(</span>now()<span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> IPSComposition.id = <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> <span style=\"color: navy\">(</span>today()<span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">today</span><span style=\"color: navy\">, </span> IPSComposition.title = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Patient Summary as of:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">today</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> IPSComposition.confidentiality = <span style=\"color: blue\">'N'</span><span style=\"color: navy\">, </span> IPSComposition.text<b> as </b><span style=\"color: maroon\">IPSCompositionText</span><span style=\"color: navy\">, </span> IPSCompositionText.status = <span style=\"color: blue\">'generated'</span><span style=\"color: navy\">, </span> IPSCompositionText.div = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'&lt;div xmlns=\"http://www.w3.org/1999/xhtml\"&gt;Title: International Patient Summary from Brazil, code: http://loinc.org#60591-5, status: generated, confidentiality: N&lt;/div&gt;'</span><span style=\"color: navy\">)</span> <i>\"SetCompositionFirstOrderFields\"</i><span style=\"color: navy\">;</span>#xD;\n        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> IPSComposition.subject<b> as </b><span style=\"color: maroon\">IPSCompositionSubject</span><span style=\"color: navy\">, </span> IPSComposition.author<b> as </b><span style=\"color: maroon\">IPSCompositionAuthor</span><span style=\"color: navy\">, </span> IPSComposition.custodian<b> as </b><span style=\"color: maroon\">IPSCompositionCustodian</span><span style=\"color: navy\">, </span> IPSComposition.section<b> as </b><span style=\"color: maroon\">IPSCompositionSectionActiveProblems</span><span style=\"color: navy\">, </span> IPSComposition.section<b> as </b><span style=\"color: maroon\">IPSCompositionMedication</span><span style=\"color: navy\">, </span> IPSComposition.section<b> as </b><span style=\"color: maroon\">IPSCompositionAllergiesAndIntolerances</span><span style=\"color: navy\">, </span> IPSComposition.section<b> as </b><span style=\"color: maroon\">IPSCompositionVitalSigns</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>          RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> IPSCompositionSubject.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSPatientReference</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> IPSCompositionAuthor.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSPractitionerReference</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> IPSCompositionCustodian.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSPractitionerReference</span><span style=\"color: navy\">)</span> <i>\"SetReferences\"</i><span style=\"color: navy\">;</span>#xD;\n          RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> IPSCompositionSectionActiveProblems.title = <span style=\"color: blue\">'Active Problems'</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://loinc.org'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'11450-4'</span><span style=\"color: navy\">, </span> c.display = <span style=\"color: blue\">'Problem list Reported'</span><span style=\"color: navy\">, </span> cc.coding = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> IPSCompositionSectionActiveProblems.code = <span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> IPSCompositionSectionActiveProblems.entry<b> as </b><span style=\"color: maroon\">IPSCompositionSectionActiveProblemsEntry</span><span style=\"color: navy\">, </span> IPSCompositionSectionActiveProblemsEntry.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSConditionNoKnownProblemsReference</span><span style=\"color: navy\">)</span> <i>\"SetActiveProblems\"</i><span style=\"color: navy\">;</span>#xD;\n          RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> IPSCompositionMedication.title = <span style=\"color: blue\">'Medications'</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://loinc.org'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'10160-0'</span><span style=\"color: navy\">, </span> c.display = <span style=\"color: blue\">'History of Medication use Narrative'</span><span style=\"color: navy\">, </span> cc.coding = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> IPSCompositionMedication.code = <span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> IPSCompositionMedication.entry<b> as </b><span style=\"color: maroon\">IPSCompositionSectionMedicationEntry</span><span style=\"color: navy\">, </span> IPSCompositionSectionMedicationEntry.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSMedicationStatementNoKnownMedicationsReference</span><span style=\"color: navy\">)</span> <i>\"SetTitleMedications\"</i><span style=\"color: navy\">;</span>#xD;\n          RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> IPSCompositionAllergiesAndIntolerances.title = <span style=\"color: blue\">'Allergies and Intolerances'</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://loinc.org'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'48765-2'</span><span style=\"color: navy\">, </span> c.display = <span style=\"color: blue\">'Allergies and adverse reactions Document'</span><span style=\"color: navy\">, </span> cc.coding = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> IPSCompositionAllergiesAndIntolerances.code = <span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> IPSCompositionAllergiesAndIntolerances.entry<b> as </b><span style=\"color: maroon\">IPSCompositionSectionAllergiesAndIntolerancesEntry</span><span style=\"color: navy\">, </span> IPSCompositionSectionAllergiesAndIntolerancesEntry.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSAllergyIntoleranceNoKnownAllergiesReference</span><span style=\"color: navy\">)</span> <i>\"SetAllergiesAndIntolerances\"</i><span style=\"color: navy\">;</span>#xD;\n          RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> IPSCompositionVitalSigns.title = <span style=\"color: blue\">'Vital Signs'</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://loinc.org'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'8716-3'</span><span style=\"color: navy\">, </span> c.display = <span style=\"color: blue\">'Vital signs'</span><span style=\"color: navy\">, </span> cc.coding = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> IPSCompositionVitalSigns.code = <span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> IPSCompositionVitalSigns.entry<b> as </b><span style=\"color: maroon\">IPSCompositionVitalSignsEntry</span><span style=\"color: navy\">, </span> IPSCompositionVitalSignsEntry.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSVitalSignsNoKnownVitalSignsReference</span><span style=\"color: navy\">)</span> <i>\"SetVitalSigns\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">}</span> <i>\"SetSubjectAuthorCustodianSection\"</i><span style=\"color: navy\">;</span>#xD;\n        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span>IPSEntry.resource = <span style=\"color: maroon\">IPSComposition</span> <i>\"SetResourceComposition\"</i><span style=\"color: navy\">;</span>#xD;\n      <span style=\"color: navy\">}</span> <i>\"SetComposition\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"SetEmptyComposition\"</i><span style=\"color: navy\">;</span>#xD;\n    RNDSEntry<b> where </b><span style=\"color: navy\">(</span>RNDSEntry = 'empty'<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryCondition<b> then</b><span style=\"color: navy\"> {#xD;\n</span>      RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">uuid</span><span style=\"color: navy\">, </span> IPSEntryCondition.fullUrl = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">uuid</span><span style=\"color: navy\">)</span> <i>\"SetFullUrl\"</i><span style=\"color: navy\">;</span>#xD;\n      RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span><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\">IPSCondition</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://terminology.hl7.org/CodeSystem/condition-clinical'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'active'</span><span style=\"color: navy\">, </span> cc.coding = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> IPSCondition.clinicalStatus = <span style=\"color: maroon\">cc</span> <i>\"SetClinicalStatus\"</i><span style=\"color: navy\">;</span>#xD;\n        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'no-problem-info'</span><span style=\"color: navy\">, </span> c.display = <span style=\"color: blue\">'No information about problems'</span><span style=\"color: navy\">, </span> cc.coding = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> IPSCondition.code = <span style=\"color: maroon\">cc</span> <i>\"SetCode\"</i><span style=\"color: navy\">;</span>#xD;\n        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://terminology.hl7.org/CodeSystem/condition-ver-status'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'confirmed'</span><span style=\"color: navy\">, </span> c.display = <span style=\"color: blue\">'Confirmed'</span><span style=\"color: navy\">, </span> cc.coding = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> IPSCondition.verificationStatus = <span style=\"color: maroon\">cc</span> <i>\"SetCode\"</i><span style=\"color: navy\">;</span>#xD;\n        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> IPSCondition.subject<b> as </b><span style=\"color: maroon\">IPSConditionSubject</span><span style=\"color: navy\">, </span> IPSConditionSubject.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSPatientReference</span><span style=\"color: navy\">)</span> <i>\"SetSubject\"</i><span style=\"color: navy\">;</span>#xD;\n        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> IPSEntryCondition.resource<b> as </b><span style=\"color: maroon\">IPSEntryConditionResource</span><span style=\"color: navy\">, </span> IPSEntryConditionResource.text<b> as </b><span style=\"color: maroon\">IPSEntryConditionResourceText</span><span style=\"color: navy\">, </span> IPSEntryConditionResourceText.status = <span style=\"color: blue\">'generated'</span><span style=\"color: navy\">, </span> IPSCondition.code<b> as </b><span style=\"color: maroon\">IPSConditionCode</span><span style=\"color: navy\">, </span> IPSConditionCode.coding<b> as </b><span style=\"color: maroon\">IPSConditionCodeCoding</span><span style=\"color: navy\">, </span> IPSConditionCodeCoding.code<b> as </b><span style=\"color: maroon\">IPSConditionCodeCodingCode</span><span style=\"color: navy\">, </span> IPSCondition.clinicalStatus<b> as </b><span style=\"color: maroon\">IPSConditionClinicalStatus</span><span style=\"color: navy\">, </span> IPSConditionClinicalStatus.coding<b> as </b><span style=\"color: maroon\">IPSConditionClinicalStatusCoding</span><span style=\"color: navy\">, </span> IPSConditionClinicalStatusCoding.code<b> as </b><span style=\"color: maroon\">IPSConditionClinicalStatusCodingCode</span><span style=\"color: navy\">, </span> IPSCondition.verificationStatus<b> as </b><span style=\"color: maroon\">IPSConditionVerificationStatus</span><span style=\"color: navy\">, </span> IPSConditionVerificationStatus.coding<b> as </b><span style=\"color: maroon\">IPSConditionVerificationStatusCoding</span><span style=\"color: navy\">, </span> IPSConditionVerificationStatusCoding.code<b> as </b><span style=\"color: maroon\">IPSConditionVerificationStatusCodingCode</span><span style=\"color: navy\">, </span> IPSEntryConditionResourceText.div = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'&lt;div xmlns=\"http://www.w3.org/1999/xhtml\"&gt;Condition'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSConditionCodeCodingCode</span><span style=\"color: navy\">, </span><span style=\"color: blue\">',clinicalStatus:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSConditionClinicalStatusCodingCode</span><span style=\"color: navy\">, </span><span style=\"color: blue\">',verificationStatus:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSConditionVerificationStatusCodingCode</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'&lt;/div&gt;'</span><span style=\"color: navy\">)</span> <i>\"SetConditionNarrativeElement\"</i><span style=\"color: navy\">;</span>#xD;\n        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryCondition.resource = <span style=\"color: maroon\">IPSCondition</span> <i>\"SetCondition\"</i><span style=\"color: navy\">;</span>#xD;\n      <span style=\"color: navy\">}</span> <i>\"SetCondition\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"SetEmptyCondition\"</i><span style=\"color: navy\">;</span>#xD;\n    RNDSEntry<b> where </b><span style=\"color: navy\">(</span>RNDSEntry = 'empty'<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryAllergyIntolerance<b> then</b><span style=\"color: navy\"> {#xD;\n</span>      RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">uuid</span><span style=\"color: navy\">, </span> IPSEntryAllergyIntolerance.fullUrl = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">uuid</span><span style=\"color: navy\">)</span> <i>\"SetFullUrl\"</i><span style=\"color: navy\">;</span>#xD;\n      RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span><b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'AllergyIntolerance'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">IPSAllergyIntolerance</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'active'</span><span style=\"color: navy\">, </span> cc.coding = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> IPSAllergyIntolerance.clinicalStatus = <span style=\"color: maroon\">cc</span> <i>\"SetClinicalStatus\"</i><span style=\"color: navy\">;</span>#xD;\n        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'no-allergy-info'</span><span style=\"color: navy\">, </span> c.display = <span style=\"color: blue\">'No information about allergies'</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> cc.coding = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> IPSAllergyIntolerance.code = <span style=\"color: maroon\">cc</span> <i>\"SetCode\"</i><span style=\"color: navy\">;</span>#xD;\n        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> IPSAllergyIntolerance.patient<b> as </b><span style=\"color: maroon\">IPSAllergyIntolerancePatient</span><span style=\"color: navy\">, </span> IPSAllergyIntolerancePatient.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSPatientReference</span><span style=\"color: navy\">)</span> <i>\"SetPatient\"</i><span style=\"color: navy\">;</span>#xD;\n        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryAllergyIntolerance.resource = <span style=\"color: maroon\">IPSAllergyIntolerance</span> <i>\"SetAllergyIntolerance\"</i><span style=\"color: navy\">;</span>#xD;\n        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> IPSAllergyIntolerance.text<b> as </b><span style=\"color: maroon\">IPSAllergyIntoleranceText</span><span style=\"color: navy\">, </span> IPSAllergyIntoleranceText.status = <span style=\"color: blue\">'generated'</span><span style=\"color: navy\">, </span> IPSAllergyIntoleranceText.div = <span style=\"color: blue\">'&lt;div xmlns=\"http://www.w3.org/1999/xhtml\"&gt;No allergy information&lt;/div&gt;'</span> <i>\"SetAllergyText\"</i><span style=\"color: navy\">;</span>#xD;\n      <span style=\"color: navy\">}</span> <i>\"SetAllergyIntolerance\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"SetEmptyAllergyIntolerance\"</i><span style=\"color: navy\">;</span>#xD;\n    RNDSEntry<b> where </b><span style=\"color: navy\">(</span>RNDSEntry = 'empty'<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryMedicationStatement<b> then</b><span style=\"color: navy\"> {#xD;\n</span>      RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span><b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'MedicationStatement'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">IPSMedicationStatement</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span>IPSMedicationStatement.status = <span style=\"color: blue\">'unknown'</span> <i>\"SetStatus\"</i><span style=\"color: navy\">;</span>#xD;\n        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'no-medication-info'</span><span style=\"color: navy\">, </span> c.display = <span style=\"color: blue\">'No information about medications'</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> cc.coding = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> IPSMedicationStatement.medication = <span style=\"color: maroon\">cc</span> <i>\"SetCode\"</i><span style=\"color: navy\">;</span>#xD;\n        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span>IPSMedicationStatement.effectivePeriod<b> as </b><span style=\"color: maroon\">IPSMedicationStatementEffectivePeriod</span><b> then </b>NotApplicable<span style=\"color: navy\">(</span><span style=\"color: maroon\">RNDSEntry</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSMedicationStatementEffectivePeriod</span><span style=\"color: navy\">)</span> <i>\"SetEffectivePeriod\"</i><span style=\"color: navy\">;</span>#xD;\n        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> IPSMedicationStatement.subject<b> as </b><span style=\"color: maroon\">IPSMedicationStatementSubject</span><span style=\"color: navy\">, </span> IPSMedicationStatementSubject.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSPatientReference</span><span style=\"color: navy\">)</span> <i>\"SetSubject\"</i><span style=\"color: navy\">;</span>#xD;\n        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">uuid</span><span style=\"color: navy\">, </span> IPSEntryMedicationStatement.fullUrl = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">uuid</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> IPSEntryMedicationStatement.resource = <span style=\"color: maroon\">IPSMedicationStatement</span> <i>\"SetMedicationStatement\"</i><span style=\"color: navy\">;</span>#xD;\n      <span style=\"color: navy\">}</span> <i>\"SetMedicationStatement\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"SetEmptyMedicationStatement\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"SetEmptyIPSEntries\"</i><span style=\"color: navy\">;</span>#xD;\n  src.entry<b> as </b><span style=\"color: maroon\">RNDSEntry</span><span style=\"color: navy\"><b> -&gt; </b></span> tgt.entry<b> as </b><span style=\"color: maroon\">IPSEntry</span><span style=\"color: navy\">, </span> tgt.entry<b> as </b><span style=\"color: maroon\">IPSEntryCondition</span><span style=\"color: navy\">, </span> tgt.entry<b> as </b><span style=\"color: maroon\">IPSEntryVitalSigns</span><span style=\"color: navy\">, </span> tgt.entry<b> as </b><span style=\"color: maroon\">IPSEntryResults</span><span style=\"color: navy\">, </span> tgt.entry<b> as </b><span style=\"color: maroon\">IPSEntrySpecimen</span><span style=\"color: navy\">, </span> tgt.entry<b> as </b><span style=\"color: maroon\">IPSEntryImmunization</span><span style=\"color: navy\">, </span> tgt.entry<b> as </b><span style=\"color: maroon\">IPSEntryProcedures</span><span style=\"color: navy\">, </span> tgt.entry<b> as </b><span style=\"color: maroon\">IPSEntryMedicationRequests</span><span style=\"color: navy\">, </span> tgt.entry<b> as </b><span style=\"color: maroon\">IPSEntryMedications</span><span style=\"color: navy\">, </span> tgt.entry<b> as </b><span style=\"color: maroon\">IPSEntryAllergyIntolerance</span><span style=\"color: navy\">, </span> tgt.entry<b> as </b><span style=\"color: maroon\">IPSEntryMedicationStatement</span><span style=\"color: navy\">, </span> tgt.entry<b> as </b><span style=\"color: maroon\">IPSEntryPatient</span><span style=\"color: navy\">, </span> tgt.entry<b> as </b><span style=\"color: maroon\">IPSEntryPractitioner</span><span style=\"color: navy\">, </span> tgt.entry<b> as </b><span style=\"color: maroon\">IPSEntryCustodian</span><span style=\"color: navy\">, </span> <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">IPSPatientReference</span><span style=\"color: navy\">, </span> <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">IPSPractitionerReference</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    RNDSEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResource</span><span style=\"color: navy\"><b> -&gt; </b></span><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\">IPSEntryResourceComposition</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>      RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> IPSEntryResourceComposition.status = <span style=\"color: blue\">'final'</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://loinc.org'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'60591-5'</span><span style=\"color: navy\">, </span> c.display = <span style=\"color: blue\">'Patient Summary Document'</span><span style=\"color: navy\">, </span> cc.coding = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> IPSEntryResourceComposition.type = <span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> IPSEntryResourceComposition.date = <span style=\"color: navy\">(</span>now()<span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> IPSEntryResourceComposition.id = <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> <span style=\"color: navy\">(</span>today()<span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">today</span><span style=\"color: navy\">, </span> IPSEntryResourceComposition.title = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Patient Summary as of'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">today</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> IPSEntryResourceComposition.confidentiality = <span style=\"color: blue\">'N'</span><span style=\"color: navy\">, </span> IPSEntryResourceComposition.text<b> as </b><span style=\"color: maroon\">IPSEntryResourceCompositionText</span><span style=\"color: navy\">, </span> IPSEntryResourceCompositionText.status = <span style=\"color: blue\">'generated'</span><span style=\"color: navy\">, </span> IPSEntryResourceCompositionText.div = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'&lt;div xmlns=\"http://www.w3.org/1999/xhtml\"&gt;Title: International Patient Summary from Brazil, code: http://loinc.org#60591-5, status: generated, confidentiality: N&lt;/div&gt;'</span><span style=\"color: navy\">)</span> <i>\"SetCompositionFirstOrderFields\"</i><span style=\"color: navy\">;</span>#xD;\n      RNDSEntryResource<span style=\"color: navy\"><b> -&gt; </b></span> IPSEntryResourceComposition.subject<b> as </b><span style=\"color: maroon\">IPSEntryResourceCompositionSubject</span><span style=\"color: navy\">, </span> IPSEntryResourceComposition.author<b> as </b><span style=\"color: maroon\">IPSEntryResourceCompositionPractitioner</span><span style=\"color: navy\">, </span> IPSEntryResourceComposition.custodian<b> as </b><span style=\"color: maroon\">IPSEntryResourceCompositionCustodian</span><span style=\"color: navy\">, </span> IPSEntryResourceComposition.section<b> as </b><span style=\"color: maroon\">IPSEntryResourceCompositionSectionActiveProblems</span><span style=\"color: navy\">, </span> IPSEntryResourceComposition.section<b> as </b><span style=\"color: maroon\">IPSEntryResourceCompositionSectionMedications</span><span style=\"color: navy\">, </span> IPSEntryResourceComposition.section<b> as </b><span style=\"color: maroon\">IPSEntryResourceCompositionSectionAllergiesAndIntolerances</span><span style=\"color: navy\">, </span> IPSEntryResourceComposition.section<b> as </b><span style=\"color: maroon\">IPSEntryResourceCompositionSectionResults</span><span style=\"color: navy\">, </span> IPSEntryResourceComposition.section<b> as </b><span style=\"color: maroon\">IPSEntryResourceCompositionSectionVitalSigns</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>        <span style=\"color: navy\">// </span><span style=\"color: green\">Bloco que seta as referencias a subject, practitioner e custodian no composition</span>#xD;\n        RNDSEntryResource<span style=\"color: navy\"><b> -&gt; </b></span> IPSEntryResourceCompositionSubject.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSPatientReference</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> IPSEntryResourceCompositionPractitioner.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSPractitionerReference</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> IPSEntryResourceCompositionCustodian.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSPractitionerReference</span><span style=\"color: navy\">)</span> <i>\"SetResourceCompositionReferences\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">// </span><span style=\"color: green\">Bloco que cria a secao de problemas no composition</span>#xD;\n        RNDSEntryResource<span style=\"color: navy\"><b> -&gt; </b></span> IPSEntryResourceCompositionSectionActiveProblems.title = <span style=\"color: blue\">'Active Problems'</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://loinc.org'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'11450-4'</span><span style=\"color: navy\">, </span> c.display = <span style=\"color: blue\">'Problem list Reported'</span><span style=\"color: navy\">, </span> cc.coding = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> IPSEntryResourceCompositionSectionActiveProblems.code = <span style=\"color: maroon\">cc</span> <i>\"SetActiveProblems\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">// </span><span style=\"color: green\">Bloco que cria condition vazio quando nao ha conditions no bundle</span>#xD;\n        RNDSEntryResource<b> where </b><span style=\"color: navy\">(</span>RNDSEntryResource.entry.resource.entry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRCondicaoSaude').empty()<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span> <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\">IPSEntryEmptyCondition</span><span style=\"color: navy\">, </span> <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">IPSEntryEmptyConditionId</span><span style=\"color: navy\">, </span> IPSEntryEmptyCondition.id = <span style=\"color: maroon\">IPSEntryEmptyConditionId</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://terminology.hl7.org/CodeSystem/condition-clinical'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'active'</span><span style=\"color: navy\">, </span> cc.coding = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> IPSEntryEmptyCondition.clinicalStatus = <span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'no-problem-info'</span><span style=\"color: navy\">, </span> c.display = <span style=\"color: blue\">'No information about problems'</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> cc.coding = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> IPSEntryEmptyCondition.code = <span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> IPSEntryEmptyCondition.subject<b> as </b><span style=\"color: maroon\">IPSEntryEmptyConditionSubject</span><span style=\"color: navy\">, </span> IPSEntryEmptyConditionSubject.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSPatientReference</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> IPSEntryCondition.fullUrl = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSEntryEmptyConditionId</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> IPSEntryCondition.resource = <span style=\"color: maroon\">IPSEntryEmptyCondition</span><span style=\"color: navy\">, </span> IPSEntryResourceCompositionSectionActiveProblems.entry<b> as </b><span style=\"color: maroon\">IPSEntryResourceCompositionSectionActiveProblemsEntry</span><span style=\"color: navy\">, </span> IPSEntryResourceCompositionSectionActiveProblemsEntry.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSEntryEmptyConditionId</span><span style=\"color: navy\">)</span> <i>\"CreateNoKnownConditions\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">// </span><span style=\"color: green\">Bloco que cria a secao de alergias no composition</span>#xD;\n        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> IPSEntryResourceCompositionSectionAllergiesAndIntolerances.title = <span style=\"color: blue\">'Allergies and Intolerances'</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://loinc.org'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'48765-2'</span><span style=\"color: navy\">, </span> c.display = <span style=\"color: blue\">'Allergies and adverse reactions Document'</span><span style=\"color: navy\">, </span> cc.coding = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> IPSEntryResourceCompositionSectionAllergiesAndIntolerances.code = <span style=\"color: maroon\">cc</span> <i>\"SetAllergiesAndIntolerances\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">// </span><span style=\"color: green\">Bloco que cria o Allergy Intolerance vazio quando nao ha allergy intolerance no bundle</span>#xD;\n        RNDSEntryResource<b> where </b><span style=\"color: navy\">(</span>RNDSEntryResource.entry.resource.entry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRAlergiaReacaoAdversa').empty()<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'AllergyIntolerance'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">IPSEntryEmptyAllergyIntolerance</span><span style=\"color: navy\">, </span> <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">IPSEntryEmptyAllergyIntoleranceId</span><span style=\"color: navy\">, </span> IPSEntryEmptyAllergyIntolerance.id = <span style=\"color: maroon\">IPSEntryEmptyAllergyIntoleranceId</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'active'</span><span style=\"color: navy\">, </span> cc.coding = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> IPSEntryEmptyAllergyIntolerance.clinicalStatus = <span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'no-allergy-info'</span><span style=\"color: navy\">, </span> c.display = <span style=\"color: blue\">'No information about allergies'</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> cc.coding = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> IPSEntryEmptyAllergyIntolerance.code = <span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> IPSEntryEmptyAllergyIntolerance.patient<b> as </b><span style=\"color: maroon\">IPSEntryEmptyAllergyIntolerancePatient</span><span style=\"color: navy\">, </span> IPSEntryEmptyAllergyIntolerancePatient.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSPatientReference</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> IPSEntryEmptyAllergyIntolerance.text<b> as </b><span style=\"color: maroon\">IPSEntryEmptyAllergyIntoleranceText</span><span style=\"color: navy\">, </span> IPSEntryEmptyAllergyIntoleranceText.status = <span style=\"color: blue\">'generated'</span><span style=\"color: navy\">, </span> IPSEntryEmptyAllergyIntoleranceText.div = <span style=\"color: blue\">'&lt;div xmlns=\"http://www.w3.org/1999/xhtml\"&gt;No known allergies&lt;/div&gt;'</span><span style=\"color: navy\">, </span> IPSEntryAllergyIntolerance.fullUrl = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSEntryEmptyAllergyIntoleranceId</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> IPSEntryAllergyIntolerance.resource = <span style=\"color: maroon\">IPSEntryEmptyAllergyIntolerance</span><span style=\"color: navy\">, </span> IPSEntryResourceCompositionSectionAllergiesAndIntolerances.entry<b> as </b><span style=\"color: maroon\">IPSEntryResourceCompositionSectionAllergiesAndIntolerancesEntry</span><span style=\"color: navy\">, </span> IPSEntryResourceCompositionSectionAllergiesAndIntolerancesEntry.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSEntryEmptyAllergyIntoleranceId</span><span style=\"color: navy\">)</span> <i>\"CreateNoKnownConditions\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">// </span><span style=\"color: green\">Bloco que cria Medication Statement vazio quando nao ha medication statement no bundle</span>#xD;\n        RNDSEntryResource<b> where </b><span style=\"color: navy\">(</span>RNDSEntryResource.entry.resource.entry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRMedicamento').empty()<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'MedicationStatement'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">IPSEntryEmptyMedicationStatement</span><span style=\"color: navy\">, </span> <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">IPSEntryEmptyMedicationStatementId</span><span style=\"color: navy\">, </span> IPSEntryEmptyMedicationStatement.id = <span style=\"color: maroon\">IPSEntryEmptyMedicationStatementId</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'no-medication-info'</span><span style=\"color: navy\">, </span> c.display = <span style=\"color: blue\">'No information about medications'</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> cc.coding = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> IPSEntryEmptyMedicationStatement.medication = <span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> IPSEntryEmptyMedicationStatement.status = <span style=\"color: blue\">'unknown'</span><span style=\"color: navy\">, </span> IPSEntryEmptyMedicationStatement.subject<b> as </b><span style=\"color: maroon\">IPSEntryEmptyMedicationStatementSubject</span><span style=\"color: navy\">, </span> IPSEntryEmptyMedicationStatementSubject.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSPatientReference</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> IPSEntryMedicationStatement.fullUrl = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSEntryEmptyMedicationStatementId</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> IPSEntryMedicationStatement.resource = <span style=\"color: maroon\">IPSEntryEmptyMedicationStatement</span><span style=\"color: navy\">, </span> IPSEntryResourceCompositionSectionMedications.entry<b> as </b><span style=\"color: maroon\">IPSEntryResourceCompositionSectionMedicationEntry</span><span style=\"color: navy\">, </span> IPSEntryResourceCompositionSectionMedicationEntry.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSEntryEmptyMedicationStatementId</span><span style=\"color: navy\">)</span> <i>\"CreateNoKnownMedications\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">// </span><span style=\"color: green\">Bloco que cria conditions BRCondicaoSaude</span>#xD;\n        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>          RNDSEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResource</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>            RNDSEntryResource.entry<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntry</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>              RNDSEntryResourceEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResource</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>                RNDSEntryResourceEntryResource.entry<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntry</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>                  RNDSEntryResourceEntryResourceEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResource</span><b> where </b><span style=\"color: navy\">(</span>RNDSEntryResourceEntryResourceEntry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRCondicaoSaude').empty().not()<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>                    RNDSEntryResourceEntryResourceEntryResource.id<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\"><b> -&gt; </b></span> IPSEntryResourceCompositionSectionActiveProblems.entry<b> as </b><span style=\"color: maroon\">IPSEntryResourceCompositionSectionActiveProblemsEntry</span><span style=\"color: navy\">, </span> IPSEntryResourceCompositionSectionActiveProblemsEntry.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> tgt.entry<b> as </b><span style=\"color: maroon\">AddEntry</span><span style=\"color: navy\">, </span> AddEntry.fullUrl = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> AddEntry.resource = <span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResource</span> <i>\"AddEntry\"</i><span style=\"color: navy\">;</span>#xD;\n                  <span style=\"color: navy\">}</span> <i>\"SetResource\"</i><span style=\"color: navy\">;</span>#xD;\n                <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntryResourceEntry\"</i><span style=\"color: navy\">;</span>#xD;\n              <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntryResource\"</i><span style=\"color: navy\">;</span>#xD;\n            <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntry\"</i><span style=\"color: navy\">;</span>#xD;\n          <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResource\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntry\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">// </span><span style=\"color: green\">Bloco que cria alergias BRAlergiaReacaoAdversa</span>#xD;\n        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>          RNDSEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResource</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>            RNDSEntryResource.entry<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntry</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>              RNDSEntryResourceEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResource</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>                RNDSEntryResourceEntryResource.entry<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntry</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>                  RNDSEntryResourceEntryResourceEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResource</span><b> where </b><span style=\"color: navy\">(</span>RNDSEntryResourceEntryResourceEntry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRAlergiaReacaoAdversa').empty().not()<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>                    RNDSEntryResourceEntryResourceEntryResource.id<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\"><b> -&gt; </b></span> IPSEntryResourceCompositionSectionAllergiesAndIntolerances.entry<b> as </b><span style=\"color: maroon\">IPSEntryResourceCompositionSectionAllergiesAndIntolerancesEntry</span><span style=\"color: navy\">, </span> IPSEntryResourceCompositionSectionAllergiesAndIntolerancesEntry.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> tgt.entry<b> as </b><span style=\"color: maroon\">AddEntry</span><span style=\"color: navy\">, </span> AddEntry.fullUrl = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> AddEntry.resource = <span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResource</span> <i>\"AddEntry\"</i><span style=\"color: navy\">;</span>#xD;\n                  <span style=\"color: navy\">}</span> <i>\"SetResource\"</i><span style=\"color: navy\">;</span>#xD;\n                <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntryResourceEntry\"</i><span style=\"color: navy\">;</span>#xD;\n              <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntryResource\"</i><span style=\"color: navy\">;</span>#xD;\n            <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntry\"</i><span style=\"color: navy\">;</span>#xD;\n          <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResource\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntry\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">// </span><span style=\"color: green\">Bloco que cria Secao de REL</span>#xD;\n        RNDSEntryResource<b> where </b><span style=\"color: navy\">(</span>RNDSEntryResource.entry.resource.entry.resource.meta.where((profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRDiagnosticoCOVID19-TesteRapido') or (profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRDiagnosticoLaboratorioClinico') or (profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRObservacaoDescritiva')).empty().not()<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryResourceComposition<b> then</b><span style=\"color: navy\"> {#xD;\n</span>          RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryResourceCompositionSectionResults<b> then</b><span style=\"color: navy\"> {#xD;\n</span>            <span style=\"color: navy\">// </span><span style=\"color: green\">cria section de results no composition</span>#xD;\n            RNDSEntryResource<span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryResourceCompositionSectionResults<b> then</b><span style=\"color: navy\"> {#xD;\n</span>              RNDSEntryResource<span style=\"color: navy\"><b> -&gt; </b></span> IPSEntryResourceCompositionSectionResults.title = <span style=\"color: blue\">'Results'</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://loinc.org'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'30954-2'</span><span style=\"color: navy\">, </span> c.display = <span style=\"color: blue\">'Relevant diagnostic tests/laboratory data Narrative'</span><span style=\"color: navy\">, </span> cc.coding = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> IPSEntryResourceCompositionSectionResults.code = <span style=\"color: maroon\">cc</span> <i>\"SetResultsNarrative\"</i><span style=\"color: navy\">;</span>#xD;\n            <span style=\"color: navy\">}</span> <i>\"SetCompositionSectionResults\"</i><span style=\"color: navy\">;</span>#xD;\n          <span style=\"color: navy\">}</span> <i>\"CreateSectionResults\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">}</span> <i>\"CreateSectionResultsIfExist\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">// </span><span style=\"color: green\">Bloco que mapeia REL</span>#xD;\n        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>          RNDSEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResource</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>            RNDSEntryResource.entry<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntry</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>              RNDSEntryResourceEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResource</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>                RNDSEntryResourceEntryResource.entry<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntry</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>                  RNDSEntryResourceEntryResourceEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResource</span><b> where </b><span style=\"color: navy\">(</span>RNDSEntryResourceEntryResourceEntry.resource.meta.where((profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRDiagnosticoCOVID19-TesteRapido') or (profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRDiagnosticoLaboratorioClinico') or (profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRObservacaoDescritiva')).empty().not()<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>                    RNDSEntryResourceEntryResourceEntryResource.id<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\"><b> -&gt; </b></span> IPSEntryResourceCompositionSectionResults.entry<b> as </b><span style=\"color: maroon\">IPSEntryResourceCompositionSectionResultsEntry</span><span style=\"color: navy\">, </span> IPSEntryResourceCompositionSectionResultsEntry.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> tgt.entry<b> as </b><span style=\"color: maroon\">AddEntry</span><span style=\"color: navy\">, </span> AddEntry.fullUrl = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> AddEntry.resource = <span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResource</span> <i>\"AddEntry\"</i><span style=\"color: navy\">;</span>#xD;\n                  <span style=\"color: navy\">}</span> <i>\"SetResource\"</i><span style=\"color: navy\">;</span>#xD;\n                <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntryResourceEntry\"</i><span style=\"color: navy\">;</span>#xD;\n              <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntryResource\"</i><span style=\"color: navy\">;</span>#xD;\n            <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntry\"</i><span style=\"color: navy\">;</span>#xD;\n          <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResource\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntry\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">// </span><span style=\"color: green\">Bloco que mapeia BRAmostraBiologica-1.0</span>#xD;\n        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>          RNDSEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResource</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>            RNDSEntryResource.entry<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntry</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>              RNDSEntryResourceEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResource</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>                RNDSEntryResourceEntryResource.entry<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntry</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>                  RNDSEntryResourceEntryResourceEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResource</span><b> where </b><span style=\"color: navy\">(</span>RNDSEntryResourceEntryResourceEntry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRAmostraBiologica').empty().not()<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>                    RNDSEntryResourceEntryResourceEntryResource.id<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\"><b> -&gt; </b></span> tgt.entry<b> as </b><span style=\"color: maroon\">AddEntry</span><span style=\"color: navy\">, </span> AddEntry.fullUrl = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> AddEntry.resource = <span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResource</span> <i>\"AddEntry\"</i><span style=\"color: navy\">;</span>#xD;\n                  <span style=\"color: navy\">}</span> <i>\"SetResource\"</i><span style=\"color: navy\">;</span>#xD;\n                <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntryResourceEntry\"</i><span style=\"color: navy\">;</span>#xD;\n              <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntryResource\"</i><span style=\"color: navy\">;</span>#xD;\n            <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntry\"</i><span style=\"color: navy\">;</span>#xD;\n          <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResource\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntry\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">// </span><span style=\"color: green\">Bloco que cria Secao de Vital Signs</span>#xD;\n        RNDSEntryResource<b> where </b><span style=\"color: navy\">(</span>RNDSEntryResource.entry.resource.entry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRMedidaObservada').empty().not()<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryResourceComposition<b> then</b><span style=\"color: navy\"> {#xD;\n</span>          RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryResourceCompositionSectionVitalSigns<b> then</b><span style=\"color: navy\"> {#xD;\n</span>            <span style=\"color: navy\">// </span><span style=\"color: green\">cria section de results no composition</span>#xD;\n            RNDSEntryResource<span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryResourceCompositionSectionVitalSigns<b> then</b><span style=\"color: navy\"> {#xD;\n</span>              RNDSEntryResource<span style=\"color: navy\"><b> -&gt; </b></span> IPSEntryResourceCompositionSectionVitalSigns.title = <span style=\"color: blue\">'Vital Signs'</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://loinc.org'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'8716-3'</span><span style=\"color: navy\">, </span> c.display = <span style=\"color: blue\">'Vital signs'</span><span style=\"color: navy\">, </span> cc.coding = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> IPSEntryResourceCompositionSectionVitalSigns.code = <span style=\"color: maroon\">cc</span> <i>\"SetResultsNarrative\"</i><span style=\"color: navy\">;</span>#xD;\n            <span style=\"color: navy\">}</span> <i>\"SetCompositionSectionResults\"</i><span style=\"color: navy\">;</span>#xD;\n          <span style=\"color: navy\">}</span> <i>\"CreateSectionResults\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">}</span> <i>\"CreateSectionResultsIfExist\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">// </span><span style=\"color: green\">Bloco que cria Vital Signs</span>#xD;\n        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>          RNDSEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResource</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>            RNDSEntryResource.entry<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntry</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>              RNDSEntryResourceEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResource</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>                RNDSEntryResourceEntryResource.entry<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntry</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>                  RNDSEntryResourceEntryResourceEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResource</span><b> where </b><span style=\"color: navy\">(</span>RNDSEntryResourceEntryResourceEntry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRMedidaObservada').empty().not()<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>                    RNDSEntryResourceEntryResourceEntryResource.id<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\"><b> -&gt; </b></span> IPSEntryResourceCompositionSectionVitalSigns.entry<b> as </b><span style=\"color: maroon\">IPSEntryResourceCompositionSectionVitalSignsEntry</span><span style=\"color: navy\">, </span> IPSEntryResourceCompositionSectionVitalSignsEntry.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> tgt.entry<b> as </b><span style=\"color: maroon\">AddEntry</span><span style=\"color: navy\">, </span> AddEntry.fullUrl = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> AddEntry.resource = <span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResource</span> <i>\"AddEntry\"</i><span style=\"color: navy\">;</span>#xD;\n                  <span style=\"color: navy\">}</span> <i>\"SetResource\"</i><span style=\"color: navy\">;</span>#xD;\n                <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntryResourceEntry\"</i><span style=\"color: navy\">;</span>#xD;\n              <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntryResource\"</i><span style=\"color: navy\">;</span>#xD;\n            <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntry\"</i><span style=\"color: navy\">;</span>#xD;\n          <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResource\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntry\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">// </span><span style=\"color: green\">Bloco que cria secao de Imunizacao</span>#xD;\n        RNDSEntryResource<b> where </b><span style=\"color: navy\">(</span>RNDSEntryResource.entry.resource.entry.resource.meta.where((profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRImunobiologicoAdministrado') or (profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRImunobiologicoAdministradoCarga') or (profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRImunobiologicoAdministradoCampanha')).empty().not()<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryResourceComposition<b> then</b><span style=\"color: navy\"> {#xD;\n</span>          RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryResourceComposition.section<b> as </b><span style=\"color: maroon\">IPSEntryResourceCompositionSectionImmunizations</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>            <span style=\"color: navy\">// </span><span style=\"color: green\">cria section de immunizations no composition</span>#xD;\n            RNDSEntryResource<span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryResourceCompositionSectionImmunizations<b> then</b><span style=\"color: navy\"> {#xD;\n</span>              RNDSEntryResource<span style=\"color: navy\"><b> -&gt; </b></span> IPSEntryResourceCompositionSectionImmunizations.title = <span style=\"color: blue\">'Immunizations'</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://loinc.org'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'11369-6'</span><span style=\"color: navy\">, </span> c.display = <span style=\"color: blue\">'History of Immunization Narrative'</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> cc.coding = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> IPSEntryResourceCompositionSectionImmunizations.code = <span style=\"color: maroon\">cc</span> <i>\"SetImmunizationsNarrative\"</i><span style=\"color: navy\">;</span>#xD;\n            <span style=\"color: navy\">}</span> <i>\"SetCompositionSectionImmunizations\"</i><span style=\"color: navy\">;</span>#xD;\n            <span style=\"color: navy\">// </span><span style=\"color: green\">Bloco que mapeia BRImunobiologicoAdministrado-2.0, BRImunobiologicoAdministradoCampanha-1.0 e BRImunobiologicoAdministradoCarga-2.0</span>#xD;\n            RNDSEntryResource.entry<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntry</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>              RNDSEntryResourceEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResource</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>                RNDSEntryResourceEntryResource.entry<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntry</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>                  RNDSEntryResourceEntryResourceEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResource</span><b> where </b><span style=\"color: navy\">(</span>RNDSEntryResourceEntryResourceEntry.resource.meta.where((profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRImunobiologicoAdministrado') or (profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRImunobiologicoAdministradoCarga') or (profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRImunobiologicoAdministradoCampanha')).empty().not()<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>                    RNDSEntryResourceEntryResourceEntryResource.id<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\"><b> -&gt; </b></span> IPSEntryResourceCompositionSectionImmunizations.entry<b> as </b><span style=\"color: maroon\">IPSEntryResourceCompositionSectionImmunizationsEntry</span><span style=\"color: navy\">, </span> IPSEntryResourceCompositionSectionImmunizationsEntry.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> tgt.entry<b> as </b><span style=\"color: maroon\">AddEntry</span><span style=\"color: navy\">, </span> AddEntry.fullUrl = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> AddEntry.resource = <span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResource</span> <i>\"AddEntry\"</i><span style=\"color: navy\">;</span>#xD;\n                  <span style=\"color: navy\">}</span> <i>\"SetResource\"</i><span style=\"color: navy\">;</span>#xD;\n                <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntryResourceEntry\"</i><span style=\"color: navy\">;</span>#xD;\n              <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntryResource\"</i><span style=\"color: navy\">;</span>#xD;\n            <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntry\"</i><span style=\"color: navy\">;</span>#xD;\n          <span style=\"color: navy\">}</span> <i>\"CreateSectionImmunizations\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">}</span> <i>\"CreateSectionImmunizationsIfExists\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">// </span><span style=\"color: green\">http://www.saude.gov.br/fhir/r4/StructureDefinition/BRProcedimentoRealizado-1.0</span>#xD;\n        RNDSEntryResource<b> where </b><span style=\"color: navy\">(</span>RNDSEntryResource.entry.resource.entry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRProcedimentoRealizado').empty().not()<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryResourceComposition<b> then</b><span style=\"color: navy\"> {#xD;\n</span>          RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryResourceComposition.section<b> as </b><span style=\"color: maroon\">IPSEntryResourceCompositionSectionProcedures</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>            <span style=\"color: navy\">// </span><span style=\"color: green\">cria section de procedures no composition</span>#xD;\n            RNDSEntryResource<span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryResourceCompositionSectionProcedures<b> then</b><span style=\"color: navy\"> {#xD;\n</span>              RNDSEntryResource<span style=\"color: navy\"><b> -&gt; </b></span> IPSEntryResourceCompositionSectionProcedures.title = <span style=\"color: blue\">'History of procedures'</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://loinc.org'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'47519-4'</span><span style=\"color: navy\">, </span> c.display = <span style=\"color: blue\">'History of Procedures Narrative'</span><span style=\"color: navy\">, </span> cc.coding = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> IPSEntryResourceCompositionSectionProcedures.code = <span style=\"color: maroon\">cc</span> <i>\"SetProceduresNarrative\"</i><span style=\"color: navy\">;</span>#xD;\n            <span style=\"color: navy\">}</span> <i>\"SetCompositionSectionProcedures\"</i><span style=\"color: navy\">;</span>#xD;\n            <span style=\"color: navy\">// </span><span style=\"color: green\">Bloco que mapeia BRImunobiologicoAdministrado-2.0, BRImunobiologicoAdministradoCampanha-1.0 e BRImunobiologicoAdministradoCarga-2.0</span>#xD;\n            RNDSEntryResource.entry<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntry</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>              RNDSEntryResourceEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResource</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>                RNDSEntryResourceEntryResource.entry<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntry</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>                  RNDSEntryResourceEntryResourceEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResource</span><b> where </b><span style=\"color: navy\">(</span>RNDSEntryResourceEntryResourceEntry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRProcedimentoRealizado').empty().not()<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.entry<b> then</b><span style=\"color: navy\"> {#xD;\n</span>                    RNDSEntryResourceEntryResourceEntryResource.id<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\"><b> -&gt; </b></span> IPSEntryResourceCompositionSectionProcedures.entry<b> as </b><span style=\"color: maroon\">IPSEntryResourceCompositionSectionProceduresEntry</span><span style=\"color: navy\">, </span> IPSEntryResourceCompositionSectionProceduresEntry.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> tgt.entry<b> as </b><span style=\"color: maroon\">AddEntry</span><span style=\"color: navy\">, </span> AddEntry.fullUrl = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> AddEntry.resource = <span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResource</span> <i>\"AddEntry\"</i><span style=\"color: navy\">;</span>#xD;\n                  <span style=\"color: navy\">}</span> <i>\"SetResource\"</i><span style=\"color: navy\">;</span>#xD;\n                <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntryResourceEntry\"</i><span style=\"color: navy\">;</span>#xD;\n              <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntryResource\"</i><span style=\"color: navy\">;</span>#xD;\n            <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntry\"</i><span style=\"color: navy\">;</span>#xD;\n          <span style=\"color: navy\">}</span> <i>\"CreateSectionProcedures\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">}</span> <i>\"CreateSectionProceduresIfExists\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">// </span><span style=\"color: green\">cria section de medications no composition</span>#xD;\n        RNDSEntryResource<span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryResourceCompositionSectionMedications<b> then</b><span style=\"color: navy\"> {#xD;\n</span>          RNDSEntryResource<span style=\"color: navy\"><b> -&gt; </b></span> IPSEntryResourceCompositionSectionMedications.title = <span style=\"color: blue\">'Medication'</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Coding'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://loinc.org'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'10160-0'</span><span style=\"color: navy\">, </span> c.display = <span style=\"color: blue\">'History of Medication use Narrative'</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">cc</span><span style=\"color: navy\">, </span> cc.coding = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> IPSEntryResourceCompositionSectionMedications.code = <span style=\"color: maroon\">cc</span> <i>\"SetMedicationsNarrative\"</i><span style=\"color: navy\">;</span>#xD;\n          <span style=\"color: navy\">// </span><span style=\"color: green\">http://www.saude.gov.br/fhir/r4/StructureDefinition/BRPrescricaoMedicamento</span>#xD;\n          RNDSEntryResource.entry<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntry</span><span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryMedicationRequests<b> then</b><span style=\"color: navy\"> {#xD;\n</span>            RNDSEntryResourceEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResource</span><span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryMedicationRequests<b> then</b><span style=\"color: navy\"> {#xD;\n</span>              RNDSEntryResourceEntryResource.entry<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntry</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>                RNDSEntryResourceEntryResourceEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResource</span><b> where </b><span style=\"color: navy\">(</span>RNDSEntryResourceEntryResourceEntry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRPrescricaoMedicamento').empty().not()<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryMedicationRequests.resource<b> as </b><span style=\"color: maroon\">IPSEntryMedicationRequestsResource</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>                  RNDSEntryResourceEntryResourceEntryResource.id<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\"><b> -&gt; </b></span> IPSEntryResourceCompositionSectionMedications.entry<b> as </b><span style=\"color: maroon\">IPSEntryResourceCompositionSectionMedicationsEntry</span><span style=\"color: navy\">, </span> IPSEntryResourceCompositionSectionMedicationsEntry.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> tgt.entry<b> as </b><span style=\"color: maroon\">AddEntry</span><span style=\"color: navy\">, </span> AddEntry.fullUrl = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> AddEntry.resource = <span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResource</span> <i>\"AddEntry\"</i><span style=\"color: navy\">;</span>#xD;\n                <span style=\"color: navy\">}</span> <i>\"SetResource\"</i><span style=\"color: navy\">;</span>#xD;\n              <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntryResourceEntry\"</i><span style=\"color: navy\">;</span>#xD;\n            <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntryResource\"</i><span style=\"color: navy\">;</span>#xD;\n          <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntry\"</i><span style=\"color: navy\">;</span>#xD;\n          <span style=\"color: navy\">// </span><span style=\"color: green\">http://www.saude.gov.br/fhir/r4/StructureDefinition/BRMedicamento</span>#xD;\n          RNDSEntryResource.entry<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntry</span><span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryMedications<b> then</b><span style=\"color: navy\"> {#xD;\n</span>            RNDSEntryResourceEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResource</span><span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryMedications<b> then</b><span style=\"color: navy\"> {#xD;\n</span>              RNDSEntryResourceEntryResource.entry<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntry</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>                RNDSEntryResourceEntryResourceEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResource</span><b> where </b><span style=\"color: navy\">(</span>RNDSEntryResourceEntryResourceEntry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRMedicamento').empty().not()<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryMedications.resource<b> as </b><span style=\"color: maroon\">IPSEntryMedicationsResource</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>                  RNDSEntryResourceEntryResourceEntryResource.id<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\"><b> -&gt; </b></span> tgt.entry<b> as </b><span style=\"color: maroon\">AddEntry</span><span style=\"color: navy\">, </span> AddEntry.fullUrl = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResourceId</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> AddEntry.resource = <span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResource</span> <i>\"AddEntry\"</i><span style=\"color: navy\">;</span>#xD;\n                <span style=\"color: navy\">}</span> <i>\"SetResource\"</i><span style=\"color: navy\">;</span>#xD;\n              <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntryResourceEntry\"</i><span style=\"color: navy\">;</span>#xD;\n            <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntryResource\"</i><span style=\"color: navy\">;</span>#xD;\n          <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntry\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">}</span> <i>\"SetCompositionSectionMedications\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">// </span><span style=\"color: green\">Bloco que cria Patient</span>#xD;\n        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryPatient<b> then</b><span style=\"color: navy\"> {#xD;\n</span>          RNDSEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResource</span><span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryPatient<b> then</b><span style=\"color: navy\"> {#xD;\n</span>            RNDSEntryResource.entry<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntry</span><span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryPatient<b> then</b><span style=\"color: navy\"> {#xD;\n</span>              RNDSEntryResourceEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResource</span><span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryPatient<b> then</b><span style=\"color: navy\"> {#xD;\n</span>                RNDSEntryResourceEntryResource.entry<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntry</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>                  RNDSEntryResourceEntryResourceEntry.resource<b> as </b><span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResource</span><b> where </b><span style=\"color: navy\">(</span>RNDSEntryResourceEntryResourceEntry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRIndividuo').empty().not()<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryPatient.resource<b> as </b><span style=\"color: maroon\">IPSEntryPatientResource</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>                    RNDSEntryResourceEntryResourceEntryResource<span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryPatient.fullUrl = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSPatientReference</span><span style=\"color: navy\">)</span> <i>\"SetPatientFullUrl\"</i><span style=\"color: navy\">;</span>#xD;\n                    RNDSEntryResourceEntryResourceEntryResource<span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryPatient.resource = <span style=\"color: maroon\">RNDSEntryResourceEntryResourceEntryResource</span> <i>\"SetPatientResource\"</i><span style=\"color: navy\">;</span>#xD;\n                    RNDSEntryResourceEntryResourceEntryResource<span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryPatientResource.id = <span style=\"color: maroon\">IPSPatientReference</span> <i>\"SetPatientId\"</i><span style=\"color: navy\">;</span>#xD;\n                  <span style=\"color: navy\">}</span> <i>\"SetPatient\"</i><span style=\"color: navy\">;</span>#xD;\n                <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntryResourceEntry\"</i><span style=\"color: navy\">;</span>#xD;\n              <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntryResource\"</i><span style=\"color: navy\">;</span>#xD;\n            <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResourceEntry\"</i><span style=\"color: navy\">;</span>#xD;\n          <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntryResource\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">}</span> <i>\"IterateRNDSEntry\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">// </span><span style=\"color: green\">Bloco que cria organization para author e custodian</span>#xD;\n        RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryPractitioner<b> then</b><span style=\"color: navy\"> {#xD;\n</span>          RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span>IPSEntryPractitioner.fullUrl = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSPractitionerReference</span><span style=\"color: navy\">)</span> <i>\"SetFullUrl\"</i><span style=\"color: navy\">;</span>#xD;\n          RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span><b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Organization'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">IPSOrganization</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>            RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span>IPSOrganization.id = <span style=\"color: maroon\">IPSPractitionerReference</span> <i>\"SetId\"</i><span style=\"color: navy\">;</span>#xD;\n            RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Identifier'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">IPSPractitionerIdentifier</span><span style=\"color: navy\">, </span> IPSPractitionerIdentifier.system = <span style=\"color: blue\">'http://www.saude.gov.br/fhir/r4/NamingSystem/cnpj'</span><span style=\"color: navy\">, </span> IPSPractitionerIdentifier.value = <span style=\"color: blue\">'00394544000185'</span><span style=\"color: navy\">, </span> IPSOrganization.identifier = <span style=\"color: maroon\">IPSPractitionerIdentifier</span> <i>\"SetIdentifier\"</i><span style=\"color: navy\">;</span>#xD;\n            RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span>IPSOrganization.name = <span style=\"color: blue\">'Ministério da Saúde do Brasil'</span> <i>\"SetName\"</i><span style=\"color: navy\">;</span>#xD;\n            RNDSEntry<span style=\"color: navy\"><b> -&gt; </b></span> IPSEntryPractitioner.fullUrl = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSPractitionerReference</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> IPSEntryPractitioner.resource = <span style=\"color: maroon\">IPSOrganization</span> <i>\"SetAuthor\"</i><span style=\"color: navy\">;</span>#xD;\n          <span style=\"color: navy\">}</span> <i>\"SetAuthor\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">}</span> <i>\"SetEmptyAuthor\"</i><span style=\"color: navy\">;</span>#xD;\n        RNDSEntryResource.id<b> as </b><span style=\"color: maroon\">RNDSEntryResourceId</span><span style=\"color: navy\"><b> -&gt; </b></span> IPSEntryResourceComposition.id<b> as </b><span style=\"color: maroon\">IPSEntryResourceCompositionId</span><span style=\"color: navy\">, </span> IPSEntry.fullUrl = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'urn:uuid:'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">IPSEntryResourceCompositionId</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> IPSEntry.resource = <span style=\"color: maroon\">IPSEntryResourceComposition</span> <i>\"SetResourceComposition\"</i><span style=\"color: navy\">;</span>#xD;\n      <span style=\"color: navy\">}</span> <i>\"SetSubjectAuthorCustodianSection\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"SetIPSEntryResourceComposition\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"SetIPSEntries\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><b>group </b>DataAbsentReason<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>Element, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>Element<span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span>  src<span style=\"color: navy\"><b> -&gt; </b></span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Extension'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">TgtExtension</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'code'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.value = <span style=\"color: blue\">'unknown'</span><span style=\"color: navy\">, </span> TgtExtension.url = <span style=\"color: blue\">'http://hl7.org/fhir/StructureDefinition/data-absent-reason'</span><span style=\"color: navy\">, </span> TgtExtension.value = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> tgt.extension = <span style=\"color: maroon\">TgtExtension</span> <i>\"SetExtension\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><b>group </b>NotApplicable<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>Element, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>Element<span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span>  src<span style=\"color: navy\"><b> -&gt; </b></span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Extension'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">TgtExtension</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'code'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> c.value = <span style=\"color: blue\">'not-applicable'</span><span style=\"color: navy\">, </span> TgtExtension.url = <span style=\"color: blue\">'http://hl7.org/fhir/StructureDefinition/data-absent-reason'</span><span style=\"color: navy\">, </span> TgtExtension.value = <span style=\"color: maroon\">c</span><span style=\"color: navy\">, </span> tgt.extension = <span style=\"color: maroon\">TgtExtension</span> <i>\"SetExtension\"</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://ips.saude.gov.br/fhir/StructureMap/StructureMapBRIPS"] ;
  fhir:StructureMap.version [ fhir:value "1.2.0"] ;
  fhir:StructureMap.name [ fhir:value "StructureMapBRIPS"] ;
  fhir:StructureMap.title [ fhir:value "Mapeamento de Bundle da RNDS para o IPS"] ;
  fhir:StructureMap.status [ fhir:value "draft"] ;
  fhir:StructureMap.date [ fhir:value "2026-08-22T00:48:37-03:00"^^xsd:dateTime] ;
  fhir:StructureMap.publisher [ fhir:value "Ministério do Saúde do Brasil"] ;
  fhir:StructureMap.contact [
     fhir:index 0 ;
     fhir:ContactDetail.name [ fhir:value "Ministério do Saúde do Brasil" ] ;
     fhir:ContactDetail.telecom [
       fhir:index 0 ;
       fhir:ContactPoint.system [ fhir:value "url" ] ;
       fhir:ContactPoint.value [ fhir:value "https://gov.br/saude" ]
     ], [
       fhir:index 1 ;
       fhir:ContactPoint.system [ fhir:value "email" ] ;
       fhir:ContactPoint.value [ fhir:value "contato@gointerop.com" ]
     ]
  ], [
     fhir:index 1 ;
     fhir:ContactDetail.name [ fhir:value "Italo Macedo" ] ;
     fhir:ContactDetail.telecom [
       fhir:index 0 ;
       fhir:ContactPoint.system [ fhir:value "email" ] ;
       fhir:ContactPoint.value [ fhir:value "italo@gointerop.com" ] ;
       fhir:ContactPoint.use [ fhir:value "work" ]
     ]
  ] ;
  fhir:StructureMap.description [ fhir:value "Mapeamento de Bundle da RNDS para o IPS"] ;
  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 "BR" ] ;
       fhir:Coding.display [ fhir:value "Brazil" ]
     ]
  ] ;
  fhir:StructureMap.structure [
     fhir:index 0 ;
     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 "source" ] ;
     fhir:StructureMap.structure.alias [ fhir:value "TLeft" ]
  ], [
     fhir:index 1 ;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/uv/ips/StructureDefinition/Bundle-uv-ips" ;
       fhir:link <http://hl7.org/fhir/uv/ips/StructureDefinition/Bundle-uv-ips>
     ] ;
     fhir:StructureMap.structure.mode [ fhir:value "target" ] ;
     fhir:StructureMap.structure.alias [ fhir:value "TRight" ]
  ] ;
  fhir:StructureMap.group [
     fhir:index 0 ;
     fhir:StructureMap.group.name [ fhir:value "RNDSIPSBundle" ] ;
     fhir:StructureMap.group.typeMode [ fhir:value "none" ] ;
     fhir:StructureMap.group.input [
       fhir:index 0 ;
       fhir:StructureMap.group.input.name [ fhir:value "src" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "TLeft" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ], [
       fhir:index 1 ;
       fhir:StructureMap.group.input.name [ fhir:value "tgt" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "TRight" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]
     ] ;
     fhir:StructureMap.group.rule [
       fhir:index 0 ;
       fhir:StructureMap.group.rule.name [ fhir:value "SetBundleMetaData" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSID" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "IPS" ]
       ] ;
       fhir:StructureMap.group.rule.rule [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.name [ fhir:value "SetMetaData" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSID" ]
         ] ;
         fhir:StructureMap.group.rule.target [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.element [ fhir:value "identifier" ] ;
           fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSIdentifier" ]
         ] ;
         fhir:StructureMap.group.rule.rule [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.name [ fhir:value "SetDocumentTypeAndTimestampAndIdentifier" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSID" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "IPS" ] ;
             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 "document" ]
             ]
           ], [
             fhir:index 1 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "IPS" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "timestamp" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "now()" ]
             ]
           ], [
             fhir:index 2 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "IPSIdentifier" ] ;
             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 "urn:ietf:rfc:3986" ]
             ]
           ], [
             fhir:index 3 ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.variable [ fhir:value "uuid" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ]
           ], [
             fhir:index 4 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "IPSIdentifier" ] ;
             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 "append" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "uuid" ]
             ]
           ]
         ]
       ]
     ], [
       fhir:index 1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "SetEmptyIPSEntries" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ;
         fhir:StructureMap.group.rule.source.defaultValueString [ fhir:value "'empty'" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntry" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
         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 "IPSEntry" ]
       ], [
         fhir:index 1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
         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 "IPSEntryCondition" ]
       ], [
         fhir:index 2 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
         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 "IPSEntryAllergyIntolerance" ]
       ], [
         fhir:index 3 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
         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 "IPSEntryMedicationStatement" ]
       ], [
         fhir:index 4 ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSPatientReference" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ]
       ], [
         fhir:index 5 ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSPractitionerReference" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ]
       ], [
         fhir:index 6 ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSConditionNoKnownProblemsReference" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ]
       ], [
         fhir:index 7 ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSMedicationStatementNoKnownMedicationsReference" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ]
       ], [
         fhir:index 8 ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSAllergyIntoleranceNoKnownAllergiesReference" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ]
       ], [
         fhir:index 9 ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSVitalSignsNoKnownVitalSignsReference" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ]
       ] ;
       fhir:StructureMap.group.rule.rule [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.name [ fhir:value "SetEmptyComposition" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ] ;
           fhir:StructureMap.group.rule.source.condition [ fhir:value "RNDSEntry = 'empty'" ]
         ] ;
         fhir:StructureMap.group.rule.target [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntry" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ]
         ] ;
         fhir:StructureMap.group.rule.rule [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.name [ fhir:value "SetFullUrl" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.variable [ fhir:value "uuid" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ]
           ], [
             fhir:index 1 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntry" ] ;
             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 "append" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "uuid" ]
             ]
           ]
         ], [
           fhir:index 1 ;
           fhir:StructureMap.group.rule.name [ fhir:value "SetComposition" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSComposition" ] ;
             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:StructureMap.group.rule.rule [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetCompositionFirstOrderFields" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSComposition" ] ;
               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 "final" ]
               ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ] ;
               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 2 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
               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 3 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 4 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 "60591-5" ]
               ]
             ], [
               fhir:index 5 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 "Patient Summary Document" ]
               ]
             ], [
               fhir:index 6 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "cc" ] ;
               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 "c" ]
               ]
             ], [
               fhir:index 7 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSComposition" ] ;
               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.valueId [ fhir:value "cc" ]
               ]
             ], [
               fhir:index 8 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSComposition" ] ;
               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 "evaluate" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "now()" ]
               ]
             ], [
               fhir:index 9 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSComposition" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "id" ] ;
               fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ]
             ], [
               fhir:index 10 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "today" ] ;
               fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "today()" ]
               ]
             ], [
               fhir:index 11 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSComposition" ] ;
               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 "append" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Patient Summary as of:" ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "today" ]
               ]
             ], [
               fhir:index 12 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSComposition" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "confidentiality" ] ;
               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 "N" ]
               ]
             ], [
               fhir:index 13 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSComposition" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "text" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSCompositionText" ]
             ], [
               fhir:index 14 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCompositionText" ] ;
               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 "generated" ]
               ]
             ], [
               fhir:index 15 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCompositionText" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "div" ] ;
               fhir:StructureMap.group.rule.target.transform [ fhir:value "append" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "<div xmlns=\"http://www.w3.org/1999/xhtml\">Title: International Patient Summary from Brazil, code: http://loinc.org#60591-5, status: generated, confidentiality: N</div>" ]
               ]
             ]
           ], [
             fhir:index 1 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetSubjectAuthorCustodianSection" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSComposition" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSCompositionSubject" ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSComposition" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "author" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSCompositionAuthor" ]
             ], [
               fhir:index 2 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSComposition" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "custodian" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSCompositionCustodian" ]
             ], [
               fhir:index 3 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSComposition" ] ;
               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 "IPSCompositionSectionActiveProblems" ]
             ], [
               fhir:index 4 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSComposition" ] ;
               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 "IPSCompositionMedication" ]
             ], [
               fhir:index 5 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSComposition" ] ;
               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 "IPSCompositionAllergiesAndIntolerances" ]
             ], [
               fhir:index 6 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSComposition" ] ;
               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 "IPSCompositionVitalSigns" ]
             ] ;
             fhir:StructureMap.group.rule.rule [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.name [ fhir:value "SetReferences" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
               ] ;
               fhir:StructureMap.group.rule.target [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCompositionSubject" ] ;
                 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 "append" ] ;
                 fhir:StructureMap.group.rule.target.parameter [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                 ], [
                   fhir:index 1 ;
                   fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSPatientReference" ]
                 ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCompositionAuthor" ] ;
                 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 "append" ] ;
                 fhir:StructureMap.group.rule.target.parameter [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                 ], [
                   fhir:index 1 ;
                   fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSPractitionerReference" ]
                 ]
               ], [
                 fhir:index 2 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCompositionCustodian" ] ;
                 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 "append" ] ;
                 fhir:StructureMap.group.rule.target.parameter [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                 ], [
                   fhir:index 1 ;
                   fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSPractitionerReference" ]
                 ]
               ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.name [ fhir:value "SetActiveProblems" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
               ] ;
               fhir:StructureMap.group.rule.target [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCompositionSectionActiveProblems" ] ;
                 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 "Active Problems" ]
                 ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ] ;
                 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 2 ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
                 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 3 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                 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 4 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                 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 "11450-4" ]
                 ]
               ], [
                 fhir:index 5 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                 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 "Problem list Reported" ]
                 ]
               ], [
                 fhir:index 6 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "cc" ] ;
                 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 "c" ]
                 ]
               ], [
                 fhir:index 7 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCompositionSectionActiveProblems" ] ;
                 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.valueId [ fhir:value "cc" ]
                 ]
               ], [
                 fhir:index 8 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCompositionSectionActiveProblems" ] ;
                 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 "IPSCompositionSectionActiveProblemsEntry" ]
               ], [
                 fhir:index 9 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCompositionSectionActiveProblemsEntry" ] ;
                 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 "append" ] ;
                 fhir:StructureMap.group.rule.target.parameter [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                 ], [
                   fhir:index 1 ;
                   fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSConditionNoKnownProblemsReference" ]
                 ]
               ]
             ], [
               fhir:index 2 ;
               fhir:StructureMap.group.rule.name [ fhir:value "SetTitleMedications" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
               ] ;
               fhir:StructureMap.group.rule.target [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCompositionMedication" ] ;
                 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 "Medications" ]
                 ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ] ;
                 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 2 ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
                 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 3 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                 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 4 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                 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 "10160-0" ]
                 ]
               ], [
                 fhir:index 5 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                 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 "History of Medication use Narrative" ]
                 ]
               ], [
                 fhir:index 6 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "cc" ] ;
                 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 "c" ]
                 ]
               ], [
                 fhir:index 7 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCompositionMedication" ] ;
                 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.valueId [ fhir:value "cc" ]
                 ]
               ], [
                 fhir:index 8 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCompositionMedication" ] ;
                 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 "IPSCompositionSectionMedicationEntry" ]
               ], [
                 fhir:index 9 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCompositionSectionMedicationEntry" ] ;
                 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 "append" ] ;
                 fhir:StructureMap.group.rule.target.parameter [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                 ], [
                   fhir:index 1 ;
                   fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSMedicationStatementNoKnownMedicationsReference" ]
                 ]
               ]
             ], [
               fhir:index 3 ;
               fhir:StructureMap.group.rule.name [ fhir:value "SetAllergiesAndIntolerances" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
               ] ;
               fhir:StructureMap.group.rule.target [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCompositionAllergiesAndIntolerances" ] ;
                 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 "Allergies and Intolerances" ]
                 ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ] ;
                 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 2 ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
                 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 3 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                 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 4 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                 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 "48765-2" ]
                 ]
               ], [
                 fhir:index 5 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                 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 "Allergies and adverse reactions Document" ]
                 ]
               ], [
                 fhir:index 6 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "cc" ] ;
                 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 "c" ]
                 ]
               ], [
                 fhir:index 7 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCompositionAllergiesAndIntolerances" ] ;
                 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.valueId [ fhir:value "cc" ]
                 ]
               ], [
                 fhir:index 8 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCompositionAllergiesAndIntolerances" ] ;
                 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 "IPSCompositionSectionAllergiesAndIntolerancesEntry" ]
               ], [
                 fhir:index 9 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCompositionSectionAllergiesAndIntolerancesEntry" ] ;
                 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 "append" ] ;
                 fhir:StructureMap.group.rule.target.parameter [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                 ], [
                   fhir:index 1 ;
                   fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSAllergyIntoleranceNoKnownAllergiesReference" ]
                 ]
               ]
             ], [
               fhir:index 4 ;
               fhir:StructureMap.group.rule.name [ fhir:value "SetVitalSigns" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
               ] ;
               fhir:StructureMap.group.rule.target [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCompositionVitalSigns" ] ;
                 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 "Vital Signs" ]
                 ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ] ;
                 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 2 ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
                 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 3 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                 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 4 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                 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 "8716-3" ]
                 ]
               ], [
                 fhir:index 5 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                 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 "Vital signs" ]
                 ]
               ], [
                 fhir:index 6 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "cc" ] ;
                 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 "c" ]
                 ]
               ], [
                 fhir:index 7 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCompositionVitalSigns" ] ;
                 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.valueId [ fhir:value "cc" ]
                 ]
               ], [
                 fhir:index 8 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCompositionVitalSigns" ] ;
                 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 "IPSCompositionVitalSignsEntry" ]
               ], [
                 fhir:index 9 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCompositionVitalSignsEntry" ] ;
                 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 "append" ] ;
                 fhir:StructureMap.group.rule.target.parameter [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                 ], [
                   fhir:index 1 ;
                   fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSVitalSignsNoKnownVitalSignsReference" ]
                 ]
               ]
             ]
           ], [
             fhir:index 2 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetResourceComposition" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntry" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ;
               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 "IPSComposition" ]
               ]
             ]
           ]
         ]
       ], [
         fhir:index 1 ;
         fhir:StructureMap.group.rule.name [ fhir:value "SetEmptyCondition" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ] ;
           fhir:StructureMap.group.rule.source.condition [ fhir:value "RNDSEntry = 'empty'" ]
         ] ;
         fhir:StructureMap.group.rule.target [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryCondition" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ]
         ] ;
         fhir:StructureMap.group.rule.rule [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.name [ fhir:value "SetFullUrl" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.variable [ fhir:value "uuid" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ]
           ], [
             fhir:index 1 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryCondition" ] ;
             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 "append" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "uuid" ]
             ]
           ]
         ], [
           fhir:index 1 ;
           fhir:StructureMap.group.rule.name [ fhir:value "SetCondition" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSCondition" ] ;
             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:StructureMap.group.rule.rule [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetClinicalStatus" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ] ;
               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 1 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
               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 2 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 3 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 4 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "cc" ] ;
               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 "c" ]
               ]
             ], [
               fhir:index 5 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCondition" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "clinicalStatus" ] ;
               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 "cc" ]
               ]
             ]
           ], [
             fhir:index 1 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetCode" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ] ;
               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 1 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
               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 2 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips" ]
               ]
             ], [
               fhir:index 3 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 "no-problem-info" ]
               ]
             ], [
               fhir:index 4 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 "No information about problems" ]
               ]
             ], [
               fhir:index 5 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "cc" ] ;
               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 "c" ]
               ]
             ], [
               fhir:index 6 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCondition" ] ;
               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.valueId [ fhir:value "cc" ]
               ]
             ]
           ], [
             fhir:index 2 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetCode" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ] ;
               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 1 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
               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 2 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 3 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 "confirmed" ]
               ]
             ], [
               fhir:index 4 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 "Confirmed" ]
               ]
             ], [
               fhir:index 5 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "cc" ] ;
               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 "c" ]
               ]
             ], [
               fhir:index 6 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCondition" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "verificationStatus" ] ;
               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 "cc" ]
               ]
             ]
           ], [
             fhir:index 3 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetSubject" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCondition" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSConditionSubject" ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSConditionSubject" ] ;
               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 "append" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSPatientReference" ]
               ]
             ]
           ], [
             fhir:index 4 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetConditionNarrativeElement" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryCondition" ] ;
               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 "IPSEntryConditionResource" ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryConditionResource" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "text" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSEntryConditionResourceText" ]
             ], [
               fhir:index 2 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryConditionResourceText" ] ;
               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 "generated" ]
               ]
             ], [
               fhir:index 3 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCondition" ] ;
               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 "IPSConditionCode" ]
             ], [
               fhir:index 4 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSConditionCode" ] ;
               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 "IPSConditionCodeCoding" ]
             ], [
               fhir:index 5 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSConditionCodeCoding" ] ;
               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 "IPSConditionCodeCodingCode" ]
             ], [
               fhir:index 6 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCondition" ] ;
               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 "IPSConditionClinicalStatus" ]
             ], [
               fhir:index 7 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSConditionClinicalStatus" ] ;
               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 "IPSConditionClinicalStatusCoding" ]
             ], [
               fhir:index 8 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSConditionClinicalStatusCoding" ] ;
               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 "IPSConditionClinicalStatusCodingCode" ]
             ], [
               fhir:index 9 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSCondition" ] ;
               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 "IPSConditionVerificationStatus" ]
             ], [
               fhir:index 10 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSConditionVerificationStatus" ] ;
               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 "IPSConditionVerificationStatusCoding" ]
             ], [
               fhir:index 11 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSConditionVerificationStatusCoding" ] ;
               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 "IPSConditionVerificationStatusCodingCode" ]
             ], [
               fhir:index 12 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryConditionResourceText" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "div" ] ;
               fhir:StructureMap.group.rule.target.transform [ fhir:value "append" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "<div xmlns=\"http://www.w3.org/1999/xhtml\">Condition" ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSConditionCodeCodingCode" ]
               ], [
                 fhir:index 2 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value ",clinicalStatus:" ]
               ], [
                 fhir:index 3 ;
                 fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSConditionClinicalStatusCodingCode" ]
               ], [
                 fhir:index 4 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value ",verificationStatus:" ]
               ], [
                 fhir:index 5 ;
                 fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSConditionVerificationStatusCodingCode" ]
               ], [
                 fhir:index 6 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "</div>" ]
               ]
             ]
           ], [
             fhir:index 5 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetCondition" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryCondition" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ;
               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 "IPSCondition" ]
               ]
             ]
           ]
         ]
       ], [
         fhir:index 2 ;
         fhir:StructureMap.group.rule.name [ fhir:value "SetEmptyAllergyIntolerance" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ] ;
           fhir:StructureMap.group.rule.source.condition [ fhir:value "RNDSEntry = 'empty'" ]
         ] ;
         fhir:StructureMap.group.rule.target [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryAllergyIntolerance" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ]
         ] ;
         fhir:StructureMap.group.rule.rule [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.name [ fhir:value "SetFullUrl" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.variable [ fhir:value "uuid" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ]
           ], [
             fhir:index 1 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryAllergyIntolerance" ] ;
             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 "append" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "uuid" ]
             ]
           ]
         ], [
           fhir:index 1 ;
           fhir:StructureMap.group.rule.name [ fhir:value "SetAllergyIntolerance" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSAllergyIntolerance" ] ;
             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 "AllergyIntolerance" ]
             ]
           ] ;
           fhir:StructureMap.group.rule.rule [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetClinicalStatus" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ] ;
               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 1 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
               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 2 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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/allergyintolerance-clinical" ]
               ]
             ], [
               fhir:index 3 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 4 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "cc" ] ;
               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 "c" ]
               ]
             ], [
               fhir:index 5 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSAllergyIntolerance" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "clinicalStatus" ] ;
               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 "cc" ]
               ]
             ]
           ], [
             fhir:index 1 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetCode" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
               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 1 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips" ]
               ]
             ], [
               fhir:index 2 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 "no-allergy-info" ]
               ]
             ], [
               fhir:index 3 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 "No information about allergies" ]
               ]
             ], [
               fhir:index 4 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ] ;
               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 "cc" ] ;
               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 "c" ]
               ]
             ], [
               fhir:index 6 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSAllergyIntolerance" ] ;
               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.valueId [ fhir:value "cc" ]
               ]
             ]
           ], [
             fhir:index 2 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetPatient" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSAllergyIntolerance" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "patient" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSAllergyIntolerancePatient" ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSAllergyIntolerancePatient" ] ;
               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 "append" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSPatientReference" ]
               ]
             ]
           ], [
             fhir:index 3 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetAllergyIntolerance" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryAllergyIntolerance" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ;
               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 "IPSAllergyIntolerance" ]
               ]
             ]
           ], [
             fhir:index 4 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetAllergyText" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSAllergyIntolerance" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "text" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSAllergyIntoleranceText" ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSAllergyIntoleranceText" ] ;
               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 "generated" ]
               ]
             ], [
               fhir:index 2 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSAllergyIntoleranceText" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "div" ] ;
               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 "<div xmlns=\"http://www.w3.org/1999/xhtml\">No allergy information</div>" ]
               ]
             ]
           ]
         ]
       ], [
         fhir:index 3 ;
         fhir:StructureMap.group.rule.name [ fhir:value "SetEmptyMedicationStatement" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ] ;
           fhir:StructureMap.group.rule.source.condition [ fhir:value "RNDSEntry = 'empty'" ]
         ] ;
         fhir:StructureMap.group.rule.target [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryMedicationStatement" ] ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ]
         ] ;
         fhir:StructureMap.group.rule.rule [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.name [ fhir:value "SetMedicationStatement" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSMedicationStatement" ] ;
             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 "MedicationStatement" ]
             ]
           ] ;
           fhir:StructureMap.group.rule.rule [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetStatus" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSMedicationStatement" ] ;
               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 "unknown" ]
               ]
             ]
           ], [
             fhir:index 1 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetCode" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
               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 1 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips" ]
               ]
             ], [
               fhir:index 2 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 "no-medication-info" ]
               ]
             ], [
               fhir:index 3 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 "No information about medications" ]
               ]
             ], [
               fhir:index 4 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ] ;
               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 "cc" ] ;
               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 "c" ]
               ]
             ], [
               fhir:index 6 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSMedicationStatement" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "medication" ] ;
               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 "cc" ]
               ]
             ]
           ], [
             fhir:index 2 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetEffectivePeriod" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSMedicationStatement" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "effectivePeriod" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSMedicationStatementEffectivePeriod" ]
             ] ;
             fhir:StructureMap.group.rule.dependent [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.dependent.name [ fhir:value "NotApplicable" ] ;
               fhir:StructureMap.group.rule.dependent.variable [
                 fhir:value "RNDSEntry" ;
                 fhir:index 0
               ], [
                 fhir:value "IPSMedicationStatementEffectivePeriod" ;
                 fhir:index 1
               ]
             ]
           ], [
             fhir:index 3 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetSubject" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSMedicationStatement" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSMedicationStatementSubject" ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSMedicationStatementSubject" ] ;
               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 "append" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSPatientReference" ]
               ]
             ]
           ], [
             fhir:index 4 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetMedicationStatement" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "uuid" ] ;
               fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryMedicationStatement" ] ;
               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 "append" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "uuid" ]
               ]
             ], [
               fhir:index 2 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryMedicationStatement" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ;
               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 "IPSMedicationStatement" ]
               ]
             ]
           ]
         ]
       ]
     ], [
       fhir:index 2 ;
       fhir:StructureMap.group.rule.name [ fhir:value "SetIPSEntries" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntry" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
         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 "IPSEntry" ]
       ], [
         fhir:index 1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
         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 "IPSEntryCondition" ]
       ], [
         fhir:index 2 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
         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 "IPSEntryVitalSigns" ]
       ], [
         fhir:index 3 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
         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 "IPSEntryResults" ]
       ], [
         fhir:index 4 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
         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 "IPSEntrySpecimen" ]
       ], [
         fhir:index 5 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
         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 "IPSEntryImmunization" ]
       ], [
         fhir:index 6 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
         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 "IPSEntryProcedures" ]
       ], [
         fhir:index 7 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
         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 "IPSEntryMedicationRequests" ]
       ], [
         fhir:index 8 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
         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 "IPSEntryMedications" ]
       ], [
         fhir:index 9 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
         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 "IPSEntryAllergyIntolerance" ]
       ], [
         fhir:index 10 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
         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 "IPSEntryMedicationStatement" ]
       ], [
         fhir:index 11 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
         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 "IPSEntryPatient" ]
       ], [
         fhir:index 12 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
         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 "IPSEntryPractitioner" ]
       ], [
         fhir:index 13 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
         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 "IPSEntryCustodian" ]
       ], [
         fhir:index 14 ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSPatientReference" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ]
       ], [
         fhir:index 15 ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSPractitionerReference" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ]
       ] ;
       fhir:StructureMap.group.rule.rule [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.name [ fhir:value "SetIPSEntryResourceComposition" ] ;
         fhir:StructureMap.group.rule.source [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ] ;
           fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
           fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResource" ]
         ] ;
         fhir:StructureMap.group.rule.target [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
           fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSEntryResourceComposition" ] ;
           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:StructureMap.group.rule.rule [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.name [ fhir:value "SetCompositionFirstOrderFields" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceComposition" ] ;
             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 "final" ]
             ]
           ], [
             fhir:index 1 ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ] ;
             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 2 ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
             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 3 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
             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 4 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
             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 "60591-5" ]
             ]
           ], [
             fhir:index 5 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
             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 "Patient Summary Document" ]
             ]
           ], [
             fhir:index 6 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "cc" ] ;
             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 "c" ]
             ]
           ], [
             fhir:index 7 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceComposition" ] ;
             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.valueId [ fhir:value "cc" ]
             ]
           ], [
             fhir:index 8 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceComposition" ] ;
             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 "evaluate" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "now()" ]
             ]
           ], [
             fhir:index 9 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceComposition" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "id" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ]
           ], [
             fhir:index 10 ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.variable [ fhir:value "today" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "today()" ]
             ]
           ], [
             fhir:index 11 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceComposition" ] ;
             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 "append" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Patient Summary as of" ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "today" ]
             ]
           ], [
             fhir:index 12 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceComposition" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "confidentiality" ] ;
             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 "N" ]
             ]
           ], [
             fhir:index 13 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceComposition" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "text" ] ;
             fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSEntryResourceCompositionText" ]
           ], [
             fhir:index 14 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionText" ] ;
             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 "generated" ]
             ]
           ], [
             fhir:index 15 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionText" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "div" ] ;
             fhir:StructureMap.group.rule.target.transform [ fhir:value "append" ] ;
             fhir:StructureMap.group.rule.target.parameter [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "<div xmlns=\"http://www.w3.org/1999/xhtml\">Title: International Patient Summary from Brazil, code: http://loinc.org#60591-5, status: generated, confidentiality: N</div>" ]
             ]
           ]
         ], [
           fhir:index 1 ;
           fhir:StructureMap.group.rule.name [ fhir:value "SetSubjectAuthorCustodianSection" ] ;
           fhir:StructureMap.group.rule.source [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ]
           ] ;
           fhir:StructureMap.group.rule.target [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceComposition" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ] ;
             fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSEntryResourceCompositionSubject" ]
           ], [
             fhir:index 1 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceComposition" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "author" ] ;
             fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSEntryResourceCompositionPractitioner" ]
           ], [
             fhir:index 2 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceComposition" ] ;
             fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
             fhir:StructureMap.group.rule.target.element [ fhir:value "custodian" ] ;
             fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSEntryResourceCompositionCustodian" ]
           ], [
             fhir:index 3 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceComposition" ] ;
             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 "IPSEntryResourceCompositionSectionActiveProblems" ]
           ], [
             fhir:index 4 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceComposition" ] ;
             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 "IPSEntryResourceCompositionSectionMedications" ]
           ], [
             fhir:index 5 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceComposition" ] ;
             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 "IPSEntryResourceCompositionSectionAllergiesAndIntolerances" ]
           ], [
             fhir:index 6 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceComposition" ] ;
             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 "IPSEntryResourceCompositionSectionResults" ]
           ], [
             fhir:index 7 ;
             fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceComposition" ] ;
             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 "IPSEntryResourceCompositionSectionVitalSigns" ]
           ] ;
           fhir:StructureMap.group.rule.rule [
             fhir:index 0 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetResourceCompositionReferences" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSubject" ] ;
               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 "append" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSPatientReference" ]
               ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionPractitioner" ] ;
               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 "append" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSPractitionerReference" ]
               ]
             ], [
               fhir:index 2 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionCustodian" ] ;
               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 "append" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSPractitionerReference" ]
               ]
             ] ;
             fhir:StructureMap.group.rule.documentation [ fhir:value "Bloco que seta as referencias a subject, practitioner e custodian no composition" ]
           ], [
             fhir:index 1 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetActiveProblems" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionActiveProblems" ] ;
               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 "Active Problems" ]
               ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ] ;
               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 2 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
               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 3 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 4 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 "11450-4" ]
               ]
             ], [
               fhir:index 5 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 "Problem list Reported" ]
               ]
             ], [
               fhir:index 6 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "cc" ] ;
               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 "c" ]
               ]
             ], [
               fhir:index 7 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionActiveProblems" ] ;
               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.valueId [ fhir:value "cc" ]
               ]
             ] ;
             fhir:StructureMap.group.rule.documentation [ fhir:value "Bloco que cria a secao de problemas no composition" ]
           ], [
             fhir:index 2 ;
             fhir:StructureMap.group.rule.name [ fhir:value "CreateNoKnownConditions" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ] ;
               fhir:StructureMap.group.rule.source.condition [ fhir:value "RNDSEntryResource.entry.resource.entry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRCondicaoSaude').empty()" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSEntryEmptyCondition" ] ;
               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 1 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSEntryEmptyConditionId" ] ;
               fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ]
             ], [
               fhir:index 2 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryEmptyCondition" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "id" ] ;
               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 "IPSEntryEmptyConditionId" ]
               ]
             ], [
               fhir:index 3 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ] ;
               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.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
               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 5 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 6 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 7 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "cc" ] ;
               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 "c" ]
               ]
             ], [
               fhir:index 8 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryEmptyCondition" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "clinicalStatus" ] ;
               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 "cc" ]
               ]
             ], [
               fhir:index 9 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
               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 10 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips" ]
               ]
             ], [
               fhir:index 11 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 "no-problem-info" ]
               ]
             ], [
               fhir:index 12 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 "No information about problems" ]
               ]
             ], [
               fhir:index 13 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ] ;
               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 14 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "cc" ] ;
               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 "c" ]
               ]
             ], [
               fhir:index 15 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryEmptyCondition" ] ;
               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.valueId [ fhir:value "cc" ]
               ]
             ], [
               fhir:index 16 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryEmptyCondition" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSEntryEmptyConditionSubject" ]
             ], [
               fhir:index 17 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryEmptyConditionSubject" ] ;
               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 "append" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSPatientReference" ]
               ]
             ], [
               fhir:index 18 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryCondition" ] ;
               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 "append" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSEntryEmptyConditionId" ]
               ]
             ], [
               fhir:index 19 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryCondition" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ;
               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 "IPSEntryEmptyCondition" ]
               ]
             ], [
               fhir:index 20 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionActiveProblems" ] ;
               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 "IPSEntryResourceCompositionSectionActiveProblemsEntry" ]
             ], [
               fhir:index 21 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionActiveProblemsEntry" ] ;
               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 "append" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSEntryEmptyConditionId" ]
               ]
             ] ;
             fhir:StructureMap.group.rule.documentation [ fhir:value "Bloco que cria condition vazio quando nao ha conditions no bundle" ]
           ], [
             fhir:index 3 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetAllergiesAndIntolerances" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionAllergiesAndIntolerances" ] ;
               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 "Allergies and Intolerances" ]
               ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ] ;
               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 2 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
               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 3 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 4 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 "48765-2" ]
               ]
             ], [
               fhir:index 5 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 "Allergies and adverse reactions Document" ]
               ]
             ], [
               fhir:index 6 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "cc" ] ;
               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 "c" ]
               ]
             ], [
               fhir:index 7 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionAllergiesAndIntolerances" ] ;
               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.valueId [ fhir:value "cc" ]
               ]
             ] ;
             fhir:StructureMap.group.rule.documentation [ fhir:value "Bloco que cria a secao de alergias no composition" ]
           ], [
             fhir:index 4 ;
             fhir:StructureMap.group.rule.name [ fhir:value "CreateNoKnownConditions" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ] ;
               fhir:StructureMap.group.rule.source.condition [ fhir:value "RNDSEntryResource.entry.resource.entry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRAlergiaReacaoAdversa').empty()" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSEntryEmptyAllergyIntolerance" ] ;
               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 "AllergyIntolerance" ]
               ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSEntryEmptyAllergyIntoleranceId" ] ;
               fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ]
             ], [
               fhir:index 2 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryEmptyAllergyIntolerance" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "id" ] ;
               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 "IPSEntryEmptyAllergyIntoleranceId" ]
               ]
             ], [
               fhir:index 3 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ] ;
               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.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
               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 5 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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/allergyintolerance-clinical" ]
               ]
             ], [
               fhir:index 6 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 7 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "cc" ] ;
               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 "c" ]
               ]
             ], [
               fhir:index 8 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryEmptyAllergyIntolerance" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "clinicalStatus" ] ;
               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 "cc" ]
               ]
             ], [
               fhir:index 9 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
               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 10 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips" ]
               ]
             ], [
               fhir:index 11 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 "no-allergy-info" ]
               ]
             ], [
               fhir:index 12 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 "No information about allergies" ]
               ]
             ], [
               fhir:index 13 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ] ;
               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 14 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "cc" ] ;
               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 "c" ]
               ]
             ], [
               fhir:index 15 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryEmptyAllergyIntolerance" ] ;
               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.valueId [ fhir:value "cc" ]
               ]
             ], [
               fhir:index 16 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryEmptyAllergyIntolerance" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "patient" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSEntryEmptyAllergyIntolerancePatient" ]
             ], [
               fhir:index 17 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryEmptyAllergyIntolerancePatient" ] ;
               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 "append" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSPatientReference" ]
               ]
             ], [
               fhir:index 18 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryEmptyAllergyIntolerance" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "text" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSEntryEmptyAllergyIntoleranceText" ]
             ], [
               fhir:index 19 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryEmptyAllergyIntoleranceText" ] ;
               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 "generated" ]
               ]
             ], [
               fhir:index 20 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryEmptyAllergyIntoleranceText" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "div" ] ;
               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 "<div xmlns=\"http://www.w3.org/1999/xhtml\">No known allergies</div>" ]
               ]
             ], [
               fhir:index 21 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryAllergyIntolerance" ] ;
               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 "append" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSEntryEmptyAllergyIntoleranceId" ]
               ]
             ], [
               fhir:index 22 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryAllergyIntolerance" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ;
               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 "IPSEntryEmptyAllergyIntolerance" ]
               ]
             ], [
               fhir:index 23 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionAllergiesAndIntolerances" ] ;
               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 "IPSEntryResourceCompositionSectionAllergiesAndIntolerancesEntry" ]
             ], [
               fhir:index 24 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionAllergiesAndIntolerancesEntry" ] ;
               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 "append" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSEntryEmptyAllergyIntoleranceId" ]
               ]
             ] ;
             fhir:StructureMap.group.rule.documentation [ fhir:value "Bloco que cria o Allergy Intolerance vazio quando nao ha allergy intolerance no bundle" ]
           ], [
             fhir:index 5 ;
             fhir:StructureMap.group.rule.name [ fhir:value "CreateNoKnownMedications" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ] ;
               fhir:StructureMap.group.rule.source.condition [ fhir:value "RNDSEntryResource.entry.resource.entry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRMedicamento').empty()" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSEntryEmptyMedicationStatement" ] ;
               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 "MedicationStatement" ]
               ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSEntryEmptyMedicationStatementId" ] ;
               fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ]
             ], [
               fhir:index 2 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryEmptyMedicationStatement" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "id" ] ;
               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 "IPSEntryEmptyMedicationStatementId" ]
               ]
             ], [
               fhir:index 3 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
               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 4 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips" ]
               ]
             ], [
               fhir:index 5 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 "no-medication-info" ]
               ]
             ], [
               fhir:index 6 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
               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 "No information about medications" ]
               ]
             ], [
               fhir:index 7 ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ] ;
               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 8 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "cc" ] ;
               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 "c" ]
               ]
             ], [
               fhir:index 9 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryEmptyMedicationStatement" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "medication" ] ;
               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 "cc" ]
               ]
             ], [
               fhir:index 10 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryEmptyMedicationStatement" ] ;
               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 "unknown" ]
               ]
             ], [
               fhir:index 11 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryEmptyMedicationStatement" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "subject" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSEntryEmptyMedicationStatementSubject" ]
             ], [
               fhir:index 12 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryEmptyMedicationStatementSubject" ] ;
               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 "append" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSPatientReference" ]
               ]
             ], [
               fhir:index 13 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryMedicationStatement" ] ;
               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 "append" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSEntryEmptyMedicationStatementId" ]
               ]
             ], [
               fhir:index 14 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryMedicationStatement" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ;
               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 "IPSEntryEmptyMedicationStatement" ]
               ]
             ], [
               fhir:index 15 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionMedications" ] ;
               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 "IPSEntryResourceCompositionSectionMedicationEntry" ]
             ], [
               fhir:index 16 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionMedicationEntry" ] ;
               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 "append" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSEntryEmptyMedicationStatementId" ]
               ]
             ] ;
             fhir:StructureMap.group.rule.documentation [ fhir:value "Bloco que cria Medication Statement vazio quando nao ha medication statement no bundle" ]
           ], [
             fhir:index 6 ;
             fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntry" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
             ] ;
             fhir:StructureMap.group.rule.rule [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResource" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ] ;
                 fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                 fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResource" ]
               ] ;
               fhir:StructureMap.group.rule.target [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
               ] ;
               fhir:StructureMap.group.rule.rule [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntry" ] ;
                 fhir:StructureMap.group.rule.source [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ] ;
                   fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
                   fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntry" ]
                 ] ;
                 fhir:StructureMap.group.rule.target [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                   fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                   fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
                 ] ;
                 fhir:StructureMap.group.rule.rule [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntryResource" ] ;
                   fhir:StructureMap.group.rule.source [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntry" ] ;
                     fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                     fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResource" ]
                   ] ;
                   fhir:StructureMap.group.rule.target [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                     fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                     fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
                   ] ;
                   fhir:StructureMap.group.rule.rule [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntryResourceEntry" ] ;
                     fhir:StructureMap.group.rule.source [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResource" ] ;
                       fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
                       fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntry" ]
                     ] ;
                     fhir:StructureMap.group.rule.rule [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.name [ fhir:value "SetResource" ] ;
                       fhir:StructureMap.group.rule.source [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResourceEntry" ] ;
                         fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                         fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntryResource" ] ;
                         fhir:StructureMap.group.rule.source.condition [ fhir:value "RNDSEntryResourceEntryResourceEntry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRCondicaoSaude').empty().not()" ]
                       ] ;
                       fhir:StructureMap.group.rule.target [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                         fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
                       ] ;
                       fhir:StructureMap.group.rule.rule [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.name [ fhir:value "AddEntry" ] ;
                         fhir:StructureMap.group.rule.source [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResourceEntryResource" ] ;
                           fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ;
                           fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                         ] ;
                         fhir:StructureMap.group.rule.target [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionActiveProblems" ] ;
                           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 "IPSEntryResourceCompositionSectionActiveProblemsEntry" ]
                         ], [
                           fhir:index 1 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionActiveProblemsEntry" ] ;
                           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 "append" ] ;
                           fhir:StructureMap.group.rule.target.parameter [
                             fhir:index 0 ;
                             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                           ], [
                             fhir:index 1 ;
                             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                           ]
                         ], [
                           fhir:index 2 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                           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 "AddEntry" ]
                         ], [
                           fhir:index 3 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "AddEntry" ] ;
                           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 "append" ] ;
                           fhir:StructureMap.group.rule.target.parameter [
                             fhir:index 0 ;
                             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                           ], [
                             fhir:index 1 ;
                             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                           ]
                         ], [
                           fhir:index 4 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "AddEntry" ] ;
                           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                           fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ;
                           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 "RNDSEntryResourceEntryResourceEntryResource" ]
                           ]
                         ]
                       ]
                     ]
                   ]
                 ]
               ]
             ] ;
             fhir:StructureMap.group.rule.documentation [ fhir:value "Bloco que cria conditions BRCondicaoSaude" ]
           ], [
             fhir:index 7 ;
             fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntry" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
             ] ;
             fhir:StructureMap.group.rule.rule [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResource" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ] ;
                 fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                 fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResource" ]
               ] ;
               fhir:StructureMap.group.rule.target [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
               ] ;
               fhir:StructureMap.group.rule.rule [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntry" ] ;
                 fhir:StructureMap.group.rule.source [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ] ;
                   fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
                   fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntry" ]
                 ] ;
                 fhir:StructureMap.group.rule.target [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                   fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                   fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
                 ] ;
                 fhir:StructureMap.group.rule.rule [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntryResource" ] ;
                   fhir:StructureMap.group.rule.source [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntry" ] ;
                     fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                     fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResource" ]
                   ] ;
                   fhir:StructureMap.group.rule.target [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                     fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                     fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
                   ] ;
                   fhir:StructureMap.group.rule.rule [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntryResourceEntry" ] ;
                     fhir:StructureMap.group.rule.source [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResource" ] ;
                       fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
                       fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntry" ]
                     ] ;
                     fhir:StructureMap.group.rule.rule [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.name [ fhir:value "SetResource" ] ;
                       fhir:StructureMap.group.rule.source [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResourceEntry" ] ;
                         fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                         fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntryResource" ] ;
                         fhir:StructureMap.group.rule.source.condition [ fhir:value "RNDSEntryResourceEntryResourceEntry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRAlergiaReacaoAdversa').empty().not()" ]
                       ] ;
                       fhir:StructureMap.group.rule.target [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                         fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
                       ] ;
                       fhir:StructureMap.group.rule.rule [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.name [ fhir:value "AddEntry" ] ;
                         fhir:StructureMap.group.rule.source [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResourceEntryResource" ] ;
                           fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ;
                           fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                         ] ;
                         fhir:StructureMap.group.rule.target [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionAllergiesAndIntolerances" ] ;
                           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 "IPSEntryResourceCompositionSectionAllergiesAndIntolerancesEntry" ]
                         ], [
                           fhir:index 1 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionAllergiesAndIntolerancesEntry" ] ;
                           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 "append" ] ;
                           fhir:StructureMap.group.rule.target.parameter [
                             fhir:index 0 ;
                             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                           ], [
                             fhir:index 1 ;
                             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                           ]
                         ], [
                           fhir:index 2 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                           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 "AddEntry" ]
                         ], [
                           fhir:index 3 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "AddEntry" ] ;
                           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 "append" ] ;
                           fhir:StructureMap.group.rule.target.parameter [
                             fhir:index 0 ;
                             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                           ], [
                             fhir:index 1 ;
                             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                           ]
                         ], [
                           fhir:index 4 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "AddEntry" ] ;
                           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                           fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ;
                           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 "RNDSEntryResourceEntryResourceEntryResource" ]
                           ]
                         ]
                       ]
                     ]
                   ]
                 ]
               ]
             ] ;
             fhir:StructureMap.group.rule.documentation [ fhir:value "Bloco que cria alergias BRAlergiaReacaoAdversa" ]
           ], [
             fhir:index 8 ;
             fhir:StructureMap.group.rule.name [ fhir:value "CreateSectionResultsIfExist" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ] ;
               fhir:StructureMap.group.rule.source.condition [ fhir:value "RNDSEntryResource.entry.resource.entry.resource.meta.where((profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRDiagnosticoCOVID19-TesteRapido') or (profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRDiagnosticoLaboratorioClinico') or (profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRObservacaoDescritiva')).empty().not()" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceComposition" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ]
             ] ;
             fhir:StructureMap.group.rule.rule [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.name [ fhir:value "CreateSectionResults" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
               ] ;
               fhir:StructureMap.group.rule.target [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionResults" ] ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ]
               ] ;
               fhir:StructureMap.group.rule.rule [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.name [ fhir:value "SetCompositionSectionResults" ] ;
                 fhir:StructureMap.group.rule.source [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ]
                 ] ;
                 fhir:StructureMap.group.rule.target [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionResults" ] ;
                   fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ]
                 ] ;
                 fhir:StructureMap.group.rule.rule [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.name [ fhir:value "SetResultsNarrative" ] ;
                   fhir:StructureMap.group.rule.source [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ]
                   ] ;
                   fhir:StructureMap.group.rule.target [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionResults" ] ;
                     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 "Results" ]
                     ]
                   ], [
                     fhir:index 1 ;
                     fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                     fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ] ;
                     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 2 ;
                     fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                     fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
                     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 3 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                     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 4 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                     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 "30954-2" ]
                     ]
                   ], [
                     fhir:index 5 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                     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 "Relevant diagnostic tests/laboratory data Narrative" ]
                     ]
                   ], [
                     fhir:index 6 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "cc" ] ;
                     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 "c" ]
                     ]
                   ], [
                     fhir:index 7 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionResults" ] ;
                     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.valueId [ fhir:value "cc" ]
                     ]
                   ]
                 ] ;
                 fhir:StructureMap.group.rule.documentation [ fhir:value "cria section de results no composition" ]
               ]
             ] ;
             fhir:StructureMap.group.rule.documentation [ fhir:value "Bloco que cria Secao de REL" ]
           ], [
             fhir:index 9 ;
             fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntry" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
             ] ;
             fhir:StructureMap.group.rule.rule [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResource" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ] ;
                 fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                 fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResource" ]
               ] ;
               fhir:StructureMap.group.rule.target [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
               ] ;
               fhir:StructureMap.group.rule.rule [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntry" ] ;
                 fhir:StructureMap.group.rule.source [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ] ;
                   fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
                   fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntry" ]
                 ] ;
                 fhir:StructureMap.group.rule.target [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                   fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                   fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
                 ] ;
                 fhir:StructureMap.group.rule.rule [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntryResource" ] ;
                   fhir:StructureMap.group.rule.source [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntry" ] ;
                     fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                     fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResource" ]
                   ] ;
                   fhir:StructureMap.group.rule.target [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                     fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                     fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
                   ] ;
                   fhir:StructureMap.group.rule.rule [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntryResourceEntry" ] ;
                     fhir:StructureMap.group.rule.source [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResource" ] ;
                       fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
                       fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntry" ]
                     ] ;
                     fhir:StructureMap.group.rule.rule [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.name [ fhir:value "SetResource" ] ;
                       fhir:StructureMap.group.rule.source [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResourceEntry" ] ;
                         fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                         fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntryResource" ] ;
                         fhir:StructureMap.group.rule.source.condition [ fhir:value "RNDSEntryResourceEntryResourceEntry.resource.meta.where((profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRDiagnosticoCOVID19-TesteRapido') or (profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRDiagnosticoLaboratorioClinico') or (profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRObservacaoDescritiva')).empty().not()" ]
                       ] ;
                       fhir:StructureMap.group.rule.target [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                         fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
                       ] ;
                       fhir:StructureMap.group.rule.rule [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.name [ fhir:value "AddEntry" ] ;
                         fhir:StructureMap.group.rule.source [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResourceEntryResource" ] ;
                           fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ;
                           fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                         ] ;
                         fhir:StructureMap.group.rule.target [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionResults" ] ;
                           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 "IPSEntryResourceCompositionSectionResultsEntry" ]
                         ], [
                           fhir:index 1 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionResultsEntry" ] ;
                           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 "append" ] ;
                           fhir:StructureMap.group.rule.target.parameter [
                             fhir:index 0 ;
                             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                           ], [
                             fhir:index 1 ;
                             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                           ]
                         ], [
                           fhir:index 2 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                           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 "AddEntry" ]
                         ], [
                           fhir:index 3 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "AddEntry" ] ;
                           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 "append" ] ;
                           fhir:StructureMap.group.rule.target.parameter [
                             fhir:index 0 ;
                             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                           ], [
                             fhir:index 1 ;
                             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                           ]
                         ], [
                           fhir:index 4 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "AddEntry" ] ;
                           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                           fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ;
                           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 "RNDSEntryResourceEntryResourceEntryResource" ]
                           ]
                         ]
                       ]
                     ]
                   ]
                 ]
               ]
             ] ;
             fhir:StructureMap.group.rule.documentation [ fhir:value "Bloco que mapeia REL" ]
           ], [
             fhir:index 10 ;
             fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntry" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
             ] ;
             fhir:StructureMap.group.rule.rule [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResource" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ] ;
                 fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                 fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResource" ]
               ] ;
               fhir:StructureMap.group.rule.target [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
               ] ;
               fhir:StructureMap.group.rule.rule [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntry" ] ;
                 fhir:StructureMap.group.rule.source [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ] ;
                   fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
                   fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntry" ]
                 ] ;
                 fhir:StructureMap.group.rule.target [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                   fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                   fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
                 ] ;
                 fhir:StructureMap.group.rule.rule [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntryResource" ] ;
                   fhir:StructureMap.group.rule.source [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntry" ] ;
                     fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                     fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResource" ]
                   ] ;
                   fhir:StructureMap.group.rule.target [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                     fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                     fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
                   ] ;
                   fhir:StructureMap.group.rule.rule [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntryResourceEntry" ] ;
                     fhir:StructureMap.group.rule.source [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResource" ] ;
                       fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
                       fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntry" ]
                     ] ;
                     fhir:StructureMap.group.rule.rule [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.name [ fhir:value "SetResource" ] ;
                       fhir:StructureMap.group.rule.source [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResourceEntry" ] ;
                         fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                         fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntryResource" ] ;
                         fhir:StructureMap.group.rule.source.condition [ fhir:value "RNDSEntryResourceEntryResourceEntry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRAmostraBiologica').empty().not()" ]
                       ] ;
                       fhir:StructureMap.group.rule.target [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                         fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
                       ] ;
                       fhir:StructureMap.group.rule.rule [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.name [ fhir:value "AddEntry" ] ;
                         fhir:StructureMap.group.rule.source [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResourceEntryResource" ] ;
                           fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ;
                           fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                         ] ;
                         fhir:StructureMap.group.rule.target [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                           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 "AddEntry" ]
                         ], [
                           fhir:index 1 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "AddEntry" ] ;
                           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 "append" ] ;
                           fhir:StructureMap.group.rule.target.parameter [
                             fhir:index 0 ;
                             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                           ], [
                             fhir:index 1 ;
                             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                           ]
                         ], [
                           fhir:index 2 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "AddEntry" ] ;
                           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                           fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ;
                           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 "RNDSEntryResourceEntryResourceEntryResource" ]
                           ]
                         ]
                       ]
                     ]
                   ]
                 ]
               ]
             ] ;
             fhir:StructureMap.group.rule.documentation [ fhir:value "Bloco que mapeia BRAmostraBiologica-1.0" ]
           ], [
             fhir:index 11 ;
             fhir:StructureMap.group.rule.name [ fhir:value "CreateSectionResultsIfExist" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ] ;
               fhir:StructureMap.group.rule.source.condition [ fhir:value "RNDSEntryResource.entry.resource.entry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRMedidaObservada').empty().not()" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceComposition" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ]
             ] ;
             fhir:StructureMap.group.rule.rule [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.name [ fhir:value "CreateSectionResults" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
               ] ;
               fhir:StructureMap.group.rule.target [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionVitalSigns" ] ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ]
               ] ;
               fhir:StructureMap.group.rule.rule [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.name [ fhir:value "SetCompositionSectionResults" ] ;
                 fhir:StructureMap.group.rule.source [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ]
                 ] ;
                 fhir:StructureMap.group.rule.target [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionVitalSigns" ] ;
                   fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ]
                 ] ;
                 fhir:StructureMap.group.rule.rule [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.name [ fhir:value "SetResultsNarrative" ] ;
                   fhir:StructureMap.group.rule.source [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ]
                   ] ;
                   fhir:StructureMap.group.rule.target [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionVitalSigns" ] ;
                     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 "Vital Signs" ]
                     ]
                   ], [
                     fhir:index 1 ;
                     fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                     fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ] ;
                     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 2 ;
                     fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                     fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
                     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 3 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                     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 4 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                     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 "8716-3" ]
                     ]
                   ], [
                     fhir:index 5 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                     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 "Vital signs" ]
                     ]
                   ], [
                     fhir:index 6 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "cc" ] ;
                     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 "c" ]
                     ]
                   ], [
                     fhir:index 7 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionVitalSigns" ] ;
                     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.valueId [ fhir:value "cc" ]
                     ]
                   ]
                 ] ;
                 fhir:StructureMap.group.rule.documentation [ fhir:value "cria section de results no composition" ]
               ]
             ] ;
             fhir:StructureMap.group.rule.documentation [ fhir:value "Bloco que cria Secao de Vital Signs" ]
           ], [
             fhir:index 12 ;
             fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntry" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
             ] ;
             fhir:StructureMap.group.rule.rule [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResource" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ] ;
                 fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                 fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResource" ]
               ] ;
               fhir:StructureMap.group.rule.target [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
               ] ;
               fhir:StructureMap.group.rule.rule [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntry" ] ;
                 fhir:StructureMap.group.rule.source [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ] ;
                   fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
                   fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntry" ]
                 ] ;
                 fhir:StructureMap.group.rule.target [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                   fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                   fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
                 ] ;
                 fhir:StructureMap.group.rule.rule [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntryResource" ] ;
                   fhir:StructureMap.group.rule.source [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntry" ] ;
                     fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                     fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResource" ]
                   ] ;
                   fhir:StructureMap.group.rule.target [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                     fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                     fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
                   ] ;
                   fhir:StructureMap.group.rule.rule [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntryResourceEntry" ] ;
                     fhir:StructureMap.group.rule.source [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResource" ] ;
                       fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
                       fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntry" ]
                     ] ;
                     fhir:StructureMap.group.rule.rule [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.name [ fhir:value "SetResource" ] ;
                       fhir:StructureMap.group.rule.source [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResourceEntry" ] ;
                         fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                         fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntryResource" ] ;
                         fhir:StructureMap.group.rule.source.condition [ fhir:value "RNDSEntryResourceEntryResourceEntry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRMedidaObservada').empty().not()" ]
                       ] ;
                       fhir:StructureMap.group.rule.target [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                         fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
                       ] ;
                       fhir:StructureMap.group.rule.rule [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.name [ fhir:value "AddEntry" ] ;
                         fhir:StructureMap.group.rule.source [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResourceEntryResource" ] ;
                           fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ;
                           fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                         ] ;
                         fhir:StructureMap.group.rule.target [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionVitalSigns" ] ;
                           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 "IPSEntryResourceCompositionSectionVitalSignsEntry" ]
                         ], [
                           fhir:index 1 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionVitalSignsEntry" ] ;
                           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 "append" ] ;
                           fhir:StructureMap.group.rule.target.parameter [
                             fhir:index 0 ;
                             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                           ], [
                             fhir:index 1 ;
                             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                           ]
                         ], [
                           fhir:index 2 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                           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 "AddEntry" ]
                         ], [
                           fhir:index 3 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "AddEntry" ] ;
                           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 "append" ] ;
                           fhir:StructureMap.group.rule.target.parameter [
                             fhir:index 0 ;
                             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                           ], [
                             fhir:index 1 ;
                             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                           ]
                         ], [
                           fhir:index 4 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "AddEntry" ] ;
                           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                           fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ;
                           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 "RNDSEntryResourceEntryResourceEntryResource" ]
                           ]
                         ]
                       ]
                     ]
                   ]
                 ]
               ]
             ] ;
             fhir:StructureMap.group.rule.documentation [ fhir:value "Bloco que cria Vital Signs" ]
           ], [
             fhir:index 13 ;
             fhir:StructureMap.group.rule.name [ fhir:value "CreateSectionImmunizationsIfExists" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ] ;
               fhir:StructureMap.group.rule.source.condition [ fhir:value "RNDSEntryResource.entry.resource.entry.resource.meta.where((profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRImunobiologicoAdministrado') or (profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRImunobiologicoAdministradoCarga') or (profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRImunobiologicoAdministradoCampanha')).empty().not()" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceComposition" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ]
             ] ;
             fhir:StructureMap.group.rule.rule [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.name [ fhir:value "CreateSectionImmunizations" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
               ] ;
               fhir:StructureMap.group.rule.target [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceComposition" ] ;
                 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 "IPSEntryResourceCompositionSectionImmunizations" ]
               ] ;
               fhir:StructureMap.group.rule.rule [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.name [ fhir:value "SetCompositionSectionImmunizations" ] ;
                 fhir:StructureMap.group.rule.source [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ]
                 ] ;
                 fhir:StructureMap.group.rule.target [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionImmunizations" ] ;
                   fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ]
                 ] ;
                 fhir:StructureMap.group.rule.rule [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.name [ fhir:value "SetImmunizationsNarrative" ] ;
                   fhir:StructureMap.group.rule.source [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ]
                   ] ;
                   fhir:StructureMap.group.rule.target [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionImmunizations" ] ;
                     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 "Immunizations" ]
                     ]
                   ], [
                     fhir:index 1 ;
                     fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                     fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
                     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 2 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                     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 3 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                     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 "11369-6" ]
                     ]
                   ], [
                     fhir:index 4 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                     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 "History of Immunization Narrative" ]
                     ]
                   ], [
                     fhir:index 5 ;
                     fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                     fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ] ;
                     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 "cc" ] ;
                     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 "c" ]
                     ]
                   ], [
                     fhir:index 7 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionImmunizations" ] ;
                     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.valueId [ fhir:value "cc" ]
                     ]
                   ]
                 ] ;
                 fhir:StructureMap.group.rule.documentation [ fhir:value "cria section de immunizations no composition" ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntry" ] ;
                 fhir:StructureMap.group.rule.source [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ] ;
                   fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
                   fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntry" ]
                 ] ;
                 fhir:StructureMap.group.rule.target [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                   fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                   fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
                 ] ;
                 fhir:StructureMap.group.rule.rule [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntryResource" ] ;
                   fhir:StructureMap.group.rule.source [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntry" ] ;
                     fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                     fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResource" ]
                   ] ;
                   fhir:StructureMap.group.rule.target [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                     fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                     fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
                   ] ;
                   fhir:StructureMap.group.rule.rule [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntryResourceEntry" ] ;
                     fhir:StructureMap.group.rule.source [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResource" ] ;
                       fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
                       fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntry" ]
                     ] ;
                     fhir:StructureMap.group.rule.rule [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.name [ fhir:value "SetResource" ] ;
                       fhir:StructureMap.group.rule.source [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResourceEntry" ] ;
                         fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                         fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntryResource" ] ;
                         fhir:StructureMap.group.rule.source.condition [ fhir:value "RNDSEntryResourceEntryResourceEntry.resource.meta.where((profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRImunobiologicoAdministrado') or (profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRImunobiologicoAdministradoCarga') or (profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRImunobiologicoAdministradoCampanha')).empty().not()" ]
                       ] ;
                       fhir:StructureMap.group.rule.target [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                         fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
                       ] ;
                       fhir:StructureMap.group.rule.rule [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.name [ fhir:value "AddEntry" ] ;
                         fhir:StructureMap.group.rule.source [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResourceEntryResource" ] ;
                           fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ;
                           fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                         ] ;
                         fhir:StructureMap.group.rule.target [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionImmunizations" ] ;
                           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 "IPSEntryResourceCompositionSectionImmunizationsEntry" ]
                         ], [
                           fhir:index 1 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionImmunizationsEntry" ] ;
                           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 "append" ] ;
                           fhir:StructureMap.group.rule.target.parameter [
                             fhir:index 0 ;
                             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                           ], [
                             fhir:index 1 ;
                             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                           ]
                         ], [
                           fhir:index 2 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                           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 "AddEntry" ]
                         ], [
                           fhir:index 3 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "AddEntry" ] ;
                           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 "append" ] ;
                           fhir:StructureMap.group.rule.target.parameter [
                             fhir:index 0 ;
                             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                           ], [
                             fhir:index 1 ;
                             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                           ]
                         ], [
                           fhir:index 4 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "AddEntry" ] ;
                           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                           fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ;
                           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 "RNDSEntryResourceEntryResourceEntryResource" ]
                           ]
                         ]
                       ]
                     ]
                   ]
                 ] ;
                 fhir:StructureMap.group.rule.documentation [ fhir:value "Bloco que mapeia BRImunobiologicoAdministrado-2.0, BRImunobiologicoAdministradoCampanha-1.0 e BRImunobiologicoAdministradoCarga-2.0" ]
               ]
             ] ;
             fhir:StructureMap.group.rule.documentation [ fhir:value "Bloco que cria secao de Imunizacao" ]
           ], [
             fhir:index 14 ;
             fhir:StructureMap.group.rule.name [ fhir:value "CreateSectionProceduresIfExists" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ] ;
               fhir:StructureMap.group.rule.source.condition [ fhir:value "RNDSEntryResource.entry.resource.entry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRProcedimentoRealizado').empty().not()" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceComposition" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ]
             ] ;
             fhir:StructureMap.group.rule.rule [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.name [ fhir:value "CreateSectionProcedures" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
               ] ;
               fhir:StructureMap.group.rule.target [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceComposition" ] ;
                 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 "IPSEntryResourceCompositionSectionProcedures" ]
               ] ;
               fhir:StructureMap.group.rule.rule [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.name [ fhir:value "SetCompositionSectionProcedures" ] ;
                 fhir:StructureMap.group.rule.source [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ]
                 ] ;
                 fhir:StructureMap.group.rule.target [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionProcedures" ] ;
                   fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ]
                 ] ;
                 fhir:StructureMap.group.rule.rule [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.name [ fhir:value "SetProceduresNarrative" ] ;
                   fhir:StructureMap.group.rule.source [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ]
                   ] ;
                   fhir:StructureMap.group.rule.target [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionProcedures" ] ;
                     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 "History of procedures" ]
                     ]
                   ], [
                     fhir:index 1 ;
                     fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                     fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ] ;
                     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 2 ;
                     fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                     fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
                     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 3 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                     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 4 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                     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 "47519-4" ]
                     ]
                   ], [
                     fhir:index 5 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                     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 "History of Procedures Narrative" ]
                     ]
                   ], [
                     fhir:index 6 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "cc" ] ;
                     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 "c" ]
                     ]
                   ], [
                     fhir:index 7 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionProcedures" ] ;
                     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.valueId [ fhir:value "cc" ]
                     ]
                   ]
                 ] ;
                 fhir:StructureMap.group.rule.documentation [ fhir:value "cria section de procedures no composition" ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntry" ] ;
                 fhir:StructureMap.group.rule.source [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ] ;
                   fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
                   fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntry" ]
                 ] ;
                 fhir:StructureMap.group.rule.target [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                   fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                   fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
                 ] ;
                 fhir:StructureMap.group.rule.rule [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntryResource" ] ;
                   fhir:StructureMap.group.rule.source [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntry" ] ;
                     fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                     fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResource" ]
                   ] ;
                   fhir:StructureMap.group.rule.target [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                     fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                     fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
                   ] ;
                   fhir:StructureMap.group.rule.rule [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntryResourceEntry" ] ;
                     fhir:StructureMap.group.rule.source [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResource" ] ;
                       fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
                       fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntry" ]
                     ] ;
                     fhir:StructureMap.group.rule.rule [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.name [ fhir:value "SetResource" ] ;
                       fhir:StructureMap.group.rule.source [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResourceEntry" ] ;
                         fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                         fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntryResource" ] ;
                         fhir:StructureMap.group.rule.source.condition [ fhir:value "RNDSEntryResourceEntryResourceEntry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRProcedimentoRealizado').empty().not()" ]
                       ] ;
                       fhir:StructureMap.group.rule.target [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                         fhir:StructureMap.group.rule.target.element [ fhir:value "entry" ]
                       ] ;
                       fhir:StructureMap.group.rule.rule [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.name [ fhir:value "AddEntry" ] ;
                         fhir:StructureMap.group.rule.source [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResourceEntryResource" ] ;
                           fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ;
                           fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                         ] ;
                         fhir:StructureMap.group.rule.target [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionProcedures" ] ;
                           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 "IPSEntryResourceCompositionSectionProceduresEntry" ]
                         ], [
                           fhir:index 1 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionProceduresEntry" ] ;
                           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 "append" ] ;
                           fhir:StructureMap.group.rule.target.parameter [
                             fhir:index 0 ;
                             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                           ], [
                             fhir:index 1 ;
                             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                           ]
                         ], [
                           fhir:index 2 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                           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 "AddEntry" ]
                         ], [
                           fhir:index 3 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "AddEntry" ] ;
                           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 "append" ] ;
                           fhir:StructureMap.group.rule.target.parameter [
                             fhir:index 0 ;
                             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                           ], [
                             fhir:index 1 ;
                             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                           ]
                         ], [
                           fhir:index 4 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "AddEntry" ] ;
                           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                           fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ;
                           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 "RNDSEntryResourceEntryResourceEntryResource" ]
                           ]
                         ]
                       ]
                     ]
                   ]
                 ] ;
                 fhir:StructureMap.group.rule.documentation [ fhir:value "Bloco que mapeia BRImunobiologicoAdministrado-2.0, BRImunobiologicoAdministradoCampanha-1.0 e BRImunobiologicoAdministradoCarga-2.0" ]
               ]
             ] ;
             fhir:StructureMap.group.rule.documentation [ fhir:value "http://www.saude.gov.br/fhir/r4/StructureDefinition/BRProcedimentoRealizado-1.0" ]
           ], [
             fhir:index 15 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetCompositionSectionMedications" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionMedications" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ]
             ] ;
             fhir:StructureMap.group.rule.rule [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.name [ fhir:value "SetMedicationsNarrative" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ]
               ] ;
               fhir:StructureMap.group.rule.target [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionMedications" ] ;
                 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 "Medication" ]
                 ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
                 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 2 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                 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 3 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                 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 "10160-0" ]
                 ]
               ], [
                 fhir:index 4 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
                 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 "History of Medication use Narrative" ]
                 ]
               ], [
                 fhir:index 5 ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.variable [ fhir:value "cc" ] ;
                 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 "cc" ] ;
                 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 "c" ]
                 ]
               ], [
                 fhir:index 7 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionMedications" ] ;
                 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.valueId [ fhir:value "cc" ]
                 ]
               ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntry" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ] ;
                 fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
                 fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntry" ]
               ] ;
               fhir:StructureMap.group.rule.target [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryMedicationRequests" ] ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ]
               ] ;
               fhir:StructureMap.group.rule.rule [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntryResource" ] ;
                 fhir:StructureMap.group.rule.source [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntry" ] ;
                   fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                   fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResource" ]
                 ] ;
                 fhir:StructureMap.group.rule.target [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryMedicationRequests" ] ;
                   fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ]
                 ] ;
                 fhir:StructureMap.group.rule.rule [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntryResourceEntry" ] ;
                   fhir:StructureMap.group.rule.source [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResource" ] ;
                     fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
                     fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntry" ]
                   ] ;
                   fhir:StructureMap.group.rule.rule [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.name [ fhir:value "SetResource" ] ;
                     fhir:StructureMap.group.rule.source [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResourceEntry" ] ;
                       fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                       fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntryResource" ] ;
                       fhir:StructureMap.group.rule.source.condition [ fhir:value "RNDSEntryResourceEntryResourceEntry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRPrescricaoMedicamento').empty().not()" ]
                     ] ;
                     fhir:StructureMap.group.rule.target [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryMedicationRequests" ] ;
                       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 "IPSEntryMedicationRequestsResource" ]
                     ] ;
                     fhir:StructureMap.group.rule.rule [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.name [ fhir:value "AddEntry" ] ;
                       fhir:StructureMap.group.rule.source [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResourceEntryResource" ] ;
                         fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ;
                         fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                       ] ;
                       fhir:StructureMap.group.rule.target [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionMedications" ] ;
                         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 "IPSEntryResourceCompositionSectionMedicationsEntry" ]
                       ], [
                         fhir:index 1 ;
                         fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceCompositionSectionMedicationsEntry" ] ;
                         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 "append" ] ;
                         fhir:StructureMap.group.rule.target.parameter [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                         ], [
                           fhir:index 1 ;
                           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                         ]
                       ], [
                         fhir:index 2 ;
                         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                         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 "AddEntry" ]
                       ], [
                         fhir:index 3 ;
                         fhir:StructureMap.group.rule.target.context [ fhir:value "AddEntry" ] ;
                         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 "append" ] ;
                         fhir:StructureMap.group.rule.target.parameter [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                         ], [
                           fhir:index 1 ;
                           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                         ]
                       ], [
                         fhir:index 4 ;
                         fhir:StructureMap.group.rule.target.context [ fhir:value "AddEntry" ] ;
                         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                         fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ;
                         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 "RNDSEntryResourceEntryResourceEntryResource" ]
                         ]
                       ]
                     ]
                   ]
                 ]
               ] ;
               fhir:StructureMap.group.rule.documentation [ fhir:value "http://www.saude.gov.br/fhir/r4/StructureDefinition/BRPrescricaoMedicamento" ]
             ], [
               fhir:index 2 ;
               fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntry" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ] ;
                 fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
                 fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntry" ]
               ] ;
               fhir:StructureMap.group.rule.target [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryMedications" ] ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ]
               ] ;
               fhir:StructureMap.group.rule.rule [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntryResource" ] ;
                 fhir:StructureMap.group.rule.source [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntry" ] ;
                   fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                   fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResource" ]
                 ] ;
                 fhir:StructureMap.group.rule.target [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryMedications" ] ;
                   fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ]
                 ] ;
                 fhir:StructureMap.group.rule.rule [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntryResourceEntry" ] ;
                   fhir:StructureMap.group.rule.source [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResource" ] ;
                     fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
                     fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntry" ]
                   ] ;
                   fhir:StructureMap.group.rule.rule [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.name [ fhir:value "SetResource" ] ;
                     fhir:StructureMap.group.rule.source [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResourceEntry" ] ;
                       fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                       fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntryResource" ] ;
                       fhir:StructureMap.group.rule.source.condition [ fhir:value "RNDSEntryResourceEntryResourceEntry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRMedicamento').empty().not()" ]
                     ] ;
                     fhir:StructureMap.group.rule.target [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryMedications" ] ;
                       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 "IPSEntryMedicationsResource" ]
                     ] ;
                     fhir:StructureMap.group.rule.rule [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.name [ fhir:value "AddEntry" ] ;
                       fhir:StructureMap.group.rule.source [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResourceEntryResource" ] ;
                         fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ;
                         fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                       ] ;
                       fhir:StructureMap.group.rule.target [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
                         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 "AddEntry" ]
                       ], [
                         fhir:index 1 ;
                         fhir:StructureMap.group.rule.target.context [ fhir:value "AddEntry" ] ;
                         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 "append" ] ;
                         fhir:StructureMap.group.rule.target.parameter [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                         ], [
                           fhir:index 1 ;
                           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "RNDSEntryResourceEntryResourceEntryResourceId" ]
                         ]
                       ], [
                         fhir:index 2 ;
                         fhir:StructureMap.group.rule.target.context [ fhir:value "AddEntry" ] ;
                         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                         fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ;
                         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 "RNDSEntryResourceEntryResourceEntryResource" ]
                         ]
                       ]
                     ]
                   ]
                 ]
               ] ;
               fhir:StructureMap.group.rule.documentation [ fhir:value "http://www.saude.gov.br/fhir/r4/StructureDefinition/BRMedicamento" ]
             ] ;
             fhir:StructureMap.group.rule.documentation [ fhir:value "cria section de medications no composition" ]
           ], [
             fhir:index 16 ;
             fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntry" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryPatient" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ]
             ] ;
             fhir:StructureMap.group.rule.rule [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResource" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ] ;
                 fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                 fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResource" ]
               ] ;
               fhir:StructureMap.group.rule.target [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryPatient" ] ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ]
               ] ;
               fhir:StructureMap.group.rule.rule [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntry" ] ;
                 fhir:StructureMap.group.rule.source [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ] ;
                   fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
                   fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntry" ]
                 ] ;
                 fhir:StructureMap.group.rule.target [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryPatient" ] ;
                   fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ]
                 ] ;
                 fhir:StructureMap.group.rule.rule [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntryResource" ] ;
                   fhir:StructureMap.group.rule.source [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntry" ] ;
                     fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                     fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResource" ]
                   ] ;
                   fhir:StructureMap.group.rule.target [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryPatient" ] ;
                     fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ]
                   ] ;
                   fhir:StructureMap.group.rule.rule [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.name [ fhir:value "IterateRNDSEntryResourceEntryResourceEntry" ] ;
                     fhir:StructureMap.group.rule.source [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResource" ] ;
                       fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
                       fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntry" ]
                     ] ;
                     fhir:StructureMap.group.rule.rule [
                       fhir:index 0 ;
                       fhir:StructureMap.group.rule.name [ fhir:value "SetPatient" ] ;
                       fhir:StructureMap.group.rule.source [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResourceEntry" ] ;
                         fhir:StructureMap.group.rule.source.element [ fhir:value "resource" ] ;
                         fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceEntryResourceEntryResource" ] ;
                         fhir:StructureMap.group.rule.source.condition [ fhir:value "RNDSEntryResourceEntryResourceEntry.resource.meta.where(profile = 'http://www.saude.gov.br/fhir/r4/StructureDefinition/BRIndividuo').empty().not()" ]
                       ] ;
                       fhir:StructureMap.group.rule.target [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryPatient" ] ;
                         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 "IPSEntryPatientResource" ]
                       ] ;
                       fhir:StructureMap.group.rule.rule [
                         fhir:index 0 ;
                         fhir:StructureMap.group.rule.name [ fhir:value "SetPatientFullUrl" ] ;
                         fhir:StructureMap.group.rule.source [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResourceEntryResource" ]
                         ] ;
                         fhir:StructureMap.group.rule.target [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryPatient" ] ;
                           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 "append" ] ;
                           fhir:StructureMap.group.rule.target.parameter [
                             fhir:index 0 ;
                             fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                           ], [
                             fhir:index 1 ;
                             fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSPatientReference" ]
                           ]
                         ]
                       ], [
                         fhir:index 1 ;
                         fhir:StructureMap.group.rule.name [ fhir:value "SetPatientResource" ] ;
                         fhir:StructureMap.group.rule.source [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResourceEntryResource" ]
                         ] ;
                         fhir:StructureMap.group.rule.target [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryPatient" ] ;
                           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                           fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ;
                           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 "RNDSEntryResourceEntryResourceEntryResource" ]
                           ]
                         ]
                       ], [
                         fhir:index 2 ;
                         fhir:StructureMap.group.rule.name [ fhir:value "SetPatientId" ] ;
                         fhir:StructureMap.group.rule.source [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResourceEntryResourceEntryResource" ]
                         ] ;
                         fhir:StructureMap.group.rule.target [
                           fhir:index 0 ;
                           fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryPatientResource" ] ;
                           fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                           fhir:StructureMap.group.rule.target.element [ fhir:value "id" ] ;
                           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 "IPSPatientReference" ]
                           ]
                         ]
                       ]
                     ]
                   ]
                 ]
               ]
             ] ;
             fhir:StructureMap.group.rule.documentation [ fhir:value "Bloco que cria Patient" ]
           ], [
             fhir:index 17 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetEmptyAuthor" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryPractitioner" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ]
             ] ;
             fhir:StructureMap.group.rule.rule [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.name [ fhir:value "SetFullUrl" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
               ] ;
               fhir:StructureMap.group.rule.target [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryPractitioner" ] ;
                 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 "append" ] ;
                 fhir:StructureMap.group.rule.target.parameter [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                 ], [
                   fhir:index 1 ;
                   fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSPractitionerReference" ]
                 ]
               ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.name [ fhir:value "SetAuthor" ] ;
               fhir:StructureMap.group.rule.source [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
               ] ;
               fhir:StructureMap.group.rule.target [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                 fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSOrganization" ] ;
                 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 "Organization" ]
                 ]
               ] ;
               fhir:StructureMap.group.rule.rule [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.name [ fhir:value "SetId" ] ;
                 fhir:StructureMap.group.rule.source [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
                 ] ;
                 fhir:StructureMap.group.rule.target [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.context [ fhir:value "IPSOrganization" ] ;
                   fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                   fhir:StructureMap.group.rule.target.element [ fhir:value "id" ] ;
                   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 "IPSPractitionerReference" ]
                   ]
                 ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.name [ fhir:value "SetIdentifier" ] ;
                 fhir:StructureMap.group.rule.source [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
                 ] ;
                 fhir:StructureMap.group.rule.target [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                   fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSPractitionerIdentifier" ] ;
                   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 "Identifier" ]
                   ]
                 ], [
                   fhir:index 1 ;
                   fhir:StructureMap.group.rule.target.context [ fhir:value "IPSPractitionerIdentifier" ] ;
                   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://www.saude.gov.br/fhir/r4/NamingSystem/cnpj" ]
                   ]
                 ], [
                   fhir:index 2 ;
                   fhir:StructureMap.group.rule.target.context [ fhir:value "IPSPractitionerIdentifier" ] ;
                   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.valueString [ fhir:value "00394544000185" ]
                   ]
                 ], [
                   fhir:index 3 ;
                   fhir:StructureMap.group.rule.target.context [ fhir:value "IPSOrganization" ] ;
                   fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                   fhir:StructureMap.group.rule.target.element [ fhir:value "identifier" ] ;
                   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 "IPSPractitionerIdentifier" ]
                   ]
                 ]
               ], [
                 fhir:index 2 ;
                 fhir:StructureMap.group.rule.name [ fhir:value "SetName" ] ;
                 fhir:StructureMap.group.rule.source [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
                 ] ;
                 fhir:StructureMap.group.rule.target [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.context [ fhir:value "IPSOrganization" ] ;
                   fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                   fhir:StructureMap.group.rule.target.element [ fhir:value "name" ] ;
                   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 "Ministério da Saúde do Brasil" ]
                   ]
                 ]
               ], [
                 fhir:index 3 ;
                 fhir:StructureMap.group.rule.name [ fhir:value "SetAuthor" ] ;
                 fhir:StructureMap.group.rule.source [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntry" ]
                 ] ;
                 fhir:StructureMap.group.rule.target [
                   fhir:index 0 ;
                   fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryPractitioner" ] ;
                   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 "append" ] ;
                   fhir:StructureMap.group.rule.target.parameter [
                     fhir:index 0 ;
                     fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
                   ], [
                     fhir:index 1 ;
                     fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSPractitionerReference" ]
                   ]
                 ], [
                   fhir:index 1 ;
                   fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryPractitioner" ] ;
                   fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
                   fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ;
                   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 "IPSOrganization" ]
                   ]
                 ]
               ]
             ] ;
             fhir:StructureMap.group.rule.documentation [ fhir:value "Bloco que cria organization para author e custodian" ]
           ], [
             fhir:index 18 ;
             fhir:StructureMap.group.rule.name [ fhir:value "SetResourceComposition" ] ;
             fhir:StructureMap.group.rule.source [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.source.context [ fhir:value "RNDSEntryResource" ] ;
               fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ;
               fhir:StructureMap.group.rule.source.variable [ fhir:value "RNDSEntryResourceId" ]
             ] ;
             fhir:StructureMap.group.rule.target [
               fhir:index 0 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntryResourceComposition" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "id" ] ;
               fhir:StructureMap.group.rule.target.variable [ fhir:value "IPSEntryResourceCompositionId" ]
             ], [
               fhir:index 1 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntry" ] ;
               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 "append" ] ;
               fhir:StructureMap.group.rule.target.parameter [
                 fhir:index 0 ;
                 fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "urn:uuid:" ]
               ], [
                 fhir:index 1 ;
                 fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "IPSEntryResourceCompositionId" ]
               ]
             ], [
               fhir:index 2 ;
               fhir:StructureMap.group.rule.target.context [ fhir:value "IPSEntry" ] ;
               fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
               fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ;
               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 "IPSEntryResourceComposition" ]
               ]
             ]
           ]
         ]
       ]
     ]
  ], [
     fhir:index 1 ;
     fhir:StructureMap.group.name [ fhir:value "DataAbsentReason" ] ;
     fhir:StructureMap.group.typeMode [ fhir:value "none" ] ;
     fhir:StructureMap.group.input [
       fhir:index 0 ;
       fhir:StructureMap.group.input.name [ fhir:value "src" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "Element" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ], [
       fhir:index 1 ;
       fhir:StructureMap.group.input.name [ fhir:value "tgt" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "Element" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]
     ] ;
     fhir:StructureMap.group.rule [
       fhir:index 0 ;
       fhir:StructureMap.group.rule.name [ fhir:value "SetExtension" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "src" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "TgtExtension" ] ;
         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 "Extension" ]
         ]
       ], [
         fhir:index 1 ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
         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 "code" ]
         ]
       ], [
         fhir:index 2 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
         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.valueString [ fhir:value "unknown" ]
         ]
       ], [
         fhir:index 3 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "TgtExtension" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "url" ] ;
         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://hl7.org/fhir/StructureDefinition/data-absent-reason" ]
         ]
       ], [
         fhir:index 4 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "TgtExtension" ] ;
         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 "c" ]
         ]
       ], [
         fhir:index 5 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "extension" ] ;
         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 "TgtExtension" ]
         ]
       ]
     ]
  ], [
     fhir:index 2 ;
     fhir:StructureMap.group.name [ fhir:value "NotApplicable" ] ;
     fhir:StructureMap.group.typeMode [ fhir:value "none" ] ;
     fhir:StructureMap.group.input [
       fhir:index 0 ;
       fhir:StructureMap.group.input.name [ fhir:value "src" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "Element" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ], [
       fhir:index 1 ;
       fhir:StructureMap.group.input.name [ fhir:value "tgt" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "Element" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]
     ] ;
     fhir:StructureMap.group.rule [
       fhir:index 0 ;
       fhir:StructureMap.group.rule.name [ fhir:value "SetExtension" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "src" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "TgtExtension" ] ;
         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 "Extension" ]
         ]
       ], [
         fhir:index 1 ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "c" ] ;
         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 "code" ]
         ]
       ], [
         fhir:index 2 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "c" ] ;
         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.valueString [ fhir:value "not-applicable" ]
         ]
       ], [
         fhir:index 3 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "TgtExtension" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "url" ] ;
         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://hl7.org/fhir/StructureDefinition/data-absent-reason" ]
         ]
       ], [
         fhir:index 4 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "TgtExtension" ] ;
         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 "c" ]
         ]
       ], [
         fhir:index 5 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "extension" ] ;
         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 "TgtExtension" ]
         ]
       ]
     ]
  ] .

# - ontology header ------------------------------------------------------------

<https://ips.saude.gov.br/fhir/StructureMap/StructureMapBRIPS.ttl> a owl:Ontology ;
  owl:imports fhir:fhir.ttl .

# -------------------------------------------------------------------------------------

