Structured Data Capture, published by HL7 International / FHIR Infrastructure. This guide is not an authorized publication; it is the continuous build for version 4.0.0-ci-build built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/sdc/ and changes regularly. See the Directory of published versions
| Page standards status: Trial-use | Maturity Level: 4 |
@prefix fhir: <http://hl7.org/fhir/> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . # - resource ------------------------------------------------------------------- <http://hl7.org/fhir/StructureMap/ExtractComplexSmap> a fhir:StructureMap ; fhir:nodeRole fhir:treeRoot ; fhir:Resource.id [ fhir:value "ExtractComplexSmap"] ; fhir:Resource.language [ fhir:value "en"] ; fhir:DomainResource.text [ fhir:Narrative.status [ fhir:value "additional" ] ; fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <pre>/// url = \"http://hl7.org/fhir/uv/sdc/StructureMap/ExtractComplexSmap\"\n/// name = \"ExtractComplexSmap\"\n/// status = \"active\"\n/// title = \"Complex extraction structure map example\"\n/// description = \"An example of a StructureMap used to support extraction from a QuestionnaireResponse\"\n/// experimental = \"true\"\n\nmap \"http://hl7.org/fhir/uv/sdc/StructureMap/ExtractComplexSmap\" = \"ExtractComplexSmap\"\n\nuses \"http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse\" as source\nuses \"http://hl7.org/fhir/StructureDefinition/Bundle\" as target\nuses \"http://hl7.org/fhir/StructureDefinition/Patient\" as target\nuses \"http://hl7.org/fhir/StructureDefinition/RelatedPerson\" as target\nuses \"http://hl7.org/fhir/StructureDefinition/Observation\" as target\nuses \"http://hl7.org/fhir/StructureDefinition/Coding\" as target\n\ngroup ExtractBundle(source src : QuestionnaireResponse, target tgt : Bundle) {\n\n // Patient\n src.item as patientItem where (linkId = 'patient') -> tgt.entry as patientEntry, uuid() as patientFullUrl then {\n src -> patientEntry.resource = create('Patient') as pat //, pat.id = (%patientFullUrl)\n then PopulatePatient(src, patientItem, pat), PopulateBundleEntry(src, patientEntry, patientFullUrl) \"popPatient\";\n \n // Related Person(s)\n src.item as rpItem where (linkId = 'contacts') -> tgt.entry as entry, uuid() as fullUrl then {\n src -> entry.resource = create('RelatedPerson') as rp //, rp.id = (%fullUrl)\n then PopulateRelatedPerson(src, rpItem, rp, patientFullUrl), PopulateBundleEntry(src, entry, fullUrl) \"popRelatedPerson\";\n } \"CreateRelatedPersonEntry\";\n \n src.item as obsItems where (linkId = 'obs') -> tgt then {\n // Height Observation\n obsItems.item as heightItem where (linkId = 'height') -> tgt.entry as entry, uuid() as fullUrl then {\n src -> entry.resource = create('Observation') as obs,\n cc('http://loinc.org', '8302-2', 'Body height') as coding,\n obs.value = create('Quantity') as q, q.value = (%heightItem.answer.value.first()), q.unit = 'm'\n then PopulateObservation(src, heightItem, obs, coding, patientFullUrl), \n PopulateBundleEntry(src, entry, fullUrl) \"popObs\";\n } \"CreateHeightObsEntry\";\n \n // Weight Observation\n obsItems.item as weightItem where (linkId = 'weight') -> tgt.entry as entry, uuid() as fullUrl then {\n src -> entry.resource = create('Observation') as obs,\n cc('http://loinc.org', '29463-7', 'Weight') as coding,\n obs.value = create('Quantity') as q, q.value = (%weightItem.answer.value.first()), q.unit = 'kg'\n then PopulateObservation(src, weightItem, obs, coding, patientFullUrl), \n PopulateBundleEntry(src, entry, fullUrl) \"popObs\";\n } \"CreateWeightObsEntry\";\n\n // Prepare the bundle entry\n obsItems.item as complicationItem where (linkId = 'complication') -> tgt.entry as entry, uuid() as fullUrl then {\n src -> entry.resource = create('Observation') as obs,\n cc('http://example.org/sdh/demo/CodeSystem/cc-screening-codes', 'sigmoidoscopy-complication') as coding,\n obs.value = (%complicationItem.answer.value.first())\n then PopulateObservation(src, complicationItem, obs, coding, patientFullUrl), \n PopulateBundleEntry(src, entry, fullUrl) \"popObs\";\n } \"CreateComplicationObsEntry\";\n };\n } \"CreatePatientEntry\";\n}\n\ngroup PopulateBundleEntry(source src : QuestionnaireResponse, target entry, target fullUrl) {\n src -> entry.fullUrl = ('urn:uuid:' & %fullUrl) \"SetFullUrl\";\n src -> entry.request as req then {\n src -> req.method = 'POST' \"setMethod\";\n } \"SetRequest\";\n}\n\ngroup PopulatePatient(source src: QuestionnaireResponse, source patientItem, target pat : Patient) {\n patientItem.item as gender where (linkId = 'gender') -> pat.gender = (%gender.answer.value.first().code) \"SetGender\";\n patientItem.item as dob where (linkId = 'dob') -> pat.birthDate = (%dob.answer.value) \"SetBirthDate\";\n \n // name\n patientItem.item as name where (linkId = 'name') -> pat.name as tgtName then {\n name -> tgtName.text = (%name.item.where(linkId='given' or linkId='family').answer.value.join(' ')) \"SetNameText\";\n name.item as family where (linkId = 'family') -> tgtName.family = (%family.answer.value) \"SetFamily\";\n name.item as given where (linkId = 'given') then { \n given.answer as answer -> tgtName.given = (%answer.value) \"AnswerValue\";\n } \"SetGiven\";\n } \"SetName\";\n \n // identifier\n patientItem.item as itemIdentifier where (linkId = 'ihi') -> pat.identifier as tgtIdentifier then {\n itemIdentifier -> tgtIdentifier.type as t, t.text = 'National Identifier (IHI)' \"SetIdentifierType\";\n itemIdentifier -> tgtIdentifier.system = 'http://example.org/nhio' \"SetIdentifierSystem\";\n itemIdentifier -> tgtIdentifier.value = (%itemIdentifier.answer.value) \"SetIdentifierValue\";\n } \"SetIdentifier\";\n \n // telecom\n patientItem.item as itemMobile where (linkId = 'mobile-phone') -> pat.telecom as t, t.system='phone', t.value = (%itemMobile.answer.value), t.use = 'mobile' \"SetTelecom\";\n}\n\ngroup PopulateRelatedPerson(source src: QuestionnaireResponse, source rpItem, target rp : RelatedPerson, target patientFullUrl) {\n rpItem -> rp.patient as p, p.reference = (%patientFullUrl) \"SetPatientRef\";\n rpItem.item as name where (linkId = 'contact-name') -> rp.name as n, n.text = (%name.answer.value) \"SetName\";\n rpItem.item as rel where (linkId = 'relationship') -> rp.relationship as r, r.coding = (%rel.answer.value) \"SetRelationship\";\n rpItem.item as phone where (linkId = 'phone') -> rp.telecom as t, t.system = 'phone', t.value = (%phone.answer.value), t.use = 'mobile' \"SetPhone\";\n}\n\ngroup PopulateObservation(source src : QuestionnaireResponse, source complicationItem, target tgt : Observation, target coding : Coding, target patientFullUrl) {\n src -> tgt.code = (%coding) \"SetObservationCode\";\n src -> tgt.status = 'final' \"SetStatus\";\n // src.subject as s -> tgt.subject = s; // not using the the subject, as this is intended to be created from the data instead (as is outgoing referral)\n src.subject as s -> tgt.subject as p, p.reference = (%patientFullUrl) \"SetSubjectRef\";\n src.authored as s -> tgt.issued = s \"SetAuthored\";\n src.authored as s -> tgt.effective = s \"SetEffective\";\n src.author as s -> tgt.performer = s;\n src.id -> tgt.derivedFrom as df, df.reference = ('QuestionnaireResponse/' & %src.id) \"SetDerivedFrom\";\n}</pre>\n </div>" ] ; fhir:DomainResource.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg" ] ; fhir:Extension.valueCode [ fhir:value "fhir" ] ] ; fhir:StructureMap.url [ fhir:value "http://hl7.org/fhir/uv/sdc/StructureMap/ExtractComplexSmap"] ; fhir:StructureMap.identifier [ fhir:index -1 ; fhir:Identifier.system [ fhir:value "urn:ietf:rfc:3986" ] ; fhir:Identifier.value [ fhir:value "urn:oid:2.16.840.1.113883.4.642.40.17.43.3" ] ] ; fhir:StructureMap.version [ fhir:value "4.0.0-ci-build"] ; fhir:StructureMap.name [ fhir:value "ExtractComplexSmap"] ; fhir:StructureMap.status [ fhir:value "draft"] ; fhir:StructureMap.date [ fhir:value "2026-07-15T05:01:03+00:00"^^xsd:dateTime] ; fhir:StructureMap.publisher [ fhir:value "HL7 International / FHIR Infrastructure"] ; fhir:StructureMap.contact [ fhir:index -1 ; fhir:ContactDetail.name [ fhir:value "HL7 International / FHIR Infrastructure" ] ; fhir:ContactDetail.telecom [ fhir:index -1 ; fhir:ContactPoint.system [ fhir:value "url" ] ; fhir:ContactPoint.value [ fhir:value "http://www.hl7.org/Special/committees/fiwg" ] ] ], [ fhir:index -1 ; fhir:ContactDetail.telecom [ fhir:index -1 ; fhir:ContactPoint.system [ fhir:value "url" ] ; fhir:ContactPoint.value [ fhir:value "http://www.hl7.org/Special/committees/fiwg" ] ] ] ; fhir:StructureMap.jurisdiction [ fhir:index -1 ; fhir:CodeableConcept.coding [ fhir:index -1 ; fhir:Coding.system [ fhir:value "http://unstats.un.org/unsd/methods/m49/m49.htm" ] ; fhir:Coding.code [ fhir:value "001" ] ; fhir:Coding.display [ fhir:value "World" ] ] ] ; fhir:StructureMap.structure [ fhir:index -1 ; fhir:StructureMap.structure.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" ; fhir:link <http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse> ] ; fhir:StructureMap.structure.mode [ fhir:value "source" ] ], [ fhir:index -1 ; fhir:StructureMap.structure.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/Bundle" ; fhir:link <http://hl7.org/fhir/StructureDefinition/Bundle> ] ; fhir:StructureMap.structure.mode [ fhir:value "target" ] ], [ fhir:index -1 ; fhir:StructureMap.structure.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/Patient" ; fhir:link <http://hl7.org/fhir/StructureDefinition/Patient> ] ; fhir:StructureMap.structure.mode [ fhir:value "target" ] ], [ fhir:index -1 ; fhir:StructureMap.structure.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/RelatedPerson" ; fhir:link <http://hl7.org/fhir/StructureDefinition/RelatedPerson> ] ; fhir:StructureMap.structure.mode [ fhir:value "target" ] ], [ fhir:index -1 ; fhir:StructureMap.structure.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/Observation" ; fhir:link <http://hl7.org/fhir/StructureDefinition/Observation> ] ; fhir:StructureMap.structure.mode [ fhir:value "target" ] ], [ fhir:index -1 ; fhir:StructureMap.structure.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/Coding" ; fhir:link <http://hl7.org/fhir/StructureDefinition/Coding> ] ; fhir:StructureMap.structure.mode [ fhir:value "target" ] ] ; fhir:StructureMap.group [ fhir:index -1 ; fhir:StructureMap.group.name [ fhir:value "ExtractBundle" ] ; fhir:StructureMap.group.typeMode [ fhir:value "none" ] ; fhir:StructureMap.group.input [ fhir:index -1 ; fhir:StructureMap.group.input.name [ fhir:value "src" ] ; fhir:StructureMap.group.input.type [ fhir:value "QuestionnaireResponse" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index -1 ; fhir:StructureMap.group.input.name [ fhir:value "tgt" ] ; fhir:StructureMap.group.input.type [ fhir:value "Bundle" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ] ; fhir:StructureMap.group.rule [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "CreatePatientEntry" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "patientItem" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "(linkId = 'patient')" ] ] ; fhir:StructureMap.group.rule.target [ 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 "patientEntry" ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "patientFullUrl" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "popPatient" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "patientEntry" ] ; 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 "pat" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Patient" ] ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index -1 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "PopulatePatient" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "src" ; fhir:index -1 ], [ fhir:value "patientItem" ; fhir:index -1 ], [ fhir:value "pat" ; fhir:index -1 ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "PopulateBundleEntry" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "src" ; fhir:index -1 ], [ fhir:value "patientEntry" ; fhir:index -1 ], [ fhir:value "patientFullUrl" ; fhir:index -1 ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "CreateRelatedPersonEntry" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "rpItem" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "(linkId = 'contacts')" ] ] ; fhir:StructureMap.group.rule.target [ 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 "entry" ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "fullUrl" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "popRelatedPerson" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "entry" ] ; 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 "rp" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "RelatedPerson" ] ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index -1 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "PopulateRelatedPerson" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "src" ; fhir:index -1 ], [ fhir:value "rpItem" ; fhir:index -1 ], [ fhir:value "rp" ; fhir:index -1 ], [ fhir:value "patientFullUrl" ; fhir:index -1 ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "PopulateBundleEntry" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "src" ; fhir:index -1 ], [ fhir:value "entry" ; fhir:index -1 ], [ fhir:value "fullUrl" ; fhir:index -1 ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "item" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "obsItems" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "(linkId = 'obs')" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index -1 ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "tgt" ] ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "CreateHeightObsEntry" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "obsItems" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "heightItem" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "(linkId = 'height')" ] ] ; fhir:StructureMap.group.rule.target [ 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 "entry" ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "fullUrl" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "popObs" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "entry" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "obs" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Observation" ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "cc" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://loinc.org" ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "8302-2" ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Body height" ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "obs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "q" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Quantity" ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "q" ] ; 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 "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "%heightItem.answer.value.first()" ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "q" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "unit" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "m" ] ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index -1 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "PopulateObservation" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "src" ; fhir:index -1 ], [ fhir:value "heightItem" ; fhir:index -1 ], [ fhir:value "obs" ; fhir:index -1 ], [ fhir:value "coding" ; fhir:index -1 ], [ fhir:value "patientFullUrl" ; fhir:index -1 ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "PopulateBundleEntry" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "src" ; fhir:index -1 ], [ fhir:value "entry" ; fhir:index -1 ], [ fhir:value "fullUrl" ; fhir:index -1 ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "CreateWeightObsEntry" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "obsItems" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "weightItem" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "(linkId = 'weight')" ] ] ; fhir:StructureMap.group.rule.target [ 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 "entry" ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "fullUrl" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "popObs" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "entry" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "obs" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Observation" ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "cc" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://loinc.org" ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "29463-7" ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Weight" ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "obs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "q" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Quantity" ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "q" ] ; 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 "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "%weightItem.answer.value.first()" ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "q" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "unit" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "kg" ] ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index -1 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "PopulateObservation" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "src" ; fhir:index -1 ], [ fhir:value "weightItem" ; fhir:index -1 ], [ fhir:value "obs" ; fhir:index -1 ], [ fhir:value "coding" ; fhir:index -1 ], [ fhir:value "patientFullUrl" ; fhir:index -1 ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "PopulateBundleEntry" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "src" ; fhir:index -1 ], [ fhir:value "entry" ; fhir:index -1 ], [ fhir:value "fullUrl" ; fhir:index -1 ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "CreateComplicationObsEntry" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "obsItems" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "complicationItem" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "(linkId = 'complication')" ] ] ; fhir:StructureMap.group.rule.target [ 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 "entry" ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "fullUrl" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "uuid" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "popObs" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "entry" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "resource" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "obs" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "create" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "Observation" ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "coding" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "cc" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://example.org/sdh/demo/CodeSystem/cc-screening-codes" ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "sigmoidoscopy-complication" ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "obs" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "value" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "%complicationItem.answer.value.first()" ] ] ] ; fhir:StructureMap.group.rule.dependent [ fhir:index -1 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "PopulateObservation" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "src" ; fhir:index -1 ], [ fhir:value "complicationItem" ; fhir:index -1 ], [ fhir:value "obs" ; fhir:index -1 ], [ fhir:value "coding" ; fhir:index -1 ], [ fhir:value "patientFullUrl" ; fhir:index -1 ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.dependent.name [ fhir:value "PopulateBundleEntry" ] ; fhir:StructureMap.group.rule.dependent.variable [ fhir:value "src" ; fhir:index -1 ], [ fhir:value "entry" ; fhir:index -1 ], [ fhir:value "fullUrl" ; fhir:index -1 ] ] ] ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.name [ fhir:value "PopulateBundleEntry" ] ; fhir:StructureMap.group.typeMode [ fhir:value "none" ] ; fhir:StructureMap.group.input [ fhir:index -1 ; fhir:StructureMap.group.input.name [ fhir:value "src" ] ; fhir:StructureMap.group.input.type [ fhir:value "QuestionnaireResponse" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index -1 ; fhir:StructureMap.group.input.name [ fhir:value "entry" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ], [ fhir:index -1 ; fhir:StructureMap.group.input.name [ fhir:value "fullUrl" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ] ; fhir:StructureMap.group.rule [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "SetFullUrl" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "entry" ] ; 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 "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'urn:uuid:' & %fullUrl" ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "SetRequest" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "entry" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "request" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "req" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "setMethod" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "req" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "method" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "POST" ] ] ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.name [ fhir:value "PopulatePatient" ] ; fhir:StructureMap.group.typeMode [ fhir:value "none" ] ; fhir:StructureMap.group.input [ fhir:index -1 ; fhir:StructureMap.group.input.name [ fhir:value "src" ] ; fhir:StructureMap.group.input.type [ fhir:value "QuestionnaireResponse" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index -1 ; fhir:StructureMap.group.input.name [ fhir:value "patientItem" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index -1 ; fhir:StructureMap.group.input.name [ fhir:value "pat" ] ; fhir:StructureMap.group.input.type [ fhir:value "Patient" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ] ; fhir:StructureMap.group.rule [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "SetGender" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "patientItem" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "gender" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "(linkId = 'gender')" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "pat" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "gender" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "%gender.answer.value.first().code" ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "SetBirthDate" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "patientItem" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "dob" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "(linkId = 'dob')" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "pat" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "birthDate" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "%dob.answer.value" ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "SetName" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "patientItem" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "name" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "(linkId = 'name')" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "pat" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "name" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "tgtName" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "SetNameText" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "name" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtName" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "text" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "%name.item.where((linkId = 'given') or (linkId = 'family')).answer.value.join(' ')" ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "SetFamily" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "name" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "family" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "(linkId = 'family')" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtName" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "family" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "%family.answer.value" ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "SetGiven" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "name" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "given" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "(linkId = 'given')" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "AnswerValue" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "given" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "answer" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "answer" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtName" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "given" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "%answer.value" ] ] ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "SetIdentifier" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "patientItem" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "itemIdentifier" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "(linkId = 'ihi')" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "pat" ] ; 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 "tgtIdentifier" ] ] ; fhir:StructureMap.group.rule.rule [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "SetIdentifierType" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "itemIdentifier" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtIdentifier" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "type" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "t" ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "t" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "text" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "National Identifier (IHI)" ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "SetIdentifierSystem" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "itemIdentifier" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtIdentifier" ] ; 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 -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://example.org/nhio" ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "SetIdentifierValue" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "itemIdentifier" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "tgtIdentifier" ] ; 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 "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "%itemIdentifier.answer.value" ] ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "SetTelecom" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "patientItem" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "itemMobile" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "(linkId = 'mobile-phone')" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "pat" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "telecom" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "t" ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "t" ] ; 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 -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "phone" ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "t" ] ; 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 "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "%itemMobile.answer.value" ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "t" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "use" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "mobile" ] ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.name [ fhir:value "PopulateRelatedPerson" ] ; fhir:StructureMap.group.typeMode [ fhir:value "none" ] ; fhir:StructureMap.group.input [ fhir:index -1 ; fhir:StructureMap.group.input.name [ fhir:value "src" ] ; fhir:StructureMap.group.input.type [ fhir:value "QuestionnaireResponse" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index -1 ; fhir:StructureMap.group.input.name [ fhir:value "rpItem" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index -1 ; fhir:StructureMap.group.input.name [ fhir:value "rp" ] ; fhir:StructureMap.group.input.type [ fhir:value "RelatedPerson" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ], [ fhir:index -1 ; fhir:StructureMap.group.input.name [ fhir:value "patientFullUrl" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ] ; fhir:StructureMap.group.rule [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "SetPatientRef" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "rpItem" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "rp" ] ; 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 "p" ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "p" ] ; 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 "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "%patientFullUrl" ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "SetName" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "rpItem" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "name" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "(linkId = 'contact-name')" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "rp" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "name" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "n" ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "n" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "text" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "%name.answer.value" ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "SetRelationship" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "rpItem" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "rel" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "(linkId = 'relationship')" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "rp" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "relationship" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "r" ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "r" ] ; 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 "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "%rel.answer.value" ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "SetPhone" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "rpItem" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "phone" ] ; fhir:StructureMap.group.rule.source.condition [ fhir:value "(linkId = 'phone')" ] ] ; fhir:StructureMap.group.rule.target [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "rp" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "telecom" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "t" ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "t" ] ; 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 -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "phone" ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "t" ] ; 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 "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "%phone.answer.value" ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "t" ] ; fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ; fhir:StructureMap.group.rule.target.element [ fhir:value "use" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "mobile" ] ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.name [ fhir:value "PopulateObservation" ] ; fhir:StructureMap.group.typeMode [ fhir:value "none" ] ; fhir:StructureMap.group.input [ fhir:index -1 ; fhir:StructureMap.group.input.name [ fhir:value "src" ] ; fhir:StructureMap.group.input.type [ fhir:value "QuestionnaireResponse" ] ; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index -1 ; fhir:StructureMap.group.input.name [ fhir:value "complicationItem" ] ; 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 "Observation" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ], [ fhir:index -1 ; fhir:StructureMap.group.input.name [ fhir:value "coding" ] ; fhir:StructureMap.group.input.type [ fhir:value "Coding" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ], [ fhir:index -1 ; fhir:StructureMap.group.input.name [ fhir:value "patientFullUrl" ] ; fhir:StructureMap.group.input.mode [ fhir:value "target" ] ] ; fhir:StructureMap.group.rule [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "SetObservationCode" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ 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 "code" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "%coding" ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "SetStatus" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ] ; fhir:StructureMap.group.rule.target [ 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 "status" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "final" ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "SetSubjectRef" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "subject" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "s" ] ] ; fhir:StructureMap.group.rule.target [ 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 "subject" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "p" ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "p" ] ; 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 "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "%patientFullUrl" ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "SetAuthored" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "authored" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "s" ] ] ; fhir:StructureMap.group.rule.target [ 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 "issued" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "s" ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "SetEffective" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "authored" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "s" ] ] ; fhir:StructureMap.group.rule.target [ 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 "effective" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "s" ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "author" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "author" ] ; fhir:StructureMap.group.rule.source.variable [ fhir:value "s" ] ] ; fhir:StructureMap.group.rule.target [ 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 "performer" ] ; fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "s" ] ] ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.name [ fhir:value "SetDerivedFrom" ] ; fhir:StructureMap.group.rule.source [ fhir:index -1 ; fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ; fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ] ; fhir:StructureMap.group.rule.target [ 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 "derivedFrom" ] ; fhir:StructureMap.group.rule.target.variable [ fhir:value "df" ] ], [ fhir:index -1 ; fhir:StructureMap.group.rule.target.context [ fhir:value "df" ] ; 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 "evaluate" ] ; fhir:StructureMap.group.rule.target.parameter [ fhir:index -1 ; fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'QuestionnaireResponse/' & %src.id" ] ] ] ] ] . # - ontology header ------------------------------------------------------------ <http://hl7.org/fhir/StructureMap/ExtractComplexSmap.ttl> a owl:Ontology ; owl:imports fhir:fhir.ttl ; owl:versionIRI <http://build.fhir.org/StructureMap/ExtractComplexSmap.ttl> .
IG © 2022+ HL7 International / FHIR Infrastructure.
Package hl7.fhir.uv.sdc#4.0.0-ci-build based on FHIR 4.0.1.
Generated
2026-07-15
Links: Table of Contents |
QA Report
| Version History |
|
Propose a change
