Implement Immutable SOAP Clinical Notes (Append-Only)#148
Merged
inteee merged 5 commits intoCIVRA-INC:mainfrom Mar 8, 2026
Merged
Implement Immutable SOAP Clinical Notes (Append-Only)#148inteee merged 5 commits intoCIVRA-INC:mainfrom
inteee merged 5 commits intoCIVRA-INC:mainfrom
Conversation
inteee
requested changes
Mar 6, 2026
|
|
||
| const encounterId = req.body.encounterId ?? "mock-enc-123"; | ||
|
|
||
| if (req.body.type === "CORRECTION") { |
Contributor
There was a problem hiding this comment.
Please block nested corrections: CORRECTION notes should not be allowed to target another CORRECTION note. Corrections must only reference original non-correction clinical notes to keep amendment chains clear and compliant.
inteee
approved these changes
Mar 8, 2026
Contributor
inteee
left a comment
There was a problem hiding this comment.
Looks good to me. The changes are clear and well implemented. Approved.
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.
This PR introduces the initial implementation of immutable clinical notes for the LumenHealth EHR to ensure medical auditability. On the backend (
apps/api/src/modules/notes), aClinicalNoteModelis added with strict append-only behavior—PATCHandDELETEoperations are intentionally unsupported and return 405 Method Not Allowed. Notes are created viaPOSTusing a temporary hardcodedencounterId: "mock-enc-123". ACORRECTIONnote type is also supported, allowing doctors to issue a new note that visually supersedes a previous entry without modifying the original. On the frontend (apps/web/src/components/notes), this PR adds a segmented SOAP (Subjective, Objective, Assessment, Plan) editor using markdown or rich text, along with a chronological Notes Feed displaying author badges and timestamps for each entry. The feed visually representsCORRECTIONnotes (e.g., striking through the superseded note and referencing the new one). Form submission clears the editor and optimistically updates the feed. The API enforces that notes cannot be updated or deleted under any circumstances, ensuring a permanent audit trail.closes #115