Trying to delete parent NM1 segment - subscriber name NM1*IL, when claim has NM1*QC segment - patient #5023
Unanswered
asujata-1234
asked this question in
Q&A
Replies: 1 comment 8 replies
-
I think this is what you were asking for? For each subscriber, if there is an NM1 segment with function deleteInDocument(element) {
delete element.parent().children()[element.childIndex()]
}
for each (var sbr in msg.SBR) {
var nm1s = getSegmentsAfter(msg, sbr, 'NM1')
if (nm1s.some(nm1 => nm1['NM1.01']['NM1.01.1'].toString() == 'QC') {
nm1s.filter(nm1 => nm1['NM1.01']['NM1.01.1'].toString() == 'IL').forEach(deleteInDocument)
}
} |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My code is deleting patient - (NM1QC1Testlast1LAZARUS~). I need to delete NM1IL1Testlast1Testfirst1***MIZECM12541853~ Any advice is greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions