Skip to main content

providers

FHIR R4 EHR provider names and the quirks each provider needs.

Attributes: NEXTECH_INTELLECHARTPRO_R4_PROVIDER: The Nextech IntelleChartPro provider string from the EHR config. EPIC_R4_PROVIDER: The Epic provider string from the EHR config. MODMED_R4_PROVIDER: The ModMed provider string from the EHR config.

Module​

Functions​

profile_for​

def profile_for(    provider: str | None,) ‑> ProviderProfile:

The profile for an EHR provider string.

The only place in the FHIR R4 backend where a provider string decides how the server is queried. Choosing a backend from the provider (bitfount/config.py, federated/types.py) happens elsewhere. A provider not listed, or None, gets the default profile of a standard server.

A listed provider resolves to its one shared, frozen profile; any other gets a new default profile on each call.

Arguments

  • provider: The provider string from the EHR config, or None.

Classes​

ListingStrategy​

class ListingStrategy(*args, **kwds):

How a provider's patients are listed.

Attributes

  • NEXT_LINKS: Follow the /Patient search's next links.
  • MODMED_LADDER: ModMed's search stops paging at 10,000 results, so listing runs as a ladder of narrower searches (see modmed_listing.py).

Ancestors​

Variables​

  • static MODMED_LADDER
  • static NEXT_LINKS

ProviderProfile​

class ProviderProfile(    name: str | None,    one_code_per_search: bool = False,    entered_in_error_hint: bool = True,    encounter_status_not_hint: bool = True,    next_appointment_from_appointments_endpoint: bool = True,    observation_sort: bool = True,    bare_category_tokens: bool = False,    listing_strategy: ListingStrategy = ListingStrategy.NEXT_LINKS,    list_lookup_code: str | None = None,    bcva_from_documents: bool = False,):

The quirks of one EHR provider's FHIR R4 server, as data.

The defaults are the behaviour of a standard server; each field names the one way a provider departs from it.

Arguments

  • name: The provider string from the EHR config, or None.
  • one_code_per_search: The server rejects a comma-separated code list (Nextech reads 65893-0,65897-1 as one invalid code), so each code is searched on its own.
  • entered_in_error_hint: Whether searches may send status__not=entered-in-error, a bandwidth hint only: every caller also filters entered-in-error resources client-side.
  • encounter_status_not_hint: Whether Encounter searches may send their status__not exclusion list, a bandwidth hint only: the reader applies the same exclusion client-side. ModMed is not sent it, as it refuses status:not on some types. Its absence also skips the sort-first fast path of the next-appointment lookup, which is gated on the hint being sent.
  • next_appointment_from_appointments_endpoint: Whether the next appointment is read from the Appointment endpoint first, falling back to Encounter when that finds none or fails. Without it (Nextech), the next appointment is the start of the earliest future Encounter that is not cancelled or entered-in-error. Only the next-appointment lookup reads this; previous appointments are searched in Appointment for every provider.
  • observation_sort: Whether Observation searches may send _sort. ModMed answers a sorted Observation search with a search-engine 500, so it is never sent.
  • bare_category_tokens: Whether category is sent as the bare code (e.g. laboratory) rather than a system|code token. Nextech rejects the token form despite documenting it.
  • listing_strategy: How patients are listed.
  • list_lookup_code: A code value the server requires when looking up a FHIR List by identifier (Epic requires patients; not standard FHIR R4, see https://fhir.epic.com/Specifications?api=10519).
  • bcva_from_documents: Whether best-corrected visual acuity is read from the patient's CCD documents rather than from Observation resources (Nextech records it only in the document).

Variables​

  • bare_category_tokens : bool
  • bcva_from_documents : bool
  • encounter_status_not_hint : bool
  • entered_in_error_hint : bool
  • list_lookup_code : str | None
  • name : str | None
  • next_appointment_from_appointments_endpoint : bool
  • observation_sort : bool
  • one_code_per_search : bool