R4 Draft for Comment

This page is part of the FHIR Specification (v3.2.0: R4 Ballot 1). 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 R3

Patient Care Work GroupMaturity Level: N/ABallot Status: Informative Compartments: Patient

R2 : R3 Conversion maps for Goal.

Functional status for this map: 2 tests that all execute ok. All tests pass round-trip testing and 2 r3 resources are invalid (2 errors). (see documentation)

map "http://hl7.org/fhir/StructureMap/Goal2to3" = "R2 to R3 Conversions for Goal"

uses "http://hl7.org/fhir/DSTU2/StructureDefinition/Goal" alias GoalR2 as source
uses "http://hl7.org/fhir/StructureDefinition/Goal" alias Goal as target

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

group for type+types  Goal extends DomainResource
  input src : GoalR2 as source
  input tgt : Goal as target

  "Goal-identifier" : for src.identifier make tgt.identifier
  "Goal-subject" : for src.subject make tgt.subject
  "Goal-start" : for src.start make tgt.start 
  "Goal-target" : for src.target make tgt.target
  "Goal-category" : for src.category make tgt.category
  "Goal-description" : for src.description make tgt.description
  "Goal-status" : for src.status make tgt.status
  "Goal-statusDate" : for src.statusDate make tgt.statusDate
  "Goal-statusReason" : for src.statusReason make tgt.statusReason
  "Goal-author" : for src.author make tgt.expressedBy
  "Goal-priority" : for src.priority make tgt.priority
  "Goal-addresses" : for src.addresses make tgt.addresses
  "Goal-note" : for src.note make tgt.note
  "Goal-outcome" : for src.outcome as vs0 then goalOutcome(vs0, tgt)
endgroup

group goalOutcome extends BackboneElement
  input src as source
  input tgt as target

  "Goal.outcome-result" : for src.result : CodeableConcept 0..1 make tgt.outcomeCode
  "Goal.outcome-result" : for src.result : Reference 0..1 make tgt.outcomeReference
endgroup

map "http://hl7.org/fhir/StructureMap/Goal3to2" = "R3 to R2 Conversion for Goal"

uses "http://hl7.org/fhir/StructureDefinition/Goal" alias Goal as source
uses "http://hl7.org/fhir/DSTU2/StructureDefinition/Goal" alias GoalR2 as target

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

group for type+types  Goal extends DomainResource
  input src : Goal as source
  input tgt : GoalR2 as target

  "Goal-identifier" : for src.identifier make tgt.identifier
  "Goal-subject" : for src.subject make tgt.subject
  "Goal-start" : for src.start make tgt.start 
  "Goal-target" : for src.target make tgt.target
  "Goal-category" : for src.category make tgt.category
  "Goal-description" : for src.description make tgt.description
  "Goal-status" : for src.status make tgt.status
  "Goal-statusDate" : for src.statusDate make tgt.statusDate
  "Goal-statusReason" : for src.statusReason make tgt.statusReason
  "Goal-author" : for src.expressedBy make tgt.author
  "Goal-priority" : for src.priority make tgt.priority
  "Goal-addresses" : for src.addresses make tgt.addresses
  "Goal-note" : for src.note make tgt.note
  "Goal-outcome" : for src.outcomeCode as vs0 make tgt.outcome as vt0, vt0.result = vs0
  "Goal-outcome" : for src.outcomeReference as vs0 make tgt.outcome as vt0, vt0.result = vs0
endgroup


example
  • ERROR @ Goal.extension: The extension http://hl7.org/fhir/StructureDefinition/goal-target is unknown, and not allowed here (src = InstanceValidator)
goal-example
  • ERROR @ Goal.extension[1]: The extension http://hl7.org/fhir/StructureDefinition/goal-target is unknown, and not allowed here (src = InstanceValidator)