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

Parsing message with ~ character fails. #15

Open
richard-mihalovic opened this issue Feb 26, 2025 · 0 comments
Open

Parsing message with ~ character fails. #15

richard-mihalovic opened this issue Feb 26, 2025 · 0 comments

Comments

@richard-mihalovic
Copy link
Contributor

richard-mihalovic commented Feb 26, 2025

Hi, we have an incoming HL7 message like in this example and we want to get the number 7777 from PID.3.5 segment. But we are not able to get it.

HL7 file:

MSH|^~\&|1.2||||20250126162659||ADT^A03^ADT_A03||P|2.5^FRA^2.5|||||FRA|8859/1|||
PID|||0001^^^MCK&1.2&L^PI~7777^^^ASIP-SANTE-INS-C&1.3&ISO^INS-C^^|

Code:

const hl7Message = hl7Parser.create(message);
const path = 'PID.3.5';
console.log(path, '=', hl7Message.get(path).toRaw());

Output:

PID.3.5 = PI

I suppose the expected output should be: PI~7777.

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

No branches or pull requests

1 participant