microsoft / FHIR-Converter

Conversion utility to translate legacy data formats into FHIR
MIT License
415 stars 180 forks source link

OBX -5 where OBX-2 is SN allows for a comparator value of = and <>; however FHIR does not #504

Open lmichlsen opened 1 year ago

lmichlsen commented 1 year ago

If you have an OBX similar to below which are both v2 valid comparators OBX|1|SN|3339-4||=^23... or OBX|1|SN|3339-4||<>^23...

From v2.9 2.A.70.1 Comparator (ST) Defined as greater than, less than, greater than or equal, less than or equal, equal, and not equal, respectively (= ">" or "<" or ">=" or "<=" or "=" or "<>" If this component is not valued, it defaults to equal ("=").

Converter converts = and <> to "valueQuantity": { "comparator": "<>", "value": 23

valueSet in FHIR only allows for

Code | Display | Definition-- | -- | -- < | Less than | The actual value is less than the given value. <= | Less or Equal to | The actual value is less than or equal to the given value. >= | Greater or Equal to | The actual value is greater than or equal to the given value. > | Greater than | The actual value is greater than the given value. This results in invalid FHIR output
lmichlsen commented 1 year ago

Not sure how <> should be handled question to chat.fhir.org logged https://chat.fhir.org/#narrow/stream/179188-v2-to-FHIR/topic/Not.20equal.20comparator

evachen96 commented 11 months ago

Hi @lmichlsen ! Thanks for submitting this issue. Hoping to get some more information about your use case to help us assess possible solutions.

From https://jira.hl7.org/browse/V2-25657, we agree with you that it could be concluded that = is just a value without a comparator. For the not equal case (<>), you mentioned that you've never seen that result in a lab test but there may be other observation types that need it, could you provide any examples?

Additionally, are you already using extensions right now? Extensions are one possible way we could tackle this, but wanted to see if your current setup already uses extensions/thoughts on usability of extensions.

Thanks!

lmichlsen commented 11 months ago

The suggestion I got from Zulip was to make <> value a string

Get Outlook for iOShttps://aka.ms/o0ukef


From: Eva Chen @.> Sent: Thursday, January 4, 2024 6:33:39 PM To: microsoft/FHIR-Converter @.> Cc: Michaelsen, Linda J @.>; Mention @.> Subject: Re: [microsoft/FHIR-Converter] OBX -5 where OBX-2 is SN allows for a comparator value of = and <>; however FHIR does not (Issue #504)

Caution: External email. Do not open attachments or click on links if you do not recognize the sender.

Hi @lmichlsenhttps://github.com/lmichlsen ! Thanks for submitting this issue. Hoping to get some more information about your use case to help us assess possible solutions.

From https://jira.hl7.org/browse/V2-25657, we agree with you that it could be concluded that = is just a value without a comparator. For the not equal case (<>), you mentioned that you've never seen that result in a lab test but there may be other observation types that need it, could you provide any examples?

Additionally, are you already using extensions right now? Extensions are one possible way we could tackle this, but wanted to see if your current setup already uses extensions/thoughts on usability of extensions.

Thanks!

— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/FHIR-Converter/issues/504#issuecomment-1877953067, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJNJT2FZR2VDY6VYI7SH2HDYM5C6HAVCNFSM6AAAAAA76ONHIOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZXHE2TGMBWG4. You are receiving this because you were mentioned.Message ID: @.***>

This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or intended recipient’s authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately.

evachen96 commented 11 months ago

@lmichlsen Do you happen to have any examples or potential examples of use cases when the not equal <> comparator would be needed?