Feat/epic native table wiring#121
Merged
Merged
Conversation
…gyIntolerance into native tables - Add migration 007_clinical_detail.sql: patient_conditions, patient_medications, patient_allergies tables with RLS, indexes, and updated_at triggers - Add conditionService, medicationService, allergyService with create/listForPatient following the same org-scoped + audit pattern as labResultService - Rewrite importPatient.js: Epic import now writes to fhir_resources AND materialises structured rows in all four native tables in a single call; adds materialised counts to the return value and audit log entry - Add postCreate hooks to Condition, MedicationRequest, AllergyIntolerance in fhir/resources/index.js so direct FHIR API writes also materialise natively - 6 new unit tests (15 total passing) covering all four resource types, edge cases (no value, code.text fallback, wrong resourceType skip) Co-authored-by: Cursor <[email protected]>
…ent docs - Confirmed token exchange against Epic May 2026 sandbox (Non-Production Client ID a8634931-c997-4516-90cd-21ec3a27813e) - JWKS hosted at gist.githubusercontent.com/NeuroKoder3/.../raw/jwks.json - All 5 core system scopes granted and verified: Patient, Observation, Condition, MedicationRequest, AllergyIntolerance - Trim DEFAULT_SCOPES to the confirmed-granted set; Encounter, Immunization, Organization, Procedure registered in app and will be re-added once propagated - Add scripts/epic-sandbox-check.mjs: full diagnostic (token, scopes, metadata, patient bundle fetch, native table materialisation preview) - Add scripts/epic-key-check.mjs: keypair consistency validator Co-authored-by: Cursor <[email protected]>
…andbox Co-authored-by: Cursor <[email protected]>
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.
Description
Brief description of the changes.
Type of Change
Testing
How has this been tested?
Checklist
Compliance Considerations
Screenshots
If applicable, add screenshots.