Skip to content

move terminal details to Device resource from Location extension (initial commit)#7367

Merged
rzinger merged 5 commits intodevelopfrom
rzinger/otr-2432-rcm-ehr-store-per-location-card-reader-terminal-as-a-device
May 1, 2026
Merged

move terminal details to Device resource from Location extension (initial commit)#7367
rzinger merged 5 commits intodevelopfrom
rzinger/otr-2432-rcm-ehr-store-per-location-card-reader-terminal-as-a-device

Conversation

@rzinger
Copy link
Copy Markdown
Contributor

@rzinger rzinger commented May 1, 2026

No description provided.

…tial commit)

Co-authored-by: Copilot <copilot@github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates Stripe terminal location configuration from a Location extension to a dedicated Device resource, updating both backend zambdas and the EHR UI to read/write terminal location IDs via Device.

Changes:

  • Update save-terminal-location to create/update/delete a Device (instead of mutating Location.extension).
  • Update get-payment-locations to return stripeTerminalLocationId by joining Location results with terminal-config Device resources.
  • Add shared utils for finding the terminal-config Device and extracting the terminal location identifier; update EHR types/tests and config seed data accordingly.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/zambdas/test/rcm/save-terminal-location.test.ts Updates handler tests to validate create/update/delete behavior against Device resources.
packages/zambdas/src/rcm/payments/save-terminal-location/index.ts Migrates persistence from Location extension to Device create/update/delete.
packages/zambdas/src/rcm/payments/get-payment-locations/index.ts Adds stripeTerminalLocationId to response by querying terminal-config Device resources.
packages/utils/lib/fhir/payments.ts Adds helpers to find terminal-config Device for a Location and read the terminal location identifier.
packages/utils/lib/fhir/constants.ts Introduces new constants for device type + identifier system; marks old extension URL as deprecated.
config/oystehr/locations-and-schedules.json Moves seeded terminal location data from a Location extension to a seeded Device resource.
apps/ehr/tests/component/PaymentLocationDetailPage.test.tsx Updates mocked PaymentLocation objects to include stripeTerminalLocationId.
apps/ehr/src/rcm/state/payments/payments.api.ts Extends PaymentLocation API type with stripeTerminalLocationId.
apps/ehr/src/pages/PaymentLocationDetailPage.tsx Switches UI to consume stripeTerminalLocationId from API response instead of reading a Location extension.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/zambdas/src/rcm/payments/save-terminal-location/index.ts
Comment thread packages/utils/lib/fhir/payments.ts
Comment thread packages/utils/lib/fhir/constants.ts Outdated
Comment thread packages/zambdas/src/rcm/payments/save-terminal-location/index.ts
@rzinger rzinger requested a review from alexwillingham May 1, 2026 19:30
Comment thread packages/zambdas/src/rcm/payments/save-terminal-location/index.ts
@rzinger rzinger merged commit 583727f into develop May 1, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants