FHIR Cross-Version Mapping Pack, published by HL7 International / FHIR Infrastructure. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/fhir-cross-version/ and changes regularly. See the Directory of published versions
Page standards status: Draft | Maturity Level: 1 |
{
"resourceType" : "StructureMap",
"id" : "MedicationStatement3to2",
"text" : {
"status" : "generated",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><pre class=\"fml\">\r\n<span style=\"color: #cc00cc\">/// <b>url</b> = </span><span style=\"color: blue\">'http://hl7.org/fhir/StructureMap/MedicationStatement3to2'</span>\r\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'MedicationStatement3to2'</span>\r\n<span style=\"color: #cc00cc\">/// <b>title</b> = </span><span style=\"color: blue\">'MedicationStatement Transforms: R3 to R2'</span>\r\n<span style=\"color: #cc00cc\">/// <b>status</b> = </span><span style=\"color: blue\">'active'</span>\r\n\r\n<b>uses</b><span style=\"color: navy\"> "</span>http://hl7.org/fhir/3.0/MedicationStatement<span style=\"color: navy\">" </span><b>alias </b>MedicationStatement <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> "</span>http://hl7.org/fhir/1.0/MedicationStatement<span style=\"color: navy\">" </span><b>alias </b>MedicationStatementR2 <b>as </b><b>target</b>\r\n\r\n<b>imports</b><span style=\"color: navy\"> "</span>http://hl7.org/fhir/StructureMap/*3to2<span style=\"color: navy\">"\r\n</span>\r\n<b>group </b>MedicationStatement<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>MedicationStatement, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>MedicationStatementR2<span style=\"color: navy\">)</span><b> extends </b>DomainResource<b> <<type+>></b><span style=\"color: navy\"> {\r\n</span> src.identifier<span style=\"color: navy\"><b> -> </b></span>tgt.identifier <i>"MedicationStatement-identifier"</i><span style=\"color: navy\">;</span>\r\n src.subject<span style=\"color: navy\"><b> -> </b></span>tgt.patient <i>"MedicationStatement-subject"</i><span style=\"color: navy\">;</span>\r\n src.informationSource<span style=\"color: navy\"><b> -> </b></span>tgt.informationSource <i>"MedicationStatement-informationSource"</i><span style=\"color: navy\">;</span>\r\n src.dateAsserted<span style=\"color: navy\"><b> -> </b></span>tgt.dateAsserted <i>"MedicationStatement-dateAsserted"</i><span style=\"color: navy\">;</span>\r\n src.status<b> check </b>(src.status != 'stopped') and (status != 'on-hold')<span style=\"color: navy\"><b> -> </b></span>tgt.status <i>"MedicationStatement-status"</i><span style=\"color: navy\">;</span>\r\n src.taken<b> as </b><span style=\"color: maroon\">vt</span><b> where </b>$this = 'n'<span style=\"color: navy\"><b> -> </b></span>tgt.wasNotTaken = <span style=\"color: blue\">'true'</span> <i>"MedicationStatement-wasNotTaken"</i><span style=\"color: navy\">;</span>\r\n src.taken<b> as </b><span style=\"color: maroon\">vt</span><b> where </b>$this = 'y'<span style=\"color: navy\"><b> -> </b></span>tgt.wasNotTaken = <span style=\"color: blue\">'false'</span> <i>"MedicationStatement-wasNotTaken"</i><span style=\"color: navy\">;</span>\r\n src.reasonNotTaken<span style=\"color: navy\"><b> -> </b></span>tgt.reasonNotTaken <i>"MedicationStatement-reasonNotTaken"</i><span style=\"color: navy\">;</span>\r\n src.reasonCode<span style=\"color: navy\"><b> -> </b></span>tgt.reasonForUse <i>"MedicationStatement-reasonForUse1"</i><span style=\"color: navy\">;</span>\r\n src.reasonReference<span style=\"color: navy\"><b> -> </b></span>tgt.reasonForUse <i>"MedicationStatement-reasonForUse2"</i><span style=\"color: navy\">;</span>\r\n src.effective<span style=\"color: navy\"><b> -> </b></span>tgt.effective <i>"MedicationStatement-effective"</i><span style=\"color: navy\">;</span>\r\n src.note<span style=\"color: navy\"><b> -> </b></span>tgt.note <i>"MedicationStatement-note"</i><span style=\"color: navy\">;</span>\r\n src.derivedFrom<span style=\"color: navy\"><b> -> </b></span>tgt.supportingInformation <i>"MedicationStatement-supportingInformation"</i><span style=\"color: navy\">;</span>\r\n src.medication<span style=\"color: navy\"><b> -> </b></span>tgt.medication <i>"MedicationStatement-medication"</i><span style=\"color: navy\">;</span>\r\n src.dosage<b> as </b><span style=\"color: maroon\">vs0</span><span style=\"color: navy\"><b> -> </b></span>tgt.dosage<b> as </b><span style=\"color: maroon\">vt0</span><b> then </b>mstDosage<span style=\"color: navy\">(</span><span style=\"color: maroon\">vs0</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">vt0</span><span style=\"color: navy\">)</span> <i>"MedicationStatement-dosage"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>mstDosage<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span>, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\">)</span><b> extends </b>Element<span style=\"color: navy\"> {\r\n</span> src.text<span style=\"color: navy\"><b> -> </b></span>tgt.text <i>"DosageInstruction-text"</i><span style=\"color: navy\">;</span>\r\n src.timing<span style=\"color: navy\"><b> -> </b></span>tgt.timing <i>"DosageInstruction-timing"</i><span style=\"color: navy\">;</span>\r\n src.asNeeded<span style=\"color: navy\"><b> -> </b></span>tgt.asNeeded <i>"DosageInstruction-asNeeded"</i><span style=\"color: navy\">;</span>\r\n src.site<span style=\"color: navy\"><b> -> </b></span>tgt.site <i>"DosageInstruction-site"</i><span style=\"color: navy\">;</span>\r\n src.route<span style=\"color: navy\"><b> -> </b></span>tgt.route <i>"DosageInstruction-route"</i><span style=\"color: navy\">;</span>\r\n src.method<span style=\"color: navy\"><b> -> </b></span>tgt.method <i>"DosageInstruction-method"</i><span style=\"color: navy\">;</span>\r\n src.dose<span style=\"color: navy\"><b> -> </b></span>tgt.quantity <i>"DosageInstruction-quantity"</i><span style=\"color: navy\">;</span>\r\n src.rate<span style=\"color: navy\"><b> -> </b></span>tgt.rate <i>"DosageInstruction-rate"</i><span style=\"color: navy\">;</span>\r\n src.maxDosePerPeriod<span style=\"color: navy\"><b> -> </b></span>tgt.maxDosePerPeriod <i>"DosageInstruction-maxDosePerPeriod"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
},
"extension" : [
{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
"valueCode" : "fhir"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
"valueInteger" : 1,
"_valueInteger" : {
"extension" : [
{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom",
"valueCanonical" : "http://hl7.org/fhir/extensions/ImplementationGuide/hl7.fhir.uv.xver"
}
]
}
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
"valueCode" : "draft",
"_valueCode" : {
"extension" : [
{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom",
"valueCanonical" : "http://hl7.org/fhir/extensions/ImplementationGuide/hl7.fhir.uv.xver"
}
]
}
}
],
"url" : "http://hl7.org/fhir/StructureMap/MedicationStatement3to2",
"version" : "0.1.0",
"name" : "MedicationStatement3to2",
"title" : "MedicationStatement Transforms: R3 to R2",
"status" : "active",
"date" : "2024-02-22T03:16:50+00:00",
"publisher" : "HL7 International / FHIR Infrastructure",
"contact" : [
{
"telecom" : [
{
"system" : "url",
"value" : "http://www.hl7.org/Special/committees/fiwg"
}
]
}
],
"description" : "MedicationStatementTransformsR3toR2",
"jurisdiction" : [
{
"coding" : [
{
"system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
"code" : "001"
}
]
}
],
"structure" : [
{
"url" : "http://hl7.org/fhir/3.0/MedicationStatement",
"mode" : "source",
"alias" : "MedicationStatement"
},
{
"url" : "http://hl7.org/fhir/1.0/MedicationStatement",
"mode" : "target",
"alias" : "MedicationStatementR2"
}
],
"import" : [
"http://hl7.org/fhir/StructureMap/*3to2"
],
"group" : [
{
"name" : "MedicationStatement",
"extends" : "DomainResource",
"typeMode" : "type-and-types",
"input" : [
{
"name" : "src",
"type" : "MedicationStatement",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "MedicationStatementR2",
"mode" : "target"
}
],
"rule" : [
{
"name" : "MedicationStatement-identifier",
"source" : [
{
"context" : "src",
"element" : "identifier",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "identifier",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "MedicationStatement-subject",
"source" : [
{
"context" : "src",
"element" : "subject",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "patient",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "MedicationStatement-informationSource",
"source" : [
{
"context" : "src",
"element" : "informationSource",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "informationSource",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "MedicationStatement-dateAsserted",
"source" : [
{
"context" : "src",
"element" : "dateAsserted",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "dateAsserted",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "MedicationStatement-status",
"source" : [
{
"context" : "src",
"element" : "status",
"variable" : "vvv",
"check" : "(src.status != 'stopped') and (status != 'on-hold')"
}
],
"target" : [
{
"context" : "tgt",
"element" : "status",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "MedicationStatement-wasNotTaken",
"source" : [
{
"context" : "src",
"element" : "taken",
"variable" : "vt",
"condition" : "$this = 'n'"
}
],
"target" : [
{
"context" : "tgt",
"element" : "wasNotTaken",
"transform" : "copy",
"parameter" : [
{
"valueString" : "true"
}
]
}
]
},
{
"name" : "MedicationStatement-wasNotTaken",
"source" : [
{
"context" : "src",
"element" : "taken",
"variable" : "vt",
"condition" : "$this = 'y'"
}
],
"target" : [
{
"context" : "tgt",
"element" : "wasNotTaken",
"transform" : "copy",
"parameter" : [
{
"valueString" : "false"
}
]
}
]
},
{
"name" : "MedicationStatement-reasonNotTaken",
"source" : [
{
"context" : "src",
"element" : "reasonNotTaken",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "reasonNotTaken",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "MedicationStatement-reasonForUse1",
"source" : [
{
"context" : "src",
"element" : "reasonCode",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "reasonForUse",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "MedicationStatement-reasonForUse2",
"source" : [
{
"context" : "src",
"element" : "reasonReference",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "reasonForUse",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "MedicationStatement-effective",
"source" : [
{
"context" : "src",
"element" : "effective",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "effective",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "MedicationStatement-note",
"source" : [
{
"context" : "src",
"element" : "note",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "note",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "MedicationStatement-supportingInformation",
"source" : [
{
"context" : "src",
"element" : "derivedFrom",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "supportingInformation",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "MedicationStatement-medication",
"source" : [
{
"context" : "src",
"element" : "medication",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "medication",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "MedicationStatement-dosage",
"source" : [
{
"context" : "src",
"element" : "dosage",
"variable" : "vs0"
}
],
"target" : [
{
"context" : "tgt",
"element" : "dosage",
"variable" : "vt0"
}
],
"dependent" : [
{
"name" : "mstDosage",
"parameter" : [
{
"valueId" : "vs0"
},
{
"valueId" : "vt0"
}
]
}
]
}
]
},
{
"name" : "mstDosage",
"extends" : "Element",
"input" : [
{
"name" : "src",
"mode" : "source"
},
{
"name" : "tgt",
"mode" : "target"
}
],
"rule" : [
{
"name" : "DosageInstruction-text",
"source" : [
{
"context" : "src",
"element" : "text",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "text",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "DosageInstruction-timing",
"source" : [
{
"context" : "src",
"element" : "timing",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "timing",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "DosageInstruction-asNeeded",
"source" : [
{
"context" : "src",
"element" : "asNeeded",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "asNeeded",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "DosageInstruction-site",
"source" : [
{
"context" : "src",
"element" : "site",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "site",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "DosageInstruction-route",
"source" : [
{
"context" : "src",
"element" : "route",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "route",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "DosageInstruction-method",
"source" : [
{
"context" : "src",
"element" : "method",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "method",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "DosageInstruction-quantity",
"source" : [
{
"context" : "src",
"element" : "dose",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "quantity",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "DosageInstruction-rate",
"source" : [
{
"context" : "src",
"element" : "rate",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "rate",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "DosageInstruction-maxDosePerPeriod",
"source" : [
{
"context" : "src",
"element" : "maxDosePerPeriod",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "maxDosePerPeriod",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
}
]
}
]
}