Hi to all,
i have a bad problem trying to scan all OBR-ORC segments of an HL7 message.
I have a message like this:
I try to extract all ORC-OBR pairs and to get some values from them in this way:
this is what I read from logger:
As you can see, while ['ORC']['ORC.3']['EI.1'] follows the correct order, ['ORC']['ORC.2']['EI.1'] do not. This is a
very bad problem for me, because I can't use the k index in order to manage message information correctly.
where is the problem? Could this be a bug?
Thanks to all,
asulis
i have a bad problem trying to scan all OBR-ORC segments of an HL7 message.
I have a message like this:
Code:
MSH|^~\&|XXXX|AOB RIS-PACS|XXXXXXX|XXXXXXXXXXX|||ORM^O01|1|P|2.3.1||||||8859/1 PID|||XXXXXXXXXXX^^^AOB~XXXXXXXXXXX^^^CF||XXXXX^XXXXXXX||XXXXXXXX|M|||XXXXXXXXXXXXXX^^XXXXX^XXXXXX^XXXXXXX^ITALIA^H~^^^^^^C||~|||||XXXXXXXXXXXX^^^AOB|||||XXXXXXX|||XXXXXXX PV1|||||||||||||||||||2070038266^^^AOB||||||||||||||||||||||||||||||||V ORC|XO|^AOB|47889^EbitRIS|2070038266|SC||^^^20070226130800||20070226130757|^PAOLOENNE||^[email protected] OBR||^AOB|47889^EbitRIS|8827^8827 - RADIOGRAFIA DEL FEMORE, GINOCCHIO E GAMBA^MedTrak^8827^8827 - RADIOGRAFIA DEL FEMORE, GINOCCHIO E GAMBA^RISolution|||||||||\F\\F\R0\F\\F\|||^[email protected]||40290|40317|69013||||CR|||^^^20070226130800||||^\F\\F\R0\F\\F\ ORC|XO|2070038266.4^AOB|47891^EbitRIS|2070038266|SC||^^^20070226130800||20070226130757|^PAOLOENNE||^[email protected] OBR||2070038266.4^AOB|47891^EbitRIS|8827^8827 - RADIOGRAFIA DEL FEMORE, GINOCCHIO E GAMBA^MedTrak^8827^8827 - RADIOGRAFIA DEL FEMORE, GINOCCHIO E GAMBA^RISolution|||||||||\F\\F\R0\F\\F\|||^[email protected]||40290|40317|69013||||DX|||^^^20070226130800||||^\F\\F\R0\F\\F\ ORC|XO|2070038266.1^AOB|47892^EbitRIS|2070038266|SC||^^^20070226130800||20070226130757|^PAOLOENNE||^[email protected] OBR||2070038266.1^AOB|47892^EbitRIS|87441^87441 - RADIOGRAFIA DEL TORACE DI ROUTINE, NAS^MedTrak^87441^87441 - RADIOGRAFIA DEL TORACE DI ROUTINE, NAS^RISolution|||||||||\F\\F\R0\F\\F\|||^[email protected]||40290|40317|69013||||DX|||^^^20070226130800||||^\F\\F\R0\F\\F\ ORC|XO|2070038266.2^AOB|47893^EbitRIS|2070038266|SC||^^^20070226130800||20070226130757|^PAOLOENNE||^[email protected] OBR||2070038266.2^AOB|47893^EbitRIS|8722^8722 - RADIOGRAFIA DELLA COLONNA CERVICALE^MedTrak^8722^8722 - RADIOGRAFIA DELLA COLONNA CERVICALE^RISolution|||||||||\F\\F\R0\F\\F\|||^[email protected]||40290|40317|69013||||DX|||^^^20070226130800||||^\F\\F\R0\F\\F\ ORC|XO|^AOB|47894^EbitRIS|2070038266|SC||^^^20070226130800||20070226130757|^PAOLOENNE||^[email protected] OBR||^AOB|47894^EbitRIS|88772.69013^88772 - ECO(COLOR)DOPPLER ARTI SUP.,INF.,DISTR,(AR^MedTrak^88772.69013^88772 - ECO(COLOR)DOPPLER ARTI SUP.,INF.,DISTR,(AR^RISolution|||||||||\F\\F\R0\F\\F\|||^[email protected]||40290|40317|69013||||US|||^^^20070226130800||||^\F\\F\R0\F\\F\
Code:
var orm_path = 'ORM_O01.ORCOBRRQDRQ1ODSODTRXONTEDG1RXRRXCNTEOBXNTECTIBLG'; for (var k=0; k<msg[orm_path].length(); k++) { logger.info('PRINTED k key:'+k+msg[orm_path]['ORC']['ORC.3']['EI.1'][k]); logger.info('PRINTED k value:'+k+msg[orm_path]['ORC']['ORC.2']['EI.1'][k]); }
Code:
PRINTED k key:047889 PRINTED k value:02070038266.4 PRINTED k key:147891 PRINTED k value:12070038266.1 PRINTED k key:247892 PRINTED k value:22070038266.2 PRINTED k key:347893 PRINTED k value:3undefined PRINTED k key:447894 PRINTED k value:4undefined
very bad problem for me, because I can't use the k index in order to manage message information correctly.
where is the problem? Could this be a bug?
Thanks to all,
asulis
Comment