I'm trying to put a value in an OBR field on the condition that there is a certain value in an NTE segment associated with that OBR segment. So in English, if NTE-3 = "Is Patient Fasting?->Yes" then place "Y" in OBR-39.
With this message...........
MSH|^~\&|CHPEPIC|OHC||OHC|20140829103809|SCHR019|O RM^O01|581|T|2.3|||||||||
PID|1||E6034293^^^EPI^EPI||OHC^ASHLEY||19770101|F| |1|333 SANE ST.^^CINCINNATI^OH^45202^USA^^^509|509|(513)878-0101^P^PH^^^513^8780101|||S||86860|282-82-8888|||||||||||||
PV1||O|ohc ham^^^OHC^^^^^^^||||||||||||||||86860||||||||||||| ||||||||||||20140829103615||||||
GT1|1|100003677|OHC^ASHLEY^^||333 SANE ST.^^CINCINNATI^OH^45202^USA^^^509|(513)878-0101^^^^^513^8780101||19770101|F|P/F|SLF|282-82-8888||||||||||||||||
IN1|1|3123020|9001|BCBS|PO BOX 105187^^ATLANTA^GA^30348^|||||||20140612||||OHC^AS HLEY^^|Self|19770101|333 SANE ST.^^CINCINNATI^OH^45202^USA^^^509|||1|||||||||||| ||12112|||||||F||||||
ORC|NW|93281548^EPC|||||^^^20140829^^R||2014082910 3806|SCHR019^NEFF^RYAN^M^||25^LANG^EVAN^Z^^^^^SER LAB OHC PROVIDER ID^^^^SER LAB OHC PROVIDER ID|ohc ham^^^308105^^^^^AFL OHC HAM|(513)682-4800^^^^^513^6824800||||^^^^|||||||||||O|TELEPHONE WI|||
OBR|1|93281548^EPC||1006400^LIPID PANEL^OHCLABEAP^^LIPID PANEL||20140829|20140829103809||||L||||BLOOD&Blood |25^LANG^EVAN^Z^^^^^SER LAB OHC PROVIDER ID^^^^SER LAB OHC PROVIDER ID|(513)682-4800^^^^^513^6824800|||||||Lab|||^^^20140829^^R||| |^Neoplasm related pain (acute) (chronic)|||||20140829|||||||||
NTE|1||Is Patient Fasting?/# of Hours->NO||
DG1|1|ICD-9-CM|338.3^Neoplasm related pain (acute) (chronic)^ICD-9-CM|Neoplasm related pain (acute) (chronic)||
ORC|NW|93281549^EPC|||||^^^20140829^^R||2014082910 3806|SCHR019^BRUSKOTTER^AMANDA^L^||25^LANG^EVAN^Z^ ^^^^SER LAB OHC PROVIDER ID^^^^SER LAB OHC PROVIDER ID|ohc ham^^^308105^^^^^AFL OHC HAM|(513)682-4800^^^^^513^6824800||||^^^^|||||||||||O|TELEPHONE WI|||
OBR|2|93281549^EPC||1001140^IRON AND TIBC^OHCLABEAP^^IRON +TIBC||20140829|20140829103809||||L||||BLOOD&Blood |25^LANG^EVAN^Z^^^^^SER LAB OHC PROVIDER ID^^^^SER LAB OHC PROVIDER ID|(513)682-4800^^^^^513^6824800|||||||Lab|||^^^20140829^^R||| |^Neoplasm related pain (acute) (chronic)|||||20140829|||||||||
NTE|1||Is Patient Fasting?->YES||
NTE|2||No of Hours?->12 hours||
DG1|1|ICD-9-CM|338.3^Neoplasm related pain (acute) (chronic)^ICD-9-CM|Neoplasm related pain (acute) (chronic)||
I'm expecting to get "Y" in the SECOND OBR-39 field, but instead, it's coming up blank in both of the OBR segments.
Here is my simple code that is probably too simple for what I'm trying to do:
var i = 0;
var FastYes = msg['OBR'][i]['OBR.39']['OBR.39.1'].toString();
var FastAns = '';
while (msg['NTE'][i] != null) {
FastAns = msg['NTE'][i]['NTE.3']['NTE.3.1'].toString();
if (FastAns = 'Is Patient Fasting?->Yes') {
FastYes = 'Y';
}
i = i + 1;
}
So how can I fix this?
Happy Labor Day weekend to everyone, too!
With this message...........
MSH|^~\&|CHPEPIC|OHC||OHC|20140829103809|SCHR019|O RM^O01|581|T|2.3|||||||||
PID|1||E6034293^^^EPI^EPI||OHC^ASHLEY||19770101|F| |1|333 SANE ST.^^CINCINNATI^OH^45202^USA^^^509|509|(513)878-0101^P^PH^^^513^8780101|||S||86860|282-82-8888|||||||||||||
PV1||O|ohc ham^^^OHC^^^^^^^||||||||||||||||86860||||||||||||| ||||||||||||20140829103615||||||
GT1|1|100003677|OHC^ASHLEY^^||333 SANE ST.^^CINCINNATI^OH^45202^USA^^^509|(513)878-0101^^^^^513^8780101||19770101|F|P/F|SLF|282-82-8888||||||||||||||||
IN1|1|3123020|9001|BCBS|PO BOX 105187^^ATLANTA^GA^30348^|||||||20140612||||OHC^AS HLEY^^|Self|19770101|333 SANE ST.^^CINCINNATI^OH^45202^USA^^^509|||1|||||||||||| ||12112|||||||F||||||
ORC|NW|93281548^EPC|||||^^^20140829^^R||2014082910 3806|SCHR019^NEFF^RYAN^M^||25^LANG^EVAN^Z^^^^^SER LAB OHC PROVIDER ID^^^^SER LAB OHC PROVIDER ID|ohc ham^^^308105^^^^^AFL OHC HAM|(513)682-4800^^^^^513^6824800||||^^^^|||||||||||O|TELEPHONE WI|||
OBR|1|93281548^EPC||1006400^LIPID PANEL^OHCLABEAP^^LIPID PANEL||20140829|20140829103809||||L||||BLOOD&Blood |25^LANG^EVAN^Z^^^^^SER LAB OHC PROVIDER ID^^^^SER LAB OHC PROVIDER ID|(513)682-4800^^^^^513^6824800|||||||Lab|||^^^20140829^^R||| |^Neoplasm related pain (acute) (chronic)|||||20140829|||||||||
NTE|1||Is Patient Fasting?/# of Hours->NO||
DG1|1|ICD-9-CM|338.3^Neoplasm related pain (acute) (chronic)^ICD-9-CM|Neoplasm related pain (acute) (chronic)||
ORC|NW|93281549^EPC|||||^^^20140829^^R||2014082910 3806|SCHR019^BRUSKOTTER^AMANDA^L^||25^LANG^EVAN^Z^ ^^^^SER LAB OHC PROVIDER ID^^^^SER LAB OHC PROVIDER ID|ohc ham^^^308105^^^^^AFL OHC HAM|(513)682-4800^^^^^513^6824800||||^^^^|||||||||||O|TELEPHONE WI|||
OBR|2|93281549^EPC||1001140^IRON AND TIBC^OHCLABEAP^^IRON +TIBC||20140829|20140829103809||||L||||BLOOD&Blood |25^LANG^EVAN^Z^^^^^SER LAB OHC PROVIDER ID^^^^SER LAB OHC PROVIDER ID|(513)682-4800^^^^^513^6824800|||||||Lab|||^^^20140829^^R||| |^Neoplasm related pain (acute) (chronic)|||||20140829|||||||||
NTE|1||Is Patient Fasting?->YES||
NTE|2||No of Hours?->12 hours||
DG1|1|ICD-9-CM|338.3^Neoplasm related pain (acute) (chronic)^ICD-9-CM|Neoplasm related pain (acute) (chronic)||
I'm expecting to get "Y" in the SECOND OBR-39 field, but instead, it's coming up blank in both of the OBR segments.
Here is my simple code that is probably too simple for what I'm trying to do:
var i = 0;
var FastYes = msg['OBR'][i]['OBR.39']['OBR.39.1'].toString();
var FastAns = '';
while (msg['NTE'][i] != null) {
FastAns = msg['NTE'][i]['NTE.3']['NTE.3.1'].toString();
if (FastAns = 'Is Patient Fasting?->Yes') {
FastYes = 'Y';
}
i = i + 1;
}
So how can I fix this?
Happy Labor Day weekend to everyone, too!
Multiple OBRs and NTEs - Mapping One Field
0 commentaires:
Enregistrer un commentaire