source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/OCXODGPM.m@ 1297

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

initial load of WorldVistAEHR

File size: 2.0 KB
Line 
1OCXODGPM ;SLC/RJS,CLA - External Interface - PROCESS MAS MOVEMENT EVENT ;4/30/99 15:03
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32**;Dec 17,1997
3 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
4 ;
5 ;
6 Q
7SILENT(OUTMSG) ;
8 ;
9 N OCXRDT,OCXOZZT
10 S OCXRDT=($H*86400+$P($H,",",2))
11 S:'$D(OUTMSG) OUTMSG=""
12 D CHECK(.OUTMSG)
13 Q
14VERBOSE ;
15 ;
16 N OCXX,OUTMSG,OCXOZZT
17 S OCXRDT=($H*86400+$P($H,",",2))
18 S OUTMSG=""
19 D CHECK(.OUTMSG)
20 W:$O(OUTMSG(0)) !,"Order Check Message: ",$C(7)
21 S OCXX=0 F S OCXX=$O(OUTMSG(OCXX)) Q:'OCXX W !,OUTMSG(OCXX)
22 W:$O(OUTMSG(0)) !,$C(7)
23 Q
24 ;
25CHECK(OUTMSG) ;
26 ;
27 ;
28 I $$RTEST D Q
29 .N OMSG,OTMOUT,OCXM
30 .S OMSG="^25^^Order Checking is recompiling and momentarily disabled"
31 .S OCXM=0 F S OCXM=$O(OUTMSG(OCXM)) Q:'OCXM Q:(OUTMSG(OCXM)[OMSG)
32 .Q:OCXM
33 .S OUTMSG($O(OUTMSG(""),-1)+1)=OMSG
34 ;
35 N OCXSUB,OCXTEST,OCXDATA,OCXEL,OCXSEG0,OCXOLOG,OCXOSRC
36 ;
37 S (OCXTEST,OCXDATA)=""
38 S OCXOSRC="DGPM PATIENT MOVEMENT PROTOCOL"
39 ;
40 S OCXOLOG=$$LOG($G(DGPMDA),$G(DGPM0),$G(DGPMA),$G(DGPMP))
41 ;
42 D UPDATE^OCXOZ01(+$G(DFN),OCXOSRC,.OUTMSG)
43 ;
44 D FINISH^OCXOLOG(OCXOLOG)
45 ;
46 Q
47 ;
48RTEST() ;
49 N DATE,TMOUT
50 Q:'$L($T(^OCXOZ01)) 1
51 I '($P($G(^OCXD(861,1,0)),U,1)="SITE PREFERENCES") K ^OCXD(861,1) S ^OCXD(861,1,0)="SITE PREFERENCES"
52 S DATE=$P($G(^OCXD(861,1,0)),U,3)
53 I DATE,((+DATE)=(+$H)),(((+$P($H,",",2))-(+$P(DATE,",",2)))<1800) Q 1
54 Q 0
55 ;
56LOG(OCXD1,OCXD2,OCXD3,OCXD4) ;
57 ;
58 ; Log Messages
59 ;
60 I $G(OCXTRACE),$$CDATA^OCXOZ01 D Q 0
61 .W !," Raw Input Data "
62 .W !," DFN: ",$G(DFN)
63 .W !," DGPMDA: ",$G(DGPMDA)
64 .W !," DGPMA: ",$G(DGPMA)
65 .W !," DGPM0: ",$G(DGPM0)
66 .W !," DGPMP: ",$G(DGPMP)
67 .W !
68 ;
69 Q:'$L($T(LOG^OCXOZ01)) 0 Q:'$$LOG^OCXOZ01 0
70 N OCXNL
71 S OCXARY="OCXNL"
72 S OCXNL(1)="DGPMDA="_$G(OCXD1)
73 S OCXNL(2)="DGPM0="_$G(OCXD2)
74 S OCXNL(3)="DGPMA="_$G(OCXD3)
75 S OCXNL(4)="DGPMP="_$G(OCXD4)
76 Q $$NEW^OCXOLOG(OCXARY,"DGPM",+$G(DUZ),+$G(DFN))
77 ;
78ERROR Q
79 ;
80 ; **** Old Labels to insure backwards compatibility ****
81 ;
82PROC(OUTMSG) ;
83 D SILENT(.OUTMSG)
84 Q
85 ;
86EN D VERBOSE Q
87 ;
88NOW() N X,Y,%DT S X="N",%DT="T" D ^%DT Q +Y
89 ;
Note: See TracBrowser for help on using the repository browser.