AllergyIntolerance STU3 CareConnect to R4 UKCore
TODO: Project must be set to a specific FHIR version, therefore there will be issues rendering on or the other profile. Currently set to R4, other rendering issues with the CareConnect resource on top of this issue even when set to STU3 Current both profile tabs have R4 AllergyIntolerance.
TODO: There is an issue with how these StructureMaps need to be loaded to process them with the validator_cli. The cannonical url must match (and file) must match what is used for the base transform. This will be covered in the tooling guideance, so it might be ok at a project level to change the URL of the profile transform to the base one, so both can be displayed.
This page provides:
- A view of the CareConnect AlleryIntolerance profile (TODO see above)
- A view of the UKCore AlleryIntolerance profile
- A StructureMap that will transform a CareConnect AllergyIntolerance resource to a UKCore AllergyIntolerance resource
- The FML that can be used to generate the CareConnect to UKCore StructureMap for AllergyIntolerance
- The StructureMap provided for base transforms from STU3 to R4 for AllergyIntolerance
- The FML that can be used to generate the base STU3 to R4 StructureMap for AllergyIntolerance
- Resource examples
- An example STU3 CareConnect AllergyIntolerance input resource
- The corresponding R4 UKCore AllergyIntolerance output resource
aother speling mistak
The resource cannot be rendered.
The resource cannot be rendered.
| StructureMap |
| id : 1 |
| meta |
| versionId : 3 |
| lastUpdated : 2022-07-14T16:38:12.092+00:00 |
| text |
| status : generated |
| url : http://hl7.org/fhir/StructureMap/CareConnectUKCoreAllergyIntolerance3to4 |
| name : Conversions for STU3 CareConnect and R4 UKCore AllergyIntolerance |
| structure |
| url : http://hl7.org/fhir/3.0/StructureDefinition/AllergyIntolerance |
| mode : source |
| alias : AllergyIntoleranceR3 |
| structure |
| url : http://hl7.org/fhir/4.0/StructureDefinition/AllergyIntolerance |
| mode : target |
| alias : AllergyIntolerance |
| import : http://hl7.org/fhir/StructureMap/*3to4 |
| group |
| name : AllergyIntolerance |
| extends : DomainResource |
| typeMode : type-and-types |
| input |
| name : src |
| type : AllergyIntoleranceR3 |
| mode : source |
| input |
| name : tgt |
| type : AllergyIntolerance |
| mode : target |
| rule |
| name : extension |
| source |
| context : src |
| element : extension |
| variable : ext |
| condition : $this.url = 'https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-AllergyIntoleranceEnd-1' |
| target |
| context : tgt |
| contextType : variable |
| element : extension |
| variable : tgtext |
| transform : create |
| parameter |
| value : Extension |
| target |
| context : tgtext |
| contextType : variable |
| element : url |
| transform : copy |
| parameter |
| value : https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AllergyIntoleranceEnd |
| rule |
| name : extension |
| source |
| context : ext |
| element : extension |
| variable : vs |
| target |
| contextType : variable |
| variable : vt |
| transform : copy |
| parameter |
| value : tgtext |
| target |
| context : vt |
| contextType : variable |
| element : extension |
| transform : copy |
| parameter |
| value : vs |
| rule |
| name : extension |
| source |
| context : src |
| element : extension |
| variable : ext |
| condition : $this.url = 'http://hl7.org/fhir/StructureDefinition/encounter-associatedEncounter' |
| target |
| context : tgt |
| contextType : variable |
| element : encounter |
| variable : vt |
| rule |
| name : value-Reference |
| source |
| context : ext |
| type : Reference |
| element : value |
| variable : vs |
| target |
| contextType : variable |
| variable : vt1 |
| transform : copy |
| parameter |
| value : vt |
| target |
| context : tgt |
| contextType : variable |
| element : encounter |
| transform : copy |
| parameter |
| value : vs |
| rule |
| name : extension |
| source |
| context : src |
| element : extension |
| variable : ext |
| condition : $this.url = 'https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-Evidence-1' |
| target |
| context : tgt |
| contextType : variable |
| element : extension |
| variable : tgtext |
| transform : create |
| parameter |
| value : Extension |
| target |
| context : tgtext |
| contextType : variable |
| element : url |
| transform : copy |
| parameter |
| value : https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-Evidence |
| rule |
| name : value-Reference |
| source |
| context : ext |
| type : Reference |
| element : value |
| variable : vs |
| target |
| context : tgtext |
| contextType : variable |
| element : value |
| variable : vt |
| transform : create |
| parameter |
| value : Reference |
| target |
| context : tgtext |
| contextType : variable |
| element : value |
| transform : copy |
| parameter |
| value : vs |
| rule |
| name : identifier |
| source |
| context : src |
| element : identifier |
| variable : vvv |
| target |
| context : tgt |
| contextType : variable |
| element : identifier |
| variable : vvv |
| transform : create |
| rule |
| name : clinicalStatus |
| source |
| context : src |
| element : clinicalStatus |
| variable : vs |
| target |
| context : tgt |
| contextType : variable |
| element : clinicalStatus |
| variable : vt |
| target |
| context : vt |
| contextType : variable |
| element : coding |
| variable : c |
| target |
| context : c |
| contextType : variable |
| element : system |
| transform : copy |
| parameter |
| value : http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical |
| target |
| context : c |
| contextType : variable |
| element : code |
| transform : copy |
| parameter |
| value : vs |
| rule |
| name : verificationStatus |
| source |
| context : src |
| element : verificationStatus |
| variable : vs |
| target |
| context : tgt |
| contextType : variable |
| element : verificationStatus |
| variable : vt |
| target |
| context : vt |
| contextType : variable |
| element : coding |
| variable : c |
| target |
| context : c |
| contextType : variable |
| element : system |
| transform : copy |
| parameter |
| value : http://terminology.hl7.org/CodeSystem/allergyintolerance-verification |
| target |
| context : c |
| contextType : variable |
| element : code |
| transform : copy |
| parameter |
| value : vs |
| rule |
| name : type |
| source |
| context : src |
| element : type |
| variable : vvv |
| target |
| context : tgt |
| contextType : variable |
| element : type |
| variable : vvv |
| transform : create |
| rule |
| name : category |
| source |
| context : src |
| element : category |
| variable : vvv |
| target |
| context : tgt |
| contextType : variable |
| element : category |
| variable : vvv |
| transform : create |
| rule |
| name : criticality |
| source |
| context : src |
| element : criticality |
| variable : vvv |
| target |
| context : tgt |
| contextType : variable |
| element : criticality |
| variable : vvv |
| transform : create |
| rule |
| name : code-CodeableConcept |
| source |
| context : src |
| type : CodeableConcept |
| element : code |
| variable : vs |
| target |
| context : tgt |
| contextType : variable |
| element : code |
| variable : vt |
| transform : create |
| parameter |
| value : CodeableConcept |
| dependent |
| name : CodeableConceptAllergyIntolerance |
| variable : vs |
| variable : vt |
| rule |
| name : patient |
| source |
| context : src |
| element : patient |
| variable : vvv |
| target |
| context : tgt |
| contextType : variable |
| element : patient |
| variable : vvv |
| transform : create |
| rule |
| name : onset-dateTime |
| source |
| context : src |
| type : dateTime |
| element : onset |
| variable : vs |
| target |
| context : tgt |
| contextType : variable |
| element : onset |
| variable : vt |
| transform : create |
| parameter |
| value : dateTime |
| dependent |
| name : dateTime |
| variable : vs |
| variable : vt |
| rule |
| name : onset-Age |
| source |
| context : src |
| type : Age |
| element : onset |
| variable : vs |
| target |
| context : tgt |
| contextType : variable |
| element : onset |
| variable : vt |
| transform : create |
| parameter |
| value : Age |
| dependent |
| name : Age |
| variable : vs |
| variable : vt |
| rule |
| name : onset-Period |
| source |
| context : src |
| type : Period |
| element : onset |
| variable : vs |
| target |
| context : tgt |
| contextType : variable |
| element : onset |
| variable : vt |
| transform : create |
| parameter |
| value : Period |
| dependent |
| name : Period |
| variable : vs |
| variable : vt |
| rule |
| name : onset-Range |
| source |
| context : src |
| type : Range |
| element : onset |
| variable : vs |
| target |
| context : tgt |
| contextType : variable |
| element : onset |
| variable : vt |
| transform : create |
| parameter |
| value : Range |
| dependent |
| name : Range |
| variable : vs |
| variable : vt |
| rule |
| name : onset-string |
| source |
| context : src |
| type : string |
| element : onset |
| variable : vs |
| target |
| context : tgt |
| contextType : variable |
| element : onset |
| variable : vt |
| transform : create |
| parameter |
| value : string |
| dependent |
| name : string |
| variable : vs |
| variable : vt |
| rule |
| name : recordedDate |
| source |
| context : src |
| element : assertedDate |
| variable : vvv |
| target |
| context : tgt |
| contextType : variable |
| element : recordedDate |
| variable : vvv |
| transform : create |
| rule |
| name : recorder |
| source |
| context : src |
| element : recorder |
| variable : vvv |
| target |
| context : tgt |
| contextType : variable |
| element : recorder |
| variable : vvv |
| transform : create |
| rule |
| name : asserter |
| source |
| context : src |
| element : asserter |
| variable : vvv |
| target |
| context : tgt |
| contextType : variable |
| element : asserter |
| variable : vvv |
| transform : create |
| rule |
| name : lastOccurrence |
| source |
| context : src |
| element : lastOccurrence |
| variable : vvv |
| target |
| context : tgt |
| contextType : variable |
| element : lastOccurrence |
| variable : vvv |
| transform : create |
| rule |
| name : note |
| source |
| context : src |
| element : note |
| variable : vvv |
| target |
| context : tgt |
| contextType : variable |
| element : note |
| variable : vvv |
| transform : create |
| rule |
| name : reaction |
| source |
| context : src |
| element : reaction |
| variable : vs0 |
| target |
| context : tgt |
| contextType : variable |
| element : reaction |
| variable : vt0 |
| rule |
| name : substance-CodeableConcept |
| source |
| context : vs0 |
| type : CodeableConcept |
| element : substance |
| variable : vs1 |
| target |
| context : vt0 |
| contextType : variable |
| element : substance |
| variable : vt1 |
| transform : create |
| parameter |
| value : CodeableConcept |
| dependent |
| name : CodeableConceptAllergyIntolerance |
| variable : vs1 |
| variable : vt1 |
| rule |
| name : manifestation-CodeableConcept |
| source |
| context : vs0 |
| type : CodeableConcept |
| element : manifestation |
| variable : vs1 |
| target |
| context : vt0 |
| contextType : variable |
| element : manifestation |
| variable : vt1 |
| transform : create |
| parameter |
| value : CodeableConcept |
| dependent |
| name : CodeableConceptAllergyIntolerance |
| variable : vs1 |
| variable : vt1 |
| rule |
| name : description |
| source |
| context : vs0 |
| element : description |
| variable : vvv |
| target |
| context : vt0 |
| contextType : variable |
| element : description |
| variable : vvv |
| transform : create |
| rule |
| name : onset |
| source |
| context : vs0 |
| element : onset |
| variable : vvv |
| target |
| context : vt0 |
| contextType : variable |
| element : onset |
| variable : vvv |
| transform : create |
| rule |
| name : severity |
| source |
| context : vs0 |
| element : severity |
| variable : vvv |
| target |
| context : vt0 |
| contextType : variable |
| element : severity |
| variable : vvv |
| transform : create |
| rule |
| name : exposureRoute-CodeableConcept |
| source |
| context : vs0 |
| type : CodeableConcept |
| element : exposureRoute |
| variable : vs1 |
| target |
| context : vt0 |
| contextType : variable |
| element : exposureRoute |
| variable : vt1 |
| transform : create |
| parameter |
| value : CodeableConcept |
| dependent |
| name : CodeableConceptAllergyIntolerance |
| variable : vs1 |
| variable : vt1 |
| rule |
| name : note |
| source |
| context : vs0 |
| element : note |
| variable : vvv |
| target |
| context : vt0 |
| contextType : variable |
| element : note |
| variable : vvv |
| transform : create |
| group |
| name : CodeableConceptAllergyIntolerance |
| typeMode : none |
| input |
| name : src |
| type : CodeableConcept |
| mode : source |
| input |
| name : tgt |
| type : CodeableConcept |
| mode : target |
| rule |
| name : coding |
| source |
| context : src |
| element : coding |
| variable : vs |
| target |
| context : tgt |
| contextType : variable |
| element : coding |
| variable : vt |
| transform : create |
| parameter |
| value : Coding |
| dependent |
| name : SctCoding |
| variable : vs |
| variable : vt |
| rule |
| name : text |
| source |
| context : src |
| element : text |
| variable : text |
| target |
| context : tgt |
| contextType : variable |
| element : text |
| transform : copy |
| parameter |
| value : text |
| group |
| name : SctCoding |
| typeMode : none |
| input |
| name : src |
| type : Coding |
| mode : source |
| input |
| name : tgt |
| type : Coding |
| mode : target |
| rule |
| name : system |
| source |
| context : src |
| element : system |
| variable : system |
| target |
| context : tgt |
| contextType : variable |
| element : system |
| transform : copy |
| parameter |
| value : system |
| rule |
| name : version |
| source |
| context : src |
| element : version |
| variable : version |
| target |
| context : tgt |
| contextType : variable |
| element : version |
| transform : copy |
| parameter |
| value : version |
| rule |
| name : code |
| source |
| context : src |
| element : code |
| variable : code |
| target |
| context : tgt |
| contextType : variable |
| element : code |
| transform : copy |
| parameter |
| value : code |
| rule |
| name : display |
| source |
| context : src |
| element : display |
| variable : display |
| target |
| context : tgt |
| contextType : variable |
| element : display |
| transform : copy |
| parameter |
| value : display |
| rule |
| name : userSelected |
| source |
| context : src |
| element : userSelected |
| variable : userSelected |
| target |
| context : tgt |
| contextType : variable |
| element : userSelected |
| transform : copy |
| parameter |
| value : userSelected |
| rule |
| name : extension |
| source |
| context : src |
| element : extension |
| variable : vs |
| condition : ($this.url = 'https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-coding-sctdescid') or ($this.url = 'https://fhir.nhs.uk/STU3/StructureDefinition/Extension-coding-sctdescid') |
| target |
| context : tgt |
| contextType : variable |
| element : extension |
| variable : vt |
| transform : create |
| parameter |
| value : Extension |
| target |
| context : vt |
| contextType : variable |
| element : url |
| transform : copy |
| parameter |
| value : https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-CodingSCTDescId |
| rule |
| name : extension |
| source |
| context : vs |
| element : extension |
| variable : vsx |
| condition : $this.url = 'descriptionId' |
| target |
| context : vt |
| contextType : variable |
| element : extension |
| variable : vtx |
| transform : create |
| parameter |
| value : Extension |
| target |
| context : vtx |
| contextType : variable |
| element : url |
| transform : copy |
| parameter |
| value : descriptionId |
| rule |
| name : value-id |
| source |
| context : vsx |
| type : id |
| element : value |
| variable : vsv |
| target |
| context : vtx |
| contextType : variable |
| element : value |
| variable : vtv |
| transform : create |
| parameter |
| value : Identifier |
| target |
| context : vtv |
| contextType : variable |
| element : system |
| transform : copy |
| parameter |
| value : http://snomed.info/sct |
| target |
| context : vtv |
| contextType : variable |
| element : value |
| transform : copy |
| parameter |
| value : vsv |
| rule |
| name : extension |
| source |
| context : vs |
| element : extension |
| variable : vsx |
| condition : $this.url = 'descriptionDisplay' |
| target |
| context : vt |
| contextType : variable |
| element : extension |
| variable : vtx |
| transform : create |
| parameter |
| value : Extension |
| target |
| context : vt |
| contextType : variable |
| element : extension |
| transform : copy |
| parameter |
| value : vsx |
map "http://hl7.org/fhir/StructureMap/AllergyIntolerance3to4" = "Conversions for STU3 CareConnect and R4 UKCore AllergyIntolerance" uses "http://hl7.org/fhir/3.0/StructureDefinition/AllergyIntolerance" alias AllergyIntoleranceR3 as source uses "http://hl7.org/fhir/4.0/StructureDefinition/AllergyIntolerance" alias AllergyIntolerance as target imports "http://hl7.org/fhir/StructureMap/*3to4" group AllergyIntolerance(source src : AllergyIntoleranceR3, target tgt : AllergyIntolerance) extends DomainResource <<type+>> { src.extension as ext where $this.url='https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-AllergyIntoleranceEnd-1' -> tgt.extension = create('Extension') as tgtext, tgtext.url = 'https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AllergyIntoleranceEnd' then { ext.extension as vs -> tgtext as vt, vt.extension = vs; }; src.extension as ext where $this.url='http://hl7.org/fhir/StructureDefinition/encounter-associatedEncounter' -> tgt.encounter as vt then { ext.value: Reference as vs -> vt as vt1, tgt.encounter = vs; }; src.extension as ext where $this.url='https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-Evidence-1' -> tgt.extension = create('Extension') as tgtext, tgtext.url = 'https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-Evidence' then { ext.value: Reference as vs -> tgtext.value = create('Reference') as vt, tgtext.value = vs; }; src.identifier -> tgt.identifier; src.clinicalStatus as vs -> tgt.clinicalStatus as vt, vt.coding as c, c.system = 'http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical', c.code = vs; src.verificationStatus as vs -> tgt.verificationStatus as vt, vt.coding as c, c.system = 'http://terminology.hl7.org/CodeSystem/allergyintolerance-verification', c.code = vs; src.type -> tgt.type; src.category -> tgt.category; src.criticality -> tgt.criticality; src.code : CodeableConcept as vs -> tgt.code = create('CodeableConcept') as vt then CodeableConceptAllergyIntolerance(vs, vt); src.patient -> tgt.patient; src.onset : dateTime as vs -> tgt.onset = create('dateTime') as vt then dateTime(vs, vt); src.onset : Age as vs -> tgt.onset = create('Age') as vt then Age(vs, vt); src.onset : Period as vs -> tgt.onset = create('Period') as vt then Period(vs, vt); src.onset : Range as vs -> tgt.onset = create('Range') as vt then Range(vs, vt); src.onset : string as vs -> tgt.onset = create('string') as vt then string(vs, vt); src.assertedDate -> tgt.recordedDate "recordedDate"; src.recorder -> tgt.recorder; src.asserter -> tgt.asserter; src.lastOccurrence -> tgt.lastOccurrence; src.note -> tgt.note; src.reaction as vs0 -> tgt.reaction as vt0 then { vs0.substance : CodeableConcept as vs1 -> vt0.substance = create('CodeableConcept') as vt1 then CodeableConceptAllergyIntolerance(vs1, vt1); vs0.manifestation : CodeableConcept as vs1 -> vt0.manifestation = create('CodeableConcept') as vt1 then CodeableConceptAllergyIntolerance(vs1, vt1); vs0.description -> vt0.description; vs0.onset -> vt0.onset; vs0.severity -> vt0.severity; vs0.exposureRoute : CodeableConcept as vs1 -> vt0.exposureRoute = create('CodeableConcept') as vt1 then CodeableConceptAllergyIntolerance(vs1, vt1); vs0.note -> vt0.note; }; } group CodeableConceptAllergyIntolerance(source src : CodeableConcept, target tgt : CodeableConcept) { src.coding as vs -> tgt.coding = create('Coding') as vt then SctCoding(vs, vt); src.text as text -> tgt.text = text; } group SctCoding(source src : Coding, target tgt : Coding) { src.system as system -> tgt.system = system; src.version as version -> tgt.version = version; src.code as code -> tgt.code = code; src.display as display -> tgt.display = display; src.userSelected as userSelected -> tgt.userSelected = userSelected; src.extension as vs where $this.url='https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-coding-sctdescid' or $this.url='https://fhir.nhs.uk/STU3/StructureDefinition/Extension-coding-sctdescid' -> tgt.extension = create('Extension') as vt, vt.url = 'https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-CodingSCTDescId' then { vs.extension as vsx where $this.url='descriptionId' -> vt.extension = create('Extension') as vtx, vtx.url = 'descriptionId' then { vsx.value: id as vsv -> vtx.value = create('Identifier') as vtv, vtv.system='http://snomed.info/sct', vtv.value = vsv; }; vs.extension as vsx where $this.url='descriptionDisplay' -> vt.extension = create('Extension') as vtx, vt.extension = vsx; }; }
| StructureMap |
| id : 1 |
| meta |
| versionId : 2 |
| lastUpdated : 2022-07-14T16:07:53.219+00:00 |
| text |
| status : generated |
| url : http://hl7.org/fhir/StructureMap/AllergyIntolerance3to4 |
| name : R3 to R4 Conversions for AllergyIntolerance |
| structure |
| url : http://hl7.org/fhir/3.0/StructureDefinition/AllergyIntolerance |
| mode : source |
| alias : AllergyIntoleranceR3 |
| structure |
| url : http://hl7.org/fhir/4.0/StructureDefinition/AllergyIntolerance |
| mode : target |
| alias : AllergyIntolerance |
| import : http://hl7.org/fhir/StructureMap/*3to4 |
| group |
| name : AllergyIntolerance |
| extends : DomainResource |
| typeMode : type-and-types |
| input |
| name : src |
| type : AllergyIntoleranceR3 |
| mode : source |
| input |
| name : tgt |
| type : AllergyIntolerance |
| mode : target |
| rule |
| name : identifier |
| source |
| context : src |
| element : identifier |
| variable : vvv |
| target |
| context : tgt |
| contextType : variable |
| element : identifier |
| variable : vvv |
| transform : create |
| rule |
| name : clinicalStatus |
| source |
| context : src |
| element : clinicalStatus |
| variable : vs |
| target |
| context : tgt |
| contextType : variable |
| element : clinicalStatus |
| variable : vt |
| target |
| context : vt |
| contextType : variable |
| element : coding |
| variable : c |
| target |
| context : c |
| contextType : variable |
| element : system |
| transform : copy |
| parameter |
| value : http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical |
| target |
| context : c |
| contextType : variable |
| element : code |
| transform : copy |
| parameter |
| value : vs |
| rule |
| name : verificationStatus |
| source |
| context : src |
| element : verificationStatus |
| variable : vs |
| target |
| context : tgt |
| contextType : variable |
| element : verificationStatus |
| variable : vt |
| target |
| context : vt |
| contextType : variable |
| element : coding |
| variable : c |
| target |
| context : c |
| contextType : variable |
| element : system |
| transform : copy |
| parameter |
| value : http://terminology.hl7.org/CodeSystem/allergyintolerance-verification |
| target |
| context : c |
| contextType : variable |
| element : code |
| transform : copy |
| parameter |
| value : vs |
| rule |
| name : type |
| source |
| context : src |
| element : type |
| variable : vvv |
| target |
| context : tgt |
| contextType : variable |
| element : type |
| variable : vvv |
| transform : create |
| rule |
| name : category |
| source |
| context : src |
| element : category |
| variable : vvv |
| target |
| context : tgt |
| contextType : variable |
| element : category |
| variable : vvv |
| transform : create |
| rule |
| name : criticality |
| source |
| context : src |
| element : criticality |
| variable : vvv |
| target |
| context : tgt |
| contextType : variable |
| element : criticality |
| variable : vvv |
| transform : create |
| rule |
| name : code |
| source |
| context : src |
| element : code |
| variable : vvv |
| target |
| context : tgt |
| contextType : variable |
| element : code |
| variable : vvv |
| transform : create |
| rule |
| name : patient |
| source |
| context : src |
| element : patient |
| variable : vvv |
| target |
| context : tgt |
| contextType : variable |
| element : patient |
| variable : vvv |
| transform : create |
| rule |
| name : onset-dateTime |
| source |
| context : src |
| type : dateTime |
| element : onset |
| variable : vs |
| target |
| context : tgt |
| contextType : variable |
| element : onset |
| variable : vt |
| transform : create |
| parameter |
| value : dateTime |
| dependent |
| name : dateTime |
| variable : vs |
| variable : vt |
| rule |
| name : onset-Age |
| source |
| context : src |
| type : Age |
| element : onset |
| variable : vs |
| target |
| context : tgt |
| contextType : variable |
| element : onset |
| variable : vt |
| transform : create |
| parameter |
| value : Age |
| dependent |
| name : Age |
| variable : vs |
| variable : vt |
| rule |
| name : onset-Period |
| source |
| context : src |
| type : Period |
| element : onset |
| variable : vs |
| target |
| context : tgt |
| contextType : variable |
| element : onset |
| variable : vt |
| transform : create |
| parameter |
| value : Period |
| dependent |
| name : Period |
| variable : vs |
| variable : vt |
| rule |
| name : onset-Range |
| source |
| context : src |
| type : Range |
| element : onset |
| variable : vs |
| target |
| context : tgt |
| contextType : variable |
| element : onset |
| variable : vt |
| transform : create |
| parameter |
| value : Range |
| dependent |
| name : Range |
| variable : vs |
| variable : vt |
| rule |
| name : onset-string |
| source |
| context : src |
| type : string |
| element : onset |
| variable : vs |
| target |
| context : tgt |
| contextType : variable |
| element : onset |
| variable : vt |
| transform : create |
| parameter |
| value : string |
| dependent |
| name : string |
| variable : vs |
| variable : vt |
| rule |
| name : recordedDate |
| source |
| context : src |
| element : assertedDate |
| variable : vvv |
| target |
| context : tgt |
| contextType : variable |
| element : recordedDate |
| variable : vvv |
| transform : create |
| rule |
| name : recorder |
| source |
| context : src |
| element : recorder |
| variable : vvv |
| target |
| context : tgt |
| contextType : variable |
| element : recorder |
| variable : vvv |
| transform : create |
| rule |
| name : asserter |
| source |
| context : src |
| element : asserter |
| variable : vvv |
| target |
| context : tgt |
| contextType : variable |
| element : asserter |
| variable : vvv |
| transform : create |
| rule |
| name : lastOccurrence |
| source |
| context : src |
| element : lastOccurrence |
| variable : vvv |
| target |
| context : tgt |
| contextType : variable |
| element : lastOccurrence |
| variable : vvv |
| transform : create |
| rule |
| name : note |
| source |
| context : src |
| element : note |
| variable : vvv |
| target |
| context : tgt |
| contextType : variable |
| element : note |
| variable : vvv |
| transform : create |
| rule |
| name : reaction |
| source |
| context : src |
| element : reaction |
| variable : vs0 |
| target |
| context : tgt |
| contextType : variable |
| element : reaction |
| variable : vt0 |
| rule |
| name : substance |
| source |
| context : vs0 |
| element : substance |
| variable : vvv |
| target |
| context : vt0 |
| contextType : variable |
| element : substance |
| variable : vvv |
| transform : create |
| rule |
| name : manifestation |
| source |
| context : vs0 |
| element : manifestation |
| variable : vvv |
| target |
| context : vt0 |
| contextType : variable |
| element : manifestation |
| variable : vvv |
| transform : create |
| rule |
| name : description |
| source |
| context : vs0 |
| element : description |
| variable : vvv |
| target |
| context : vt0 |
| contextType : variable |
| element : description |
| variable : vvv |
| transform : create |
| rule |
| name : onset |
| source |
| context : vs0 |
| element : onset |
| variable : vvv |
| target |
| context : vt0 |
| contextType : variable |
| element : onset |
| variable : vvv |
| transform : create |
| rule |
| name : severity |
| source |
| context : vs0 |
| element : severity |
| variable : vvv |
| target |
| context : vt0 |
| contextType : variable |
| element : severity |
| variable : vvv |
| transform : create |
| rule |
| name : exposureRoute |
| source |
| context : vs0 |
| element : exposureRoute |
| variable : vvv |
| target |
| context : vt0 |
| contextType : variable |
| element : exposureRoute |
| variable : vvv |
| transform : create |
| rule |
| name : note |
| source |
| context : vs0 |
| element : note |
| variable : vvv |
| target |
| context : vt0 |
| contextType : variable |
| element : note |
| variable : vvv |
| transform : create |
map "http://hl7.org/fhir/StructureMap/AllergyIntolerance3to4" = "R3 to R4 Conversions for AllergyIntolerance" uses "http://hl7.org/fhir/3.0/StructureDefinition/AllergyIntolerance" alias AllergyIntoleranceR3 as source uses "http://hl7.org/fhir/StructureDefinition/AllergyIntolerance" alias AllergyIntolerance as target imports "http://hl7.org/fhir/StructureMap/*3to4" group AllergyIntolerance(source src : AllergyIntoleranceR3, target tgt : AllergyIntolerance) extends DomainResource <<type+>> { src.identifier -> tgt.identifier; src.clinicalStatus as vs -> tgt.clinicalStatus as vt, vt.coding as c, c.system = 'http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical', c.code = vs; src.verificationStatus as vs -> tgt.verificationStatus as vt, vt.coding as c, c.system = 'http://terminology.hl7.org/CodeSystem/allergyintolerance-verification', c.code = vs; src.type -> tgt.type; src.category -> tgt.category; src.criticality -> tgt.criticality; src.code -> tgt.code; src.patient -> tgt.patient; src.onset : dateTime as vs -> tgt.onset = create('dateTime') as vt then dateTime(vs, vt); src.onset : Age as vs -> tgt.onset = create('Age') as vt then Age(vs, vt); src.onset : Period as vs -> tgt.onset = create('Period') as vt then Period(vs, vt); src.onset : Range as vs -> tgt.onset = create('Range') as vt then Range(vs, vt); src.onset : string as vs -> tgt.onset = create('string') as vt then string(vs, vt); src.assertedDate -> tgt.recordedDate "recordedDate"; src.recorder -> tgt.recorder; src.asserter -> tgt.asserter; src.lastOccurrence -> tgt.lastOccurrence; src.note -> tgt.note; src.reaction as vs0 -> tgt.reaction as vt0 then { vs0.substance -> vt0.substance; vs0.manifestation -> vt0.manifestation; vs0.description -> vt0.description; vs0.onset -> vt0.onset; vs0.severity -> vt0.severity; vs0.exposureRoute -> vt0.exposureRoute; vs0.note -> vt0.note; }; }
Input Example
| AllergyIntolerance.assertedDate[0] | 2014-10-09T14:58:00+11:00 |
| AllergyIntolerance.text[0].status[0] | generated |
| AllergyIntolerance.text[0].div[0] | <div xmlns="http://www.w3.org/1999/xhtml"><p><b>Some text to transform</b></p></div> |
| AllergyIntolerance.extension[0].url[0] | http://hl7.org/fhir/StructureDefinition/encounter-associatedEncounter |
| AllergyIntolerance.extension[0].value[0].reference[0] | Encounter/Base-STU3--Encounter--00001 |
| AllergyIntolerance.extension[1].extension[0].url[0] | endDate |
| AllergyIntolerance.extension[1].extension[0].value[0] | 2022-01-15 |
| AllergyIntolerance.extension[1].extension[1].url[0] | reasonEnded |
| AllergyIntolerance.extension[1].extension[1].value[0] | Allergy resolved by prescribed medication |
| AllergyIntolerance.extension[1].url[0] | https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-AllergyIntoleranceEnd-1 |
| AllergyIntolerance.extension[2].url[0] | https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-Evidence-1 |
| AllergyIntolerance.extension[2].value[0].reference[0] | DiagnosticReport/Base-STU3--DiagnosticReport--00001 |
| AllergyIntolerance.identifier[0].system[0] | http://acme.com/ids/patients/risks |
| AllergyIntolerance.identifier[0].value[0] | 49476534 |
| AllergyIntolerance.identifier[0].assigner[0].reference[0] | Organization/NHSD-STU3--CareConnect-Organisation-1--00001 |
| AllergyIntolerance.clinicalStatus[0].value[0] | active |
| AllergyIntolerance.verificationStatus[0].value[0] | confirmed |
| AllergyIntolerance.type[0] | allergy |
| AllergyIntolerance.category[0] | medication |
| AllergyIntolerance.criticality[0] | high |
| AllergyIntolerance.code[0].coding[0].extension[0].extension[0].url[0] | descriptionId |
| AllergyIntolerance.code[0].coding[0].extension[0].extension[0].value[0] | 614975019 |
| AllergyIntolerance.code[0].coding[0].extension[0].extension[1].url[0] | descriptionDisplay |
| AllergyIntolerance.code[0].coding[0].extension[0].extension[1].value[0] | Cashew nuts (substance) |
| AllergyIntolerance.code[0].coding[0].extension[0].url[0] | https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-coding-sctdescid |
| AllergyIntolerance.code[0].coding[0].system[0] | http://snomed.info/sct |
| AllergyIntolerance.code[0].coding[0].code[0] | 227493005 |
| AllergyIntolerance.code[0].coding[0].display[0] | Cashew nut |
| AllergyIntolerance.code[0].text[0] | Cashew nuts |
| AllergyIntolerance.patient[0].reference[0] | Patient/example |
| AllergyIntolerance.onset[0] | 2004 |
| AllergyIntolerance.recorder[0].reference[0] | Practitioner/example |
| AllergyIntolerance.asserter[0].reference[0] | Patient/example |
| AllergyIntolerance.lastOccurrence[0] | 2012-06 |
| AllergyIntolerance.note[0].text[0] | The criticality is high becasue of the observed anaphylactic reaction when challenged with cashew extract. |
| AllergyIntolerance.reaction[0].substance[0].coding[0].system[0] | http://www.nlm.nih.gov/research/umls/rxnorm |
| AllergyIntolerance.reaction[0].substance[0].coding[0].code[0] | 1160593 |
| AllergyIntolerance.reaction[0].substance[0].coding[0].display[0] | cashew nut allergenic extract Injectable Product |
| AllergyIntolerance.reaction[0].substance[0].coding[1].extension[0].extension[0].url[0] | descriptionId |
| AllergyIntolerance.reaction[0].substance[0].coding[1].extension[0].extension[0].value[0] | 1462228014 |
| AllergyIntolerance.reaction[0].substance[0].coding[1].extension[0].extension[1].url[0] | descriptionDisplay |
| AllergyIntolerance.reaction[0].substance[0].coding[1].extension[0].extension[1].value[0] | Anacardium occidentale specific immunoglobulin E (substance) |
| AllergyIntolerance.reaction[0].substance[0].coding[1].extension[0].url[0] | https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-coding-sctdescid |
| AllergyIntolerance.reaction[0].substance[0].coding[1].system[0] | http://snomed.info/sct |
| AllergyIntolerance.reaction[0].substance[0].coding[1].code[0] | 388050007 |
| AllergyIntolerance.reaction[0].substance[0].coding[1].display[0] | Cashew nut specific IgE |
| AllergyIntolerance.reaction[0].manifestation[0].coding[0].extension[0].extension[0].url[0] | descriptionId |
| AllergyIntolerance.reaction[0].manifestation[0].coding[0].extension[0].extension[0].value[0] | 776058010 |
| AllergyIntolerance.reaction[0].manifestation[0].coding[0].extension[0].extension[1].url[0] | descriptionDisplay |
| AllergyIntolerance.reaction[0].manifestation[0].coding[0].extension[0].extension[1].value[0] | Anaphylaxis (disorder) |
| AllergyIntolerance.reaction[0].manifestation[0].coding[0].extension[0].url[0] | https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-coding-sctdescid |
| AllergyIntolerance.reaction[0].manifestation[0].coding[0].system[0] | http://snomed.info/sct |
| AllergyIntolerance.reaction[0].manifestation[0].coding[0].code[0] | 39579001 |
| AllergyIntolerance.reaction[0].manifestation[0].coding[0].display[0] | Anaphylactic reaction |
| AllergyIntolerance.reaction[0].description[0] | Challenge Protocol. Severe reaction to subcutaneous cashew extract. Epinephrine administered |
| AllergyIntolerance.reaction[0].onset[0] | 2012-06-12 |
| AllergyIntolerance.reaction[0].severity[0] | severe |
| AllergyIntolerance.reaction[0].exposureRoute[0].coding[0].extension[0].extension[0].url[0] | descriptionId |
| AllergyIntolerance.reaction[0].exposureRoute[0].coding[0].extension[0].extension[0].value[0] | 765702016 |
| AllergyIntolerance.reaction[0].exposureRoute[0].coding[0].extension[0].extension[1].url[0] | descriptionDisplay |
| AllergyIntolerance.reaction[0].exposureRoute[0].coding[0].extension[0].extension[1].value[0] | Subcutaneous route (qualifier value) |
| AllergyIntolerance.reaction[0].exposureRoute[0].coding[0].extension[0].url[0] | https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-coding-sctdescid |
| AllergyIntolerance.reaction[0].exposureRoute[0].coding[0].system[0] | http://snomed.info/sct |
| AllergyIntolerance.reaction[0].exposureRoute[0].coding[0].code[0] | 34206005 |
| AllergyIntolerance.reaction[0].exposureRoute[0].coding[0].display[0] | Subcutaneous route |
| AllergyIntolerance.reaction[0].note[0].author[0].reference[0] | Practitioner/NHSD-STU3--CareConnect-Practitioner-1--00001 |
| AllergyIntolerance.reaction[0].note[0].text[0] | The patient reports that the onset of urticaria was within 15 minutes of eating cashews. |
TODO (STU3 resource won't render as project is R4)
Output Example
| AllergyIntolerance.text[0].status[0] | generated |
| AllergyIntolerance.text[0].div[0] | <div xmlns="http://www.w3.org/1999/xhtml"><p><b>Some text to transform</b></p></div> |
| AllergyIntolerance.extension[0].url[0] | http://hl7.org/fhir/StructureDefinition/encounter-associatedEncounter |
| AllergyIntolerance.extension[0].value[0].reference[0] | Encounter/Base-STU3--Encounter--00001 |
| AllergyIntolerance.extension[1].extension[0].url[0] | endDate |
| AllergyIntolerance.extension[1].extension[0].value[0] | 2022-01-15 |
| AllergyIntolerance.extension[1].extension[1].url[0] | reasonEnded |
| AllergyIntolerance.extension[1].extension[1].value[0] | Allergy resolved by prescribed medication |
| AllergyIntolerance.extension[1].url[0] | https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-AllergyIntoleranceEnd-1 |
| AllergyIntolerance.extension[2].url[0] | https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-Evidence-1 |
| AllergyIntolerance.extension[2].value[0].reference[0] | DiagnosticReport/Base-STU3--DiagnosticReport--00001 |
| AllergyIntolerance.extension[3].extension[0].url[0] | endDate |
| AllergyIntolerance.extension[3].extension[0].value[0] | 2022-01-15 |
| AllergyIntolerance.extension[3].extension[1].url[0] | reasonEnded |
| AllergyIntolerance.extension[3].extension[1].value[0] | Allergy resolved by prescribed medication |
| AllergyIntolerance.extension[3].url[0] | https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AllergyIntoleranceEnd |
| AllergyIntolerance.extension[4].url[0] | https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-Evidence |
| AllergyIntolerance.extension[4].value[0].reference[0] | DiagnosticReport/Base-STU3--DiagnosticReport--00001 |
| AllergyIntolerance.identifier[0].system[0] | http://acme.com/ids/patients/risks |
| AllergyIntolerance.identifier[0].value[0] | 49476534 |
| AllergyIntolerance.identifier[0].assigner[0].reference[0] | Organization/NHSD-STU3--CareConnect-Organisation-1--00001 |
| AllergyIntolerance.clinicalStatus[0].coding[0].system[0] | http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical |
| AllergyIntolerance.clinicalStatus[0].coding[0].code[0] | active |
| AllergyIntolerance.verificationStatus[0].coding[0].system[0] | http://terminology.hl7.org/CodeSystem/allergyintolerance-verification |
| AllergyIntolerance.verificationStatus[0].coding[0].code[0] | confirmed |
| AllergyIntolerance.type[0] | allergy |
| AllergyIntolerance.category[0] | medication |
| AllergyIntolerance.criticality[0] | high |
| AllergyIntolerance.code[0].coding[0].extension[0].extension[0].url[0] | descriptionId |
| AllergyIntolerance.code[0].coding[0].extension[0].extension[0].value[0].system[0] | http://snomed.info/sct |
| AllergyIntolerance.code[0].coding[0].extension[0].extension[0].value[0].value[0] | 614975019 |
| AllergyIntolerance.code[0].coding[0].extension[0].extension[1].url[0] | descriptionDisplay |
| AllergyIntolerance.code[0].coding[0].extension[0].extension[1].value[0] | Cashew nuts (substance) |
| AllergyIntolerance.code[0].coding[0].extension[0].url[0] | https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-CodingSCTDescId |
| AllergyIntolerance.code[0].coding[0].system[0] | http://snomed.info/sct |
| AllergyIntolerance.code[0].coding[0].code[0] | 227493005 |
| AllergyIntolerance.code[0].coding[0].display[0] | Cashew nut |
| AllergyIntolerance.code[0].text[0] | Cashew nuts |
| AllergyIntolerance.patient[0].reference[0] | Patient/example |
| AllergyIntolerance.encounter[0].reference[0] | Encounter/Base-STU3--Encounter--00001 |
| AllergyIntolerance.onset[0] | 2004 |
| AllergyIntolerance.recordedDate[0] | 2014-10-09T14:58:00+11:00 |
| AllergyIntolerance.recorder[0].reference[0] | Practitioner/example |
| AllergyIntolerance.asserter[0].reference[0] | Patient/example |
| AllergyIntolerance.lastOccurrence[0] | 2012-06 |
| AllergyIntolerance.note[0].text[0] | The criticality is high becasue of the observed anaphylactic reaction when challenged with cashew extract. |
| AllergyIntolerance.reaction[0].substance[0].coding[0].system[0] | http://www.nlm.nih.gov/research/umls/rxnorm |
| AllergyIntolerance.reaction[0].substance[0].coding[0].code[0] | 1160593 |
| AllergyIntolerance.reaction[0].substance[0].coding[0].display[0] | cashew nut allergenic extract Injectable Product |
| AllergyIntolerance.reaction[0].substance[0].coding[1].extension[0].extension[0].url[0] | descriptionId |
| AllergyIntolerance.reaction[0].substance[0].coding[1].extension[0].extension[0].value[0].system[0] | http://snomed.info/sct |
| AllergyIntolerance.reaction[0].substance[0].coding[1].extension[0].extension[0].value[0].value[0] | 1462228014 |
| AllergyIntolerance.reaction[0].substance[0].coding[1].extension[0].extension[1].url[0] | descriptionDisplay |
| AllergyIntolerance.reaction[0].substance[0].coding[1].extension[0].extension[1].value[0] | Anacardium occidentale specific immunoglobulin E (substance) |
| AllergyIntolerance.reaction[0].substance[0].coding[1].extension[0].url[0] | https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-CodingSCTDescId |
| AllergyIntolerance.reaction[0].substance[0].coding[1].system[0] | http://snomed.info/sct |
| AllergyIntolerance.reaction[0].substance[0].coding[1].code[0] | 388050007 |
| AllergyIntolerance.reaction[0].substance[0].coding[1].display[0] | Cashew nut specific IgE |
| AllergyIntolerance.reaction[0].manifestation[0].coding[0].extension[0].extension[0].url[0] | descriptionId |
| AllergyIntolerance.reaction[0].manifestation[0].coding[0].extension[0].extension[0].value[0].system[0] | http://snomed.info/sct |
| AllergyIntolerance.reaction[0].manifestation[0].coding[0].extension[0].extension[0].value[0].value[0] | 776058010 |
| AllergyIntolerance.reaction[0].manifestation[0].coding[0].extension[0].extension[1].url[0] | descriptionDisplay |
| AllergyIntolerance.reaction[0].manifestation[0].coding[0].extension[0].extension[1].value[0] | Anaphylaxis (disorder) |
| AllergyIntolerance.reaction[0].manifestation[0].coding[0].extension[0].url[0] | https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-CodingSCTDescId |
| AllergyIntolerance.reaction[0].manifestation[0].coding[0].system[0] | http://snomed.info/sct |
| AllergyIntolerance.reaction[0].manifestation[0].coding[0].code[0] | 39579001 |
| AllergyIntolerance.reaction[0].manifestation[0].coding[0].display[0] | Anaphylactic reaction |
| AllergyIntolerance.reaction[0].description[0] | Challenge Protocol. Severe reaction to subcutaneous cashew extract. Epinephrine administered |
| AllergyIntolerance.reaction[0].onset[0] | 2012-06-12 |
| AllergyIntolerance.reaction[0].severity[0] | severe |
| AllergyIntolerance.reaction[0].exposureRoute[0].coding[0].extension[0].extension[0].url[0] | descriptionId |
| AllergyIntolerance.reaction[0].exposureRoute[0].coding[0].extension[0].extension[0].value[0].system[0] | http://snomed.info/sct |
| AllergyIntolerance.reaction[0].exposureRoute[0].coding[0].extension[0].extension[0].value[0].value[0] | 765702016 |
| AllergyIntolerance.reaction[0].exposureRoute[0].coding[0].extension[0].extension[1].url[0] | descriptionDisplay |
| AllergyIntolerance.reaction[0].exposureRoute[0].coding[0].extension[0].extension[1].value[0] | Subcutaneous route (qualifier value) |
| AllergyIntolerance.reaction[0].exposureRoute[0].coding[0].extension[0].url[0] | https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-CodingSCTDescId |
| AllergyIntolerance.reaction[0].exposureRoute[0].coding[0].system[0] | http://snomed.info/sct |
| AllergyIntolerance.reaction[0].exposureRoute[0].coding[0].code[0] | 34206005 |
| AllergyIntolerance.reaction[0].exposureRoute[0].coding[0].display[0] | Subcutaneous route |
| AllergyIntolerance.reaction[0].note[0].author[0].reference[0] | Practitioner/NHSD-STU3--CareConnect-Practitioner-1--00001 |
| AllergyIntolerance.reaction[0].note[0].text[0] | The patient reports that the onset of urticaria was within 15 minutes of eating cashews. |