source: FOIAVistA/trunk/r/OPERATIONS_WITH_DESERT_STORM-A1B2/A1B2UTL.m@ 1446

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

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1A1B2UTL ;ALB/MJK - ODS Utility Routine;
2 ;;Version 1.55 (local for MAS v5 sites);;
3 ;
4ADD ; -- add an entry to a file
5 ; input: A1B2FL := file number
6 ; A1B2DT := date/time for .01
7 ; DFN := pt ifn
8 ;output: Y := as define by DIC call
9 ;
10 S Y=-1 D FAC G ADDQ:A1B2FN=""
11 K DD,D0 S X=A1B2DT,DIC(0)="L",DIC="^A1B2("_A1B2FL_"," D FILE^DICN G ADDQ:Y<0
12 S DIE=DIC,DA=+Y,A1B2Y=Y,DR=".07////"_A1B2FN_";.08////"_A1B2FNME_";.12////"_DFN_";.15////1;1.01////2;1.05////"_DUZ K DIC
13 D ^DIE K DR,DIE,DA,DE,DQ,DG S Y=A1B2Y
14ADDQ K A1B2FN,A1B2FNME,A1B2Y Q
15 ;
16FAC ; -- find inst and get fac # and name
17 ;
18 N X
19 S (A1B2FN,A1B2FNME)="",X=+$O(^DG(40.8,0))
20 I $D(^DG(40.8,X,0)) S X=+$P(^(0),U,7) D GET
21 Q
22 ;
23NTL ; -- get fac # and name for nationally sign input user (IHS)
24 ; input: DUZ, DUZ(2)
25 ; output: A1B2FN := fac #
26 ; A1B2FNME := fac name
27 ; A1B2VRG := vhs&ra region #
28 ;
29 S (A1B2FN,A1B2FNME,A1B2VRG)=""
30 I $D(DUZ(2)) S X=+DUZ(2) D GET
31 Q
32 ;
33KVAR ; -- kill vars set in NTL call
34 K A1B2FN,A1B2FNME,A1B2VRG
35 Q
36 ;
37GET ; -- get fac data
38 I $D(^DIC(4,X,0)),$D(^(99)) S A1B2FN=+^(99),A1B2FNME=$P(^(0),U)
39 I $D(^DIC(4,X,11002)) S A1B2VRG=+^(11002)
40 Q
41 ;
42ON ;is the ODS software turned on?
43 ; input: none
44 ; output: A1B2ODS := 0 for off and 1 for on
45 ;
46 S A1B2ODS=0 I $D(^A1B2(11500.5,1,0)) S A1B2ODS=+$P(^(0),U,2)
47 Q
48 ;
49DIS ; -- screen set
50 S DIS(0)="I $P(^A1B2(A1B2FL,D0,0),U,15) N X S X=$S($D(A1B2NTY):$P(A1B2NTY,U,2),1:"""") I $S(X=""""!(X=""A""):1,X=""V"":$P(^(0),U,7)=A1B2FN,X=""R"":$P(^(0),U,9)=A1B2VRG,1:0)"
51 Q
52 ;
Note: See TracBrowser for help on using the repository browser.