• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

medplum / medplum / 21497127484
92%
main: 92%

Build:
Build:
LAST BUILD BRANCH: gh-readonly-queue/main/pr-8903-6030554a0758a3535196e2ede65ab9725ef15ff9
DEFAULT BRANCH: main
Ran 29 Jan 2026 10:40PM UTC
Jobs 1
Files 720
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Jan 2026 10:32PM UTC coverage: 92.278% (-0.002%) from 92.28%
21497127484

push

github

web-flow
Appointment $book operation (#8300)

* Rough in Appointment/$book operation

No real implementation yet, just a skeleton.

Signed-off-by: Noah Silas <noah@medplum.com>

* Add basic persistence in Appointment/$book

- Records an Appointment, which the user can update to represent the
  details of the upcoming visit.

- Records Slots with `status: 'busy'`, which will affect future
  scheduling operations such as $find/$book.

Signed-off-by: Noah Silas <noah@medplum.com>

* Check for blocks before saving in $book

If someone else has already booked a slot that collides with the
requested slot, return an error.

We perform these reads inside a serializable transaction so that two
parallel requests to $book the same time will have one succeed and one
fail with a 409 Conflict error.

Signed-off-by: Noah Silas <noah@medplum.com>

* Move some $find helpers into scheduling utilities

Specifically, I'm going to use `resolveAvailability` and
`applyExistingSlots` for $book/$hold handlers. Pulling these (and their
support functions) into a shared utilities namespace will help keep
things a little organized in here.

Signed-off-by: Noah Silas <noah@medplum.com>

* Enforce scheduling parameters availability in $book

When trying to use $book to grab an appointment, ensure that folks are
only taking appointments inside the scheduled availability.

Signed-off-by: Noah Silas <noah@medplum.com>

* Include explicit `status: free` slots in $book availability

These slots can be used to mark time as available outside of the normal
scheduling parameters definitions. This allows the creation of one-time
overrides (example: "I am taking new-patient appointments on Jan 15 from
noon to five PM").

As an implementation note, one utility function (hasMatchingServiceType)
was updating to take a `Coding[]` instead of a single Coding. This
allows reuse in some new contexts where we have a Slot or Appointment
whose ServiceType is a `CodableConcept` which may have many Codings.

Signe... (continued)

16879 of 19141 branches covered (88.18%)

Branch coverage included in aggregate %.

180 of 186 new or added lines in 6 files covered. (96.77%)

30887 of 32622 relevant lines covered (94.68%)

13879.74 hits per line

Uncovered Changes

Lines Coverage ∆ File
5
89.92
packages/server/src/fhir/operations/book.ts
1
97.62
packages/server/src/fhir/operations/utils/scheduling.ts
Jobs
ID Job ID Ran Files Coverage
1 21497127484.1 29 Jan 2026 10:40PM UTC 720
92.28
GitHub Action Run
Source Files on build 21497127484
  • Tree
  • List 720
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 55a22d56 on github
  • Prev Build on gh-readonly-queue/main/pr-8324-651bc44076ef46079a3afe9414e4fb65a8fc073a (#21495547351)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc