Skip to content

Parsing Message for Multiple ZAD segments and removing them based on what information is present #6006

Answered by pacmano1
dombarone asked this question in Q&A
Discussion options

You must be logged in to vote

you might need:

var modifiedMessageString = hl7MessageString.replace(/^ZAD\|0(\|*)+\r?$/gm, '').replace(/\r\r/gm, '\r')

I probably was pasting new lines for line ends, they should be carriage returns as per spec.

Replies: 2 comments 12 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
12 replies
@dombarone
Comment options

@pacmano1
Comment options

pacmano1 Dec 1, 2023
Collaborator

@dombarone
Comment options

@pacmano1
Comment options

pacmano1 Dec 1, 2023
Collaborator

Answer selected by dombarone
@dombarone
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants