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" : "Medication2to3",
"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/Medication2to3'</span>\r\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'Medication2to3'</span>\r\n<span style=\"color: #cc00cc\">/// <b>title</b> = </span><span style=\"color: blue\">'Medication Transforms: R2 to R3'</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/1.0/Medication<span style=\"color: navy\">" </span><b>alias </b>MedicationR2 <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> "</span>http://hl7.org/fhir/3.0/Medication<span style=\"color: navy\">" </span><b>alias </b>Medication <b>as </b><b>target</b>\r\n\r\n<b>imports</b><span style=\"color: navy\"> "</span>http://hl7.org/fhir/StructureMap/*2to3<span style=\"color: navy\">"\r\n</span>\r\n<b>group </b>Medication<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>MedicationR2, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>Medication<span style=\"color: navy\">)</span><b> extends </b>DomainResource<b> <<type+>></b><span style=\"color: navy\"> {\r\n</span> src.code<span style=\"color: navy\"><b> -> </b></span>tgt.code <i>"Medication-code"</i><span style=\"color: navy\">;</span>\r\n src.isBrand<span style=\"color: navy\"><b> -> </b></span>tgt.isBrand <i>"Medication-isBrand"</i><span style=\"color: navy\">;</span>\r\n src.manufacturer<span style=\"color: navy\"><b> -> </b></span>tgt.manufacturer <i>"Medication-manufacturer"</i><span style=\"color: navy\">;</span>\r\n src.product<b> as </b><span style=\"color: maroon\">vs0</span><b> then </b>medProduct<span style=\"color: navy\">(</span><span style=\"color: maroon\">vs0</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tgt</span><span style=\"color: navy\">)</span> <i>"Medication-product"</i><span style=\"color: navy\">;</span>\r\n src.package<b> as </b><span style=\"color: maroon\">vs0</span><span style=\"color: navy\"><b> -> </b></span>tgt.package<b> as </b><span style=\"color: maroon\">vt0</span><b> then </b>medPackage<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>"Medication-package"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>medProduct<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>BackboneElement<span style=\"color: navy\"> {\r\n</span> src.form<span style=\"color: navy\"><b> -> </b></span>tgt.form <i>"product-form"</i><span style=\"color: navy\">;</span>\r\n src.ingredient<b> as </b><span style=\"color: maroon\">vs0</span><span style=\"color: navy\"><b> -> </b></span>tgt.ingredient<b> as </b><span style=\"color: maroon\">vt0</span><b> then </b>medIngredient<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>"product-ingredient"</i><span style=\"color: navy\">;</span>\r\n src.batch<b> as </b><span style=\"color: maroon\">vs0</span><span style=\"color: navy\"><b> -> </b></span> tgt.package<b> as </b><span style=\"color: maroon\">pkg</span><span style=\"color: navy\">, </span> pkg.batch<b> as </b><span style=\"color: maroon\">vt0</span><b> then </b>medBatch<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>"product-batch"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>medIngredient<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>BackboneElement<span style=\"color: navy\"> {\r\n</span> src.item<span style=\"color: navy\"><b> -> </b></span>tgt.item <i>"batch-item"</i><span style=\"color: navy\">;</span>\r\n src.amount<span style=\"color: navy\"><b> -> </b></span>tgt.amount <i>"batch-amount"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>medBatch<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>BackboneElement<span style=\"color: navy\"> {\r\n</span> src.lotNumber<span style=\"color: navy\"><b> -> </b></span>tgt.lotNumber <i>"batch-lotNumber"</i><span style=\"color: navy\">;</span>\r\n src.expirationDate<span style=\"color: navy\"><b> -> </b></span>tgt.expirationDate <i>"batch-expirationDate"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>medPackage<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>BackboneElement<span style=\"color: navy\"> {\r\n</span> src.container<span style=\"color: navy\"><b> -> </b></span>tgt.container <i>"package-container"</i><span style=\"color: navy\">;</span>\r\n src.content<b> as </b><span style=\"color: maroon\">vs0</span><span style=\"color: navy\"><b> -> </b></span>tgt.content<b> as </b><span style=\"color: maroon\">vt0</span><b> then </b>medContent<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>"package-content"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>medContent<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>BackboneElement<span style=\"color: navy\"> {\r\n</span> src.item<span style=\"color: navy\"><b> -> </b></span>tgt.item <i>"content-item"</i><span style=\"color: navy\">;</span>\r\n src.amount<span style=\"color: navy\"><b> -> </b></span>tgt.amount <i>"content-amount"</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/Medication2to3",
"version" : "0.1.0",
"name" : "Medication2to3",
"title" : "Medication Transforms: R2 to R3",
"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" : "MedicationTransformsR2toR3",
"jurisdiction" : [
{
"coding" : [
{
"system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
"code" : "001"
}
]
}
],
"structure" : [
{
"url" : "http://hl7.org/fhir/1.0/Medication",
"mode" : "source",
"alias" : "MedicationR2"
},
{
"url" : "http://hl7.org/fhir/3.0/Medication",
"mode" : "target",
"alias" : "Medication"
}
],
"import" : [
"http://hl7.org/fhir/StructureMap/*2to3"
],
"group" : [
{
"name" : "Medication",
"extends" : "DomainResource",
"typeMode" : "type-and-types",
"input" : [
{
"name" : "src",
"type" : "MedicationR2",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "Medication",
"mode" : "target"
}
],
"rule" : [
{
"name" : "Medication-code",
"source" : [
{
"context" : "src",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "Medication-isBrand",
"source" : [
{
"context" : "src",
"element" : "isBrand",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "isBrand",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "Medication-manufacturer",
"source" : [
{
"context" : "src",
"element" : "manufacturer",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "manufacturer",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "Medication-product",
"source" : [
{
"context" : "src",
"element" : "product",
"variable" : "vs0"
}
],
"dependent" : [
{
"name" : "medProduct",
"parameter" : [
{
"valueId" : "vs0"
},
{
"valueId" : "tgt"
}
]
}
]
},
{
"name" : "Medication-package",
"source" : [
{
"context" : "src",
"element" : "package",
"variable" : "vs0"
}
],
"target" : [
{
"context" : "tgt",
"element" : "package",
"variable" : "vt0"
}
],
"dependent" : [
{
"name" : "medPackage",
"parameter" : [
{
"valueId" : "vs0"
},
{
"valueId" : "vt0"
}
]
}
]
}
]
},
{
"name" : "medProduct",
"extends" : "BackboneElement",
"input" : [
{
"name" : "src",
"mode" : "source"
},
{
"name" : "tgt",
"mode" : "target"
}
],
"rule" : [
{
"name" : "product-form",
"source" : [
{
"context" : "src",
"element" : "form",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "form",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "product-ingredient",
"source" : [
{
"context" : "src",
"element" : "ingredient",
"variable" : "vs0"
}
],
"target" : [
{
"context" : "tgt",
"element" : "ingredient",
"variable" : "vt0"
}
],
"dependent" : [
{
"name" : "medIngredient",
"parameter" : [
{
"valueId" : "vs0"
},
{
"valueId" : "vt0"
}
]
}
]
},
{
"name" : "product-batch",
"source" : [
{
"context" : "src",
"element" : "batch",
"variable" : "vs0"
}
],
"target" : [
{
"context" : "tgt",
"element" : "package",
"variable" : "pkg"
},
{
"context" : "pkg",
"element" : "batch",
"variable" : "vt0"
}
],
"dependent" : [
{
"name" : "medBatch",
"parameter" : [
{
"valueId" : "vs0"
},
{
"valueId" : "vt0"
}
]
}
]
}
]
},
{
"name" : "medIngredient",
"extends" : "BackboneElement",
"input" : [
{
"name" : "src",
"mode" : "source"
},
{
"name" : "tgt",
"mode" : "target"
}
],
"rule" : [
{
"name" : "batch-item",
"source" : [
{
"context" : "src",
"element" : "item",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "item",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "batch-amount",
"source" : [
{
"context" : "src",
"element" : "amount",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "amount",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
}
]
},
{
"name" : "medBatch",
"extends" : "BackboneElement",
"input" : [
{
"name" : "src",
"mode" : "source"
},
{
"name" : "tgt",
"mode" : "target"
}
],
"rule" : [
{
"name" : "batch-lotNumber",
"source" : [
{
"context" : "src",
"element" : "lotNumber",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "lotNumber",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "batch-expirationDate",
"source" : [
{
"context" : "src",
"element" : "expirationDate",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "expirationDate",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
}
]
},
{
"name" : "medPackage",
"extends" : "BackboneElement",
"input" : [
{
"name" : "src",
"mode" : "source"
},
{
"name" : "tgt",
"mode" : "target"
}
],
"rule" : [
{
"name" : "package-container",
"source" : [
{
"context" : "src",
"element" : "container",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "container",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "package-content",
"source" : [
{
"context" : "src",
"element" : "content",
"variable" : "vs0"
}
],
"target" : [
{
"context" : "tgt",
"element" : "content",
"variable" : "vt0"
}
],
"dependent" : [
{
"name" : "medContent",
"parameter" : [
{
"valueId" : "vs0"
},
{
"valueId" : "vt0"
}
]
}
]
}
]
},
{
"name" : "medContent",
"extends" : "BackboneElement",
"input" : [
{
"name" : "src",
"mode" : "source"
},
{
"name" : "tgt",
"mode" : "target"
}
],
"rule" : [
{
"name" : "content-item",
"source" : [
{
"context" : "src",
"element" : "item",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "item",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "content-amount",
"source" : [
{
"context" : "src",
"element" : "amount",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "amount",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
}
]
}
]
}