R4 Ballot #1 (Mixed Normative/Trial use)

This page is part of the FHIR Specification (v3.3.0: R4 Ballot 2). 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 Administration Work GroupMaturity Level: N/ABallot Status: Informative Compartments: Practitioner

R2 : R3 Conversion maps for Practitioner.

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

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

uses "http://hl7.org/fhir/DSTU2/StructureDefinition/Practitioner" alias PractitionerR2 as source
uses "http://hl7.org/fhir/StructureDefinition/Practitioner" alias Practitioner as target

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

group for type+types  Practitioner extends DomainResource
  input src : PractitionerR2 as source
  input tgt : Practitioner as target

  "Practitioner-identifier" : for src.identifier make tgt.identifier
  "Practitioner-active" : for src.active make tgt.active
  "Practitioner-name" : for src.name make tgt.name
  "Practitioner-telecom" : for src.telecom make tgt.telecom
  "Practitioner-address" : for src.address make tgt.address
  "Practitioner-gender" : for src.gender make tgt.gender
  "Practitioner-birthDate" : for src.birthDate make tgt.birthDate
  "Practitioner-photo" : for src.photo make tgt.photo
  "Practitioner-role" : for src.practitionerRole as vs0 make create("PractitionerRole") as vt0 then prcRole(src, tgt, vs0, vt0)
  "Practitioner-qualification" : for src.qualification as vs0 make tgt.qualification as vt0 then prcQualification(vs0, vt0) 
  "Practitioner-communication" : for src.communication make tgt.communication
endgroup

group prcRole extends BackboneElement
  input pr as source // the source r2 practitioner resource
  input prtgt as target // the target r3 practitioner resource
  input src as source // the source practitioner role
  input tgt as target // the target PractitionerRole resource

  "Practitioner.role-id" : for src make tgt.practitioner = create("Reference") as p, p.reference = ('Practitioner/'+pr.id) 
  "Practitioner.role-organization" : for src.managingOrganization make tgt.organization
  "Practitioner.role-code" : for src.role make tgt.code
  "Practitioner.role-specialty" : for src.specialty make tgt.specialty
  "Practitioner.role-period" : for src.period make tgt.period
  "Practitioner.role-location" : for src.location make tgt.location
  "Practitioner.role-healthcareService" : for src.healthcareService make tgt.healthcareService
endgroup
  
group prcQualification extends BackboneElement
  input src as source
  input tgt as target

  "Practitioner.qualification-identifier" : for src.identifier make tgt.identifier
  "Practitioner.qualification-code" : for src.code make tgt.code
  "Practitioner.qualification-period" : for src.period make tgt.period
  "Practitioner.qualification-issuer" : for src.issuer make tgt.issuer
endgroup

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

uses "http://hl7.org/fhir/StructureDefinition/Practitioner" alias Practitioner as source
uses "http://hl7.org/fhir/DSTU2/StructureDefinition/Practitioner" alias PractitionerR2 as target

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

group for type+types  Practitioner extends DomainResource
  input src : Practitioner as source
  input tgt : PractitionerR2 as target

  "Practitioner-identifier" : for src.identifier make tgt.identifier
  "Practitioner-active" : for src.active make tgt.active
  "Practitioner-name" : for src.name make tgt.name
  "Practitioner-telecom" : for src.telecom make tgt.telecom
  "Practitioner-address" : for src.address make tgt.address
  "Practitioner-gender" : for src.gender make tgt.gender
  "Practitioner-birthDate" : for src.birthDate make tgt.birthDate
  "Practitioner-photo" : for src.photo make tgt.photo
  "Practitioner-role" : for search('/PractitionerRole?practitioner='+src.id) : PractitionerRole as vs0 make tgt.practitionerRole as vt0 then prcRole(vs0, vt0)
  "Practitioner-qualification" : for src.qualification as vs0 make tgt.qualification as vt0 then prcQualification(vs0, vt0) 
  "Practitioner-communication" : for src.communication make tgt.communication
endgroup

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

  "Practitioner.role-organization" : for src.organization make tgt.managingOrganization
  "Practitioner.role-code" : for src.code make tgt.role
  "Practitioner.role-specialty" : for src.specialty make tgt.specialty
  "Practitioner.role-period" : for src.period make tgt.period
  "Practitioner.role-location" : for src.location make tgt.location
  "Practitioner.role-healthcareService" : for src.healthcareService make tgt.healthcareService
endgroup
  
group prcQualification extends BackboneElement
  input src as source
  input tgt as target

  "Practitioner.qualification-identifier" : for src.identifier make tgt.identifier
  "Practitioner.qualification-code" : for src.code make tgt.code
  "Practitioner.qualification-period" : for src.period make tgt.period
  "Practitioner.qualification-issuer" : for src.issuer make tgt.issuer
endgroup