FHIR Release 3 (STU)

This page is part of the FHIR Specification (v3.0.2: STU 3). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions

Orders and Observations Work GroupMaturity Level: N/ABallot Status: InformativeCompartments: Device, Encounter, Patient, Practitioner, RelatedPerson

R2 : R3 Converson maps for ProcedureRequest.

Functional status for this map: 6 tests that all execute ok. 5 fail round-trip testing and 6 r3 resources are invalid (9 errors). (see documentation)

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

uses "http://hl7.org/fhir/DSTU2/StructureDefinition/ProcedureRequest" alias ProcedureRequestR2 as source
uses "http://hl7.org/fhir/StructureDefinition/ProcedureRequest" alias ProcedureRequest as target

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

group for type+types  ProcedureRequest extends DomainResource
  input src : ProcedureRequestR2 as source
  input tgt : ProcedureRequest as target

  "ProcedureRequest-identifier" : for src.identifier make tgt.identifier
  "ProcedureRequest-subject" : for src.subject make tgt.subject
  "ProcedureRequest-code" : for src.code make tgt.code
  "ProcedureRequest-bodySite" : for src.bodySite make tgt.bodySite
  "ProcedureRequest-reason1" : for src.reason as v where v.is(CodeableConcept) make tgt.reasonCode = v
  "ProcedureRequest-reason2" : for src.reason as v where v.is(Reference) make tgt.reasonReference = v
  "ProcedureRequest-scheduled" : for src.scheduled make tgt.occurrence
  "ProcedureRequest-encounter" : for src.encounter make tgt.context
  "ProcedureRequest-performer" : for src.performer make tgt.performer
  "ProcedureRequest-status" : for src.status make tgt.status
  "ProcedureRequest-notes" : for src.notes make tgt.note
  "ProcedureRequest-asNeeded" : for src.asNeeded make tgt.asNeeded
  "ProcedureRequest-orderedOn" : for src.orderedOn make tgt.authoredOn
  "ProcedureRequest-orderer" : for src.orderer as v make tgt.requester as d, d.agent = v
  "ProcedureRequest-priority" : for src.priority make tgt.priority


endgroup

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

uses "http://hl7.org/fhir/StructureDefinition/ProcedureRequest" alias ProcedureRequest as source
uses "http://hl7.org/fhir/DSTU2/StructureDefinition/ProcedureRequest" alias ProcedureRequestR2 as target

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

group for type+types  ProcedureRequest extends DomainResource
  input src : ProcedureRequest as source
  input tgt : ProcedureRequestR2 as target

  "ProcedureRequest-identifier" : for src.identifier make tgt.identifier
  "ProcedureRequest-subject" : for src.subject make tgt.subject
  "ProcedureRequest-code" : for src.code make tgt.code
  "ProcedureRequest-bodySite" : for src.bodySite make tgt.bodySite
  "ProcedureRequest-reason1" : for src.reasonCode make tgt.reason
  "ProcedureRequest-reason2" : for src.reasonReference make tgt.reason
  "ProcedureRequest-scheduled" : for src.occurrence make tgt.scheduled
  "ProcedureRequest-encounter" : for src.context make tgt.encounter
  "ProcedureRequest-performer" : for src.performer make tgt.performer
  "ProcedureRequest-status" : for src.status make tgt.status
  "ProcedureRequest-notes" : for src.note make tgt.notes
  "ProcedureRequest-asNeeded" : for src.asNeeded make tgt.asNeeded
  "ProcedureRequest-orderedOn" : for src.authoredOn make tgt.orderedOn
  "ProcedureRequest-orderer" : for src.requester as v then {
    "ProcedureRequest-orderer-inner" : for v.agent make tgt.orderer
  }
  "ProcedureRequest-priority" : for src.priority make tgt.priority

endgroup

example
  • ERROR @ ProcedureRequest: Profile http://hl7.org/fhir/StructureDefinition/ProcedureRequest, Element 'ProcedureRequest.status': minimum required = 1, but only found 0 (src = InstanceValidator)
  • ERROR @ ProcedureRequest: Profile http://hl7.org/fhir/StructureDefinition/ProcedureRequest, Element 'ProcedureRequest.intent': minimum required = 1, but only found 0 (src = InstanceValidator)
procedurerequest-example
  • ERROR @ ProcedureRequest: Profile http://hl7.org/fhir/StructureDefinition/ProcedureRequest, Element 'ProcedureRequest.intent': minimum required = 1, but only found 0 (src = InstanceValidator)
diagnosticorder-example
  • ERROR @ ProcedureRequest.extension[1]: The extension http://hl7.org/fhir/StructureDefinition/diagnosticorder-reason is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ ProcedureRequest.extension[2]: The extension http://hl7.org/fhir/StructureDefinition/diagnosticorder-reasonRejected is unknown, and not allowed here (src = InstanceValidator)
  • ERROR @ ProcedureRequest.extension[3]: The extension http://hl7.org/fhir/diagnosticorder-r2-marker is unknown, and not allowed here (src = InstanceValidator)
di
  • ERROR @ ProcedureRequest.extension: The extension http://hl7.org/fhir/diagnosticorder-r2-marker is unknown, and not allowed here (src = InstanceValidator)
ft4
  • ERROR @ ProcedureRequest.extension: The extension http://hl7.org/fhir/diagnosticorder-r2-marker is unknown, and not allowed here (src = InstanceValidator)
do-uslab-example1
  • ERROR @ ProcedureRequest.extension: The extension http://hl7.org/fhir/diagnosticorder-r2-marker is unknown, and not allowed here (src = InstanceValidator)