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

Include the optional LongName attribute in the XML encoded output. #301

Closed
laxmi-lal-menaria opened this issue Jun 3, 2022 · 7 comments · Fixed by #308
Closed

Include the optional LongName attribute in the XML encoded output. #301

laxmi-lal-menaria opened this issue Jun 3, 2022 · 7 comments · Fixed by #308

Comments

@laxmi-lal-menaria
Copy link
Contributor

I am new to HL7 parser, I need to parse and save data to Database.

I have tried to use NHAPI and I found that its has all segments with their descriptions while debugging. I need these description with the segments position or any alternative to get them?

i.e. PID.5 -> Patient Name

image

@milkshakeuk
Copy link
Member

@lmenaria can you provide more info on what output you're looking for? An example?

@laxmi-lal-menaria
Copy link
Contributor Author

I would need these actual name with the values.

image

Or is there any mapping file where from I get these actual naming for my database.

Please help me on that part.

@milkshakeuk
Copy link
Member

milkshakeuk commented Jun 7, 2022

@lmenaria Having had a look at the specification for the xml encoded hl7 v2 there is an optional attribute that can be used called LongName which should contain the information you want; this is currently not included in the xml encoded output likely because its optional and also it would make the output very large.

It would look like this:

...
<OBX>
    <OBX.1 LongName='Set ID - OBX'>1</OBX.1>
    <OBX.2 LongName='Value Type'>ST</OBX.2>
    <OBX.3 LongName='Observation Identifier'>
        <CE.1 LongName='identifier'>9804-6</CE.1>
        <CE.2 LongName='text'>Weight</CE.2>
        <CE.3 LongName='name of coding system'>LN</CE.3>
    </OBX.3>
    <OBX.5 LongName='Observation Value'>74</OBX.5>
    <OBX.6 LongName='Units'>
        <CE.1 LongName='identifier'>kg</CE.1>
    </OBX.6>
    <OBX.11 LongName='Observation Result Status'>F</OBX.11>
</OBX>
...

Technically this could be done as an enhancement to the DefaultXmlParser to optionally include the LongName attribute, assuming the long name is currently available during encoding, feel free to create a pull request for this.

In regards to if there is a mapping file ... you can get all those long names from the xml schemas (xsd files) for each version from hl7 product page.

@milkshakeuk milkshakeuk changed the title How can I add Actual Name DESCRIPTION of the ID with the segments Include the optional LongName attribute in the XML encoded output. Jun 7, 2022
@ghost
Copy link

ghost commented Jun 7, 2022

Thanks, I will review the code base and try to add this optional property.

Meanwhile if anyone who is willing to add the new property quickly, this will let me a lot.

@laxmi-lal-menaria
Copy link
Contributor Author

Created a pull request: @ #308

@milkshakeuk
Copy link
Member

@laxmi-lal-menaria any updates on your PR?

@milkshakeuk
Copy link
Member

@laxmi-lal-menaria this change is in the latest 3.2.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants