Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions input/fsh/examples/ExampleSlotWithAppointmentType.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,26 @@ Usage: #example
Title: "Slot Accepting New and Existing Patients"
Description: "A slot that is accepting new and existing patients"

* appointmentType = http://terminology.hl7.org/CodeSystem/accepting-patients#newpt
* schedule = Reference(ExampleSchedule)
* status = #free
* start = "2026-03-21T10:45:00-04:00"
* end = "2026-03-21T11:15:00-04:00"

* extension[+].url = "http://hl7.org/fhir/uv/smart-scheduling-links/StructureDefinition/patient-type"
* extension[=].valueCoding.system = "http://terminology.hl7.org/CodeSystem/accepting-patients"
* extension[=].valueCoding.code = #newpt

Instance: AcceptOnlyExistingPatients
InstanceOf: SmartSchedulingSlot
Usage: #example
Title: "Slot Accepting Only Existing Patients"
Description: "A slot that is accepting only existing patients"

* appointmentType = http://terminology.hl7.org/CodeSystem/accepting-patients#existptonly
* schedule = Reference(ExampleSchedule)
* status = #free
* start = "2026-03-21T10:45:00-04:00"
* end = "2026-03-21T11:15:00-04:00"

* extension[+].url = "http://hl7.org/fhir/uv/smart-scheduling-links/StructureDefinition/patient-type"
* extension[=].valueCoding.system = "http://terminology.hl7.org/CodeSystem/accepting-patients"
* extension[=].valueCoding.code = #existptonly
17 changes: 17 additions & 0 deletions input/fsh/extensions/patient-type.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Extension: PatientType
Id: patient-type
Title: "Patient Type"
Description: """
This extension enables SSL to represent new-patient acceptance policy and binding to
AcceptingPatientsVS.
"""

* ^context.type = #element
* ^context.expression = "Slot"

* value[x] only Coding
* valueCoding 1..1
* valueCoding.system 1..1
* valueCoding.system = "http://terminology.hl7.org/CodeSystem/accepting-patients"
* valueCoding.code 1..1
* valueCoding.code from http://hl7.org/fhir/us/ndh/ValueSet/AcceptingPatientsVS (extensible)
14 changes: 9 additions & 5 deletions input/fsh/profiles/slot.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,17 @@ timing (e.g., "between 9 a.m. and 5 p.m." or "between noon and five p.m.").
// start 1..1
// end 1..1

* id 1..1 MS
* schedule MS
* schedule only Reference(SmartSchedulingSchedule)
* status MS
* start MS
* end MS
* appointmentType MS
* appointmentType from AppointmentTypeAndReasonsVS (preferred)

//
* extension contains
BookingDeepLink named bookingDeepLink 0..1 and
BookingPhone named bookingPhone 0..1
BookingDeepLink named bookingDeepLink 0..1 MS and
BookingPhone named bookingPhone 0..1 MS and
PatientType named patientType 1..1 MS // double check to see if we wanted to make this required.

Instance: ExampleSlot
InstanceOf: SmartSchedulingSlot
Expand All @@ -43,6 +42,11 @@ Usage: #example
* end = "2026-03-21T11:15:00-04:00"
* extension[0].url = "http://hl7.org/fhir/uv/smart-scheduling-links/StructureDefinition/booking-deep-link"
* extension[=].valueUrl = "https://ehr.example.org/booking/slots/123"

* extension[+].url = "http://hl7.org/fhir/uv/smart-scheduling-links/StructureDefinition/booking-phone"
* extension[=].valueContactPoint.system = #phone
* extension[=].valueContactPoint.value = "+1-555-123-4567"

* extension[+].url = "http://hl7.org/fhir/uv/smart-scheduling-links/StructureDefinition/patient-type"
* extension[=].valueCoding.system = "http://terminology.hl7.org/CodeSystem/accepting-patients"
* extension[=].valueCoding.code = #newpt
28 changes: 0 additions & 28 deletions input/fsh/terminology/valuesets/slot-appointment-type-vs.fsh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ The following data elements must always be present or must be supported if the d
- end

**Each Slot Must Support:**
- appointmentType
- booking deep link
- booking phone number
- patient type

**Profile Specific Implementation Guidance:**

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Discussed extensively in [February 2026 as captured in these confluence notes](https://confluence.hl7.org/spaces/PA/pages/413256942/New+vs.+Existing+Patients), but also during the 2026 CMS Connectathon in July. General options included:
- being very opionated about modeling patient type in a new extension that is required
- using an extension that is inspired by the 'characteristic' data element in R6/continuous build. This would function like a patient badge of sorts. We'd then slice on characteristic to model patient type.

In all scenarios discussed, the group agreed that slot.appointmentType was not ideal given the 0..1 cardinality and the fact that patient type is orothogonal to appointmentType as it could represent a variety of other things.

After [discussions on 8/3/2026](https://github.com/HL7/smart-scheduling-links/pull/46), we decided to use the simple extension for patient type. Opinions weren't overtly strong either way, but the fact that "patient type" was a concept used in a lot of places, we decided to keep our simple extension.