source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORWUBCMA.m@ 1452

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

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1ORWUBCMA ; SLC/KCM/JLI - General Utilites for Windows Calls; 1/12/02
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**133**;Dec 17, 1997
3 ;;OR BCMA ORDER COM;**133**;1/10/2002
4 ;
5USERINFO(REC) ; return relevant info for current user
6 ; return DUZ^NAME^USRCLS^CANSIGN^ISPROVIDER^ORDERROLE^NOORDER^DTIME^
7 ; COUNTDOWN^ENABLEVERIFY^NOTIFYAPPS^MSGHANG^DOMAIN^SERVICE^
8 ; AUTOSAVE^INITTAB^LASTTAB
9 N X
10 S REC=DUZ_U_$P(^VA(200,DUZ,0),U)
11 S $P(REC,U,3)=$S($D(^XUSEC("ORES",DUZ)):3,$D(^XUSEC("ORELSE",DUZ)):2,$D(^XUSEC("OREMAS",DUZ)):1,1:0)
12 S $P(REC,U,4)=$D(^XUSEC("ORES",DUZ))&$D(^XUSEC("PROVIDER",DUZ))
13 S $P(REC,U,5)=$D(^XUSEC("PROVIDER",DUZ))
14 S $P(REC,U,6)=$$ORDROLE
15 S $P(REC,U,7)=$$GET^XPAR("USR^SYS^PKG","ORWOR DISABLE ORDERING",1,"I")
16 S $P(REC,U,8)=$$GET^XPAR("USR^SYS","ORWOR TIMEOUT CHART",1,"I")
17 I '$P(REC,U,8),$G(DTIME) S $P(REC,U,8)=DTIME
18 S $P(REC,U,9)=$$GET^XPAR("USR^SYS^PKG","ORWOR TIMEOUT COUNTDOWN",1,"I")
19 S X=$$GET^XPAR("USR^SYS^PKG","ORWOR ENABLE VERIFY",1,"I")
20 S $P(REC,U,10)=$S(X=1:1,X=2:0,1:'$P(REC,U,7))
21 S $P(REC,U,11)=$$GET^XPAR("USR^SYS^PKG","ORWOR BROADCAST MESSAGES",1,"I")
22 S $P(REC,U,12)=$$GET^XPAR("USR^SYS^PKG","ORWOR AUTO CLOSE PT MSG",1,"I")
23 S $P(REC,U,13)=$$KSP^XUPARAM("WHERE") ; domain
24 S $P(REC,U,14)=+$G(^VA(200,DUZ,5)) ; service/section
25 S $P(REC,U,15)=$$GET^XPAR("USR^SYS^PKG","ORWOR AUTOSAVE NOTE",1,"I")
26 S $P(REC,U,16)=$$GET^XPAR("USR^DIV^SYS^PKG","ORCH INITIAL TAB",1,"I")
27 S $P(REC,U,17)=$$GET^XPAR("USR^DIV^SYS^PKG","ORCH USE LAST TAB",1,"I")
28 S $P(REC,U,18)=$$GET^XPAR("USR^DIV^SYS^PKG","ORWOR DISABLE WEB ACCESS",1,"I")
29 S $P(REC,U,19)=$$GET^XPAR("SYS^PKG","ORWOR DISABLE HOLD ORDERS",1,"I")
30 Q
31ORDROLE() ; returns the role a person takes in ordering
32 ; VAL: 0=nokey, 1=clerk, 2=nurse, 3=physician, 4=student, 5=bad keys
33 I ($D(^XUSEC("OREMAS",DUZ))+$D(^XUSEC("ORELSE",DUZ))+$D(^XUSEC("ORES",DUZ)))>1 Q 5
34 I $D(^XUSEC("OREMAS",DUZ)) Q 1 ; clerk
35 I $D(^XUSEC("ORELSE",DUZ)) Q 2 ; nurse
36 I $D(^XUSEC("ORES",DUZ)),$D(^XUSEC("PROVIDER",DUZ)) Q 3 ; doctor
37 I $D(^XUSEC("PROVIDER",DUZ)) Q 4 ; student
38 Q 0
Note: See TracBrowser for help on using the repository browser.