Skip to content

feat(golden-id): return OpenCR golden id (CRUID) to the EMR and store as ECID - #68

Merged
mherman22 merged 1 commit into
IsantePlus:mainfrom
mherman22:feat/return-golden-id
Jul 8, 2026
Merged

mherman22 merged 1 commit into
IsantePlus:mainfrom
mherman22:feat/return-golden-id

Conversation

@mherman22

Copy link
Copy Markdown

What

After a patient is fed to OpenCR and deduplicated, resolve the golden record id (CRUID) and store it on the local patient as the ECID identifier — so the EMR holds the enterprise identity the Client Registry returns.

How

  • MpiClientService.getGoldenRecordId(patient) — queries OpenCR by the patient's iSantePlus ID, finds the linked golden record (by golden tag), and follows replaced-by to the surviving golden on merges. Returns null if unmatched.
  • MpiClientService.synchronizeGoldenRecordId(patient) — resolves it and stores it as the identifier type configured by mpi-client.pid.goldenRecordType (default ECID), suppressing the export advice so the write does not re-trigger a feed.
  • Wired into PatientUpdateWorker — runs on patient save after the PIX feed, so registration automatically stamps the golden id locally.
  • New config: mpi-client.pid.goldenRecordType (default ECID).

Notes

@mherman22
mherman22 merged commit 0f554f1 into IsantePlus:main Jul 8, 2026
1 check passed
@mherman22
mherman22 deleted the feat/return-golden-id branch July 8, 2026 15:17
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.

1 participant