R4 Ballot #1 #2 (Mixed Normative/Trial use)

This page is part of the FHIR Specification (v3.3.0: (v3.5.0: R4 Ballot 2). #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 Group Maturity Level : N/A Ballot Status : Informative Compartments : Not linked to any defined compartments

R2 : R3 : R4 Conversion maps for HealthcareService.

Functional status for this map: 1 test that all execute ok. of which 1 fail round-trip testing and all r3 resources are valid. to execute . ( see documentation)

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

uses "http://hl7.org/fhir/DSTU2/StructureDefinition/HealthcareService" alias HealthcareServiceR2 as source
uses "http://hl7.org/fhir/StructureDefinition/HealthcareService" alias HealthcareService as target

map "http://hl7.org/fhir/StructureMap/HealthcareService3to4" = "R3 to R4 Conversions for HealthcareService"


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


group for type+types HealthcareService extends DomainResource
  input src : HealthcareServiceR2 as source
  input tgt : HealthcareService as target

uses "http://hl7.org/fhir/3.0/StructureDefinition/HealthcareService" alias HealthcareServiceR3 as source
uses "http://hl7.org/fhir/StructureDefinition/HealthcareService" alias HealthcareService as target


  "HealthcareService-identifier" : for src.identifier make tgt.identifier
  "HealthcareService-providedBy" : for src.providedBy make tgt.providedBy
  "HealthcareService-serviceCategory" : for src.serviceCategory make tgt.category
  "HealthcareService-serviceType" : for src.serviceType as v then hsvcType(v, tgt)
  "HealthcareService-location" : for src.location make tgt.location
  "HealthcareService-serviceName" : for src.serviceName make tgt.name
  "HealthcareService-comment" : for src.comment make tgt.comment
  "HealthcareService-extraDetails" : for src.extraDetails make tgt.extraDetails
  "HealthcareService-photo" : for src.photo make tgt.photo
  "HealthcareService-telecom" : for src.telecom make tgt.telecom
  "HealthcareService-coverageArea" : for src.coverageArea make tgt.coverageArea
  "HealthcareService-serviceProvisionCode" : for src.serviceProvisionCode make tgt.serviceProvisionCode
  "HealthcareService-eligibility" : for src.eligibility make tgt.eligibility
  "HealthcareService-eligibilityNote" : for src.eligibilityNote make tgt.eligibilityNote
  "HealthcareService-programName" : for src.programName make tgt.programName
  "HealthcareService-characteristic" : for src.characteristic make tgt.characteristic
  "HealthcareService-referralMethod" : for src.referralMethod make tgt.referralMethod
  "HealthcareService-appointmentRequired" : for src.appointmentRequired make tgt.appointmentRequired
  "HealthcareService-availableTime" : for src.availableTime as vs0 make tgt.availableTime as vt0 then hsvcAvailable(vs0, vt0)
  "HealthcareService-notAvailable" : for src.notAvailable as vs0 make tgt.notAvailable as vt0 then hsvcNotAvailable(vs0, vt0)
  "HealthcareService-availabilityExceptions" : for src.availabilityExceptions make tgt.availabilityExceptions
endgroup

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


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


  "HealthcareService.availableTime-daysOfWeek" : for src.daysOfWeek make tgt.daysOfWeek
  "HealthcareService.availableTime-allDay" : for src.allDay make tgt.allDay
  "HealthcareService.availableTime-availableStartTime" : for src.availableStartTime make tgt.availableStartTime
  "HealthcareService.availableTime-availableEndTime" : for src.availableEndTime make tgt.availableEndTime
endgroup


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

group HealthcareService extends DomainResource
  input src : HealthcareServiceR3 as source
  input tgt : HealthcareService as target


  "HealthcareService.notAvailable-description" : for src.description make tgt.description
  "HealthcareService.notAvailable-during" : for src.during make tgt.during

  "HealthcareService.identifier" : for src.identifier as vs make tgt.identifier as vt
  "HealthcareService.active" : for src.active as vs make tgt.active as vt
  "HealthcareService.providedBy" : for src.providedBy as vs make tgt.providedBy as vt
  "HealthcareService.category" : for src.category as vs make tgt.category as vt
  "HealthcareService.type" : for src.type as vs make tgt.type as vt
  "HealthcareService.specialty" : for src.specialty as vs make tgt.specialty as vt
  "HealthcareService.location" : for src.location as vs make tgt.location as vt
  "HealthcareService.name" : for src.name as vs make tgt.name as vt
  "HealthcareService.comment" : for src.comment as vs make tgt.comment as vt
  "HealthcareService.extraDetails" : for src.extraDetails as vs make tgt.extraDetails as vt
  "HealthcareService.photo" : for src.photo as vs make tgt.photo as vt
  "HealthcareService.telecom" : for src.telecom as vs make tgt.telecom as vt
  "HealthcareService.coverageArea" : for src.coverageArea as vs make tgt.coverageArea as vt
  "HealthcareService.serviceProvisionCode" : for src.serviceProvisionCode as vs make tgt.serviceProvisionCode as vt
  "HealthcareService.eligibility" : for src.eligibility as vs make tgt.eligibility as vt
  "HealthcareService.eligibilityNote" : for src.eligibilityNote as vs make tgt.eligibilityNote as vt
  "HealthcareService.programName" : for src.programName as vs make tgt.programName as vt
  "HealthcareService.characteristic" : for src.characteristic as vs make tgt.characteristic as vt
  "HealthcareService.referralMethod" : for src.referralMethod as vs make tgt.referralMethod as vt
  "HealthcareService.appointmentRequired" : for src.appointmentRequired as vs make tgt.appointmentRequired as vt
  "HealthcareService.availableTime" : for src.availableTime as vs0 make tgt.availableTime as vt0 then {
    "HealthcareService.availableTime.allDay" : for vs0.allDay as vs make vt0.allDay as vt
    "HealthcareService.availableTime.availableStartTime" : for vs0.availableStartTime as vs make vt0.availableStartTime as vt
    "HealthcareService.availableTime.availableEndTime" : for vs0.availableEndTime as vs make vt0.availableEndTime as vt
  }
  "HealthcareService.notAvailable" : for src.notAvailable as vs0 make tgt.notAvailable as vt0 then {
    "HealthcareService.notAvailable.description" : for vs0.description as vs make vt0.description as vt
    "HealthcareService.notAvailable.during" : for vs0.during as vs make vt0.during as vt
  }
  "HealthcareService.availabilityExceptions" : for src.availabilityExceptions as vs make tgt.availabilityExceptions as vt
  "HealthcareService.endpoint" : for src.endpoint as vs make tgt.endpoint as vt

endgroup

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

  "HealthcareService.serviceType-type" : for src.type make tgt.type
  "HealthcareService.serviceType-speciality" : for src.specialty make tgt.specialty
endgroup


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

map "http://hl7.org/fhir/StructureMap/HealthcareService4to3" = "R4 to R3 Conversion for HealthcareService"



uses "http://hl7.org/fhir/StructureDefinition/HealthcareService" alias HealthcareService as source
uses "http://hl7.org/fhir/DSTU2/StructureDefinition/HealthcareService" alias HealthcareServiceR2 as target

uses "http://hl7.org/fhir/3.0/StructureDefinition/HealthcareService" alias HealthcareServiceR3 as target


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

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


group for type+types  HealthcareService extends DomainResource
  input src : HealthcareService as source
  input tgt : HealthcareServiceR2 as target


  "HealthcareService-identifier" : for src.identifier make tgt.identifier
  "HealthcareService-providedBy" : for src.providedBy make tgt.providedBy
  "HealthcareService-serviceCategory" : for src.category make tgt.serviceCategory
  "HealthcareService-serviceType" : for src.type as vs make tgt.serviceType as vt, vt.type as vt then CodeableConcept(vs, vt)
  "HealthcareService-speciality" : for src.specialty as vs make tgt.serviceType as vt first, vt.specialty as vt then CodeableConcept(vs, vt) // put all the specialties on the first type
  "HealthcareService-location" : for src.location make tgt.location
  "HealthcareService-serviceName" : for src.name make tgt.serviceName
  "HealthcareService-comment" : for src.comment make tgt.comment
  "HealthcareService-extraDetails" : for src.extraDetails make tgt.extraDetails
  "HealthcareService-photo" : for src.photo make tgt.photo
  "HealthcareService-telecom" : for src.telecom make tgt.telecom
  "HealthcareService-coverageArea" : for src.coverageArea make tgt.coverageArea
  "HealthcareService-serviceProvisionCode" : for src.serviceProvisionCode make tgt.serviceProvisionCode
  "HealthcareService-eligibility" : for src.eligibility make tgt.eligibility
  "HealthcareService-eligibilityNote" : for src.eligibilityNote make tgt.eligibilityNote
  "HealthcareService-programName" : for src.programName make tgt.programName
  "HealthcareService-characteristic" : for src.characteristic make tgt.characteristic
  "HealthcareService-referralMethod" : for src.referralMethod make tgt.referralMethod
  "HealthcareService-appointmentRequired" : for src.appointmentRequired make tgt.appointmentRequired
  "HealthcareService-availableTime" : for src.availableTime as vs0 make tgt.availableTime as vt0 then hsvcAvailable(vs0, vt0)
  "HealthcareService-notAvailable" : for src.notAvailable as vs0 make tgt.notAvailable as vt0 then hsvcNotAvailable(vs0, vt0)
  "HealthcareService-availabilityExceptions" : for src.availabilityExceptions make tgt.availabilityExceptions
endgroup


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

group HealthcareService extends DomainResource
  input src : HealthcareService as source
  input tgt : HealthcareServiceR3 as target


  "HealthcareService.availableTime-daysOfWeek" : for src.daysOfWeek make tgt.daysOfWeek
  "HealthcareService.availableTime-allDay" : for src.allDay make tgt.allDay
  "HealthcareService.availableTime-availableStartTime" : for src.availableStartTime make tgt.availableStartTime
  "HealthcareService.availableTime-availableEndTime" : for src.availableEndTime make tgt.availableEndTime

  "HealthcareService.identifier" : for src.identifier as vs make tgt.identifier as vt
  "HealthcareService.active" : for src.active as vs make tgt.active as vt
  "HealthcareService.providedBy" : for src.providedBy as vs make tgt.providedBy as vt
  "HealthcareService.category" : for src.categoryFirstRep as vs make tgt.category as vt
  "HealthcareService.type" : for src.type as vs make tgt.type as vt
  "HealthcareService.specialty" : for src.specialty as vs make tgt.specialty as vt
  "HealthcareService.location" : for src.location as vs make tgt.location as vt
  "HealthcareService.name" : for src.name as vs make tgt.name as vt
  "HealthcareService.comment" : for src.comment as vs make tgt.comment as vt
  "HealthcareService.extraDetails" : for src.extraDetails as vs make tgt.extraDetails as vt
  "HealthcareService.photo" : for src.photo as vs make tgt.photo as vt
  "HealthcareService.telecom" : for src.telecom as vs make tgt.telecom as vt
  "HealthcareService.coverageArea" : for src.coverageArea as vs make tgt.coverageArea as vt
  "HealthcareService.serviceProvisionCode" : for src.serviceProvisionCode as vs make tgt.serviceProvisionCode as vt
  "HealthcareService.eligibility" : for src.eligibility as vs make tgt.eligibility as vt
  "HealthcareService.eligibilityNote" : for src.eligibilityNote as vs make tgt.eligibilityNote as vt
  "HealthcareService.programName" : for src.programName as vs make tgt.programName as vt
  "HealthcareService.characteristic" : for src.characteristic as vs make tgt.characteristic as vt
  "HealthcareService.referralMethod" : for src.referralMethod as vs make tgt.referralMethod as vt
  "HealthcareService.appointmentRequired" : for src.appointmentRequired as vs make tgt.appointmentRequired as vt
  "HealthcareService.availableTime" : for src.availableTime as vs0 make tgt.availableTime as vt0 then {
    "HealthcareService.availableTime.allDay" : for vs0.allDay as vs make vt0.allDay as vt
    "HealthcareService.availableTime.availableStartTime" : for vs0.availableStartTime as vs make vt0.availableStartTime as vt
    "HealthcareService.availableTime.availableEndTime" : for vs0.availableEndTime as vs make vt0.availableEndTime as vt
  }
  "HealthcareService.notAvailable" : for src.notAvailable as vs0 make tgt.notAvailable as vt0 then {
    "HealthcareService.notAvailable.description" : for vs0.description as vs make vt0.description as vt
    "HealthcareService.notAvailable.during" : for vs0.during as vs make vt0.during as vt
  }
  "HealthcareService.availabilityExceptions" : for src.availabilityExceptions as vs make tgt.availabilityExceptions as vt
  "HealthcareService.endpoint" : for src.endpoint as vs make tgt.endpoint as vt

endgroup

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

  "HealthcareService.notAvailable-description" : for src.description make tgt.description
  "HealthcareService.notAvailable-during" : for src.during make tgt.during
endgroup