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 . Page versions: R5 R4B R4 R3

Financial Management Work GroupMaturity Level: N/ABallot Status: InformativeCompartments: Encounter, Patient, Practitioner

R2 : R3 Converson maps for VisionPrescription.

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

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

uses "http://hl7.org/fhir/DSTU2/StructureDefinition/VisionPrescription" alias VisionPrescriptionR2 as source
uses "http://hl7.org/fhir/StructureDefinition/VisionPrescription" alias VisionPrescription as target

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

group for type+types  VisionPrescription extends DomainResource
  input src : VisionPrescriptionR2 as source
  input tgt : VisionPrescription as target

  "VisionPrescription-identifier" : for src.identifier make tgt.identifier
  "VisionPrescription-dateWritten" : for src.dateWritten make tgt.dateWritten
  "VisionPrescription-patient" : for src.patient make tgt.patient
  "VisionPrescription-prescriber" : for src.prescriber make tgt.prescriber
  "VisionPrescription-encounter" : for src.encounter make tgt.encounter
  "VisionPrescription-reason" : for src.reason make tgt.reason
  "VisionPrescription-dispense" : for src.dispense as vs0 make tgt.dispense as vt0 then vspDispense(vs0, vt0)
endgroup

group vspDispense extends BackboneElement
  input src as source
  input tgt as target
  
  "VisionPrescription.dispense-product" : for src.product as v make tgt.product as d, d.coding as v
  "VisionPrescription.dispense-eye" : for src.eye make tgt.eye
  "VisionPrescription.dispense-sphere" : for src.sphere make tgt.sphere
  "VisionPrescription.dispense-cylinder" : for src.cylinder make tgt.cylinder
  "VisionPrescription.dispense-axis" : for src.axis make tgt.axis
  "VisionPrescription.dispense-prism" : for src.prism make tgt.prism
  "VisionPrescription.dispense-base" : for src.base make tgt.base
  "VisionPrescription.dispense-add" : for src.add make tgt.add
  "VisionPrescription.dispense-power" : for src.power make tgt.power
  "VisionPrescription.dispense-backCurve" : for src.backCurve make tgt.backCurve
  "VisionPrescription.dispense-diameter" : for src.diameter make tgt.diameter
  "VisionPrescription.dispense-duration" : for src.duration make tgt.duration
  "VisionPrescription.dispense-color" : for src.color make tgt.color
  "VisionPrescription.dispense-brand" : for src.brand make tgt.brand
  "VisionPrescription.dispense-note" : for src.notes as v make tgt.note as n, n.text = v
endgroup
map "http://hl7.org/fhir/StructureMap/VisionPrescription3to2" = "R3 to R2 Conversion for VisionPrescription"

uses "http://hl7.org/fhir/StructureDefinition/VisionPrescription" alias VisionPrescription as source
uses "http://hl7.org/fhir/DSTU2/StructureDefinition/VisionPrescription" alias VisionPrescriptionR2 as target

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

group for type+types  VisionPrescription extends DomainResource
  input src : VisionPrescription as source
  input tgt : VisionPrescriptionR2 as target

  "VisionPrescription-identifier" : for src.identifier make tgt.identifier
  "VisionPrescription-dateWritten" : for src.dateWritten make tgt.dateWritten
  "VisionPrescription-patient" : for src.patient make tgt.patient
  "VisionPrescription-prescriber" : for src.prescriber make tgt.prescriber
  "VisionPrescription-encounter" : for src.encounter make tgt.encounter
  "VisionPrescription-reason" : for src.reason make tgt.reason
  "VisionPrescription-dispense" : for src.dispense as vs0 make tgt.dispense as vt0 then vspDispense(vs0, vt0)
endgroup


group vspDispense extends BackboneElement
  input src as source
  input tgt as target
  
  "VisionPrescription.dispense-product" : for src.product as v then vpsProduct(v, tgt)
  "VisionPrescription.dispense-eye1" : for src.eye as v where coding.code = 'left' make tgt.eye = "left"
  "VisionPrescription.dispense-eye2" : for src.eye as v where coding.code = 'right' make tgt.eye = "right"
  "VisionPrescription.dispense-sphere" : for src.sphere make tgt.sphere
  "VisionPrescription.dispense-cylinder" : for src.cylinder make tgt.cylinder
  "VisionPrescription.dispense-axis" : for src.axis make tgt.axis
  "VisionPrescription.dispense-prism" : for src.prism make tgt.prism
  "VisionPrescription.dispense-base1" : for src.base make tgt.base
  "VisionPrescription.dispense-add" : for src.add make tgt.add
  "VisionPrescription.dispense-power" : for src.power make tgt.power
  "VisionPrescription.dispense-backCurve" : for src.backCurve make tgt.backCurve
  "VisionPrescription.dispense-diameter" : for src.diameter make tgt.diameter
  "VisionPrescription.dispense-duration" : for src.duration make tgt.duration
  "VisionPrescription.dispense-color" : for src.color make tgt.color
  "VisionPrescription.dispense-brand" : for src.brand make tgt.brand
  "VisionPrescription.dispense-note" : for src.note as n then vspNote(n, tgt)
endgroup


group vpsProduct extends Element
  input src as source
  input tgt as target

  "VisionPrescription.dispense.product-coding" : for src.coding make tgt.product
endgroup

group vspNote extends Element
  input src as source
  input tgt as target
  
  "VisionPrescription.dispense.note-text" : for src.text make tgt.notes
endgroup