source: FOIAVistA/tag/r/IFCAP-PRC-PRX--PRCA--PRCN/PRC5B1.m@ 1582

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

initial load of FOIAVistA 6/30/08 version

File size: 3.8 KB
Line 
1PRC5B1 ;WISC/PLT-PRC5B continue ; 07/07/94 2:47 PM
2V ;;5.0;IFCAP;;4/21/95
3 QUIT ;invalid entry
4 ;
5ALD ;called by PRC5B
6 N PRCA,PRCB,PRCC
7 D EN^DDIOL("POST INITIAL: Move name (.01) to ald (5) for file 420.3"_" at "_$$NOW^PRC5A)
8 S PRCA=0 F S PRCA=$O(^PRCD(420.3,PRCA)) Q:'PRCA S PRCB=^(PRCA,0) D:$P(PRCB,"^",7)=""&($P(PRCB,"^",6)="")
9 . S PRCC=$P(PRCB,"^")
10 . D EDIT^PRC0B(.X,"420.3;;"_PRCA,"5///^S X="""_PRCC_"""")
11 . QUIT
12 D EN^DDIOL("POST INITIAL: Move name (.01) to ald (5) for file 420.3 DONE"_" at "_$$NOW^PRC5A)
13 QUIT
14 ;
15FND ;add fund code to file 420.3
16 N PRCRI,PRCA,PRCB,PRCC,PRCSTRI
17 D EN^DDIOL("POST INITIAL: Process FMS FND-DOCUMENT"_" at "_$$NOW^PRC5A)
18 S PRCSTRI=$O(^PRCD(420.1999,"AC","A",""))
19 S PRCRI(420.92)=0 F S PRCRI(420.92)=$O(^PRCU(420.92,"B","FND",PRCRI(420.92))) Q:'PRCRI(420.92) S PRCA=^PRCU(420.92,PRCRI(420.92),0) D:$P(PRCA,"^",4)]""&($P(PRCA,"^",6)="")
20 . D ED(PRCRI(420.92),1)
21 . S PRCRI(420.923)=0
22 . F S PRCRI(420.923)=$O(^PRCU(420.92,PRCRI(420.92),1,PRCRI(420.923))) Q:'PRCRI(420.923) D:$P(^(PRCRI(420.923),0),"^",2)="" FNDED(PRCRI(420.92),PRCRI(420.923))
23 . D ED(PRCRI(420.92),2)
24 D EN^DDIOL("POST INITIAL: Process FMS FND-DOCUMENT done!"_" at "_$$NOW^PRC5A)
25 QUIT
26 ;
27FNDED(PRCA,PRCB) ;start convert
28 N PRCRI,PRCAPP,PRCFUND,PRCFUNDD,PRCYB,PRCYE,A
29 S A=^PRCU(420.92,PRCA,1,PRCB,1),PRCAPP=$P(A,"~",2),PRCFUND=$P(A,"~",5)
30 S PRCYB=+$$YEAR^PRC0C($P(A,"~",3)),PRCYE=+$$YEAR^PRC0C($S($P(A,"~",4):$P(A,"~",4),1:PRCYB)),PRCFUNDD=$P(A,"~",6)
31 Q:PRCAPP=""!(PRCFUND="")!'PRCYB!'PRCYE
32 ;add/edit fund file 420.14
33 S PRCRI(420.14)=$O(^PRCD(420.14,"UNQ",PRCFUND,PRCYB,PRCYE,"")) D QUIT:'PRCRI(420.14)
34 . I PRCRI(420.14) D EDIT^PRC0B(.X,"420.14;;"_PRCRI(420.14),"1///^S X="""_PRCFUNDD_"""") I 1
35 . E S (PRCUQ,PRCK01,PRCK2,PRCK3)="" D
36 .. S X=PRCFUND,X("DR")="1////"_PRCFUNDD_";2///^S X="""_PRCYB_""";3///^S X="""_PRCYE_""";5////"_PRCSTRI
37 .. D ADD^PRC0B1(.X,.Y,"420.14;^PRCD(420.14,")
38 .. S:Y>0 PRCRI(420.14)=+Y
39 .. Q
40 . Q
41 S PRCRI(420.3)=0 F S PRCRI(420.3)=$O(^PRCD(420.3,"B",PRCFUND,PRCRI(420.3))) Q:'PRCRI(420.3) Q:$P($G(^PRCD(420.3,PRCRI(420.3),0)),"^",6)=""
42 I 'PRCRI(420.3) D QUIT:'PRCRI(420.3)
43 . S X=PRCFUND,X("DR")="2////"_PRCAPP_";4////"_$TR(PRCAPP,"_"," ")
44 . D ADD^PRC0B1(.X,.Y,"420.3;^PRCD(420.3,")
45 . S:Y>0 PRCRI(420.3)=+Y
46 D ED1(PRCA,PRCB) ;edit convert field
47 QUIT
48 ;
49PCL ;set-up program dic (called from prc5a)
50 N PRCRI,PRCA,PRCB,PRCC,PRCSTRI
51 D EN^DDIOL("POST INITIAL: Process FMS PCL-DOCUMENT"_" at "_$$NOW^PRC5A)
52 S PRCSTRI=$O(^PRCD(420.1999,"AC","A",""))
53 S PRCRI(420.92)=0 F S PRCRI(420.92)=$O(^PRCU(420.92,"B","PCL",PRCRI(420.92))) Q:'PRCRI(420.92) S PRCA=^PRCU(420.92,PRCRI(420.92),0) D:$P(PRCA,"^",4)]""&($P(PRCA,"^",6)="")
54 . D ED(PRCRI(420.92),1)
55 . S PRCRI(420.923)=0
56 . F S PRCRI(420.923)=$O(^PRCU(420.92,PRCRI(420.92),1,PRCRI(420.923))) Q:'PRCRI(420.923) D:$P(^(PRCRI(420.923),0),"^",2)="" PCLED(PRCRI(420.92),PRCRI(420.923))
57 . D ED(PRCRI(420.92),2)
58 D EN^DDIOL("POST INITIAL: Process FMS PCL-DOCUMENT done!"_" at "_$$NOW^PRC5A)
59 QUIT
60 ;
61PCLED(PRCA,PRCB) ;set-up program dic
62 N PRCRI,PRCPGM,PRCPGMD,A
63 S A=^PRCU(420.92,PRCA,1,PRCB,1),PRCPGM=$P(A,"~",3),PRCPGMD=$P(A,"~",4)
64 Q:PRCPGM=""
65 S PRCRI(420.13)=$O(^PRCD(420.13,"B",PRCPGM,""))
66 I PRCRI(420.13)="" D QUIT:'PRCRI(420.13)
67 . N X,Y
68 . S X=PRCPGM,X("DR")="1////"_PRCPGMD_";2////"_PRCSTRI
69 . D ADD^PRC0B1(.X,.Y,"420.13;^PRCD(420.13,")
70 . S:Y>0 PRCRI(420.13)=+Y
71 . QUIT
72 D ED1(PRCA,PRCB) ;edit convert field
73 QUIT
74 ;
75PAC ;set-up fcp/prj dic (called by prc5a)
76 G PAC^PRC5B3
77 QUIT
78 ;
79CPF ;fill-in fms fields in file 420 (fcp file) (called from prc5a)
80 G CPF^PRC5B2
81 ;
82 QUIT
83 ;
84ED(PRCA,PRCB) ;edit convert start/end time,PRCA=RI, PRCB=1 if start, 2 if end
85 S PRCB=$S(PRCB=1:2.6,1:2.7)
86 D EDIT^PRC0B(.X,"420.92;;"_PRCA,PRCB_"///^S X=""N""")
87 QUIT
88 ;
89ED1(PRCA,PRCB) ;edit converted y/n
90 N A
91 S A="420.92;^PRCU(420.92,;"_PRCA
92 S A=A_"~"_"420.923;^PRCU(420.92,"_PRCA_",1,;"_PRCB
93 D EDIT^PRC0B(.X,A,"2////Y")
94 QUIT
95 ;
Note: See TracBrowser for help on using the repository browser.