OP-887 Aggregate all patient-linked data for GDPR portability export - #1633
Open
giuseppesorge wants to merge 2 commits into
Open
OP-887 Aggregate all patient-linked data for GDPR portability export#1633giuseppesorge wants to merge 2 commits into
giuseppesorge wants to merge 2 commits into
Conversation
Add PatientExport aggregate and PatientExportManager collecting admissions, OPDs, laboratories, therapies, operations, vaccines, examinations and bills (with items and payments) for a single patient. Add the patient.export permission (step_a128, may be renumbered at merge) and small read helpers in PatVacManager and BillBrowserManager.
This was referenced Jul 2, 2026
Open
Contributor
Author
|
Dependent PRs building on this branch: informatici/openhospital-api#595, informatici/openhospital-gui#2229, informatici/openhospital-ui#778, informatici/openhospital-doc#289. Suggested merge order: this PR first (api/gui/ui CI cross-build against the fork branch until then). |
…ata-export # Conflicts: # sql/step_04_all_following_steps.sql
Contributor
Author
|
Merged |
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.
See OP-887.
Adds the aggregation side of the GDPR Art. 20 export: a
PatientExportplain aggregate and a newPatientExportManagercollecting, via the existing managers, the patient record plus admissions, OPD, laboratories, therapies, operations, vaccines, examinations and bills (with items and payments). Two small manager additions back it:PatVacManager.getPatientVaccines(patientCode)andBillBrowserManager.getPatientBills(patID).Notes for review:
PatientBrowserManager:TherapyManageralready constructor-injectsPatientBrowserManager, so the reverse edge would create a constructor cycle.patient.export, seeded bysql/step_a128_add_permission_patient_export.sql(P_ID_A 172, granted toadminas GP_ID 318) and mirrored inload_demo_data.sql. The step number and the two ids may need renumbering at merge: a118-a127 and the neighboring ids are reserved by other open PRs.patient.export(singular); every existing patient permission is plural (patients.*). Happy to rename topatients.exportif preferred — one-word change across the dependent PRs.Verified: new aggregation tests green (vaccines explicitly asserted, per the ticket note about the clinical sheet); the SQL was validated on a real MariaDB 10.6 for all three paths (fresh-install chain, upgrade-only step on an existing schema, full demo load).
Dependent PRs (same branch name for the fork cross-build): API, GUI, web UI and doc follow.