FHIR Cross-Version Mapping Pack
0.1.0 - Ballot for Release 5.1.0 International flag

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

StructureMap: AdverseEvent Transforms: R4B to R5

Official URL: http://hl7.org/fhir/StructureMap/AdverseEvent4Bto5 Version: 0.1.0
Standards status: Draft Maturity Level: 1 Computable Name: AdverseEvent4Bto5

AdverseEventTransformsR4BtoR5

/// url = 'http://hl7.org/fhir/StructureMap/AdverseEvent4Bto5'
/// name = 'AdverseEvent4Bto5'
/// title = 'AdverseEvent Transforms: R4B to R5'
/// status = 'active'

uses "http://hl7.org/fhir/4.3/AdverseEvent" alias AdverseEventR4B as source
uses "http://hl7.org/fhir/5.0/AdverseEvent" alias AdverseEventR5 as target

imports "http://hl7.org/fhir/StructureMap/*4Bto5"

group AdverseEvent(source src : AdverseEventR4B, target tgt : AdverseEventR5) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.actuality as v -> tgt.actuality = translate(v, 'http://hl7.org/fhir/ConceptMap/AdverseEventB.actuality-R4BtoR5', 'code');
  src.category -> tgt.category;
  src.event -> tgt.code;
  src.subject -> tgt.subject;
  src.encounter -> tgt.encounter;
  src.date : dateTime -> tgt.occurrence;
  src.detected -> tgt.detected;
  src.recordedDate -> tgt.recordedDate;
  src.resultingCondition -> tgt.resultingEffect;
  src.location -> tgt.location;
  src.seriousness -> tgt.seriousness;
  src.outcome -> tgt.outcome;
  src.recorder -> tgt.recorder;
  src.contributor as s -> tgt.participant as t then AdverseEventParticipant(s, t);
  src.study -> tgt.study;
  src.suspectEntity as s -> tgt.suspectEntity as t then AdverseEventSuspectEntity(s, t);
  src.subjectMedicalHistory as s -> tgt.contributingFactor as t then AdverseEventContributingFactor(s, t);
}

group AdverseEventParticipant(source src, target tgt) extends BackboneElement {
  src as v -> tgt.actor = v "reference";
}

group AdverseEventSuspectEntity(source src, target tgt) extends BackboneElement {
  src.instance : Reference -> tgt.instance;
  src.causality as s -> tgt.causality as t then AdverseEventSuspectEntityCausality(s, t);
}

group AdverseEventSuspectEntityCausality(source src, target tgt) extends BackboneElement {
  src.assessment -> tgt.assessmentMethod;
  src.productRelatedness -> tgt.entityRelatedness;
  src.author -> tgt.author;
}

group AdverseEventContributingFactor(source src, target tgt) extends BackboneElement {
  src as v -> tgt.item = v "reference";
}