Release 4

This page is part of the FHIR Specification (v4.0.1: R4 - Mixed Normative and STU) in it's permanent home (it will always be available at this URL). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R4B R4 R3

Orders and Observations Work GroupMaturity Level: N/AStandards Status: InformativeSecurity Category: Patient Compartments: Device, Encounter, Patient, Practitioner

R3 : R4 Conversion maps for Media.

Functional status for this map: 4 tests that all execute ok. All tests pass round-trip testing and 4 r3 resources are invalid (0 errors). (see documentation)

map "http://hl7.org/fhir/StructureMap/Media3to4" = "R3 to R4 Conversions for Media"

uses "http://hl7.org/fhir/3.0/StructureDefinition/Media" alias MediaR3 as source
uses "http://hl7.org/fhir/StructureDefinition/Media" alias Media as target

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

group Media(source src : MediaR3, target tgt : Media) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.basedOn -> tgt.basedOn;
  src.type as vs0 ->  tgt.type as vt0,  vt0.coding as c,  c.system = 'http://terminology.hl7.org/CodeSystem/media-type',  c.code = vs0;
  src.subtype -> tgt.modality;
  src.view -> tgt.view;
  src.subject -> tgt.subject;
  src.context -> tgt.encounter;
  src.occurrence : dateTime as vs -> tgt.created = create('dateTime') as vt then dateTime(vs, vt);
  src.occurrence : Period as vs -> tgt.created = create('Period') as vt then Period(vs, vt);
  src.operator -> tgt.operator;
  src.reasonCode -> tgt.reasonCode;
  src.bodySite -> tgt.bodySite;
  src.device -> tgt.device;
  src.height -> tgt.height;
  src.width -> tgt.width;
  src.frames -> tgt.frames;
  src.duration -> tgt.duration;
  src.content -> tgt.content;
  src.note -> tgt.note;
}


map "http://hl7.org/fhir/StructureMap/Media4to3" = "R4 to R3 Conversion for Media"

uses "http://hl7.org/fhir/StructureDefinition/Media" alias Media as source
uses "http://hl7.org/fhir/3.0/StructureDefinition/Media" alias MediaR3 as target

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

group Media(source src : MediaR3, target tgt : Media) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.basedOn -> tgt.basedOn;
  src.type as vs0 then {
    vs0.coding as c where system = 'http://terminology.hl7.org/CodeSystem/media-type' then {
      c.code -> tgt.type;
    };
  };
  src.modality -> tgt.subtype;
  src.view -> tgt.view;
  src.subject -> tgt.subject;
  src.encounter -> tgt.context;
  src.created : dateTime as vs -> tgt.occurrence = create('dateTime') as vt then dateTime(vs, vt);
  src.created : Period as vs -> tgt.occurrence = create('Period') as vt then Period(vs, vt);
  src.operator -> tgt.operator;
  src.reasonCode -> tgt.reasonCode;
  src.bodySite -> tgt.bodySite;
  src.device -> tgt.device;
  src.height -> tgt.height;
  src.width -> tgt.width;
  src.frames -> tgt.frames;
  src.duration -> tgt.duration;
  src.content -> tgt.content;
  src.note -> tgt.note;
}


<p>No validation errors - all conversions are clean</p>