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

medplum / medplum / 25902758472 / 1
92%
main: 92%

Build:
Build:
LAST BUILD BRANCH: gh-readonly-queue/main/pr-9362-2499a40f521dd19e9b273e6329f6a807372a3f4a
DEFAULT BRANCH: main
Ran 15 May 2026 05:59AM UTC
Files 903
Run time 29s
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

15 May 2026 05:52AM UTC coverage: 92.256% (+0.003%) from 92.253%
25902758472.1

push

github

web-flow
Add $cancel Scheduling operation (#9157)

* Add $cancel Scheduling operation

Adds the `/Appointment/$cancel` FHIR operation, which cancels a booked
or pending appointment by setting its status to cancelled and deleting
all referenced Slot resources in a serializable transaction.

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

* Convert $cancel to instance level operation

In review @ThatOneBro pointed out that this looks like it is best
expressed as an instance-level operation. Let's switch over!

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

* PR Feedback: Include current state in error message

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

* Fixup $cancel docs for instance-level operation

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

* Distinguish book/cancel test dates

These tests are sometimes failing due to transaction serialization
failures in CI; example:
https://github.com/medplum/medplum/actions/runs/25828720885/job/75888642509?pr=9157

It seems to be the case that the `$book` and `$cancel` tests are run
simultaneously due to their alphabetical proximity, and they both are
causing updates to the Slot and Appointment tables.

One thought is that there are search parameters on fields like
Slot.start that generate indexes on the data in these fields. Because
these tests were initialized by copy/paste, they share some dates. This
makes it quite likely that they are touching the same entries in those
indexes.

The idea here is that we can potentially prevent that collision by
making the start times in one test case distinct from the other.

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

* Increase transactionAttempts in scheduling tests

We're still seeing some issues in CI where $cancel and $book seem to be
colliding. Let's try turning up the transactionAttempts to see if we can
make this more resilient.

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

* Use `makeOperationDefinition` helper

Following the pattern set in #9205.

Sig... (continued)

21930 of 24757 branches covered (88.58%)

Branch coverage included in aggregate %.

44435 of 47179 relevant lines covered (94.18%)

18646.71 hits per line

Source Files on job 25902758472.1
  • Tree
  • List 903
  • Changed 84
  • Source Changed 1
  • Coverage Changed 84
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 25902758472
  • 461d394d on github
  • Prev Job for on gh-readonly-queue/main/pr-9157-9470dc99be00f22d1fd35dd44a4f522a7f799bb4 (#25889897429.1)
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