Current Build
Patient Care Work GroupMaturity Level: N/AStandards Status: InformativeSecurity Category: Patient Compartments: Encounter, Patient, Practitioner, RelatedPerson

R3 : R4 Conversion maps for Condition.

Functional status for this map: 12 tests of which 12 fail to execute. (see documentation)

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

uses "http://hl7.org/fhir/3.0/StructureDefinition/Condition" alias ConditionR3 as source
uses "http://hl7.org/fhir/StructureDefinition/Condition" alias Condition as target

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

group Condition(source src : ConditionR3, target tgt : Condition) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.clinicalStatus -> tgt.clinicalStatus;
  src.verificationStatus -> tgt.verificationStatus;
  src.category -> tgt.category;
  src.severity -> tgt.severity;
  src.code -> tgt.code;
  src.bodySite -> tgt.bodySite;
  src.subject -> tgt.subject;
  src.context -> tgt.context;
  src.onset : dateTime as vs -> tgt.onset = create("dateTime") as vt then dateTime(vs, vt);
  src.onset : Age as vs -> tgt.onset = create("Age") as vt then Age(vs, vt);
  src.onset : Period as vs -> tgt.onset = create("Period") as vt then Period(vs, vt);
  src.onset : Range as vs -> tgt.onset = create("Range") as vt then Range(vs, vt);
  src.onset : string as vs -> tgt.onset = create("string") as vt then string(vs, vt);
  src.abatement : dateTime as vs -> tgt.abatement = create("dateTime") as vt then dateTime(vs, vt);
  src.abatement : Age as vs -> tgt.abatement = create("Age") as vt then Age(vs, vt);
  src.abatement : Period as vs -> tgt.abatement = create("Period") as vt then Period(vs, vt);
  src.abatement : Range as vs -> tgt.abatement = create("Range") as vt then Range(vs, vt);
  src.abatement : string as vs -> tgt.abatement = create("string") as vt then string(vs, vt);
  src.assertedDate -> tgt.recordedDate "recordedDate";
  src.asserter -> tgt.asserter;
  src.stage as vs0 -> tgt.stage as vt0 then {
    vs0.summary -> vt0.summary;
    vs0.assessment -> vt0.assessment;
  };
  src.evidence as vs0 -> tgt.evidence as vt0 then {
    vs0.code -> vt0.code;
    vs0.detail -> vt0.detail;
  };
  src.note -> tgt.note;
}


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

uses "http://hl7.org/fhir/StructureDefinition/Condition" alias Condition as source
uses "http://hl7.org/fhir/3.0/StructureDefinition/Condition" alias ConditionR3 as target

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

group Condition(source src : ConditionR3, target tgt : Condition) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.clinicalStatus -> tgt.clinicalStatus;
  src.verificationStatus -> tgt.verificationStatus;
  src.category -> tgt.category;
  src.severity -> tgt.severity;
  src.code -> tgt.code;
  src.bodySite -> tgt.bodySite;
  src.subject -> tgt.subject;
  src.context -> tgt.context;
  src.onset -> tgt.onset;
  src.abatement -> tgt.abatement;
  src.recordedDate -> tgt.recordedDate;
  src.recorder -> tgt.recorder;
  src.asserter -> tgt.asserter;
  src.stage as s -> tgt.stage as t then ConditionStage(s, t);
  src.evidence as s -> tgt.evidence as t then ConditionEvidence(s, t);
  src.note -> tgt.note;
}

group ConditionStage(source src : ConditionR3, target tgt : Condition) extends BackboneElement <<type+>> {
  src.summary -> tgt.summary;
  src.assessment -> tgt.assessment;
  src.type -> tgt.type;
}

group ConditionEvidence(source src : ConditionR3, target tgt : Condition) extends BackboneElement <<type+>> {
  src.code -> tgt.code;
  src.detail -> tgt.detail;
}


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