This page is part of the FHIR Specification (v4.3.0: R4B -  STU). 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: R5 R4B R4
. Page versions: R5 R4B R4
| Orders and Observations  Work Group | Maturity Level: N/A | Standards Status: Informative | Security Category: Not Classified | Compartments: Not linked to any defined compartments | 
R3 : R4 Conversion maps for Task.
Functional status for this map: 6 tests that all execute ok. 3 fail round-trip testing and 1 r3 resources are invalid (0 errors). (see documentation)
map "http://hl7.org/fhir/StructureMap/Task3to4" = "R3 to R4 Conversions for Task"
uses "http://hl7.org/fhir/3.0/StructureDefinition/Task" alias TaskR3 as source
uses "http://hl7.org/fhir/StructureDefinition/Task" alias Task as target
imports "http://hl7.org/fhir/StructureMap/*3to4"
group Task(source src : TaskR3, target tgt : Task) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.definition : uri as vs -> tgt.instantiatesUri = vs;
  src.definition : Reference as vs -> tgt.instantiatesCanonical = vs;
  src.basedOn -> tgt.basedOn;
  src.groupIdentifier -> tgt.groupIdentifier;
  src.partOf -> tgt.partOf;
  src.status -> tgt.status;
  src.statusReason -> tgt.statusReason;
  src.businessStatus -> tgt.businessStatus;
  src.intent -> tgt.intent;
  src.priority -> tgt.priority;
  src.code -> tgt.code;
  src.description -> tgt.description;
  src.focus -> tgt.focus;
  src.for -> tgt.for;
  src.context -> tgt.encounter;
  src.executionPeriod -> tgt.executionPeriod;
  src.authoredOn -> tgt.authoredOn;
  src.lastModified -> tgt.lastModified;
  src.requester as vs then {
    vs.agent -> tgt.requester;
  };
  src.performerType -> tgt.performerType;
  src.owner -> tgt.owner;
  src.location -> tgt.location;
  src.reason -> tgt.reasonCode;
  src.note -> tgt.note;
  src.relevantHistory -> tgt.relevantHistory;
  src.restriction as s -> tgt.restriction as t then TaskRestriction(s, t);
  src.input as s -> tgt.input as t then TaskInput(s, t);
  src.output as s -> tgt.output as t then TaskOutput(s, t);
}
group TaskRestriction(source src, target tgt) extends BackboneElement {
  src.repetitions -> tgt.repetitions;
  src.period -> tgt.period;
  src.recipient -> tgt.recipient;
}
group TaskInput(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.value -> tgt.value;
}
group TaskOutput(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.value -> tgt.value;
}
map "http://hl7.org/fhir/StructureMap/Task4to3" = "R4 to R3 Conversion for Task"
uses "http://hl7.org/fhir/StructureDefinition/Task" alias Task as source
uses "http://hl7.org/fhir/3.0/StructureDefinition/Task" alias TaskR3 as target
imports "http://hl7.org/fhir/StructureMap/*4to3"
group Task(source src : TaskR3, target tgt : Task) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.instantiatesUri -> tgt.definition;
  src.instantiatesCanonical -> tgt.definition;
  src.basedOn -> tgt.basedOn;
  src.groupIdentifier -> tgt.groupIdentifier;
  src.partOf -> tgt.partOf;
  src.status -> tgt.status;
  src.statusReason -> tgt.statusReason;
  src.businessStatus -> tgt.businessStatus;
  src.intent -> tgt.intent;
  src.priority -> tgt.priority;
  src.code -> tgt.code;
  src.description -> tgt.description;
  src.focus -> tgt.focus;
  src.for -> tgt.for;
  src.encounter -> tgt.context;
  src.executionPeriod -> tgt.executionPeriod;
  src.authoredOn -> tgt.authoredOn;
  src.lastModified -> tgt.lastModified;
  src.requester as vs ->  tgt.requester as vt,  vt.agent = vs;
  src.performerType -> tgt.performerType;
  src.owner -> tgt.owner;
  src.location -> tgt.location;
  src.reasonCode -> tgt.reason;
  src.note -> tgt.note;
  src.relevantHistory -> tgt.relevantHistory;
  src.restriction as s -> tgt.restriction as t then TaskRestriction(s, t);
  src.input as s -> tgt.input as t then TaskInput(s, t);
  src.output as s -> tgt.output as t then TaskOutput(s, t);
}
group TaskRestriction(source src, target tgt) extends BackboneElement {
  src.repetitions -> tgt.repetitions;
  src.period -> tgt.period;
  src.recipient -> tgt.recipient;
}
group TaskInput(source src, target tgt) extends BackboneElement {
  src.type -> tgt.typeendgroup;
  src.value -> tgt.value;
}
group TaskOutput(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.value -> tgt.value;
}