FHIR Extensions Pack
5.1.0-ballot1 - Ballot for Release 5.1.0 International flag

This page is part of the FHIR Core Extensions Registry (v5.1.0-ballot: Releases Ballot 4) based on FHIR (HL7® FHIR® Standard) v5.0.0. The current version which supersedes this version is 1.0.0. For a full list of available versions, see the Directory of published versions

StructureMap: FML Conversion for Task: R4 to R5

Official URL: http://hl7.org/fhir/StructureMap/Task4to5 Version: 5.1.0-ballot1
Standards status: Trial-use Maturity Level: 1 Computable Name: Task4to5

FMLConversionforTaskR4toR5

/// url = 'http://hl7.org/fhir/StructureMap/Task4to5'
/// name = 'Task4to5'
/// title = 'FML Conversion for Task: R4 to R5'
/// status = 'active'

conceptmap "TaskPriority" {
  prefix s = "http://hl7.org/fhir/4.0/request-priority"
  prefix t = "http://hl7.org/fhir/request-priority"

  s:routine - t:routine
  s:urgent - t:urgent
  s:asap - t:asap
  s:stat - t:stat
}

conceptmap "TaskStatus" {
  prefix s = "http://hl7.org/fhir/4.0/task-status"
  prefix t = "http://hl7.org/fhir/task-status"

  s:draft - t:draft
  s:requested - t:requested
  s:received - t:received
  s:accepted - t:accepted
  s:rejected - t:rejected
  s:ready - t:ready
  s:cancelled - t:cancelled
  s:"in-progress" - t:"in-progress"
  s:"on-hold" - t:"on-hold"
  s:failed - t:failed
  s:completed - t:completed
  s:"entered-in-error" - t:"entered-in-error"
}

uses "http://hl7.org/fhir/4.0/StructureDefinition/Task" alias TaskR4 as source
uses "http://hl7.org/fhir/StructureDefinition/Task" alias TaskR5 as target

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

group Task(source src : TaskR4, target tgt : TaskR5) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.instantiatesCanonical -> tgt.instantiatesCanonical;
  src.instantiatesUri -> tgt.instantiatesUri;
  src.basedOn -> tgt.basedOn;
  src.groupIdentifier -> tgt.groupIdentifier;
  src.partOf -> tgt.partOf;
  src.status as v -> tgt.status = translate(v, '#TaskStatus', 'code');
  src.statusReason -> tgt.statusReason;
  src.businessStatus -> tgt.businessStatus;
  src.intent -> tgt.intent;
  src.priority as v -> tgt.priority = translate(v, '#TaskPriority', 'code');
  src.code -> tgt.code; // src.doNotPerform -> tgt.doNotPerform;
  src.description -> tgt.description;
  src.focus -> tgt.focus;
  src.for -> tgt.for;
  src.encounter -> tgt.encounter;
  src.executionPeriod -> tgt.executionPeriod; // src.requestedPeriod -> tgt.requestedPeriod;
  src.authoredOn -> tgt.authoredOn;
  src.lastModified -> tgt.lastModified;
  src.requester -> tgt.requester;
  src.owner -> tgt.owner; // src.requestedPerformer -> tgt.requestedPerformer;
  src.location -> tgt.location; // src.performer as s -> tgt.performer as t then TaskPerformer(s,t);
  src.reasonCode -> tgt.reason;
  src.insurance -> tgt.insurance;
  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 TaskPerformer(source src, target tgt) extends BackboneElement {
// src.function -> tgt.function;
// src.actor -> tgt.actor;
// }
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 : base64Binary -> tgt.value;
  src.value : boolean -> tgt.value;
  src.value : canonical -> tgt.value;
  src.value : code -> tgt.value;
  src.value : date -> tgt.value;
  src.value : dateTime -> tgt.value;
  src.value : decimal -> tgt.value;
  src.value : id -> tgt.value;
  src.value : instant -> tgt.value;
  src.value : integer -> tgt.value;
  src.value : markdown -> tgt.value; // src.value : integer64 -> tgt.value;
  src.value : oid -> tgt.value;
  src.value : positiveInt -> tgt.value;
  src.value : string -> tgt.value;
  src.value : time -> tgt.value;
  src.value : unsignedInt -> tgt.value;
  src.value : uri -> tgt.value;
  src.value : url -> tgt.value;
  src.value : uuid -> tgt.value;
  src.value : Address -> tgt.value;
  src.value : Age -> tgt.value;
  src.value : Annotation -> tgt.value;
  src.value : Attachment -> tgt.value;
  src.value : CodeableConcept -> tgt.value;
  src.value : Coding -> tgt.value; // src.value : CodeableReference -> tgt.value;
  src.value : ContactPoint -> tgt.value;
  src.value : Count -> tgt.value;
  src.value : Distance -> tgt.value;
  src.value : Duration -> tgt.value;
  src.value : HumanName -> tgt.value;
  src.value : Identifier -> tgt.value;
  src.value : Money -> tgt.value;
  src.value : Period -> tgt.value;
  src.value : Quantity -> tgt.value;
  src.value : Range -> tgt.value;
  src.value : Ratio -> tgt.value;
  src.value : Reference -> tgt.value; // src.value : RatioRange -> tgt.value;
  src.value : SampledData -> tgt.value;
  src.value : Signature -> tgt.value;
  src.value : Timing -> tgt.value;
  src.value : ContactDetail -> tgt.value;
  src.value : DataRequirement -> tgt.value;
  src.value : Expression -> tgt.value;
  src.value : ParameterDefinition -> tgt.value;
  src.value : RelatedArtifact -> tgt.value;
  src.value : TriggerDefinition -> tgt.value;
  src.value : UsageContext -> tgt.value;
  src.value : Dosage -> tgt.value; // src.value : Availability -> tgt.value;
  src.value : Meta -> tgt.value;
}

group TaskOutput(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.value : base64Binary -> tgt.value;
  src.value : boolean -> tgt.value;
  src.value : canonical -> tgt.value;
  src.value : code -> tgt.value;
  src.value : date -> tgt.value;
  src.value : dateTime -> tgt.value;
  src.value : decimal -> tgt.value;
  src.value : id -> tgt.value;
  src.value : instant -> tgt.value;
  src.value : integer -> tgt.value;
  src.value : markdown -> tgt.value; // src.value : integer64 -> tgt.value;
  src.value : oid -> tgt.value;
  src.value : positiveInt -> tgt.value;
  src.value : string -> tgt.value;
  src.value : time -> tgt.value;
  src.value : unsignedInt -> tgt.value;
  src.value : uri -> tgt.value;
  src.value : url -> tgt.value;
  src.value : uuid -> tgt.value;
  src.value : Address -> tgt.value;
  src.value : Age -> tgt.value;
  src.value : Annotation -> tgt.value;
  src.value : Attachment -> tgt.value;
  src.value : CodeableConcept -> tgt.value;
  src.value : Coding -> tgt.value; // src.value : CodeableReference -> tgt.value;
  src.value : ContactPoint -> tgt.value;
  src.value : Count -> tgt.value;
  src.value : Distance -> tgt.value;
  src.value : Duration -> tgt.value;
  src.value : HumanName -> tgt.value;
  src.value : Identifier -> tgt.value;
  src.value : Money -> tgt.value;
  src.value : Period -> tgt.value;
  src.value : Quantity -> tgt.value;
  src.value : Range -> tgt.value;
  src.value : Ratio -> tgt.value;
  src.value : Reference -> tgt.value; // src.value : RatioRange -> tgt.value;
  src.value : SampledData -> tgt.value;
  src.value : Signature -> tgt.value;
  src.value : Timing -> tgt.value;
  src.value : ContactDetail -> tgt.value;
  src.value : DataRequirement -> tgt.value;
  src.value : Expression -> tgt.value;
  src.value : ParameterDefinition -> tgt.value;
  src.value : RelatedArtifact -> tgt.value;
  src.value : TriggerDefinition -> tgt.value;
  src.value : UsageContext -> tgt.value;
  src.value : Dosage -> tgt.value; // src.value : Availability -> tgt.value;
  src.value : Meta -> tgt.value;
}