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" : "AllergyIntolerance3to2",
"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/AllergyIntolerance3to2'</span>\r\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'AllergyIntolerance3to2'</span>\r\n<span style=\"color: #cc00cc\">/// <b>title</b> = </span><span style=\"color: blue\">'AllergyIntolerance 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/AllergyIntolerance<span style=\"color: navy\">" </span><b>alias </b>AllergyIntolerance <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> "</span>http://hl7.org/fhir/1.0/AllergyIntolerance<span style=\"color: navy\">" </span><b>alias </b>AllergyIntoleranceR2 <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>AllergyIntolerance<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>AllergyIntolerance, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>AllergyIntoleranceR2<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>"AllergyIntolerance-identifier"</i><span style=\"color: navy\">;</span>\r\n src.onset<span style=\"color: navy\"><b> -> </b></span>tgt.onset <i>"AllergyIntolerance-onset"</i><span style=\"color: navy\">;</span>\r\n src.assertedDate<span style=\"color: navy\"><b> -> </b></span>tgt.recordedDate <i>"AllergyIntolerance-recordedDate"</i><span style=\"color: navy\">;</span>\r\n src.recorder<span style=\"color: navy\"><b> -> </b></span>tgt.recorder <i>"AllergyIntolerance-recorder"</i><span style=\"color: navy\">;</span>\r\n src.patient<span style=\"color: navy\"><b> -> </b></span>tgt.patient <i>"AllergyIntolerance-patient"</i><span style=\"color: navy\">;</span>\r\n src.asserter<span style=\"color: navy\"><b> -> </b></span>tgt.reporter <i>"AllergyIntolerance-reporter"</i><span style=\"color: navy\">;</span>\r\n src.code<span style=\"color: navy\"><b> -> </b></span>tgt.substance <i>"AllergyIntolerance-substance"</i><span style=\"color: navy\">;</span>\r\n src<b> where </b>(src.clinicalStatus = 'active') and src.verificationStatus.empty()<span style=\"color: navy\"><b> -> </b></span>tgt.status = <span style=\"color: blue\">'active'</span> <i>"AllergyIntolerance-status-active"</i><span style=\"color: navy\">;</span>\r\n src<b> where </b>(src.clinicalStatus = 'active') and (src.verificationStatus = 'confirmed')<span style=\"color: navy\"><b> -> </b></span>tgt.status = <span style=\"color: blue\">'confirmed'</span> <i>"AllergyIntolerance-status-unconfirmed"</i><span style=\"color: navy\">;</span>\r\n src<b> where </b>(src.clinicalStatus = 'active') and (src.verificationStatus = 'unconfirmed')<span style=\"color: navy\"><b> -> </b></span>tgt.status = <span style=\"color: blue\">'unconfirmed'</span> <i>"AllergyIntolerance-status-confirmed"</i><span style=\"color: navy\">;</span>\r\n src<b> where </b>src.clinicalStatus = 'inactive'<span style=\"color: navy\"><b> -> </b></span>tgt.status = <span style=\"color: blue\">'inactive'</span> <i>"AllergyIntolerance-status-inactive"</i><span style=\"color: navy\">;</span>\r\n src<b> where </b>src.clinicalStatus = 'resolved'<span style=\"color: navy\"><b> -> </b></span>tgt.status = <span style=\"color: blue\">'resolved'</span> <i>"AllergyIntolerance-status-resolved"</i><span style=\"color: navy\">;</span>\r\n src<b> where </b>src.verificationStatus = 'refuted'<span style=\"color: navy\"><b> -> </b></span>tgt.status = <span style=\"color: blue\">'refuted'</span> <i>"AllergyIntolerance-status-refuted"</i><span style=\"color: navy\">;</span>\r\n src<b> where </b>src.verificationStatus = 'entered-in-error'<span style=\"color: navy\"><b> -> </b></span>tgt.status = <span style=\"color: blue\">'entered-in-error'</span> <i>"AllergyIntolerance-status-entered-in-error"</i><span style=\"color: navy\">;</span>\r\n src.criticality<b> as </b><span style=\"color: maroon\">v</span><span style=\"color: navy\"><b> -> </b></span>tgt.criticality = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">v</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'http://hl7.org/fhir/ConceptMap/AllergyIntolerance.criticality-R3toR2'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'code'</span><span style=\"color: navy\">)</span> <i>"AllergyIntolerance-criticality"</i><span style=\"color: navy\">;</span>\r\n src.type<span style=\"color: navy\"><b> -> </b></span>tgt.type <i>"AllergyIntolerance-type"</i><span style=\"color: navy\">;</span>\r\n src.category<span style=\"color: navy\"><b> -> </b></span>tgt.category <i>"AllergyIntolerance-category"</i><span style=\"color: navy\">;</span>\r\n src.lastOccurrence<span style=\"color: navy\"><b> -> </b></span>tgt.lastOccurence <i>"AllergyIntolerance-lastOccurrence"</i><span style=\"color: navy\">;</span>\r\n src.note<span style=\"color: navy\"><b> -> </b></span>tgt.note <i>"AllergyIntolerance-note"</i><span style=\"color: navy\">;</span>\r\n src.reaction<b> as </b><span style=\"color: maroon\">vs0</span><span style=\"color: navy\"><b> -> </b></span>tgt.reaction<b> as </b><span style=\"color: maroon\">vt0</span><b> then </b>algReaction<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>"AllergyIntolerance-reaction"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>algReaction<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.substance<span style=\"color: navy\"><b> -> </b></span>tgt.substance <i>"reaction-substance"</i><span style=\"color: navy\">;</span>\r\n src.extension<b> as </b><span style=\"color: maroon\">e</span><b> where </b>e.url = 'http://hl7.org/fhir/AllergyIntolerance-r2-certainty'<span style=\"color: navy\"><b> -> </b></span>tgt.certainty = <span style=\"color: navy\">(</span>e.value<span style=\"color: navy\">)</span> <i>"reaction-certainty"</i><span style=\"color: navy\">;</span>\r\n src.manifestation<span style=\"color: navy\"><b> -> </b></span>tgt.manifestation <i>"reaction-manifestation"</i><span style=\"color: navy\">;</span>\r\n src.description<span style=\"color: navy\"><b> -> </b></span>tgt.description <i>"reaction-description"</i><span style=\"color: navy\">;</span>\r\n src.onset<span style=\"color: navy\"><b> -> </b></span>tgt.onset <i>"reaction-onset"</i><span style=\"color: navy\">;</span>\r\n src.severity<span style=\"color: navy\"><b> -> </b></span>tgt.severity <i>"reaction-severity"</i><span style=\"color: navy\">;</span>\r\n src.exposureRoute<span style=\"color: navy\"><b> -> </b></span>tgt.exposureRoute <i>"reaction-exposureRoute"</i><span style=\"color: navy\">;</span>\r\n src.note<span style=\"color: navy\"><b> -> </b></span>tgt.note <i>"reaction-note"</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/AllergyIntolerance3to2",
"version" : "0.1.0",
"name" : "AllergyIntolerance3to2",
"title" : "AllergyIntolerance 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" : "AllergyIntoleranceTransformsR3toR2",
"jurisdiction" : [
{
"coding" : [
{
"system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
"code" : "001"
}
]
}
],
"structure" : [
{
"url" : "http://hl7.org/fhir/3.0/AllergyIntolerance",
"mode" : "source",
"alias" : "AllergyIntolerance"
},
{
"url" : "http://hl7.org/fhir/1.0/AllergyIntolerance",
"mode" : "target",
"alias" : "AllergyIntoleranceR2"
}
],
"import" : [
"http://hl7.org/fhir/StructureMap/*3to2"
],
"group" : [
{
"name" : "AllergyIntolerance",
"extends" : "DomainResource",
"typeMode" : "type-and-types",
"input" : [
{
"name" : "src",
"type" : "AllergyIntolerance",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "AllergyIntoleranceR2",
"mode" : "target"
}
],
"rule" : [
{
"name" : "AllergyIntolerance-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" : "AllergyIntolerance-onset",
"source" : [
{
"context" : "src",
"element" : "onset",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "onset",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "AllergyIntolerance-recordedDate",
"source" : [
{
"context" : "src",
"element" : "assertedDate",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "recordedDate",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "AllergyIntolerance-recorder",
"source" : [
{
"context" : "src",
"element" : "recorder",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "recorder",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "AllergyIntolerance-patient",
"source" : [
{
"context" : "src",
"element" : "patient",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "patient",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "AllergyIntolerance-reporter",
"source" : [
{
"context" : "src",
"element" : "asserter",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "reporter",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "AllergyIntolerance-substance",
"source" : [
{
"context" : "src",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "substance",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "AllergyIntolerance-status-active",
"source" : [
{
"context" : "src",
"condition" : "(src.clinicalStatus = 'active') and src.verificationStatus.empty()"
}
],
"target" : [
{
"context" : "tgt",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "active"
}
]
}
]
},
{
"name" : "AllergyIntolerance-status-unconfirmed",
"source" : [
{
"context" : "src",
"condition" : "(src.clinicalStatus = 'active') and (src.verificationStatus = 'confirmed')"
}
],
"target" : [
{
"context" : "tgt",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "confirmed"
}
]
}
]
},
{
"name" : "AllergyIntolerance-status-confirmed",
"source" : [
{
"context" : "src",
"condition" : "(src.clinicalStatus = 'active') and (src.verificationStatus = 'unconfirmed')"
}
],
"target" : [
{
"context" : "tgt",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "unconfirmed"
}
]
}
]
},
{
"name" : "AllergyIntolerance-status-inactive",
"source" : [
{
"context" : "src",
"condition" : "src.clinicalStatus = 'inactive'"
}
],
"target" : [
{
"context" : "tgt",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "inactive"
}
]
}
]
},
{
"name" : "AllergyIntolerance-status-resolved",
"source" : [
{
"context" : "src",
"condition" : "src.clinicalStatus = 'resolved'"
}
],
"target" : [
{
"context" : "tgt",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "resolved"
}
]
}
]
},
{
"name" : "AllergyIntolerance-status-refuted",
"source" : [
{
"context" : "src",
"condition" : "src.verificationStatus = 'refuted'"
}
],
"target" : [
{
"context" : "tgt",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "refuted"
}
]
}
]
},
{
"name" : "AllergyIntolerance-status-entered-in-error",
"source" : [
{
"context" : "src",
"condition" : "src.verificationStatus = 'entered-in-error'"
}
],
"target" : [
{
"context" : "tgt",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "entered-in-error"
}
]
}
]
},
{
"name" : "AllergyIntolerance-criticality",
"source" : [
{
"context" : "src",
"element" : "criticality",
"variable" : "v"
}
],
"target" : [
{
"context" : "tgt",
"element" : "criticality",
"transform" : "translate",
"parameter" : [
{
"valueId" : "v"
},
{
"valueString" : "http://hl7.org/fhir/ConceptMap/AllergyIntolerance.criticality-R3toR2"
},
{
"valueString" : "code"
}
]
}
]
},
{
"name" : "AllergyIntolerance-type",
"source" : [
{
"context" : "src",
"element" : "type",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "AllergyIntolerance-category",
"source" : [
{
"context" : "src",
"element" : "category",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "category",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "AllergyIntolerance-lastOccurrence",
"source" : [
{
"context" : "src",
"element" : "lastOccurrence",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "lastOccurence",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "AllergyIntolerance-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" : "AllergyIntolerance-reaction",
"source" : [
{
"context" : "src",
"element" : "reaction",
"variable" : "vs0"
}
],
"target" : [
{
"context" : "tgt",
"element" : "reaction",
"variable" : "vt0"
}
],
"dependent" : [
{
"name" : "algReaction",
"parameter" : [
{
"valueId" : "vs0"
},
{
"valueId" : "vt0"
}
]
}
]
}
]
},
{
"name" : "algReaction",
"extends" : "BackboneElement",
"input" : [
{
"name" : "src",
"mode" : "source"
},
{
"name" : "tgt",
"mode" : "target"
}
],
"rule" : [
{
"name" : "reaction-substance",
"source" : [
{
"context" : "src",
"element" : "substance",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "substance",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "reaction-certainty",
"source" : [
{
"context" : "src",
"element" : "extension",
"variable" : "e",
"condition" : "e.url = 'http://hl7.org/fhir/AllergyIntolerance-r2-certainty'"
}
],
"target" : [
{
"context" : "tgt",
"element" : "certainty",
"transform" : "evaluate",
"parameter" : [
{
"valueString" : "e.value"
}
]
}
]
},
{
"name" : "reaction-manifestation",
"source" : [
{
"context" : "src",
"element" : "manifestation",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "manifestation",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "reaction-description",
"source" : [
{
"context" : "src",
"element" : "description",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "description",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "reaction-onset",
"source" : [
{
"context" : "src",
"element" : "onset",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "onset",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "reaction-severity",
"source" : [
{
"context" : "src",
"element" : "severity",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "severity",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "reaction-exposureRoute",
"source" : [
{
"context" : "src",
"element" : "exposureRoute",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "exposureRoute",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "reaction-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"
}
]
}
]
}
]
}
]
}