Stream: implementers
Topic: Using VersionID to capture changes over time
Håkan MacLean (Dec 15 2021 at 12:01):
Basic FHIR question here. If we use a resource, say an Observation, to capture the change of data over time (e.g. Patient Warnings or Social History), what would be the recommended way to indicate that an update is a new "version" of an old Observation? I have considered:
- Observation.meta.versionID
- Observation.derivedFrom
- Linkage resource
- Provenance resource
I like the versionID approach, because then it becomes trivial to fetch the latest version and we can also utilise versioned updates. However, I'm wondering if we're misusing the versioning functionality and that perhaps it should mainly be used for amending/correcting Observation and not to keep track of updates over time?
Observation.derivedFrom I guess would work and you would have to look through all derivedFrom values to figure out what is the latest version. And the approach perhaps doesn't work other types of resources.
The Linkage and Provenance resource has the drawback it puts more burden on the Client, to send us multiple objects in a Bundle.
What is the recommended FHIR way?
John Moehrke (Dec 15 2021 at 12:15):
The solution will also depend on if your server supports versioning. It is only with a versioning server would "Update" work, as it is only then that previous versions are preserved. Provenance would not necessarily be needed, but would add explaination as to why the version happened.
John Moehrke (Dec 15 2021 at 12:15):
But, it seems you just have a set of Observations.
John Moehrke (Dec 15 2021 at 12:17):
Just like with a new body-temperature measurement does not obsolete the previous, it is just another Observation. The very fact that both are body-temperature measurements and have a date/time; that you understand them over time. So I would just say a set of Observations. Only linkage are that they are all the same code.
Håkan MacLean (Dec 15 2021 at 17:47):
The solution will also depend on if your server supports versioning
We are creating this FHIR server from scratch, so that is not a problem :).
Just like with a new body-temperature measurement does not obsolete the previous, it is just another Observation.
The very fact that both are body-temperature measurements and have a date/time; that you understand them over time.
So I would just say a set of Observations.
Well, in our use case it slightly different. We are considering capturing some free text data using FHIR Observation, like for example Warnings and Social History. In this use case one clinician might open an old Observation from a year back, add some information, and then store it again. To me there is some kind of lineage between these Observations since the Clinician is, in a sense, editing and updating the old Observation. How would one capture this lineage?
Alexander Zautke (Dec 15 2021 at 19:05):
If you just want to have the link between the Observations, it would probably be enough to link them to a subject and re-use the same code in each Observation. If you want to have them back, you can query on both elements.
Lloyd McKenzie (Dec 15 2021 at 20:47):
The typical behavior is as @Alexander Zautke says. However, if you want to specifically assert that a new Observation 'replaces' a previous one, there's a standard extension for that - http://hl7.org/fhir/extension-observation-replaces.html
Last updated: Apr 12 2022 at 19:14 UTC