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: Goal Transforms: R5 to R4B

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

GoalTransformsR5toR4B

/// url = 'http://hl7.org/fhir/StructureMap/Goal5to4B'
/// name = 'Goal5to4B'
/// title = 'Goal Transforms: R5 to R4B'
/// status = 'active'

uses "http://hl7.org/fhir/5.0/Goal" alias GoalR5 as source
uses "http://hl7.org/fhir/4.0/Goal" alias GoalR4B as target

imports "http://hl7.org/fhir/StructureMap/*5to4B"

group Goal(source src : GoalR5, target tgt : GoalR4B) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.lifecycleStatus as v -> tgt.lifecycleStatus = translate(v, 'http://hl7.org/fhir/ConceptMap/Goal.lifecycleStatus-R5toR4', 'code');
  src.achievementStatus -> tgt.achievementStatus;
  src.category -> tgt.category;
  src.priority -> tgt.priority;
  src.description -> tgt.description;
  src.subject -> tgt.subject;
  src.start : date -> tgt.start;
  src.start : CodeableConcept -> tgt.start;
  src.target as s -> tgt.target as t then GoalTarget(s, t);
  src.statusDate -> tgt.statusDate;
  src.statusReason -> tgt.statusReason;
  src.addresses -> tgt.addresses;
  src.note -> tgt.note;
  src.outcome -> tgt.outcomeCode;
  src.outcome -> tgt.outcomeReference;
}

group GoalTarget(source src, target tgt) extends BackboneElement {
  src.measure -> tgt.measure;
  src.detail : Quantity -> tgt.detail;
  src.detail : Range -> tgt.detail;
  src.detail : CodeableConcept -> tgt.detail;
  src.detail : string -> tgt.detail;
  src.detail : boolean -> tgt.detail;
  src.detail : integer -> tgt.detail;
  src.detail : Ratio -> tgt.detail;
  src.due : date -> tgt.due;
  src.due : Duration -> tgt.due;
}