Release 5 Preview #3
Clinical Decision Support Work GroupMaturity Level: N/AStandards Status: InformativeSecurity Category: Patient Compartments: Not linked to any defined compartments

R3 : R4 Conversion maps for GuidanceResponse.

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/GuidanceResponse3to4" = "R3 to R4 Conversions for GuidanceResponse"

uses "http://hl7.org/fhir/3.0/StructureDefinition/GuidanceResponse" alias GuidanceResponseR3 as source
uses "http://hl7.org/fhir/StructureDefinition/GuidanceResponse" alias GuidanceResponse as target

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

group GuidanceResponse(source src : GuidanceResponseR3, target tgt : GuidanceResponse) extends DomainResource <<type+>> {
  src.requestId as v ->  tgt.requestIdentifier as ii,  ii.value = v;
  src.identifier -> tgt.identifier;
  src.module as vs -> tgt.module = create('canonical') as vt then Reference2Canonical(vs, vt);
  src.status -> tgt.status;
  src.subject -> tgt.subject;
  src.context -> tgt.encounter;
  src.occurrenceDateTime -> tgt.occurrenceDateTime;
  src.performer -> tgt.performer;
  src.reason : CodeableConcept as vs -> tgt.reasonCode as vt then CodeableConcept(vs, vt);
  src.reason : Reference as vs -> tgt.reasonReference as vt then Reference(vs, vt);
  src.note -> tgt.note;
  src.evaluationMessage -> tgt.evaluationMessage;
  src.outputParameters -> tgt.outputParameters;
  src.result -> tgt.result;
  src.dataRequirement -> tgt.dataRequirement;
}


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

uses "http://hl7.org/fhir/StructureDefinition/GuidanceResponse" alias GuidanceResponse as source
uses "http://hl7.org/fhir/3.0/StructureDefinition/GuidanceResponse" alias GuidanceResponseR3 as target

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

group GuidanceResponse(source src : GuidanceResponse, target tgt : GuidanceResponseR3) extends DomainResource <<type+>> {
  src.requestIdentifier as ii then {
    ii.value -> tgt.requestId;
  };
  src.identifier -> tgt.identifier;
  src.module : canonical as vs -> tgt.module as vt then canonical2Reference(vs, vt);
  src.status -> tgt.status;
  src.subject -> tgt.subject;
  src.encounter -> tgt.context;
  src.occurrenceDateTime -> tgt.occurrenceDateTime;
  src.performer -> tgt.performer;
  src.reasonCode as vs -> tgt.reason = create('CodeableConcept') as vt then CodeableConcept(vs, vt);
  src.reasonReference as vs -> tgt.reason = create('Reference') as vt then Reference(vs, vt);
  src.note -> tgt.note;
  src.evaluationMessage -> tgt.evaluationMessage;
  src.outputParameters -> tgt.outputParameters;
  src.result -> tgt.result;
  src.dataRequirement -> tgt.dataRequirement;
}


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