FHIR Cross-Version Mapping Pack
0.1.0 - Ballot for Release 5.1.0 International flag

FHIR Cross-Version Mapping Pack, published by HL7 International / FHIR Infrastructure. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/fhir-cross-version/ and changes regularly. See the Directory of published versions

StructureMap: Task Transforms: R4 to R3

Official URL: http://hl7.org/fhir/StructureMap/Task4to3 Version: 0.1.0
Standards status: Draft Maturity Level: 1 Computable Name: Task4to3

TaskTransformsR4toR3

/// url = 'http://hl7.org/fhir/StructureMap/Task4to3'
/// name = 'Task4to3'
/// title = 'Task Transforms: R4 to R3'
/// status = 'active'

uses "http://hl7.org/fhir/4.0/Task" alias Task as source
uses "http://hl7.org/fhir/3.0/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;
}