source: WorldVistAEHR/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCB1A2.m@ 862

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

initial load of WorldVistAEHR

File size: 2.1 KB
RevLine 
[613]1PRCB1A2 ;WISC/PLT-FCP ACTIVATE/DEACTIVATE ; 01/11/94 10:40 AM
2 ;;5.1;IFCAP;;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 QUIT ;invalid entry
5 ;
6REA ;reactivate an inactive fund control point
7 N PRCDD,PRCDR,PRCDI,PRCRI,PRCPR,PRCAED,PRCQT,PRCU,A,B,X,Y S PRCU="^"
8 N PRCFA S PRCFA("REACTIVATE")=""
9 S PRCF("X")="AS" D ^PRCFSITE G:'% EXIT1
10 S PRCDD=420,PRCRI(420)=PRC("SITE")
11 I '$O(^PRC(420,PRCRI(420),1,"B","")) D EN^DDIOL("No Control Point in file!") G EXIT1
12 S PRCLOCK=$$DICGL^PRC0B1(PRCDD)_PRCRI(PRCDD)_",",Y=3 D ICLOCK^PRC0B(PRCLOCK,.Y)
13 I 'Y D EN^DDIOL("File is in use, please try later!") G EXIT1
14 F D EN^DDIOL(" ") D Q:PRCQT=1
15 . N PRCDD,PRCAED,PRCDI
16 . S PRCDD=420.01,PRCQT=""
17 . S X(0)="AENOQS",X("S")="I X-9999,$P(^(0),U,19)=1"
18 . D LKUP^PRCB1A Q:PRCQT
19 . D EDIT1
20 . QUIT
21 D DCLOCK^PRC0B(PRCLOCK)
22EXIT1 QUIT
23 ;
24EDIT1 ;edit inactive/active
25 D EDIT^PRC0B(.X,PRCDI,"20Active/Inactive Control Point","") I X=0 S PRCQT=2
26 K A D PIECE^PRC0B(PRCDI,20,"I","A")
27 S X=$G(A(PRCDD,PRCRI(PRCDD),"1~20","I")) K A
28 S X=$S(X=1:"23////^S X=DUZ;24///NOW",1:"23///^S X=""@"";24///^S X=""@""")
29 D EDIT^PRC0B(.X,PRCDI,X)
30 QUIT
31 ;
32DEA ;deactivate an active fund control point
33 N PRCDD,PRCDR,PRCDI,PRCRI,PRCPR,PRCAED,PRCQT,PRCU,A,B,X,Y S PRCU="^"
34 K PRCFA S PRCF("X")="AS" D ^PRCFSITE G:'% EXIT2
35 S PRCDD=420,PRCRI(420)=PRC("SITE")
36 I '$O(^PRC(420,PRCRI(420),1,"B","")) D EN^DDIOL("No Control Point in file!") G EXIT2
37 S PRCLOCK=$$DICGL^PRC0B1(PRCDD)_PRCRI(PRCDD)_",",Y=3 D ICLOCK^PRC0B(PRCLOCK,.Y)
38 I 'Y D EN^DDIOL("File is in use, please try later!") G EXIT2
39 F D EN^DDIOL(" ") D Q:PRCQT=1
40 . N PRCDD,PRCAED,PRCDI
41 . S PRCDD=420.01,PRCQT=""
42 . S X(0)="AENOQS",X("S")="I X-9999,$P(^(0),U,19)'=1"
43 . D LKUP^PRCB1A Q:PRCQT
44 . D EDIT2
45 . QUIT
46 D DCLOCK^PRC0B(PRCLOCK)
47EXIT2 QUIT
48 ;
49EDIT2 ;edit active/inactive
50 D EDIT^PRC0B(.X,PRCDI,"20Active/Inactive Control Point","") I X=1 S PRCQT=2
51 K A D PIECE^PRC0B(PRCDI,"1~20","I","A")
52 S X=$G(A(PRCDD,PRCRI(PRCDD),20,"I")) K A
53 S X=$S(X=1:"23////^S X=DUZ;24///NOW",1:"23///^S X=""@"";24///^S X=""@""")
54 D EDIT^PRC0B(.X,PRCDI,X)
55 QUIT
56 ;
Note: See TracBrowser for help on using the repository browser.