Release 5 Preview #1

This page is part of the FHIR Specification (v4.2.0: R5 Preview #1). 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, Patient

R3 : R4 Conversion maps for DeviceUseStatement.

Functional status for this map: 1 test that all execute ok. All tests pass round-trip testing and all r3 resources are valid. (see documentation)

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

uses "http://hl7.org/fhir/3.0/StructureDefinition/DeviceUseStatement" alias DeviceUseStatementR3 as source
uses "http://hl7.org/fhir/StructureDefinition/DeviceUseStatement" alias DeviceUseStatement as target

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

group DeviceUseStatement(source src : DeviceUseStatementR3, target tgt : DeviceUseStatement) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.status -> tgt.status;
  src.subject -> tgt.subject;
  src.whenUsed as v ->  tgt.extension as vt,  vt.url = 'http://hl7.org/fhir/3.0/StructureDefinition/extension-DeviceUseStatement.whenUsed',  vt.value = v;
  src.timing : Timing as vs -> tgt.timing = create('Timing') as vt then Timing(vs, vt);
  src.timing : Period as vs -> tgt.timing = create('Period') as vt then Period(vs, vt);
  src.timing : dateTime as vs -> tgt.timing = create('dateTime') as vt then dateTime(vs, vt);
  src.recordedOn -> tgt.recordedOn;
  src.source -> tgt.source;
  src.device -> tgt.device;
  src.indication -> tgt.reasonCode;
  src.bodySite -> tgt.bodySite;
  src.note -> tgt.note;
}


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

uses "http://hl7.org/fhir/StructureDefinition/DeviceUseStatement" alias DeviceUseStatement as source
uses "http://hl7.org/fhir/3.0/StructureDefinition/DeviceUseStatement" alias DeviceUseStatementR3 as target

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

group DeviceUseStatement(source src : DeviceUseStatement, target tgt : DeviceUseStatementR3) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.status -> tgt.status;
  src.subject -> tgt.subject;
  src.extension as e where url = 'http://hl7.org/fhir/3.0/StructureDefinition/extension-DeviceUseStatement.whenUsed' then {
    e.value -> tgt.whenUsed;
  };
  src.timing : Timing as vs -> tgt.timing = create('Timing') as vt then Timing(vs, vt);
  src.timing : Period as vs -> tgt.timing = create('Period') as vt then Period(vs, vt);
  src.timing : dateTime as vs -> tgt.timing = create('dateTime') as vt then dateTime(vs, vt);
  src.recordedOn -> tgt.recordedOn;
  src.source -> tgt.source;
  src.device -> tgt.device;
  src.reasonCode -> tgt.indication "indication";
  src.bodySite -> tgt.bodySite;
  src.note -> tgt.note;
}


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