source: FOIAVistA/tag/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPR21B.m@ 1607

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

initial load of FOIAVistA 6/30/08 version

File size: 3.3 KB
Line 
1RMPR21B ;PHX/HNB/JLT-CREATE 1358 TRANSACTION, POST TO 2319 ;8/29/1994
2 ;;3.0;PROSTHETICS;**129**;Feb 09, 1996;Build 2
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4FILE ;CREATE 1358 DAILY RECORD
5 I RMPRF=1!(RMPRF=2) D PR^RMPR21A G:$D(DTOUT) KILL^RMPR21 I %=-1 S RMPRGO=$S(RMPRF=1:"ASK^RMPR21",1:"ASK5^RMPR21A") G @RMPRGO
6 W !?5,"Posting Now ..."
7 S $P(^RMPR(664,RMPRA,0),U,3)=RMPROB,$P(^(0),U,14)=RMPR("STA")
8 S (R1,RMPRCT,RMPRQT,RMPRTO,RMPRI)=0
9 S RMPRSH=$S($P(^RMPR(664,RMPRA,0),U,10):$P(^(0),U,10),1:"")
10 F S R1=$O(^RMPR(664,RMPRA,1,R1)) Q:R1'>0 D
11 .S RB=^RMPR(664,RMPRA,1,R1,0)
12 .S RMPRCT=$P(RB,U,3)
13 .S RMPRQT=$P(RB,U,4)
14 .S RMPRR=$S($P(RB,U,8)'="":RMPRR_" "_$P(RB,U,8),1:"")
15 .S RMPRTO=RMPRTO+$J(RMPRCT*RMPRQT,0,2)
16 K RB
17POST S RMPRTO=$S($D(^RMPR(664,RMPRA,2)):RMPRTO-$J((RMPRTO*$P(^(2),U,6)/100),0,2),1:RMPRTO)
18 I RMPRF'=10,RMPRF'=1 D CHECK^RMPRCT
19 I '$D(RMPRTO) G KILL^RMPR21
20 S X=RMPROB_U_DT_U_$J(RMPRTO+RMPRSH,0,2)_U_U_$E($P(RMPRNAM,",",1),1,6)_","_$E(RMPRSSN,6,9)_U_$E(RMPRR,1,60)
21 S PRCS("TYPE")="FB" K DO,DD,D0
22 D EN2^PRCS58 G:+Y'=1 ERROR^RMPR21
23 S RMPRTN=$P(Y,U,2)
24 S RMPRTRN=$P(^PRC(424,RMPRTN,0),U,1)
25M W !?5,"1358 Transaction has been assigned Number: ",RMPRTRN
26 S RMPRV=$P(^RMPR(664,RMPRA,0),U,4)
27 S $P(^RMPR(664,RMPRA,0),U,7)=RMPRTRN
28 S $P(^RMPR(664,RMPRA,0),U,6)=PRCSCPAN
29 S:'RMPRF RMPRF=9
30 S RA="1:PSC;2:2421;3:2237;4:2529-3;5:2529-7;6:2474;7:2431;8:2914;9:OTHER;10:2520;11:STOCK ISSUE;12:INVENTORY ISSUE;13:HISTORICAL DATA;"
31 S $P(^RMPR(664,RMPRA,2),U,4)=$P($P(RA,";",+RMPRF),":",2) K RA
32 I $D(RMPRPSC) S $P(^RMPR(664,RMPRA,2),U,5)=RMPRPSC
33 S:$D(RMPRDELN) $P(^RMPR(664,RMPRA,3),U)=RMPRDELN
34 S DA=RMPRA,DIK="^RMPR(664," D IX1^DIK
35 ;get AMIS grouper number
36 L +^RMPR(669.9,RMPRSITE,0):999 I $T=0 S RMPRG=DT_99 G GGC
37 S RMPRG=$P(^RMPR(669.9,RMPRSITE,0),U,7),RMPRG=RMPRG-1,$P(^(0),U,7)=RMPRG L -^RMPR(669.9,RMPRSITE,0)
38GGC S RMPRWO=$P(^RMPR(664,RMPRA,0),U,15)
39 ;check for lab
40 I RMPRWO,$D(^RMPR(664.2,+RMPRWO,0)) D
41 .F DA=0:0 S DA=$O(^RMPR(664.2,RMPRWO,1,"AC",RMPRA,DA)) Q:DA'>0 S DIK="^RMPR(664.2,"_RMPRWO_",1,",DA(1)=RMPRWO D ^DIK
42 F S B2=$O(^RMPR(664,RMPRA,1,B2)) Q:B2'>0 D R19^RMPR21C
43 K RMPRDP G:RMPRSH="" NS
44 K DD,DO S X=DT,DIC="^RMPR(660,",DIC(0)="LZ" D FILE^DICN S (RMPR660,DA)=+Y
45 ;
46 S ^RMPR(660,RMPR660,0)=DT_U_RMPRDFN_U_DT_"^X^^^^^"_RMPRV_U_RMPR("STA")_"^^^"_RMPRF_U_RMPRS_"^^^"_RMPRSH_"^^^^^",^("AMS")=RMPRG,^("AM")=U_U_RMPRDIS_U_RMPRSC,$P(^(0),U,27)=DUZ,^(1)=RMPRTRN I $D(RMPRWO),RMPRWO S $P(^("AM"),U,2)=1 D
47 .I $D(^RMPR(664.2,RMPRWO,0)) S $P(^(0),U,6)=$P(^(0),U,6)+RMPRSH
48 S ^RMPR(660,RMPR660,3)=$P($G(^RMPR(664,RMPRA,3)),U,4)
49 S DIK="^RMPR(660," D IX1^DIK S $P(^RMPR(664,RMPRA,0),U,12)=RMPR660 K RMPRDP
50NS ;check approval
51 ;D NOW^%DTC S ^RMPR(664,"AP",RMPR("STA"),%,RMPRA)="",$P(^RMPR(664,RMPRA,4),U,9)=%,$P(^(4),U,8)=1
52 ;S $P(^RMPR(664,RMPRA,4),U)=DUZ,$P(^RMPR(664,RMPRA,4),U,2)=$P(^VA(200,DUZ,20),U,3)
53 ;e-sig
54 ;I $D(^XUSEC("RMPR WARRANT",DUZ))!($D(^XUSEC("RMPR SUPERVISOR",DUZ))) I $G(RMPRSBP)'="" D
55 ;.S $P(^RMPR(664,RMPRA,4),U,3)=DUZ,$P(^(4),U,4)=RMPRSBT
56 ;.S $P(^RMPR(664,RMPRA,4),U,7)=$$SUM^RMPRSEC(RMPRSBP),$P(^RMPR(664,RMPRA,4),U,6)=$$ENCODE^RMPRSEC(RMPRSBP,DUZ,1),$P(^RMPR(664,RMPRA,4),U,5)=DT
57 ;.K ^RMPR(664,"AP",RMPR("STA"),$P($G(^RMPR(664,RMPRA,4)),U,9),RMPRA) S $P(^RMPR(664,RMPRA,4),U,8)=""
58 W !,?5,"Updated 10-2319" G:'$D(RMPRF) EXIT^RMPR21
59 Q:$D(RMPRDP) D:RMPRF=1 ^RMPRP55 D:RMPRF=2 ^RMPRP21
60 ;
61 I RMPRF=10 D ASK^RMPRE21
62 G EXIT^RMPR21
Note: See TracBrowser for help on using the repository browser.