Skip to content
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

MSH.9.2 returns MSH.9.1 value #155

Open
cragun47 opened this issue Jul 27, 2021 · 2 comments
Open

MSH.9.2 returns MSH.9.1 value #155

cragun47 opened this issue Jul 27, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@cragun47
Copy link
Contributor

Describe the bug
If referencing MSH.9.2 or MSH.9.3, the value for MSH.9.1 is returned. This happens in many cases but we have found one case where it works.

To Reproduce
In Address.yml, change addressee var to MSH.9.2:

line:
     type: STRING
     valueOf: 'GeneralUtils.makeStringArray( street, suiteApt, addressee)'
     generateList: true
     expressionType: JEXL
     vars:
          street: String, XAD.1
          suiteApt: String, XAD.2
          addressee: String, MSH.9.2

Run a test patient, such as Hl7AddressFHIRConversionTest.java, which has an MSH.9 with multiple values. Example: |VXU^V04^VXU_V04|

The output in the address is:

 "address": [ {
        "type": "postal",
        "line": [ "123 Any St", "VXU" ],
        "city": "Somewhere",
        "state": "WI",
        "postalCode": "54000"
      } ]

Expected behavior
MSH.9.2 should return the second value in MSH.9

Additional context
The value returns correctly in this case:

In MessageHeader.yml, change id as follows:

id:
  type: STRING
  valueOf: MSH.9.2
  expressionType: HL7Spec
@cragun47 cragun47 added the bug Something isn't working label Jul 27, 2021
@xpander53
Copy link
Contributor

xpander53 commented Aug 2, 2021

Once this bug is complete we should be able to remove MSH from the additional segments of all the message resources. They were added for story 139 because MSH 9.2 and MSH 9.3 were resolving to MSH 9.1. Adding MSH to all the additional segments fixed it but that is essentially just a workaround.
See #160 for files changed

@LisaWellman
Copy link
Collaborator

HL7DataExtractor is the suspected location of this bug

@LisaWellman LisaWellman added the Hackathon candidate Issues for the Alvearie Hackathon label Oct 1, 2021
@LisaWellman LisaWellman removed the Hackathon candidate Issues for the Alvearie Hackathon label Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants