smart-on-fhir / smart-scheduling-links

Clinical Appointment Slot Discovery
28 stars 15 forks source link

Indicating eligibility restrictions for a slot or schedule #17

Open Mr0grog opened 3 years ago

Mr0grog commented 3 years ago

Certain services at a certain location might have special eligibility requirements or restrictions (e.g. one clinic might be restricting COVID-19 immunization appointments to age 75+ while other clinics have a lower limit). It seems like this information belongs either on the schedule or slot level, but I’m not sure which.

I’m also not sure if FHIR already provides something ideally suited to this — I see that both schedule and slot have an option comment field that is plain text, which might be one way to represent this info.

In practice, I’ve seen this represented both as free text:

// Example from https://covidwa.com/
{
  "restrictions": "Eligible veterans only"
}

And as arrays of standardized strings:

// Example from https://vaccinateca.com/
{
  "Availability Info": [
    "Vaccinating 65+",
    "Vaccinating health care workers",
    "Appointment required"
  ]
}

(The array approach is pretty neat if you can build up a somewhat standard vocabulary.)

jmandel commented 3 years ago

It's a good point to document that Schedule.comment could be used to document these kinds of details. I'm still agnostic about how deep we want to on modeling / standardizing the vocabulary given near-term goals of broadening eligibility, but down the line I could certainly see why this is something we'd want.

Overall, I think this would be Schedule-level information, at least as far as I've been thinking about it (and could potentially be overridden at the Slot level, but I'm not sure I see the use case for that).

jmandel commented 3 years ago

Another quick point here is that the semantics of items in these arrays are not entirely uniform; they could represent criteria that you need to meet all of, or some subset, or just one of. This gets to be a normalized expression tree pretty quickly, as you make it computable :-)

There's something lovely in the simplicity of the "Info" array and the "comments" string, and it's probably good for us to keep "set of tags" as the upper limit of what we'd shoot for here.

jmandel commented 3 years ago

If we want to capture these details, the other option is linking the Schedule to a HealthcareService so we can use http://hl7.org/fhir/healthcareservice-definitions.html#HealthcareService.eligibility; semantically this is pretty good, though I'm wary of introducing another resource type to the mix unless we'd want to use more than just this one data element.

Mr0grog commented 3 years ago

the semantics of items in these arrays are not entirely uniform; they could represent criteria that you need to meet all of, or some subset, or just one of.

Yeah, that is a very fair point. I think the flip side is that it allows a client to call out particular things that might be worth highlighting or differentiating, e.g. VaccinateCA separates out the “appointment required” item and gives it iconography + a special location:

Screen Shot 2021-03-17 at 3 47 11 PM

There's something lovely in the simplicity of the "Info" array and the "comments" string, and it's probably good for us to keep "set of tags" as the upper limit of what we'd shoot for here.

Definitely agree. It’s easy for this to get out of hand and become something overly complex. :) Also definitely hear you on the point on being wary of introducing another resource type.

jmandel commented 3 years ago

See https://github.com/smart-on-fhir/smart-scheduling-links/issues/14 for additional context