Skip to content

Schedule Template Booking Limit Extension

Canonicalhttps://fhir.apps.health/StructureDefinition/nexus-schedule-template-booking-limit
Statusdraft · 1.33.0
BaseExtension (constraint)
ContextValueSet.compose.include.concept (element), ValueSet.expansion.contains (element)
SourceFSH · JSON

How many appointments a schedule template's span accepts, 0 to 5. 0 means none may be booked; an absent extension means there is no limit. A reader must not collapse the two.

FSH

The authored source of truth: extensions/ScheduleTemplateExtensions.fsh (edit on GitHub). One FSH file may define several related artifacts.

// ScheduleTemplateExtensions.fsh
// The three properties of a schedule template, carried on its concept in the template value set
// (`ValueSet-nexus-schedule-templates.fsh`): on `compose.include.concept`, and on the matching
// `expansion.contains` entry, which is the half a reader builds its list from.
//
// ABSENT IS AN ANSWER. No booking limit means no limit, which is not the same as a limit of 0; no
// warning means nothing is shown.

Extension: NexusScheduleTemplateBookingLimit
Id: nexus-schedule-template-booking-limit
Title: "Schedule Template Booking Limit Extension"
Description: """
How many appointments a schedule template's span accepts, 0 to 5. `0` means none may be booked; an
absent extension means there is no limit. A reader must not collapse the two.
"""
* ^url = "https://fhir.apps.health/StructureDefinition/nexus-schedule-template-booking-limit"
* ^status = #draft
* ^context[+].type = #element
* ^context[=].expression = "ValueSet.compose.include.concept"
* ^context[+].type = #element
* ^context[=].expression = "ValueSet.expansion.contains"
* value[x] 1..1 MS
* value[x] only integer
* valueInteger ^minValueInteger = 0
* valueInteger ^maxValueInteger = 5

Extension: NexusScheduleTemplateColour
Id: nexus-schedule-template-colour
Title: "Schedule Template Colour Extension"
Description: "The colour a schedule template's span is drawn in on the schedule, as a `#RRGGBB` hex string."
* ^url = "https://fhir.apps.health/StructureDefinition/nexus-schedule-template-colour"
* ^status = #draft
* ^context[+].type = #element
* ^context[=].expression = "ValueSet.compose.include.concept"
* ^context[+].type = #element
* ^context[=].expression = "ValueSet.expansion.contains"
* value[x] 1..1 MS
* value[x] only string
* obeys nexus-schedule-template-colour-hex

Invariant:      nexus-schedule-template-colour-hex
Description:    "The colour is a #RRGGBB hex string, the one form a booking surface draws without interpreting it."
Severity:       #error
Expression:     "value.ofType(string).matches('^#[0-9A-Fa-f]{6}$')"

Extension: NexusScheduleTemplateBookingWarning
Id: nexus-schedule-template-booking-warning
Title: "Schedule Template Booking Warning Extension"
Description: "Text shown to the user when an appointment is booked or moved into a schedule template's span."
* ^url = "https://fhir.apps.health/StructureDefinition/nexus-schedule-template-booking-warning"
* ^status = #draft
* ^context[+].type = #element
* ^context[=].expression = "ValueSet.compose.include.concept"
* ^context[+].type = #element
* ^context[=].expression = "ValueSet.expansion.contains"
* value[x] 1..1 MS
* value[x] only string