Stream: questionnaire
Topic: observationLinkPeriod and equivalent codes
Paul Lynch (Feb 15 2019 at 17:41):
I am testing observationLinkPeriod with two forms that have "height" and "weight" defined. In one form, "weight" is using LOINC 29463-7 ("Body weight"), for which there is data for the selected patient, and the field gets prepoluated with the latest value when the form is loaded. My other form just happens to use LOINC 3141-9 ("Body weight Measured") , for which disappointingly there is no data. This is a case where one would want to treat the two LOINC codes equivalently for the purpose for prepopulation. The most recent weight under either code is what should be filled in. Is there any mechanism for doing that?
Lloyd McKenzie (Feb 15 2019 at 17:45):
Not right now. Though with a vital sign like weight, if it's a compliant system, all weights are required to identify themselves with a single LOINC code (though others can also be present).
Lloyd McKenzie (Feb 15 2019 at 17:45):
What you'd presumably want to do is specify a value set rather than a single code, right?
Paul Lynch (Feb 15 2019 at 18:07):
The URL syntax is currently like http://.../Observation?code=codeSystem|code1. I would like to be able write:
http://.../Observation?code=codeSystem|code1,code2
to get results back for either code1 or code2.
NLM and Regenstrief are both working on equivalence classes, which might be useful to search on as well (but I am not sure if that is far enough along).
Paul Lynch (Feb 15 2019 at 20:48):
It looks like I should just be able to add another Coding to the item.code list. I will try that.
Lloyd McKenzie (Feb 15 2019 at 20:57):
You can certainly do code=codeSystem|code1,codeSystem|code2
Brian Postlethwaite (Jul 17 2021 at 03:52):
That format will then possibly return both or miss one if you have the count=1, or maybe consider the lastN
operation?
Paul Lynch (Jul 21 2021 at 18:41):
If you include _sort=-date&_count=1, it should get the right one.
Brian Postlethwaite (Jul 21 2021 at 21:09):
Which means you need to use a separate query for each code (rather than the one call)
Can do it as a batch query at least - but even that is still not going to optimize into a single SQL statement on the other end - or at least no chance of it anyway.
Paul Lynch (Jul 26 2021 at 17:04):
If the codes are equivalent, you don't need a separate query for each code.
Brian Postlethwaite (Jul 27 2021 at 02:06):
I was looking for a set of observations in one call, last height, weight and BMI
Lloyd McKenzie (Jul 27 2021 at 02:31):
You could call $lastn,
Lloyd McKenzie (Jul 27 2021 at 02:31):
(Though you'd have to manually filter if they had different linkPeriods)
Last updated: Apr 12 2022 at 19:14 UTC