I’m currently working on mapping clinical source datasets to openEHR and persisting the resulting Compositions in EHRbase. My current dataset is MIMIC-IV, but the mapping system is intended to support other clinical datasets as well.
During the transformation, there might be several timestamps existing for the same source record:
the time when a clinical observation was made (MIMIC: charttime)
the start and end of interventions (MIMIC: starttime , endtime)
the time when information was entered or validated (MIMIC: storetime)
the time when information became available to clinicians (MIMIC: storetime)
the time when transformed data got imported into EHRbase (Local: MyOwnTime)
The exact meaning of storetime differs between source tables which makes the correct mapping even harder.
My problem is the following:
I would like to preserve the distinctions instead of treating every timestamp as “clinical event time”, because the differentiation can change the retrospective research outcome. Analyses based on event time versus information availability can produce different results.
My questions are:
Is is it appropriate to put timestamps like starttime , endtime and charttime into the clinical ENTRY structures, like EVENT.time, HISTORY.origin, etc.?
Where should a source-system documentation/validation/availability timestamp be represented? Is FEEDER_AUDIT intended for this purpose?
My concrete evaluation use case is the calculation of clinical scores, such as SOFA. I want to compare calculations based on when an event actually occured with calculations based on when the information actually was available. Therefore, retaining the different temporal meanings in a queryable correct way is important.
I would be interested in how experienced openEHR contributors would model this, especially when preserving source-system information for research is important.
the time when a clinical observation was made (MIMIC: charttime)
Definitely OBSERVATION.event.time and OBSERVATION.origin (they are identical for a point in time event)
the start and end of interventions (MIMIC: starttime , endtime)
What is meant by 'interventions in this context? Can you give an example?
the time when information was entered or validated (MIMIC: storetime)
COMPOSITION.context.start_time
the time when information became available to clinicians (MIMIC: storetime)
FEEDER_AUDIT_DETAILS.time (as the availability_time in the original system
the time when transformed data got imported into EHRbase (Local: MyOwnTime)
VERSION wrapper commit_time ( completed automatically when you commit a composition)
By interventions with starttime and endtime, I mean source records such as
an infusion running from 10:00 to 12:00
diagnostic procedures, e.g. an ECG performed from 9:00 to 9:05
any other treatment interval, e.g. invasive ventilation from 2:00 to 8:00
How would you model this? I feel like ACTION.time could be appropriate, but it seems like it only describes a point in time. I assume COMPOSITION.context.start_time/end_time should still represent the enclosed clinical session rather than individual interventions.
I would also like to clarify the storetime case. In my mapping, multiple MIMIC source rows can be grouped into one Composition. The Composition can therefore contain several clinical events, each with its own clinical times (charttime, starttime and endtime) and the additional storetime.
For example, one laboratory measurement Composition can contain several results that occured within the same time window for one patient but became available at different times.
My current approach looks like this now:
OBSERVATION.event.time and OBSERVATION.origin represent clinical event times
every transformed source row receives its own FEEDER_AUDIT, attatched to the closest corresponding EVENT, CLUSTER, ACTION, etc.
the FEEDER_AUDIT_DETAILS.time preserves the source events storetime.
COMPOSITION.context.start_time/end_time represent either the enclosed clinical session or the time window of events i put together into one Composition
VERSION.audit_details.time_committed is the commit time generated when the Composition is imported to EHRbase.
I think with that structure, my approach would also fit the specs that Thomas referenced. How do you see this?
It should be two instances of ACTION.time, each recorded against a careflow_step for respectively “Administration started” and “Administration completed” (or aborted). The current ACTION.medication is missing a “Dose administration completed” step. This should probably be added, either to the current archetype or when we get around to reworking the medication ACTION into 2-3 different archetypes, as we’ve been discussing on and off for a while.
If the specific interval is important, this should be OBSERVATION.ecg_result recorded against an INTERVAL_EVENT with EVENT.time set to 09:05, and the EVENT.width set to 5 minutes. If the specific interval isn’t important, it could be recorded in the same archetype but with a simple POINT_EVENT.
I would say this should be recorded using two instances of an ACTION archetype , possibly ACTION.procedure, and the respective careflow_steps for “Procedure commenced” and “Procedure completed” (or aborted).
Thanks @Silje, I agree with all of those suggestions …
If others are asking themselves "why is this so much more complex than the MMIC equivalents of starttime and endtime’, it is because MMIC is an ‘extract model’, which flattens out the original record, whereas openEHR is intended to match the way that these different start/stop events would be captured in real time.