...
how should we deal with admin required functionality, e.g. destroy EHR, Compositions, Actors, etc ? Need a specific endpoint /admin or use DELETE action over resources, assuming ACL permits ?
DELETE /admin/ehr/{:ehr_id}
DELETE /admin/ehr/{:ehr_id}/composition/{:composition_id}
see https://ehrbase.readthedocs.io/en/latest/03_development/07_admin/index.html
later (less prio) also merge, unmerge, move content
delete template is problematic, if is “in use” - but on the other hand this is an admin endpoint, so it should be fine
export / import
/admin/ehr/exports
/admin/ehr/import
configure the export/import task scope with a payload (e.g. all-ehrs, subset of ehrs based on their ehrIds, “some compositions”)
background tasks - consider polling
need to define what will be the format for this dump - zip? (Seref:) sqlite? (Severin:) csv or json?
we will need to define schema for this export format
Ian: see Josh Mandel on dumping ehr-data
do we need something like ehr_extract ?
self-contained package, including templates, archetypes; maintaining cross references, versioning, contribution
import should work on existing populated CDR
what if template or other data already exists?
Alex: consider keycloak import/export strategies
consider flag to anonymize data upon export
can be used for data migration from one CDR to another, or another version
merging EHRs
parameters: source ehr-id and target ehr-id
Sebastian: it will move data from old ehr to new ehr
Sebastian: might be possible to use ehr_status to indicate that source ehr was merged, perhaps use folders or tags to mark the merged content
Alex: use ehr_status other_details or feeder_audit to indicate merging information
see also https://discourse.openehr.org/t/linking-and-merging-ehr-ids/1192/14
Erik: I wonder if merge is a variant action of moving data
better has also
unmerge
andmove
operationshow to deal with merge-conflicts ? imagine merging persisting compositions, episodes, demographic data, duplicates tags, etc
archiving/shredding Person/EHR (partial, cohort)
system?
...