source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORWTPD1.m@ 700

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

initial load of WorldVistAEHR

File size: 3.5 KB
RevLine 
[613]1ORWTPD1 ; SLC/PKS - Personal Preferences. [7/22/04 10:53am]
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**195**;Dec 17,1997
3 ;
4 Q
5 ;
6GETEFDAT(INFO) ; Get non-user level Encounter appointment date range params.
7 ;
8 N ORSTART,ORSTOP
9 S INFO=""
10 ;
11 S ORSTART=$$GET^XPAR("DIV^SYS^PKG","ORQQEAPT ENC APPT START",1,"I")
12 I 'ORSTART S ORSTART=60
13 ;
14 S ORSTOP=$$GET^XPAR("DIV^SYS^PKG","ORQQEAPT ENC APPT STOP",1,"I")
15 I 'ORSTOP S ORSTOP=0
16 ;
17 S INFO=ORSTART_U_ORSTOP
18 ;
19 Q
20 ;
21GETEDATS(INFO) ; Get user's (all levels) Encounter app't date range params.
22 ;
23 N ORSRV,ORUSER
24 S ORUSER=DUZ
25 ;
26 S ORSRV=$G(^VA(200,DUZ,5)) I +ORSRV>0 S ORSRV=$P(ORSRV,U) ; Get S/S.
27 S INFO=$$GET^XPAR("USR.`"_ORUSER_"^SRV.`"_+$G(ORSRV)_"^DIV^SYS^PKG","ORQQEAPT ENC APPT START",1,"I")_U
28 S INFO=INFO_$$GET^XPAR("USR.`"_ORUSER_"^SRV.`"_+$G(ORSRV)_"^DIV^SYS^PKG","ORQQEAPT ENC APPT STOP",1,"I")
29 ;
30 Q
31 ;
32PUTEDATS(OK,Y) ; Save Encounter app't date range params at user level.
33 ;
34 N ORSTART,ORSTOP,ORUSER
35 ;
36 S OK=1,ORUSER=DUZ
37 S ORSTART=$P(Y,U,1)
38 S ORSTOP=$P(Y,U,2)
39 I ORSTART="" S ORSTART=0
40 I ORSTOP="" S ORSTOP=0
41 I ORSTART>999 S ORSTART=999
42 I ORSTOP>999 S ORSTART=999
43 ;
44 D EN^XPAR(ORUSER_";VA(200,","ORQQEAPT ENC APPT START",1,ORSTART)
45 D EN^XPAR(ORUSER_";VA(200,","ORQQEAPT ENC APPT STOP",1,ORSTOP)
46 ;
47 Q
48 ;
49GETCSDEF(INFO) ; Get Div/Sys/Pkg Cover Sheet default range parameters.
50 ;
51 N ORVAL
52 ;
53 S ORVAL=""
54 S ORVAL=$$GET^XPAR("DIV^SYS^PKG","ORQQCSDR CS RANGE START",1,"I")
55 S ORVAL=$$CHKRNG(ORVAL,999)
56 S INFO=ORVAL_U,ORVAL=""
57 S ORVAL=$$GET^XPAR("DIV^SYS^PKG","ORQQCSDR CS RANGE STOP",1,"I")
58 S ORVAL=$$CHKRNG(ORVAL,999)
59 S INFO=INFO_ORVAL
60 ;
61 Q
62 ;
63GETCSRNG(VAL) ; Get user's Cover Sheet date range defaults.
64 ;
65 N ORSRV,ORUSER,ORVAL
66 S ORUSER=DUZ
67 ;
68 S ORVAL=""
69 S ORSRV=$G(^VA(200,DUZ,5)) I +ORSRV>0 S ORSRV=$P(ORSRV,U) ; Get S/S.
70 S ORVAL=$$GET^XPAR("USR.`"_ORUSER_"^SRV.`"_+$G(ORSRV)_"^DIV^SYS^PKG","ORQQCSDR CS RANGE START",1,"I")
71 S ORVAL=$$CHKRNG(ORVAL,999)
72 S VAL=ORVAL_U,ORVAL=""
73 S ORVAL=$$GET^XPAR("USR.`"_ORUSER_"^SRV.`"_+$G(ORSRV)_"^DIV^SYS^PKG","ORQQCSDR CS RANGE STOP",1,"I")
74 S ORVAL=$$CHKRNG(ORVAL,999)
75 S VAL=VAL_ORVAL
76 ;
77 Q
78 ;
79PUTCSRNG(OK,INFO) ; Save user's Cover Sheet data range defaults.
80 ;
81 N ORINPT,OROUTPT,ORSTART,ORSTOP,ORUSER
82 ;
83 S OK=1,ORUSER=DUZ
84 S ORSTART=+$P(INFO,U,3) S:ORSTART>999 ORSTART=999 S ORSTART=$S(ORSTART=0:"T",ORSTART<0:"T"_ORSTART,1:"T+"_ORSTART)
85 S ORSTOP=+$P(INFO,U,4) S:ORSTOP>999 ORSTART=999 S ORSTOP=$S(ORSTOP=0:"T",ORSTOP<0:"T"_ORSTOP,1:"T+"_ORSTOP)
86 S ORINPT=+$P(INFO,U,1),ORINPT=$S('ORINPT:"@",1:ORINPT)
87 S OROUTPT=+$P(INFO,U,2),OROUTPT=$S('OROUTPT:"@",1:OROUTPT)
88 D EN^XPAR(ORUSER_";VA(200,","ORQQCSDR CS RANGE START",1,ORSTART)
89 D EN^XPAR(ORUSER_";VA(200,","ORQQCSDR CS RANGE STOP",1,ORSTOP)
90 D EN^XPAR(ORUSER_";VA(200,","ORQQLR DATE RANGE INPT",1,ORINPT)
91 D EN^XPAR(ORUSER_";VA(200,","ORQQLR DATE RANGE OUTPT",1,OROUTPT)
92 ;
93 Q
94 ;
95GETEAFL(Y) ; Get "future days limit" parameter setting for Enc appt selection.
96 ;
97 S Y=$$GET^XPAR("DIV^SYS^PKG^USR","ORQQEAFL ENC APPT FUTURE LIMIT",1,"I")
98 ;
99 Q
100 ;
101CHKRNG(ORV,ORLIMIT) ; Check a "T-xx" or "T+xx" value.
102 ;
103 ; ORLIMIT must be a positive number.
104 ;
105 N ORNEG,ORPOS,ORT,ORTT,ORVALUE
106 ;
107 S (ORNEG,ORPOS,ORT,ORTT)=0
108 I $G(ORV)="" Q ORV
109 I $G(ORLIMIT)=0 Q ORV
110 ;
111 I ORV["-" S ORNEG=1
112 I ORV["+" S ORPOS=1
113 I ORV["T" S ORT=1
114 I ORV["t" S ORTT=1
115 S ORVALUE=ORV
116 I ORT S ORVALUE=$P(ORV,"T",2)
117 I ORTT S ORVALUE=$P(ORV,"t",2)
118 I ORPOS S ORVALUE=$P(ORVALUE,"+",2)
119 I ORNEG S ORVALUE=$P(ORVALUE,"-",2)
120 I ORVALUE>ORLIMIT S ORVALUE=ORLIMIT
121 ;
122 S ORV="T+"_ORVALUE
123 I ORNEG S ORV="T-"_ORVALUE
124 ;
125 Q ORV
126 ;
Note: See TracBrowser for help on using the repository browser.