FHIR Chat · Observation invariant · implementers

Stream: implementers

Topic: Observation invariant


view this post on Zulip Elliot Silver (Feb 25 2022 at 20:10):

Looking at Observation obs-6, I notice that the invariant doesn't touch on cover component.value[x] or hasMember, nor does it matter what the status of the observation is (and thus, a registered or entered-in-error Observation must have a value or have a DAR). What is the logic for why these were left out?

I recall talk of an extension that could be used to convey an attachment as an Observation "value". I can't locate the extension in R4 right now, but how does that work with the above invariant logic? Is the extension on Observation or on an Observation.value[x] (and if so, which type)?

view this post on Zulip Lloyd McKenzie (Feb 25 2022 at 20:41):

@Eric Haas @Hans Buitendijk

view this post on Zulip Eric Haas (Feb 28 2022 at 15:45):

use the R5 or R3 valueAttachment element as an extension on Observation

view this post on Zulip Eric Haas (Feb 28 2022 at 15:53):

What is the logic for why these were left out?

made it simple as possible. Note only constrains when the DAR elelment can be used. Little value in trying to anticipate a bunch of edge cases here.

view this post on Zulip Lloyd McKenzie (Feb 28 2022 at 16:07):

Actually, with invariants, you need to anticipate all edge cases. However, in this case, I don't think status needs to be taken into account. The invariant as written would allow a DAR on a blood pressure with component systolic and diastolics. It would also allow a DAR on a blood panel. However, I think having a DAR when you have components is still legit. For example, you might indicate that you don't have a result of a susceptibility test to drug X. It might be reasonable to have a parent with members with a DAR, though it would be good to know what the use-case for that is.

view this post on Zulip Elliot Silver (Feb 28 2022 at 16:10):

So the invariant basically says "you can't have a DAR if you have a value" rather than "if you don't have a value, you need a DAR"? OK.

view this post on Zulip Giantape (Mar 16 2022 at 09:59):

Hi everyone. i like to implement kind of patient's diary. did you guys have any suggestions to me which resources the best to handle this usecase?
i found this article http://community.fhir.org/t/what-is-the-best-resource-to-represent-a-patients-diary-or-note/215/2
but still not clear if it still the right choise. it wroten in 2016.

thank you for any advice.

view this post on Zulip Lloyd McKenzie (Mar 16 2022 at 13:58):

Observation would probably be the best way to capture individual entries. If you're capturing specific discrete data each day, you could also group them with a parent Observation and hasMember.

view this post on Zulip Aly Khalifa (Apr 12 2022 at 15:36):

@Lloyd McKenzie - I'd like to profile the Observation resource, where having an invariant that requires the subject.identifier and/or specimen.identifier is present. Is this possible? where I could read more about developing this invariant, if this is possible? I checked https://hl7.org/fhir/uv/shorthand/reference.html, is there additional documentation? Thanks

view this post on Zulip Lloyd McKenzie (Apr 12 2022 at 16:20):

Invariants are expressed using FHIRPath. In this case, it would simply be subject.identifier.exists() or specimen.identifier.exists()
Note that this invariant wouldn't be satisfied if you had subject.reference or specimen.reference instead of identifier - and having reference is both more common and preferred than having .identifier, so make sure that's the constraint you really want.


Last updated: Apr 12 2022 at 19:14 UTC