This page is part of the Structured Data Capture FHIR IG (v4.0.0-ballot: STU 4 Ballot 1) based on FHIR (HL7® FHIR® Standard) R4. The current version which supersedes this version is 3.0.0. For a full list of available versions, 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 ------------------------------------------------------------------- a fhir:StructureMap ; fhir:nodeRole fhir:treeRoot ; fhir:id [ fhir:v "ExtractComplexSmap"] ; # fhir:text [ fhir:status [ fhir:v "additional" ] ; fhir: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:extension ( [ fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"^^xsd:anyURI ] ; fhir:value [ fhir:v "fhir" ] ] ) ; # fhir:url [ fhir:v "http://hl7.org/fhir/uv/sdc/StructureMap/ExtractComplexSmap"^^xsd:anyURI] ; # fhir:identifier ( [ fhir:system [ fhir:v "urn:ietf:rfc:3986"^^xsd:anyURI ] ; fhir:value [ fhir:v "urn:oid:2.16.840.1.113883.4.642.40.17.43.3" ] ] ) ; # fhir:version [ fhir:v "4.0.0-ballot"] ; # fhir:name [ fhir:v "ExtractComplexSmap"] ; # fhir:status [ fhir:v "draft"] ; # fhir:date [ fhir:v "2024-12-17T01:55:34+00:00"^^xsd:dateTime] ; # fhir:publisher [ fhir:v "HL7 International / FHIR Infrastructure"] ; # fhir:contact ( [ fhir:name [ fhir:v "HL7 International / FHIR Infrastructure" ] ; ( fhir:telecom [ fhir:system [ fhir:v "url" ] ; fhir:value [ fhir:v "http://www.hl7.org/Special/committees/fiwg" ] ] ) ] [ ( fhir:telecom [ fhir:system [ fhir:v "url" ] ; fhir:value [ fhir:v "http://www.hl7.org/Special/committees/fiwg" ] ] ) ] ) ; # fhir:jurisdiction ( [ ( fhir:coding [ fhir:system [ fhir:v "http://unstats.un.org/unsd/methods/m49/m49.htm"^^xsd:anyURI ] ; fhir:code [ fhir:v "001" ] ; fhir:display [ fhir:v "World" ] ] ) ] ) ; # fhir:structure ( [ fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"^^xsd:anyURI ; fhir:link <http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse> ] ; fhir:mode [ fhir:v "source" ] ] [ fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/Bundle"^^xsd:anyURI ; fhir:link <http://hl7.org/fhir/StructureDefinition/Bundle> ] ; fhir:mode [ fhir:v "target" ] ] [ fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/Patient"^^xsd:anyURI ; fhir:link <http://hl7.org/fhir/StructureDefinition/Patient> ] ; fhir:mode [ fhir:v "target" ] ] [ fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/RelatedPerson"^^xsd:anyURI ; fhir:link <http://hl7.org/fhir/StructureDefinition/RelatedPerson> ] ; fhir:mode [ fhir:v "target" ] ] [ fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/Observation"^^xsd:anyURI ; fhir:link <http://hl7.org/fhir/StructureDefinition/Observation> ] ; fhir:mode [ fhir:v "target" ] ] [ fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/Coding"^^xsd:anyURI ; fhir:link <http://hl7.org/fhir/StructureDefinition/Coding> ] ; fhir:mode [ fhir:v "target" ] ] ) ; # fhir:group ( [ fhir:name [ fhir:v "ExtractBundle" ] ; fhir:typeMode [ fhir:v "none" ] ; ( fhir:input [ fhir:name [ fhir:v "src" ] ; fhir:type [ fhir:v "QuestionnaireResponse" ] ; fhir:mode [ fhir:v "source" ] ] [ fhir:name [ fhir:v "tgt" ] ; fhir:type [ fhir:v "Bundle" ] ; fhir:mode [ fhir:v "target" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "CreatePatientEntry" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "patientItem" ] ; fhir:condition [ fhir:v "(linkId = 'patient')" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgt" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "entry" ] ; fhir:variable [ fhir:v "patientEntry" ] ] [ fhir:contextType [ fhir:v "variable" ] ; fhir:variable [ fhir:v "patientFullUrl" ] ; fhir:transform [ fhir:v "uuid" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "popPatient" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "patientEntry" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "resource" ] ; fhir:variable [ fhir:v "pat" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Patient" ] ] ) ] ) ; ( fhir:dependent [ fhir:name [ fhir:v "PopulatePatient" ] ; ( fhir:variable [ fhir:v "src" ] [ fhir:v "patientItem" ] [ fhir:v "pat" ] ) ] [ fhir:name [ fhir:v "PopulateBundleEntry" ] ; ( fhir:variable [ fhir:v "src" ] [ fhir:v "patientEntry" ] [ fhir:v "patientFullUrl" ] ) ] ) ] [ fhir:name [ fhir:v "CreateRelatedPersonEntry" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "rpItem" ] ; fhir:condition [ fhir:v "(linkId = 'contacts')" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgt" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "entry" ] ; fhir:variable [ fhir:v "entry" ] ] [ fhir:contextType [ fhir:v "variable" ] ; fhir:variable [ fhir:v "fullUrl" ] ; fhir:transform [ fhir:v "uuid" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "popRelatedPerson" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "entry" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "resource" ] ; fhir:variable [ fhir:v "rp" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "RelatedPerson" ] ] ) ] ) ; ( fhir:dependent [ fhir:name [ fhir:v "PopulateRelatedPerson" ] ; ( fhir:variable [ fhir:v "src" ] [ fhir:v "rpItem" ] [ fhir:v "rp" ] [ fhir:v "patientFullUrl" ] ) ] [ fhir:name [ fhir:v "PopulateBundleEntry" ] ; ( fhir:variable [ fhir:v "src" ] [ fhir:v "entry" ] [ fhir:v "fullUrl" ] ) ] ) ] ) ] [ fhir:name [ fhir:v "item" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "obsItems" ] ; fhir:condition [ fhir:v "(linkId = 'obs')" ] ] ) ; ( fhir:target [ fhir:contextType [ fhir:v "variable" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "tgt" ] ] ) ] ) ; ( fhir:rule [ fhir:name [ fhir:v "CreateHeightObsEntry" ] ; ( fhir:source [ fhir:context [ fhir:v "obsItems" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "heightItem" ] ; fhir:condition [ fhir:v "(linkId = 'height')" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgt" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "entry" ] ; fhir:variable [ fhir:v "entry" ] ] [ fhir:contextType [ fhir:v "variable" ] ; fhir:variable [ fhir:v "fullUrl" ] ; fhir:transform [ fhir:v "uuid" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "popObs" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "entry" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "resource" ] ; fhir:variable [ fhir:v "obs" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Observation" ] ] ) ] [ fhir:contextType [ fhir:v "variable" ] ; fhir:variable [ fhir:v "coding" ] ; fhir:transform [ fhir:v "cc" ] ; ( fhir:parameter [ fhir:value [ fhir:v "http://loinc.org" ] ] [ fhir:value [ fhir:v "8302-2" ] ] [ fhir:value [ fhir:v "Body height" ] ] ) ] [ fhir:context [ fhir:v "obs" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "value" ] ; fhir:variable [ fhir:v "q" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Quantity" ] ] ) ] [ fhir:context [ fhir:v "q" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "value" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "%heightItem.answer.value.first()" ] ] ) ] [ fhir:context [ fhir:v "q" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "unit" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "m" ] ] ) ] ) ; ( fhir:dependent [ fhir:name [ fhir:v "PopulateObservation" ] ; ( fhir:variable [ fhir:v "src" ] [ fhir:v "heightItem" ] [ fhir:v "obs" ] [ fhir:v "coding" ] [ fhir:v "patientFullUrl" ] ) ] [ fhir:name [ fhir:v "PopulateBundleEntry" ] ; ( fhir:variable [ fhir:v "src" ] [ fhir:v "entry" ] [ fhir:v "fullUrl" ] ) ] ) ] ) ] [ fhir:name [ fhir:v "CreateWeightObsEntry" ] ; ( fhir:source [ fhir:context [ fhir:v "obsItems" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "weightItem" ] ; fhir:condition [ fhir:v "(linkId = 'weight')" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgt" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "entry" ] ; fhir:variable [ fhir:v "entry" ] ] [ fhir:contextType [ fhir:v "variable" ] ; fhir:variable [ fhir:v "fullUrl" ] ; fhir:transform [ fhir:v "uuid" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "popObs" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "entry" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "resource" ] ; fhir:variable [ fhir:v "obs" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Observation" ] ] ) ] [ fhir:contextType [ fhir:v "variable" ] ; fhir:variable [ fhir:v "coding" ] ; fhir:transform [ fhir:v "cc" ] ; ( fhir:parameter [ fhir:value [ fhir:v "http://loinc.org" ] ] [ fhir:value [ fhir:v "29463-7" ] ] [ fhir:value [ fhir:v "Weight" ] ] ) ] [ fhir:context [ fhir:v "obs" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "value" ] ; fhir:variable [ fhir:v "q" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Quantity" ] ] ) ] [ fhir:context [ fhir:v "q" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "value" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "%weightItem.answer.value.first()" ] ] ) ] [ fhir:context [ fhir:v "q" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "unit" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "kg" ] ] ) ] ) ; ( fhir:dependent [ fhir:name [ fhir:v "PopulateObservation" ] ; ( fhir:variable [ fhir:v "src" ] [ fhir:v "weightItem" ] [ fhir:v "obs" ] [ fhir:v "coding" ] [ fhir:v "patientFullUrl" ] ) ] [ fhir:name [ fhir:v "PopulateBundleEntry" ] ; ( fhir:variable [ fhir:v "src" ] [ fhir:v "entry" ] [ fhir:v "fullUrl" ] ) ] ) ] ) ] [ fhir:name [ fhir:v "CreateComplicationObsEntry" ] ; ( fhir:source [ fhir:context [ fhir:v "obsItems" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "complicationItem" ] ; fhir:condition [ fhir:v "(linkId = 'complication')" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgt" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "entry" ] ; fhir:variable [ fhir:v "entry" ] ] [ fhir:contextType [ fhir:v "variable" ] ; fhir:variable [ fhir:v "fullUrl" ] ; fhir:transform [ fhir:v "uuid" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "popObs" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "entry" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "resource" ] ; fhir:variable [ fhir:v "obs" ] ; fhir:transform [ fhir:v "create" ] ; ( fhir:parameter [ fhir:value [ fhir:v "Observation" ] ] ) ] [ fhir:contextType [ fhir:v "variable" ] ; fhir:variable [ fhir:v "coding" ] ; fhir:transform [ fhir:v "cc" ] ; ( fhir:parameter [ fhir:value [ fhir:v "http://example.org/sdh/demo/CodeSystem/cc-screening-codes" ] ] [ fhir:value [ fhir:v "sigmoidoscopy-complication" ] ] ) ] [ fhir:context [ fhir:v "obs" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "value" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "%complicationItem.answer.value.first()" ] ] ) ] ) ; ( fhir:dependent [ fhir:name [ fhir:v "PopulateObservation" ] ; ( fhir:variable [ fhir:v "src" ] [ fhir:v "complicationItem" ] [ fhir:v "obs" ] [ fhir:v "coding" ] [ fhir:v "patientFullUrl" ] ) ] [ fhir:name [ fhir:v "PopulateBundleEntry" ] ; ( fhir:variable [ fhir:v "src" ] [ fhir:v "entry" ] [ fhir:v "fullUrl" ] ) ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "PopulateBundleEntry" ] ; fhir:typeMode [ fhir:v "none" ] ; ( fhir:input [ fhir:name [ fhir:v "src" ] ; fhir:type [ fhir:v "QuestionnaireResponse" ] ; fhir:mode [ fhir:v "source" ] ] [ fhir:name [ fhir:v "entry" ] ; fhir:mode [ fhir:v "target" ] ] [ fhir:name [ fhir:v "fullUrl" ] ; fhir:mode [ fhir:v "target" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "SetFullUrl" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "entry" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "fullUrl" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "'urn:uuid:' & %fullUrl" ] ] ) ] ) ] [ fhir:name [ fhir:v "SetRequest" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "entry" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "request" ] ; fhir:variable [ fhir:v "req" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "setMethod" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "req" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "method" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "POST" ] ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "PopulatePatient" ] ; fhir:typeMode [ fhir:v "none" ] ; ( fhir:input [ fhir:name [ fhir:v "src" ] ; fhir:type [ fhir:v "QuestionnaireResponse" ] ; fhir:mode [ fhir:v "source" ] ] [ fhir:name [ fhir:v "patientItem" ] ; fhir:mode [ fhir:v "source" ] ] [ fhir:name [ fhir:v "pat" ] ; fhir:type [ fhir:v "Patient" ] ; fhir:mode [ fhir:v "target" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "SetGender" ] ; ( fhir:source [ fhir:context [ fhir:v "patientItem" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "gender" ] ; fhir:condition [ fhir:v "(linkId = 'gender')" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "pat" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "gender" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "%gender.answer.value.first().code" ] ] ) ] ) ] [ fhir:name [ fhir:v "SetBirthDate" ] ; ( fhir:source [ fhir:context [ fhir:v "patientItem" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "dob" ] ; fhir:condition [ fhir:v "(linkId = 'dob')" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "pat" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "birthDate" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "%dob.answer.value" ] ] ) ] ) ] [ fhir:name [ fhir:v "SetName" ] ; ( fhir:source [ fhir:context [ fhir:v "patientItem" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "name" ] ; fhir:condition [ fhir:v "(linkId = 'name')" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "pat" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "name" ] ; fhir:variable [ fhir:v "tgtName" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "SetNameText" ] ; ( fhir:source [ fhir:context [ fhir:v "name" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgtName" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "text" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "%name.item.where((linkId = 'given') or (linkId = 'family')).answer.value.join(' ')" ] ] ) ] ) ] [ fhir:name [ fhir:v "SetFamily" ] ; ( fhir:source [ fhir:context [ fhir:v "name" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "family" ] ; fhir:condition [ fhir:v "(linkId = 'family')" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgtName" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "family" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "%family.answer.value" ] ] ) ] ) ] [ fhir:name [ fhir:v "SetGiven" ] ; ( fhir:source [ fhir:context [ fhir:v "name" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "given" ] ; fhir:condition [ fhir:v "(linkId = 'given')" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "AnswerValue" ] ; ( fhir:source [ fhir:context [ fhir:v "given" ] ; fhir:element [ fhir:v "answer" ] ; fhir:variable [ fhir:v "answer" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgtName" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "given" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "%answer.value" ] ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "SetIdentifier" ] ; ( fhir:source [ fhir:context [ fhir:v "patientItem" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "itemIdentifier" ] ; fhir:condition [ fhir:v "(linkId = 'ihi')" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "pat" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "identifier" ] ; fhir:variable [ fhir:v "tgtIdentifier" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "SetIdentifierType" ] ; ( fhir:source [ fhir:context [ fhir:v "itemIdentifier" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgtIdentifier" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "type" ] ; fhir:variable [ fhir:v "t" ] ] [ fhir:context [ fhir:v "t" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "text" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "National Identifier (IHI)" ] ] ) ] ) ] [ fhir:name [ fhir:v "SetIdentifierSystem" ] ; ( fhir:source [ fhir:context [ fhir:v "itemIdentifier" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgtIdentifier" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "system" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "http://example.org/nhio" ] ] ) ] ) ] [ fhir:name [ fhir:v "SetIdentifierValue" ] ; ( fhir:source [ fhir:context [ fhir:v "itemIdentifier" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgtIdentifier" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "value" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "%itemIdentifier.answer.value" ] ] ) ] ) ] ) ] [ fhir:name [ fhir:v "SetTelecom" ] ; ( fhir:source [ fhir:context [ fhir:v "patientItem" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "itemMobile" ] ; fhir:condition [ fhir:v "(linkId = 'mobile-phone')" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "pat" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "telecom" ] ; fhir:variable [ fhir:v "t" ] ] [ fhir:context [ fhir:v "t" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "system" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "phone" ] ] ) ] [ fhir:context [ fhir:v "t" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "value" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "%itemMobile.answer.value" ] ] ) ] [ fhir:context [ fhir:v "t" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "use" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "mobile" ] ] ) ] ) ] ) ] [ fhir:name [ fhir:v "PopulateRelatedPerson" ] ; fhir:typeMode [ fhir:v "none" ] ; ( fhir:input [ fhir:name [ fhir:v "src" ] ; fhir:type [ fhir:v "QuestionnaireResponse" ] ; fhir:mode [ fhir:v "source" ] ] [ fhir:name [ fhir:v "rpItem" ] ; fhir:mode [ fhir:v "source" ] ] [ fhir:name [ fhir:v "rp" ] ; fhir:type [ fhir:v "RelatedPerson" ] ; fhir:mode [ fhir:v "target" ] ] [ fhir:name [ fhir:v "patientFullUrl" ] ; fhir:mode [ fhir:v "target" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "SetPatientRef" ] ; ( fhir:source [ fhir:context [ fhir:v "rpItem" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "rp" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "patient" ] ; fhir:variable [ fhir:v "p" ] ] [ fhir:context [ fhir:v "p" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "reference" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "%patientFullUrl" ] ] ) ] ) ] [ fhir:name [ fhir:v "SetName" ] ; ( fhir:source [ fhir:context [ fhir:v "rpItem" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "name" ] ; fhir:condition [ fhir:v "(linkId = 'contact-name')" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "rp" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "name" ] ; fhir:variable [ fhir:v "n" ] ] [ fhir:context [ fhir:v "n" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "text" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "%name.answer.value" ] ] ) ] ) ] [ fhir:name [ fhir:v "SetRelationship" ] ; ( fhir:source [ fhir:context [ fhir:v "rpItem" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "rel" ] ; fhir:condition [ fhir:v "(linkId = 'relationship')" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "rp" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "relationship" ] ; fhir:variable [ fhir:v "r" ] ] [ fhir:context [ fhir:v "r" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "coding" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "%rel.answer.value" ] ] ) ] ) ] [ fhir:name [ fhir:v "SetPhone" ] ; ( fhir:source [ fhir:context [ fhir:v "rpItem" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "phone" ] ; fhir:condition [ fhir:v "(linkId = 'phone')" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "rp" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "telecom" ] ; fhir:variable [ fhir:v "t" ] ] [ fhir:context [ fhir:v "t" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "system" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "phone" ] ] ) ] [ fhir:context [ fhir:v "t" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "value" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "%phone.answer.value" ] ] ) ] [ fhir:context [ fhir:v "t" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "use" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "mobile" ] ] ) ] ) ] ) ] [ fhir:name [ fhir:v "PopulateObservation" ] ; fhir:typeMode [ fhir:v "none" ] ; ( fhir:input [ fhir:name [ fhir:v "src" ] ; fhir:type [ fhir:v "QuestionnaireResponse" ] ; fhir:mode [ fhir:v "source" ] ] [ fhir:name [ fhir:v "complicationItem" ] ; fhir:mode [ fhir:v "source" ] ] [ fhir:name [ fhir:v "tgt" ] ; fhir:type [ fhir:v "Observation" ] ; fhir:mode [ fhir:v "target" ] ] [ fhir:name [ fhir:v "coding" ] ; fhir:type [ fhir:v "Coding" ] ; fhir:mode [ fhir:v "target" ] ] [ fhir:name [ fhir:v "patientFullUrl" ] ; fhir:mode [ fhir:v "target" ] ] ) ; ( fhir:rule [ fhir:name [ fhir:v "SetObservationCode" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgt" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "code" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "%coding" ] ] ) ] ) ] [ fhir:name [ fhir:v "SetStatus" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgt" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "status" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "final" ] ] ) ] ) ] [ fhir:name [ fhir:v "SetSubjectRef" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "subject" ] ; fhir:variable [ fhir:v "s" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgt" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "subject" ] ; fhir:variable [ fhir:v "p" ] ] [ fhir:context [ fhir:v "p" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "reference" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "%patientFullUrl" ] ] ) ] ) ] [ fhir:name [ fhir:v "SetAuthored" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "authored" ] ; fhir:variable [ fhir:v "s" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgt" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "issued" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "s" ] ] ) ] ) ] [ fhir:name [ fhir:v "SetEffective" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "authored" ] ; fhir:variable [ fhir:v "s" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgt" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "effective" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "s" ] ] ) ] ) ] [ fhir:name [ fhir:v "author" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "author" ] ; fhir:variable [ fhir:v "s" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgt" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "performer" ] ; fhir:transform [ fhir:v "copy" ] ; ( fhir:parameter [ fhir:value [ fhir:v "s" ] ] ) ] ) ] [ fhir:name [ fhir:v "SetDerivedFrom" ] ; ( fhir:source [ fhir:context [ fhir:v "src" ] ; fhir:element [ fhir:v "id" ] ] ) ; ( fhir:target [ fhir:context [ fhir:v "tgt" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "derivedFrom" ] ; fhir:variable [ fhir:v "df" ] ] [ fhir:context [ fhir:v "df" ] ; fhir:contextType [ fhir:v "variable" ] ; fhir:element [ fhir:v "reference" ] ; fhir:transform [ fhir:v "evaluate" ] ; ( fhir:parameter [ fhir:value [ fhir:v "'QuestionnaireResponse/' & %src.id" ] ] ) ] ) ] ) ] ) . #
IG © 2022+ HL7 International / FHIR Infrastructure. Package hl7.fhir.uv.sdc#4.0.0-ballot based on FHIR 4.0.1. Generated 2024-12-17
Links: Table of Contents |
QA Report
| Version History |
|
Propose a change