source: WorldVistAEHR/trunk/r/SCHEDULING-SD-SC/SDAMU.m@ 1582

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

initial load of WorldVistAEHR

File size: 1.5 KB
RevLine 
[613]1SDAMU ;ALB/MJK - AM Utilities ; 12/1/91
2 ;;5.3;Scheduling;**63**;Aug 13, 1993
3 ;
4SWITCH() ; -- date of ci switch over
5 Q 2921001
6 ;
7NOW() ; -- return current date and time (NOW)
8 D NOW^%DTC
9 Q %
10 ;
11BARC(TTYPE,ON,OFF) ; -- barcode on/off
12 S ON=$S($D(^%ZIS(2,TTYPE,"BAR1")):^("BAR1"),1:""),OFF=$S($D(^("BAR0")):^("BAR0"),1:"")
13 Q ON]""&(OFF]"")
14 ;
15CURRENT ; -- computed field (2.98,100)
16 S X=$P($$STATUS^SDAM1(D0,D1,+$G(^DPT(D0,"S",D1,0)),$G(^(0))),";",3)
17 Q
18 ;
19CLINIC(SDCL) ; -- generic screen for hos. loc. entries
20 ; input: SDCL := ifn of HOSPITAL LOCATION file
21 ; returned := [ 0 | do not use entry ; 1 | use entry ]
22 ;
23 ; -- must be not be a 'non-count' clinic and must be a clinic
24 N X S X=$G(^SC(SDCL,0)),X("OOS")=+$G(^("OOS"))
25 Q $S($P(X,"^",17)="Y":0,X("OOS"):0,1:$P(X,"^",3)="C")
26 ;
27DIV(SDCL,VAUTD,SDNAME,SDLEN) ; -- find division for clinic
28 ; input: SDCL := clinic ifn
29 ; VAUTD := array defined by VAUTOMA
30 ; SDLEN := length of name to pass back [optional]
31 ; output: SDNAME := name of division
32 ; return: := division ifn
33 ;
34 N X
35 I '$D(SDLEN) N SDLEN S SDLEN=35
36 S X=$S('$P($G(^DG(43,1,"GL")),U,2):+$O(^DG(40.8,0)),1:+$P($G(^SC(SDCL,0)),U,15))
37 S SDNAME=$E($S($D(^DG(40.8,X,0)):$P(^(0),U),1:"UNKNOWN"),1,SDLEN)
38 Q $S(VAUTD=1!($D(VAUTD(X))):X,1:0)
39 ;
40RT(SDRTOPT) ; -- rt call for newing and return to LM
41 N DFN,RTE,R,RTPGM,RTJR,RTY,RTDIV,X,Y
42 S X=$O(^DIC(19,"B",SDRTOPT,0))
43 I +$G(^DIC(195.4,1,"UP")),X D
44 .S X=X_";DIC(19," D EN^XQOR
45 E D
46 .W !!?5,"'",$P($G(XQORNOD(0)),U,3),"' is not available on your system." D PAUSE^VALM1
47 Q
48 ;
Note: See TracBrowser for help on using the repository browser.