Skip to main content

patient_api

In-process FastAPI service serving patient-eligibility data to the Trials Web App.

The package is laid out as:

  • app.py — the factory: what the app is and how it is wired.
  • openapi.py — the published contract: its version, and how the document is built and rendered.
  • routes.py — the API's routes, assembled from the domains.
  • domains/ — one directory per subject the API serves, holding that subject's routes, models, repository methods and examples.
  • core/ — what the domains share: the routing plumbing, the cross-domain models, and the published-partition lookup.
  • models.py, protocol.py, repository.py, examples.py — façades that keep the names those modules have always exported importable, now that the definitions live with the domains.
  • auth.py, server.py, service.py — how the pod runs it.

tests/bitfount/patient_api/test_openapi.py pins the published document, so a change to the API's surface fails there rather than reaching a client.

Module​

Submodules​