source: WorldVistAEHR/trunk/r/CLINICAL_PROCEDURES-MD/MDUXML.m@ 1800

Last change on this file since 1800 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.1 KB
Line 
1MDUXML ; HOIFO/WAA -Utilities for XML text ; 7/26/00
2 ;;1.0;CLINICAL PROCEDURES;**6**;Apr 01, 2004;Build 102
3 ; This routine will loop throught the HL7 Message as sent
4 ; by the vendor and convert that message into XML for
5 ; Processing by the gateway.
6 ;
7EN1 ;
8 N NUM,LBL,XMLCNT,XMLLINE,DL,DEVICE,Q,ORDER
9 K ^TMP($J,"MDHL7XML")
10 S DL="|",QUOT=""""
11 S (XMLCNT,ORDER,NUM)=0
12 D HEAD^MDUXMLU1
13 F S NUM=$O(^TMP($J,"MDHL7A",NUM)) Q:NUM<1 D
14 . N LINE,LBL
15 . S LINE=$G(^TMP($J,"MDHL7A",NUM)) Q:LINE=""
16 . I $P(LINE,DL,1)="OBX" D
17 . . I LINE["//" S LINE=$TR(LINE,"/","\")
18 . . I LINE["\E\" D
19 . . . N Y,Z,I S Z="" F I=1:1:$L(LINE) S Y=$E(LINE,I) D:Y="\" S Z=Z_Y
20 . . . . I $E(LINE,I+1)="E",$E(LINE,I+2)="\" S I=I+2
21 . . . . Q
22 . . . S LINE=Z
23 . . . Q
24 . . I $P(LINE,DL,6)["\\" D
25 . . . N I
26 . . . S I=$O(^TMP($J,"MDHL7A",NUM),-1)
27 . . . S ^TMP($J,"MDHL7A",(NUM+1))="OBX||ST|PROCEDURE STATUS||DONE"
28 . . . Q
29 . . Q
30 . S LINE=$$VAL^MDUXMLU1(LINE)
31 . S LBL=$P(LINE,DL,1)
32 . Q:'($S(LBL="MSH":1,LBL="PID":1,LBL="PV1":1,LBL="ORC":1,LBL="OBR":1,LBL="OBX":1,1:0))
33 . S LBL=LBL_"^MDUXMLM"
34 . D @LBL
35 . Q
36 D TAIL^MDUXMLU1
37 Q
Note: See TracBrowser for help on using the repository browser.