How does openEHR handle linking of multiple EHR ids which are generated for the same patient?
Ideally, we would like to have 1 EHR id per patient, but sometimes a temporary EHR ID may have to be generated for things like emergency care. Administrative errors are also another reason why this might happen.
How does one handle merging/linking EHR ids in an openEHR data repository (like EHRBase / EHRServer)?
These are understood as admin functions - merge and de-merge, that would be included in a service like this (not there yet).
To support that, you have to use a service such as EHR Index (also draft) or e.g. an IHE service to maintain the EHR id x subject id (i.e. patient id) relationships. This can be a NxN relationship, due to various factors, including the error same patient being giving 2 EHRs (an annoying error), 2 patients having data put in the same EHR (a dangerous error).
All of this presumes that you will not put subject ids (i.e. patient ids) into the EHRs directly, which is a common option in openEHR.
I am not sure what a ‘temporary EHR ID’ is - an EHR id in openEHR is just a GUID. You might have temporary patient ids, but the above arrangement will take care of that.
I am using the subject Id (hospital number) in the EHR. In case of emergency care, the patient identification will take some time, so we usually assign a temporary hospital ID (subject ID). I’m trying to see how to go about doing it using openEHR. It’s common to have multiple patient records associated with the same patient. So which EHR should the new data be added to?
And until the Admin Service becomes more mature and gets implemented by EHRBase, should compositions just be recommitted to the same EHR ID manually?
This is best managed in the demographics of the patient. You could allow multiple IDs for the patient all linked to the same personUuid and use that to create the ehrId.
That way you can assign temporary id to start with and later assign actual hospital id and still ensure that the ehr points to the same
I do not think merging of ehrs are described as part of openEHR specs and in fact it may never be.
It will probably ramain implementation specific. In fact it may beat be handled as a db function of finding and replacing one ehrid with another one.
It is good to hear that ehrbase has it in their roadmap.
I’ve always seen that as the “source of truth” (i.e. The real subject as identifier on the system). Other ids (e.g. national ones) would be stored in the other details. Maybe the same could be used for legacy identifiers
That is exactly the purpose of the EHR Index service, or equivalently IHE PIX service - but to be able to do this, you can’t use the simple option of putting the / a subject-id inside the EHR. It has to be a separate location. Logically, it can be a very simple table, with columns such as:
other meta-data columns
You would normally want to index on at least the first two columns.
It is not a complex thing to agree on at least a simple version of the above and document that in openEHR, such that it can be implemented e.g. in EhrBase etc. I think adding multiple subject ids directly to EHRs will only cause problems.
This would not be the case with an openEHR system. Separate EHRs causes all kinds of problems - where does the master problem list go? Medications list? Allergies? Patient preferences?
This is what we have tried to do in EHR.Network. All the external IDs including the hospital IDs are mapped to the subject_id in the demographic service. This subject_id is in turn linked to the ehr_id. This ensures that we are able to maintain one unique ehr_id for a person.
However the merging of ehr_ids when multiple ones have been created accidentally is a more complex problem. For the sake of clinical accuracy and audit, this will need a workflow and decisions outside the EHR system to validate and document this change before actually doing it within the system. The actual process of merge is implementation specific as it may involve changes to multiple services such as EHR index, EHR and possibly other services that support the clinical application.
Where I used the term subject_id, I just mean any of those external ids. I think you are using subject_id as the reliable id of a single master instance of a patient’s entry in the demographics system. In that case, your EHR index service DB table needs to be:
external_id / patient_id / whatever (potentially N of these)
Yes, true - but my knowledge of real hospital systems and contexts tells me that it’s hard (maybe impossible) to escape 100% from this. There always has to be this merge / demerge function in the system.
Our (company Better) EHR Server has an administration function to merge EHRs. It physically moves all compositions from one EHR to another, but keeps a note of that in case the operation needs to be undone due to an error (“unmerge”). I find this to be quite an elegant and definitely a totally transparent solution, but I don’t think it needs to be standardised.