We are implementing virtual folders to organize compositions as per episodes of care and encounters. The plan is to keep track of versioned compositions in encounters to capture the change of information(Complaints and diagnosis getting resolved across encounters inside an episode).This will allow us to view the compositions as they were in any encounter and not the latest version always.
For this we need to be able to query specific versions of compositions using aql. Can some body point me to the documentation or examples of how to do this?
It should be possible to query on versioned compositions but I feel a bit uncomfortable about using versioned data this way. For event-type compositions, I would only expect versions to be created as a result of an error correction, not as part of routine recording. For persistent-type compositions, new versions are routinely created but only when the previous version is reallyof little interest e.g summaries, status-tracking.
I’m uneasy about your suggested approach. Can you spell out an example/
If we take an OP episode, it will consist of possibly a screening encounter, then a consult encounter and one or more revisit encounters. We will start with recording data such as complaints, diagnosis, medication order etc . This data will be reviewed and updated in every subsequent encounters. So a complaint/diagnosis recorded in the consult may get marked as resolved during one of the subsequent revisits or sometimes something new gets added. A medication order made during the consult may get discontinued and another added later
The folders representing each of the encounters maintain a pointer to the corresponding versions of the composition so that the snapshot of the patient status is preserved and can be accessed(using an aql of versioned composition) any time into the future.
We are not using persistent compositions anywhere. To display a persistent status(Active complaints, diagnosis or medications), we use an aql to filter on status to display the relevant information. We expect that the doctor will review and update status of active items during an encounter. This is important for us as we are approaching the problem from a person centric view where the health status of the person concerned is evolving with every health encounter. Our patient summary is thus, always the last known status of the person.
By default the clinical information view is limited to an episode using virtual folders. But a summary view across episodes is also possible if we run the query outside the virtual folder context. Also in our case the compositions can get versioned as an episode progresses.
I hope that helps. Do feel free to point out any problems with our approach
If you are querying the EHR (or demographics) repository for older versions, the usual way to understand this concept is similar to in e.g. Github or other DVCS systems, which is: you are stating a time-point in system time and you want to see the data versions that were current then.
Hi Dileep, from your description of complaint/diagnosis usage, it feels that should be a persistent composition. And as I see it, for clinical use, the last version is the one that should be used. Review of previous versiosn of data is more for audit IMO.
From a clinician/modeller’s point of view, each of the consultations or visits that you describe as screening, consult encounter, revisit encounters are discrete events and need to be recorded using a separate event COMPOSITION. Each clinical consult will be recorded independently including identifying the changes from visit to visit. As part of a consult a diagnosis may be marked as resolved and that should be included as part of the consult record.
This information needs to be recorded once for medicolegal purposes and sensible querying. Similar data that needs both event based recording and sensible updated representation in summaries or persistent lists include medications, problem/diagnosis, immunisations, adverse reactions, social history, tobacco/alcohol summaries etc.
The question of where that data should be actually 1) stored vs 2) copied and displayed vs 3)displayed as the result of a query or 4) is not implemented consistently as far as I understand. Implementers please correct me if you have documented consensus.
For medicolegal purposes the consult record needs to be able to be accurately displayed and reintegrated on request, even if the component data is stored in a mix of event and persistent COMPOSITIONS.
I would think that you would also need to be able to keep a representation of the health summary, also primarily for medicolegal purposes, so that it could be determined precisely what the clinician viewed in that summary as they made a critical clinical decision, especially if it were to result in a bad outcome. That is one of the key reasons for the versioned persistent compositions.
And that will not prevent the patient summary being the last known status of the person – totally agree with your intent there. It’s just a question of how to be able to demonstrate what was the summary on a certain data, at a certain time.
Not helping with folders, but hope this contributes regarding consideration of event and persistent COMPOSITIONS. And further complicated with some of our CKM persistent COMPOSITIONS currently being constrained as events while we wait for some RM changes to support addition of context to the persistent ones.
yep, this is the way it should be in openEHR, and logically in any EHR. If you don’t do it like this, the data probably won’t make sense to other openEHR software, applications etc. also correct. You might consider the ‘health summary’ a ‘document’ of some sort, and you take the line that you are maintaining and updating just that summary rather than the constituent data. In that case, you could treat the summary as a persistent Composition and add versions to it as you say, but now your patient EHR doesn’t contain any clinical event data, only the data of a manually pre-built summary of those events. Generally it’s much more useful to record the event Compositions and just compute the summary. This can be easily facilitated by use of Folders that represent episodes, in a fashion already done by some of the vendors (at least DIPS and Code24). There is a in the RM that facilitates adding more data - this will appear in the next RM release, very soon. hope this helps.