source: FOIAVistA/tag/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPR4FSH.m@ 1779

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

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1RMPR4FSH ;PHX/HNB- MISC UTILITY PURCHASE CARD MODULE ;March 11, 1996
2 ;;3.0;PROSTHETICS;**3**;Feb 09, 1996
3EN1 ;RESET 664 ITEMS AFTER CLOSE OUT
4 F RI=0:0 S RI=$O(^TMP($J,1,RI)) Q:RI'>0 I '$D(^RMPR(664,RMPRA,1,RI,0)) D LPC
5 K %X,%Y,RI Q
6EN2 ;REST 664 ITEMS IF NOT CLOSED OUT
7 F RI=0:0 S RI=$O(^TMP($J,1,RI)) Q:RI'>0 I '$D(^RMPR(664,RMPRA,1,RI,0)) D LP
8 I '$D(RMX) F RI=0:0 S RI=$O(^TMP($J,1,RI)) Q:RI'>0 S %X="^TMP($J,1,RI,",%Y="^RMPR(664,RMPRA,1,RI," D %XY^%RCR S DA(1)=RMPRA,DA=RI,DIK="^RMPR(664,"_RMPRA_",1," D IX^DIK
9 K RMX,%Y,%X,RI S $P(^RMPR(664,RMPRA,2),U,6)="" Q
10LP ;SET DATA
11 I $D(^TMP($J,1,RI,0)) S RA=$P(^(0),U,13),RT=^TMP($J,RA,0) S X=$P(RT,U,1) K DD,DO S DIC="^RMPR(660,",DIC(0)="MLZ",DLAYGO=660 D FILE^DICN K DLAYGO
12 S RDA=+Y,%X="^TMP($J,RA,",%Y="^RMPR(660,RDA," D %XY^%RCR S DA=RDA,DIK="^RMPR(660," D IX^DIK
13 I $D(^TMP($J,1,RI,0)) S $P(^(0),U,13)=+RDA,%X="^TMP($J,1,RI,",%Y="^RMPR(664,RMPRA,1,RI," D %XY^%RCR S DA(1)=RMPRA,DA=RI,DIK="^RMPR(664,"_RMPRA_",1," D IX^DIK S RMX=1
14 Q
15LPC I $D(^TMP($J,1,RI,0)) S RT=$P(^TMP($J,1,RI,0),U,13) I $D(^TMP($J,+RT,0)) S RT=$P(^TMP($J,+RT,0),U,13),$P(^TMP($J,1,RI,0),U,2)="NOT DELIVERED/ACCEPTED",$P(^(0),U,13)=""
16 S %X="^TMP($J,1,RI,",%Y="^RMPR(664,RMPRA,1,RI," D %XY^%RCR S DA(1)=RMPRA,DA=RI,DIK="^RMPR(664,"_RMPRA_",1," D IX^DIK I $D(RMPRP) S $P(^RMPR(664,RMPRA,2),U,4)=RMPRP
17 Q
18GET ;SET TMP GLOBAL WITH PURCHASING TRANSACTION BEFORE CHANGES
19 S %X="^RMPR(664,RMPRA,1,",%Y="^TMP($J,1," D %XY^%RCR F RI=0:0 S RI=$O(^TMP($J,1,RI)) Q:RI'>0 I $D(^(RI,0)) S RA=$P(^(0),U,13) I $D(^RMPR(660,+RA,0)) S RMPRP=$P(^(0),U,13),%X="^RMPR(660,+RA,",%Y="^TMP($J,"_RA_"," D %XY^%RCR
20 I S RMPRP="2421PC" I $D(^RMPR(664,RMPRA,2)),$P(^(2),U,5)'="" S RMPRPSC=$P(^(2),U,5) D PSCAMT^RMPR4M
21 Q
Note: See TracBrowser for help on using the repository browser.