source: FOIAVistA/tag/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCH58OB.m@ 949

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

initial load of FOIAVistA 6/30/08 version

File size: 3.5 KB
Line 
1PRCH58OB ;WISC/CLH-OBLIGATE,ADJUST 1358 ;11/28/94 15:06
2V ;;5.1;IFCAP;;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4COB(DA,TRNODE,PO,OB,X) ;
5 ;enter transaction information onto PO
6 ;kills TMP("NEWDATE"),TMP("NEWACC")
7 N DATE,FLAG,I,J,PRCBBFY,SUBSTA,X
8 S $P(PO(0),"^",3,9)=$P(TRNODE(3),"^",1,3)_"^"_$P(TRNODE(3),"^",6,9)
9 S X=$P(PO(0),"^",7)+$P(PO(0),"^",9)
10 S $P(PO(0),"^",11,12)=X_"^"_OB
11 S $P(PO(0),"^",15)=$P(TRNODE(4),"^")
12 F I=6,8 S $P(PO(0),"^",I)=+$P(PO(0),"^",I)
13 S PO(1)=$P(TRNODE(3),"^",4,5)
14 ;
15 L +^PRC(442,DA)
16 S ^PRC(442,DA,0)=PO(0)
17 S $P(^PRC(442,DA,1),"^",1,2)=$P(PO(1),"^",1,2)
18 S:$P(PO(0),"^",3)]"" ^PRC(442,"E",$P($P(PO(0),"^",3)," "),DA)=""
19 S:$P(PO(1),"^")]"" ^PRC(442,"D",$P(PO(1),"^"),DA)=""
20 I $D(PRCFA("RETRAN")),'PRCFA("RETRAN") D NODE22^PRCFFU5
21 S PRCBBFY=$P(TRNODE(3),U,11)
22 S SUBSTA=$P(TRNODE(0),"^",10)
23 S:'$D(TMP("NEWDATE")) TMP("NEWDATE")=""
24 S:'$D(TMP("NEWACC")) TMP("NEWACC")="0^NO"
25 S DATE=$P(TMP("NEWDATE"),U)
26 S FLAG=$P(TMP("NEWACC"),U)
27 S DIE=442
28 S DR="26///^S X=PRCBBFY;29///^S X=DATE;30///^S X=FLAG;31///^S X=SUBSTA"
29 D ^DIE
30 K DIE,DR
31 K TMP("NEWDATE")
32 K TMP("NEWACC")
33 I $P($G(^PRC(442,DA,12)),"^",2)]"" D
34 . D REMOVE^PRCHES5(DA),ENCODE^PRCHES5(DA,$P(^PRC(442,DA,1),"^",10))
35 . QUIT
36 L -^PRC(442,DA)
37 Q
38 ;
39PAT(DA,PODA,PO,PATNUM) ;get pat info, kill PRCHPO
40 S (PO,PODA)=DA
41 S PO(0)=$G(^PRC(442,PODA,0))
42 S PATNUM=$P(PO(0),U)
43 K PRCHPO
44 Q
45 ;
46ADJ(DIC,PRC,DA) ;
47 S DIC("A")="Select OBLIGATION NUMBER: "
48 S DIC(0)="AEQZ"
49 S D="D"
50 S DIC("S")="I $P(^(0),U,2)=""O"",$P(^(0),U,4)=1,PRC(""SITE"")=+^(0),+PRC(""CP"")=+$P($P(^(0),U),""-"",4)"
51 D IX^DIC
52 Q
53 ;
54VER(PRC,X) ;verify entry
55 S X=$O(^PRC(442,"B",PRC("SITE")_"-"_X,0))
56 Q
57 ;
58PO(DA,PO) ;PO data for adjustments
59 N I
60 F I=0,1,7,8 S PO(I)=$G(^PRC(442,DA,I))
61 Q
62 ;
63OLDTT(DA,X) ;old code sheet info
64 S X=$E($G(^PRC(442,DA,10,1,0)),1,6)
65 Q
66 ;
67POADJ(PO,PODA,TRNODE,AMT) ;set adjustments in 442
68 N DIE,DR,DA,X,X1
69 S X1=AMT
70 S:AMT<0 AMT=-AMT
71 S DIE="^PRC(442,"
72 S DA=PODA
73 S DR="92///^S X=$S($P(PO(0),U,16)]"""":$P(PO(0),U,16),1:$P(PO(0),U,15))+X1;91///^S X=$P(PO(0),U,15)+X1;7.2///^S X=AMT;3.4///^S X=$P(PO(0),U,7)+$P(TRNODE(3),U,7);94///^S X=$P(PO(8),U,1)+X1"
74 S:$P(PO(0),U,9) DR=DR_";4.4///^S X=$P(PO(0),U,9)+$P(TRNODE(3),U,9)"
75 D ^DIE
76 S PO(0)=^PRC(442,PODA,0)
77 S X=100
78 S DA=PODA
79 D ENF^PRCHSTAT
80 S:X1'=AMT AMT=X1
81 Q
82 ;
83OBLK(PODA,PRCA) ;look up obligation number
84 N DIC,Y
85 S DIC="^PRC(442,"
86 S DIC(0)="AEMNQZ"
87 S DIC("A")="Select OBLIGATION NUMBER: "
88 S DIC("S")="I $P(^(0),U,2)=21"
89 S:$G(PRCA) DIC("S")=DIC("S")_","_"+$P(^(0),U,3)=PRCA"
90 D ^DIC
91 I +Y<0 S PODA=0 Q
92 S PODA=+Y
93 S PODA(0)=Y(0)
94 S PODA(1)=$P(Y,U,2)
95 S PODA(2)=$P(Y(0),U,3)
96 Q
97 ;
98BAL(PODA,AMT) ;set the 8th node equal to obligation amount
99 S ^PRC(442,PODA,8)=AMT_"^0^0"
100 Q
101 ;
102KILL(PO) ;if 1358 obligation not completed, set dollar amounts on PAT to 0
103 ;delete 'PRIMARY 2237' field, set status to 'CANCELLED ORDER'
104 ;and delete references to pat number on original request.
105 N ZZX,XXZ,DIE,DR,X,Y,TRDA,DA
106 D WAIT^PRCFYN
107 S ZZX=^PRC(442,PO,0)
108 S $P(ZZX,U,15,16)="0^0"
109 F XXZ=7,9 S $P(ZZX,U,XXZ)=0 S $P(ZZX,U,12)=""
110 S ^PRC(442,PO,0)=ZZX
111 K XXZ,^(9)
112 S DA=+$P(ZZX,U,12)
113 I $D(^PRCS(410,DA,0)) S DIE="^PRCS(410,",DR="52///@;24///@" D ^DIE K DIE,DA,DR,ZZX
114 S (X,Y)=45,DA=PO
115 D UPD^PRCHSTAT
116 K DIE,DA,DR,X,Y
117 S X="PAT Number "_PATNUM_" has been cancelled."
118 D MSG^PRCFQ W !
119 S X="Status on 1358 remains 'Pending Fiscal Action'.*"
120 D MSG^PRCFQ
121 S TRDA=+$P(ZZX,U,12)
122 I $D(^PRCS(410,TRDA,0)) D KILL^PRCS58OB(TRDA)
123 Q
124 ;
125BAL1(PODA,AMT) ;Set liquidation balance
126 S:$G(^PRC(442,+PODA,8)) $P(^(8),"^",2)=AMT
127 Q
Note: See TracBrowser for help on using the repository browser.