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" : "Dosage3to4",
"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/Dosage3to4'</span>\r\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'Dosage3to4'</span>\r\n<span style=\"color: #cc00cc\">/// <b>title</b> = </span><span style=\"color: blue\">'Dosage Transforms: R3 to R4'</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/Dosage<span style=\"color: navy\">" </span><b>alias </b>DosageR3 <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> "</span>http://hl7.org/fhir/4.0/Dosage<span style=\"color: navy\">" </span><b>alias </b>Dosage <b>as </b><b>target</b>\r\n\r\n<b>imports</b><span style=\"color: navy\"> "</span>http://hl7.org/fhir/StructureMap/*3to4<span style=\"color: navy\">"\r\n</span>\r\n<b>group </b>Dosage<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>DosageR3, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>Dosage<span style=\"color: navy\">)</span><b> extends </b>BackboneElement<b> <<type+>></b><span style=\"color: navy\"> {\r\n</span> src.sequence<span style=\"color: navy\"><b> -> </b></span>tgt.sequence<span style=\"color: navy\">;</span>\r\n src.text<span style=\"color: navy\"><b> -> </b></span>tgt.text<span style=\"color: navy\">;</span>\r\n src.additionalInstruction<span style=\"color: navy\"><b> -> </b></span>tgt.additionalInstruction<span style=\"color: navy\">;</span>\r\n src.patientInstruction<span style=\"color: navy\"><b> -> </b></span>tgt.patientInstruction<span style=\"color: navy\">;</span>\r\n src.timing<span style=\"color: navy\"><b> -> </b></span>tgt.timing<span style=\"color: navy\">;</span>\r\n src.asNeeded<span style=\"color: navy\"> : </span>boolean<b> as </b><span style=\"color: maroon\">vs</span><span style=\"color: navy\"><b> -> </b></span>tgt.asNeeded = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'boolean'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">vt</span><b> then </b>boolean<span style=\"color: navy\">(</span><span style=\"color: maroon\">vs</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">vt</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n src.asNeeded<span style=\"color: navy\"> : </span>CodeableConcept<b> as </b><span style=\"color: maroon\">vs</span><span style=\"color: navy\"><b> -> </b></span>tgt.asNeeded = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">vt</span><b> then </b>CodeableConcept<span style=\"color: navy\">(</span><span style=\"color: maroon\">vs</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">vt</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n src.site<span style=\"color: navy\"><b> -> </b></span>tgt.site<span style=\"color: navy\">;</span>\r\n src.route<span style=\"color: navy\"><b> -> </b></span>tgt.route<span style=\"color: navy\">;</span>\r\n src.method<span style=\"color: navy\"><b> -> </b></span>tgt.method<span style=\"color: navy\">;</span>\r\n src<b> where </b>dose.exists() or rate.exists()<span style=\"color: navy\"><b> -> </b></span>tgt.doseAndRate<b> as </b><span style=\"color: maroon\">vt0</span><b> then </b>doseAndRate<span style=\"color: navy\">(</span><span style=\"color: maroon\">src</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">vt0</span><span style=\"color: navy\">)</span> <i>"doserate"</i><span style=\"color: navy\">;</span>\r\n src.maxDosePerPeriod<span style=\"color: navy\"><b> -> </b></span>tgt.maxDosePerPeriod<span style=\"color: navy\">;</span>\r\n src.maxDosePerAdministration<span style=\"color: navy\"><b> -> </b></span>tgt.maxDosePerAdministration<span style=\"color: navy\">;</span>\r\n src.maxDosePerLifetime<span style=\"color: navy\"><b> -> </b></span>tgt.maxDosePerLifetime<span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>doseAndRate<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><span style=\"color: navy\"> {\r\n</span> src.dose<span style=\"color: navy\"> : </span>Range<b> as </b><span style=\"color: maroon\">vs</span><span style=\"color: navy\"><b> -> </b></span>tgt.dose = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Range'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">vt</span><b> then </b>Range<span style=\"color: navy\">(</span><span style=\"color: maroon\">vs</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">vt</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n src.dose<span style=\"color: navy\"> : </span>Quantity<b> as </b><span style=\"color: maroon\">vs</span><span style=\"color: navy\"><b> -> </b></span>tgt.dose = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Quantity'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">vt</span><b> then </b>Quantity<span style=\"color: navy\">(</span><span style=\"color: maroon\">vs</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">vt</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n src.rate<span style=\"color: navy\"> : </span>Ratio<b> as </b><span style=\"color: maroon\">vs</span><span style=\"color: navy\"><b> -> </b></span>tgt.rate = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Ratio'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">vt</span><b> then </b>Ratio<span style=\"color: navy\">(</span><span style=\"color: maroon\">vs</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">vt</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n src.rate<span style=\"color: navy\"> : </span>Range<b> as </b><span style=\"color: maroon\">vs</span><span style=\"color: navy\"><b> -> </b></span>tgt.rate = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Range'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">vt</span><b> then </b>Range<span style=\"color: navy\">(</span><span style=\"color: maroon\">vs</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">vt</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n src.rate<span style=\"color: navy\"> : </span>Quantity<b> as </b><span style=\"color: maroon\">vs</span><span style=\"color: navy\"><b> -> </b></span>tgt.rate = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Quantity'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">vt</span><b> then </b>Quantity<span style=\"color: navy\">(</span><span style=\"color: maroon\">vs</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">vt</span><span style=\"color: navy\">)</span><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/Dosage3to4",
"version" : "0.1.0",
"name" : "Dosage3to4",
"title" : "Dosage Transforms: R3 to R4",
"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" : "DosageTransformsR3toR4",
"jurisdiction" : [
{
"coding" : [
{
"system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
"code" : "001"
}
]
}
],
"structure" : [
{
"url" : "http://hl7.org/fhir/3.0/Dosage",
"mode" : "source",
"alias" : "DosageR3"
},
{
"url" : "http://hl7.org/fhir/4.0/Dosage",
"mode" : "target",
"alias" : "Dosage"
}
],
"import" : [
"http://hl7.org/fhir/StructureMap/*3to4"
],
"group" : [
{
"name" : "Dosage",
"extends" : "BackboneElement",
"typeMode" : "type-and-types",
"input" : [
{
"name" : "src",
"type" : "DosageR3",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "Dosage",
"mode" : "target"
}
],
"rule" : [
{
"name" : "sequence",
"source" : [
{
"context" : "src",
"element" : "sequence",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "sequence",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "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" : "additionalInstruction",
"source" : [
{
"context" : "src",
"element" : "additionalInstruction",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "additionalInstruction",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "patientInstruction",
"source" : [
{
"context" : "src",
"element" : "patientInstruction",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "patientInstruction",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "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" : "asNeededBoolean",
"source" : [
{
"context" : "src",
"type" : "boolean",
"element" : "asNeeded",
"variable" : "vs"
}
],
"target" : [
{
"context" : "tgt",
"element" : "asNeeded",
"variable" : "vt",
"transform" : "create",
"parameter" : [
{
"valueString" : "boolean"
}
]
}
],
"dependent" : [
{
"name" : "boolean",
"parameter" : [
{
"valueId" : "vs"
},
{
"valueId" : "vt"
}
]
}
]
},
{
"name" : "asNeededCodeableConcept",
"source" : [
{
"context" : "src",
"type" : "CodeableConcept",
"element" : "asNeeded",
"variable" : "vs"
}
],
"target" : [
{
"context" : "tgt",
"element" : "asNeeded",
"variable" : "vt",
"transform" : "create",
"parameter" : [
{
"valueString" : "CodeableConcept"
}
]
}
],
"dependent" : [
{
"name" : "CodeableConcept",
"parameter" : [
{
"valueId" : "vs"
},
{
"valueId" : "vt"
}
]
}
]
},
{
"name" : "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" : "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" : "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" : "doserate",
"source" : [
{
"context" : "src",
"condition" : "dose.exists() or rate.exists()"
}
],
"target" : [
{
"context" : "tgt",
"element" : "doseAndRate",
"variable" : "vt0"
}
],
"dependent" : [
{
"name" : "doseAndRate",
"parameter" : [
{
"valueId" : "src"
},
{
"valueId" : "vt0"
}
]
}
]
},
{
"name" : "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"
}
]
}
]
},
{
"name" : "maxDosePerAdministration",
"source" : [
{
"context" : "src",
"element" : "maxDosePerAdministration",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "maxDosePerAdministration",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "maxDosePerLifetime",
"source" : [
{
"context" : "src",
"element" : "maxDosePerLifetime",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "maxDosePerLifetime",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
}
]
},
{
"name" : "doseAndRate",
"input" : [
{
"name" : "src",
"mode" : "source"
},
{
"name" : "tgt",
"mode" : "target"
}
],
"rule" : [
{
"name" : "doseRange",
"source" : [
{
"context" : "src",
"type" : "Range",
"element" : "dose",
"variable" : "vs"
}
],
"target" : [
{
"context" : "tgt",
"element" : "dose",
"variable" : "vt",
"transform" : "create",
"parameter" : [
{
"valueString" : "Range"
}
]
}
],
"dependent" : [
{
"name" : "Range",
"parameter" : [
{
"valueId" : "vs"
},
{
"valueId" : "vt"
}
]
}
]
},
{
"name" : "doseQuantity",
"source" : [
{
"context" : "src",
"type" : "Quantity",
"element" : "dose",
"variable" : "vs"
}
],
"target" : [
{
"context" : "tgt",
"element" : "dose",
"variable" : "vt",
"transform" : "create",
"parameter" : [
{
"valueString" : "Quantity"
}
]
}
],
"dependent" : [
{
"name" : "Quantity",
"parameter" : [
{
"valueId" : "vs"
},
{
"valueId" : "vt"
}
]
}
]
},
{
"name" : "rateRatio",
"source" : [
{
"context" : "src",
"type" : "Ratio",
"element" : "rate",
"variable" : "vs"
}
],
"target" : [
{
"context" : "tgt",
"element" : "rate",
"variable" : "vt",
"transform" : "create",
"parameter" : [
{
"valueString" : "Ratio"
}
]
}
],
"dependent" : [
{
"name" : "Ratio",
"parameter" : [
{
"valueId" : "vs"
},
{
"valueId" : "vt"
}
]
}
]
},
{
"name" : "rateRange",
"source" : [
{
"context" : "src",
"type" : "Range",
"element" : "rate",
"variable" : "vs"
}
],
"target" : [
{
"context" : "tgt",
"element" : "rate",
"variable" : "vt",
"transform" : "create",
"parameter" : [
{
"valueString" : "Range"
}
]
}
],
"dependent" : [
{
"name" : "Range",
"parameter" : [
{
"valueId" : "vs"
},
{
"valueId" : "vt"
}
]
}
]
},
{
"name" : "rateQuantity",
"source" : [
{
"context" : "src",
"type" : "Quantity",
"element" : "rate",
"variable" : "vs"
}
],
"target" : [
{
"context" : "tgt",
"element" : "rate",
"variable" : "vt",
"transform" : "create",
"parameter" : [
{
"valueString" : "Quantity"
}
]
}
],
"dependent" : [
{
"name" : "Quantity",
"parameter" : [
{
"valueId" : "vs"
},
{
"valueId" : "vt"
}
]
}
]
}
]
}
]
}