Harden encounter estimate conversion and medication charge handoff - #198
Open
evangauer wants to merge 1 commit into
Open
Harden encounter estimate conversion and medication charge handoff#198evangauer wants to merge 1 commit into
evangauer wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
evangauer
marked this pull request as ready for review
August 11, 2026 11:51
This was referenced Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Why
The prior estimate conversion path could bypass the safer visit-invoice invariants, including medication dispense reconciliation and some inventory lock ordering. Older prescriptions refilled during a visit could also remain outside the signed clinical handoff even though their charge existed. Those gaps could create duplicate or stranded medication charges, stale confirmation conversions, incomplete checkout evidence, and deadlock victims during concurrent clinic work.
Clinic impact
Staff now review an estimate before promoting it into the active visit invoice. Performed medication work must be reconciled once, remains traceable to its exact dispense, and is included in the clinical handoff. Concurrent edits fail with clear refresh/review instructions instead of silently mutating stale work.
Validation
pnpm --filter @openpims/web test— 3,887 passed; 15 expected integration skipspnpm --filter @openpims/web type-checkpnpm --filter @openpims/db type-checkpnpm --filter @openpims/db db:generate— no schema changespnpm --filter @openpims/web buildgit diff --checkNo provider calls, SMS sends, payment charges, production mutations, or schema migrations are part of this change.