-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trouble parsing an HL7 message with a repeating group #325
Comments
Hi @ppc001, could you please share more context of your question? Does the converter work fail to get the OBX segment or the NTE segments? BTW, could you please share the raw liquid template you created instead of the snapshot? |
Attached is the liquid template
From: Boya Wu ***@***.***>
Sent: Wednesday, October 20, 2021 2:05 AM
To: microsoft/FHIR-Converter ***@***.***>
Cc: Costner, Phil C. ***@***.***>; Mention ***@***.***>
Subject: Re: [microsoft/FHIR-Converter] trouble parsing an HL7 message with a repeating group (#325)
External Email: Use Caution opening links or attachments
Hi @ppc001<https://github.com/ppc001>, could you please share more context of your question? Does the converter work fail to get the OBX segment or the NTE segments? BTW, could you please share the raw liquid template you created instead of the snapshot?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#325 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APSI2WNNFTMASR43UNVIU5DUHZLYHANCNFSM5F7UTKKA>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
We are here to help you get the care you need. Visit Novant Health<http://novanthealth.org/coronavirus> or Novant Health UVA<https://www.novanthealthuva.org/about-us/newsroom/coronavirus.aspx> for up-to-date information.
Estamos aquí para ayudarle con el cuidado que usted necesita. Visite Novant Health<http://novanthealth.org/coronavirus> o Novant Health UVA<https://www.novanthealthuva.org/about-us/newsroom/coronavirus.aspx> para información actualizada.
This message and any included attachments are from NOVANT HEALTH INC. and are intended only for the addressee(s). The information contained herein may include trade secrets or privileged or otherwise confidential information. Unauthorized review, forwarding, printing, copying, distributing, or using such information is strictly prohibited and may be unlawful. If you received this message in error, or have reason to believe you are not authorized to receive it, please promptly delete this message and notify the sender by email. If you believe that any information contained in this message is disparaging or harassing or if you find it objectionable please contact Novant Health, Inc. at 1-844-266-8268 or forward the email to ***@***.******@***.***>.
|
I attached the liquid template as ORU_R01.txt to the issue on GitHub.
The converter is able to process the first OBX but any of the OBX or NTE segments following it.
From: Boya Wu ***@***.***>
Sent: Wednesday, October 20, 2021 2:05 AM
To: microsoft/FHIR-Converter ***@***.***>
Cc: Costner, Phil C. ***@***.***>; Mention ***@***.***>
Subject: Re: [microsoft/FHIR-Converter] trouble parsing an HL7 message with a repeating group (#325)
External Email: Use Caution opening links or attachments
Hi @ppc001<https://github.com/ppc001>, could you please share more context of your question? Does the converter work fail to get the OBX segment or the NTE segments? BTW, could you please share the raw liquid template you created instead of the snapshot?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#325 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APSI2WNNFTMASR43UNVIU5DUHZLYHANCNFSM5F7UTKKA>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
We are here to help you get the care you need. Visit Novant Health<http://novanthealth.org/coronavirus> or Novant Health UVA<https://www.novanthealthuva.org/about-us/newsroom/coronavirus.aspx> for up-to-date information.
Estamos aquí para ayudarle con el cuidado que usted necesita. Visite Novant Health<http://novanthealth.org/coronavirus> o Novant Health UVA<https://www.novanthealthuva.org/about-us/newsroom/coronavirus.aspx> para información actualizada.
This message and any included attachments are from NOVANT HEALTH INC. and are intended only for the addressee(s). The information contained herein may include trade secrets or privileged or otherwise confidential information. Unauthorized review, forwarding, printing, copying, distributing, or using such information is strictly prohibited and may be unlawful. If you received this message in error, or have reason to believe you are not authorized to receive it, please promptly delete this message and notify the sender by email. If you believe that any information contained in this message is disparaging or harassing or if you find it objectionable please contact Novant Health, Inc. at 1-844-266-8268 or forward the email to ***@***.******@***.***>.
|
Got it. The current behavior of Currently, the segment filters in converter lack the context of grouping and have limited functions. We will investigate more about how to support it in future. As a workaround for this special case, we can use
|
Hey @yankunhuang-pku, Wanted to check-in on the progress of this issue. |
We are implementing a new filter to solve this problem. I'll let you know if it's ready. |
good afternoon, |
We plan to release it this week or next week if nothing goes wrong. |
great to hear! do you have a more precise timeline at this time? |
We released a filter called |
Closing per Yankun's solution above. Please re-open if you have additional questions, thanks! |
Thank you for creating the changes and releasing the filter @yankunhuang-pku. For bkr_998302, the intended result would be to have the NTE segments(notes/comments) of line 23-32 in the sample data file to follow OBX |9| (Observation) from line 22 as seen in MSFT_2 below Currently, with the most recent version of the FHIR converter, the NTE segments follow every single OBX instances from line 14 through 22 plus an additional instance in the ServiceRequest resource group. (line 12). We added the filter at the obrSegment level as you can see in MSFT_4 below on line 453. This deleted all nteSegments under Observations and only kept the nteSegments in the ServiceRequest resource group as seen in MSFT_3 below For bkr_998330_2, the intended result is for the NTE segments to populate the correct Observation resources and for all the Observations to get converted. With the most recent converter update, we have noticed that the notes/comments are populating the correct Observation resources as seen in MSFT_5 below. However, the following OBX and NTE segments (lines 14-42) end up getting lost and not converted. I believe this issue also stems from the NTE filtering that ends up ignoring OBXsegments that follow NTE segments. please advise on how we can achieve our intended results and move forward. Please let me know if further documentation would be necessary or helpful. |
Are these tests based on the VS Code extension? At present, we can only use the command line tool in this project to try the new filter, which has not been released on the VS Code side. Could you test these cases with the command line tool first? |
We tried testing the split_data_by_segments filter from the command line and got the following error C:\tmp\Microsoft.Health.Fhir.Liquid.Converter.Tool>.\Microsoft.Health.Fhir.Liquid.Converter.Tool.exe convert -d C:\Users\ppc001\source\repos\fhir_liquidtemplates -r ORU_R01 -i c:\tmp\fhir_input -o c:\tmp\fhir_output Here is the code snippet that was called. {% assign obxSegmentLists = hl7v2Data | split_data_by_segments 'OBX|NTE' -%} Not sure if we did something wrong there |
Do you have a timeline for the VS Code release? |
This case may be because you wrote it wrong. Missing symbol |
Yes, it will be released later than this tool. The specific delay time depends on other work. |
Thank you for that correction. I totally missed that and it completed successfully after I added the :. However, it is still not producing the results that I am expecting.
Do you have an example of how you tested this new filter?
From: yankunhuang-pku ***@***.***>
Sent: Thursday, January 20, 2022 10:10 PM
To: microsoft/FHIR-Converter ***@***.***>
Cc: Costner, Phil C. ***@***.***>; Mention ***@***.***>
Subject: Re: [microsoft/FHIR-Converter] trouble parsing an HL7 message with a repeating group (#325)
External Email: Use Caution opening links or attachments
We tried testing the split_data_by_segments filter from the command line and got the following error
C:\tmp\Microsoft.Health.Fhir.Liquid.Converter.Tool>.\Microsoft.Health.Fhir.Liquid.Converter.Tool.exe convert -d C:\Users\ppc001\source\repos\fhir_liquidtemplates -r ORU_R01 -i c:\tmp\fhir_input -o c:\tmp\fhir_output Processing c:\tmp\fhir_input\bkr_998302.hl7 Process failed: Error happened when rendering templates: Error - Filter 'split_data_by_segments' does not have a default value for 'segmentIdSeparators' and no value was supplied
Here is the code snippet that was called.
{% assign obxSegmentLists = hl7v2Data | split_data_by_segments 'OBX|NTE' -%}
Not sure if we did something wrong there
This case may be because you wrote it wrong. Missing symbol : after split_data_by_segments
—
Reply to this email directly, view it on GitHub<#325 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APSI2WLPHLKUPBJMQJXGFT3UXDFBPANCNFSM5F7UTKKA>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
We are here to help you get the care you need. Visit Novant Health<http://novanthealth.org/coronavirus> or Novant Health UVA<https://www.novanthealthuva.org/about-us/newsroom/coronavirus.aspx> for up-to-date information.
Estamos aquí para ayudarle con el cuidado que usted necesita. Visite Novant Health<http://novanthealth.org/coronavirus> o Novant Health UVA<https://www.novanthealthuva.org/about-us/newsroom/coronavirus.aspx> para información actualizada.
This message and any included attachments are from NOVANT HEALTH INC. and are intended only for the addressee(s). The information contained herein may include trade secrets or privileged or otherwise confidential information. Unauthorized review, forwarding, printing, copying, distributing, or using such information is strictly prohibited and may be unlawful. If you received this message in error, or have reason to believe you are not authorized to receive it, please promptly delete this message and notify the sender by email. If you believe that any information contained in this message is disparaging or harassing or if you find it objectionable please contact Novant Health, Inc. at 1-844-266-8268 or forward the email to ***@***.******@***.***>.
|
we have tested with command line and we are seeing the same issues. I have attached the input sample data files and some images detailing what we are seeing and what we wish to see. I have also attached what current outputs we currently see. please re-open this issue thread |
@ppc001 @ydequin21 I think it may be the error of your template logic. Here I can provide some usage for your reference. You can try to write your template logic like this sample. Please note that you should use command line tool instead of VS Code extension. If you have other questions, please provide the templates corresponding to your input data and outputs. |
@yankunhuang-pku, thank you for looking into our previous issues. We originally thought the issue above pertaining to bkr_998330 had to do with the new filter but the issue persists without the filter when using the most recent FHIR Converter template and resources. I have included the ORU_R01.liquid template. it is your current most updated version without custom changes. The input(bkr_998330 input) has NTE under OBR, OBX |1|, and OBX |2|. In our JSON output we clearly see the note under Service Request(OBR) and one Observation (OBX |1|) but there is not another Observation (OBX |2|) so we lose the entire observation with all the notes that followed it. I have also reattached the expected output for a clearer perspective on what the issue is. Moving on with our project we are not using the latest upgrade because of these code-breaking issues. |
The reason for this problem is that the templates are still old and the behavior is the same as before if you haven't modified the templates. We have not replaced the old filter |
Closing this as we have the filter |
I am trying to parse an HL7 ORU^R01 message with a repeating group. The message has the following format:
MSH
PID
[{NTE}]
[{NK1}]
PV1
{
ORC
OBR
[{NTE}]
{
[
OBX
[{NTE}]
]
}
}
MSH|^
&|BKR|NHCIEBC|||20210927003525|LABBACKGROUND|ORU^R01|38335214|P|2.3|||||||||PHLabReport-Ack^^2.16.840.1.114222.4.10.3^ISO||^NET^Internet^none@noemail.com||ENGLISH|||999999999999|999999999|||Not Hispanic||||||||N|||20190617163909|1||PID|1||59999999^^^NOVANT^CIPID|1||59999999^^^NOVANT^CI||JXXXXX^TXXXX^CXXXXXX||19010101|F||2|200 HAWTHORNE LANE^^CHARLOTTE^NC^28204^USA^P^^MECKLENBUR||(999)999-9999^PRN^PH^^1^999^9999999
59999999^^^NOVANT^CI||JXXXXX^TXXXX^CXXXXXX^JXXXXX^TXXXX^CXXXXXX||19010101|F||2|200 HAWTHORNE LANE^^CHARLOTTE^NC^28204^USA^P^^MECKLENBUR||(999)999-9999^PRN^PH^^1^999^9999999^NET^Internet^none@noemail.com||ENGLISH|||999999999999|999999999|||Not Hispanic||||||||N|||20190617163909|1|NTE|1|O|Signature - Acct: 99999999|
NTE|2|O|Allscripts - Gill Ortho, ChartID: 9999 EHR Mrn: 99999999|
NK1|1|ALMOND^CHRIS^^|Son|6225 SWIMMING DUCK RD^^CHARLOTTE^NC^28214^USA|(704)999-9999^^CP^^^704^9999999|||||||||||||||||||||||||||
NK1|2|BERRY^TAI^^|Daughter-in-|6225 SWIMMING DUCK RD^^CHARLOTTE^NC^28214^USA|(704)999-9999^^PH^^^704^9999999~(704)988-8888^^CP^^^704^9888888|||||||||||||||||||||||||||
PV1|1|OC|NHCIEBC^^^NHCIEBC^^^^^^^|||||9999999999^A^KETAN^B^^^^^^^^^NPI|||||||||||999999999999|Medicare Man||||||||||||||||||||||||20210923091309|20210923111059|||||8400112385
ORC|RE|936013155||21LCA-266S0345^Beaker|||^^^20210927^^R|935055050^56102788&Beaker|20210927003519|INFBLCRI^ACUTE INTERFACE^INCOMING^BEAKER LC RES^||8888888888^S^KIM^S^^^^^^^^^NPI|NHCIEBC^^^NHCIEBC^^^^^|(999)999-6500^^^^^999^9996500|20210927003519|||DKT2UA2490PL0^DKT2UA2490PL0^^100101001^LSC FAMILY MEDICINE||||||9 Queens^Ste 520^CHARLOTTE^NC^28204-3215^USA^C^^MECKLENBUR|||||||LAB304838^CULTURE, URINE^NH BEAKER EAP^^^^^^CULTURE, URINE
OBR|1|936013155||LAB3041225^URINE CULTURE RESULT^NH BEAKER EAP^^^^^^URINE CULTURE RESULT||20210927|20210923093255|||SES091^STARK^SHARON^E^|G||R30.0^Dysuria^ICD-10-CM^^^^^^Dysuria|20210923000000|Urine&Urine^^^Urine, Clean&Urine, Clean Catch|1376800698^STRICKLAND^KIMBERLY^S^^^^^^^^^NPI|(980)302-6500^^^^^980^3026500|||||20210927003500||Lab Only|F||^^^20210927^^R||935055050^56102788&Beaker|||&Acute Interface&Incoming&Beaker Lc Res&||||20210927||||||||||||||LAB304838^CULTURE, URINE^NH BEAKER EAP^^^^^^CULTURE, URINE
NTE|1|L|Performed at: 01 - LabCorp Burlington|
NTE|2|L|1447 York Court, Burlington, NC 272153361|
NTE|3|L|Lab Director: Sanjai Nagendra MD, Phone: 8007624344|
TQ1|1||||||||R
OBX|1|ST|10094^C URINE 1^NH BEAKER LRR^^^^^^C URINE 1||Klebsiella pneumoniae|||A|||F|||20210923093255|||||20210927003500||||NH LABCORP^D|SEE NOTES^^^^^^B||||||
NTE|1|L|Cefazolin <=4 ug/mL|
NTE|2|L|Cefazolin with an MIC <=16 predicts susceptibility to the oral agents|
NTE|3|L|cefaclor, cefdinir, cefpodoxime, cefprozil, cefuroxime, cephalexin,|
NTE|4|L|and loracarbef when used for therapy of uncomplicated urinary tract|
NTE|5|L|infections due to E. coli, Klebsiella pneumoniae, and Proteus|
NTE|6|L|mirabilis.|
NTE|7|L|50,000-100,000 colony forming units per mL|
OBX|2|ST|10098^C URINE SUS^NH BEAKER LRR^^^^^^C URINE SUS||Comment||||||F|||20210923093255|||||20210927003500||||NH LABCORP^D|SEE NOTES^^^^^^B||||||
NTE|1|L| ** S = Susceptible; I = Intermediate; R = Resistant **|
NTE|2|L| P = Positive; N = Negative|
NTE|3|L| MICS are expressed in micrograms per mL|
NTE|4|L| Antibiotic RSLT#1 RSLT#2 RSLT#3 RSLT#4|
NTE|5|L|Amoxicillin/Clavulanic Acid S|
NTE|6|L|Ampicillin R|
NTE|7|L|Cefepime S|
NTE|8|L|Ceftriaxone S|
NTE|9|L|Cefuroxime S|
NTE|10|L|Ciprofloxacin S|
NTE|11|L|Ertapenem S|
NTE|12|L|Gentamicin S|
NTE|13|L|Imipenem S|
NTE|14|L|Levofloxacin S|
NTE|15|L|Meropenem S|
NTE|16|L|Nitrofurantoin S|
NTE|17|L|Piperacillin/Tazobactam S|
NTE|18|L|Tetracycline S|
NTE|19|L|Tobramycin S|
NTE|20|L|Trimethoprim/Sulfa S|
SPM|1|||Urine^Urine^^^^^^^Urine||||Urine, Clean^Urine, Clean Catch^^^^^^^Urine, Clean Catch|||||||||20210923093255|20210923000000||||||
The messages has multiple OBX segments with multiple NTE segments following each OBX segment. The FHIR converter is only mapping the first OBX segment to an Observation resource. I need to map the NTE comments to the Observation.note.text FHIR attribute as well.
FYI: I am fairly new to the liquid markup language. Any help is greatly appreciate
d.
The text was updated successfully, but these errors were encountered: