Order based scheduling FHIR mapping

When we talk about Order based scheduling, I understand that the Order is scheduled and will have the appointment linked to it. How do we do the FHIR mapping to fetch this information (appointment linked to the Order or vice versa)?

Also, when we check-in the patient for an order that needs to be performed, I believe an Encounter is created. Is there a way we can fetch the Encounter info where the order is performed?

Is Location Type (Place of Service type) under Location R4 API a codeable concept? Does it have a valueset? Is it the CMS POS codes (Place of Service Code Set | CMS) that typically go on a claim? If not, from where in Epic do we get this info?

Appointment and Encounter have ‘basedOn’ elements that can point to the ServiceRequest that authorized action. Encounter has an ‘appointment’ element that can link to the Appointment that scheduled the encounter. You can use ‘chaining’ and/or _include and _revinclude to filter by or retrieve linked resources.

The data type and value set binding for Location are clear in the spec (yes it’s CodeableConcept with an extensible binding to <status value="active"/> <date value="2014-03-26"/> <description value="A role of a place that further classifies the setting (e.g., accident site, road side, work site, community location) in which services are delivered."/> <compose> <include> <system value="http://terminology.hl7.org/CodeSystem/v3-RoleCode"/> <filter> <property value="concept"/> <op value="descendent-of"/> <value value="_ServiceDeliveryLocationRoleType"/> </filter> </include> </compose> </ValueSet>. These draw from HL7-defined codes, not CMS codes. If you want CMS codes, you’d need to map.

Epic-specific questions should go to open@epic.com