FHIR © HL7.org  |  Server Home  |  XIG Home  |  XIG Stats  |  Server Source  |  FHIR  

FHIR IG Statistics: StructureMap/AllergyIntolerance3to2

Packagehl7.fhir.uv.xver
Resource TypeStructureMap
IdAllergyIntolerance3to2
FHIR VersionR5
Sourcehttp://hl7.org/fhir/extensions/https://build.fhir.org/ig/HL7/fhir-cross-version/StructureMap-AllergyIntolerance3to2.html
URLhttp://hl7.org/fhir/StructureMap/AllergyIntolerance3to2
Version0.1.0
Statusactive
Date2024-02-22T03:16:50+00:00
NameAllergyIntolerance3to2
TitleAllergyIntolerance Transforms: R3 to R2
Realmuv
Authorityhl7
DescriptionAllergyIntoleranceTransformsR3toR2

Resources that use this resource

No resources found


Resources that this resource uses

No resources found


Narrative

Note: links and images are rebased to the (stated) source

/// url = 'http://hl7.org/fhir/StructureMap/AllergyIntolerance3to2'
/// name = 'AllergyIntolerance3to2'
/// title = 'AllergyIntolerance Transforms: R3 to R2'
/// status = 'active'

uses "http://hl7.org/fhir/3.0/AllergyIntolerance" alias AllergyIntolerance as source
uses "http://hl7.org/fhir/1.0/AllergyIntolerance" alias AllergyIntoleranceR2 as target

imports "http://hl7.org/fhir/StructureMap/*3to2"

group AllergyIntolerance(source src : AllergyIntolerance, target tgt : AllergyIntoleranceR2) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier "AllergyIntolerance-identifier";
  src.onset -> tgt.onset "AllergyIntolerance-onset";
  src.assertedDate -> tgt.recordedDate "AllergyIntolerance-recordedDate";
  src.recorder -> tgt.recorder "AllergyIntolerance-recorder";
  src.patient -> tgt.patient "AllergyIntolerance-patient";
  src.asserter -> tgt.reporter "AllergyIntolerance-reporter";
  src.code -> tgt.substance "AllergyIntolerance-substance";
  src where (src.clinicalStatus = 'active') and src.verificationStatus.empty() -> tgt.status = 'active' "AllergyIntolerance-status-active";
  src where (src.clinicalStatus = 'active') and (src.verificationStatus = 'confirmed') -> tgt.status = 'confirmed' "AllergyIntolerance-status-unconfirmed";
  src where (src.clinicalStatus = 'active') and (src.verificationStatus = 'unconfirmed') -> tgt.status = 'unconfirmed' "AllergyIntolerance-status-confirmed";
  src where src.clinicalStatus = 'inactive' -> tgt.status = 'inactive' "AllergyIntolerance-status-inactive";
  src where src.clinicalStatus = 'resolved' -> tgt.status = 'resolved' "AllergyIntolerance-status-resolved";
  src where src.verificationStatus = 'refuted' -> tgt.status = 'refuted' "AllergyIntolerance-status-refuted";
  src where src.verificationStatus = 'entered-in-error' -> tgt.status = 'entered-in-error' "AllergyIntolerance-status-entered-in-error";
  src.criticality as v -> tgt.criticality = translate(v, 'http://hl7.org/fhir/ConceptMap/AllergyIntolerance.criticality-R3toR2', 'code') "AllergyIntolerance-criticality";
  src.type -> tgt.type "AllergyIntolerance-type";
  src.category -> tgt.category "AllergyIntolerance-category";
  src.lastOccurrence -> tgt.lastOccurence "AllergyIntolerance-lastOccurrence";
  src.note -> tgt.note "AllergyIntolerance-note";
  src.reaction as vs0 -> tgt.reaction as vt0 then algReaction(vs0, vt0) "AllergyIntolerance-reaction";
}

group algReaction(source src, target tgt) extends BackboneElement {
  src.substance -> tgt.substance "reaction-substance";
  src.extension as e where e.url = 'http://hl7.org/fhir/AllergyIntolerance-r2-certainty' -> tgt.certainty = (e.value) "reaction-certainty";
  src.manifestation -> tgt.manifestation "reaction-manifestation";
  src.description -> tgt.description "reaction-description";
  src.onset -> tgt.onset "reaction-onset";
  src.severity -> tgt.severity "reaction-severity";
  src.exposureRoute -> tgt.exposureRoute "reaction-exposureRoute";
  src.note -> tgt.note "reaction-note";
}


Source

{
  "resourceType": "StructureMap",
  "id": "AllergyIntolerance3to2",
  "text": {
    "status": "generated",
    "div": "<!-- snip (see above) -->"
  },
  "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"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}