90 lines
4.4 KiB
Mathematica
90 lines
4.4 KiB
Mathematica
RMPR21 ;PHX/HNB/JLT-CREATE 1358 TRANSACTION, POST TO 2319 ;8/29/1994
|
|
;;3.0;PROSTHETICS;**12,41,62**;Feb 09, 1996
|
|
;RVD patch #62 - pce api
|
|
;Per VHA Directive 10-93-142, this routine should not be modified.
|
|
K ^TMP($J,"RMPRPCE")
|
|
S PRCS("A")="Select OBLIGATION NUMBER: " D EN1^PRCS58 G:Y=-1 EXIT
|
|
S RMPROB=$P(Y,U,2) D BAL^RMPRPSC
|
|
ST S RMPRR="",(RMPRCT,R1,RMPRQT,RMPRTO,RMPRDS,RMPRIS,B2)=0,B1=1
|
|
W !,"This will Create"_$S('$D(RMPRF):" a NO FORM ",RMPRF=1:" a PSC 10-55 ",RMPRF=2:" a 10-2421 ",RMPRF=8:" an EYEGLASS 10-2914 ",1:" ALL OTHER ")
|
|
A S %=1 R "Do you wish to Continue" D YN^DICN G:%=1 EN1 G:%=0 H
|
|
K RMPROB G EXIT
|
|
EN1 D GETPAT^RMPRUTIL
|
|
G:'$D(RMPRDFN) EXT
|
|
K DIC,DINUM,DIC("DR")
|
|
S X=DT,DIC("DR")="1////^S X=RMPRDFN"
|
|
S DIC="^RMPR(664,",DIC(0)="AELQM",DLAYGO=664
|
|
K DD,DO
|
|
D FILE^DICN K DLAYGO,DIC Q:Y<0
|
|
S (RMPRK,RMPRA)=+Y
|
|
S DFN=RMPRDFN D DEM^VADPT
|
|
VIEW ;VIEW 10-2319
|
|
S RMPRBAC1=1 D ^RMPRPAT K RMPRBAC1 G:$D(RMPRKILL) KILL
|
|
I RMPRF=10 D EN2520^RMPRM G:'$D(RMPRF) KILL
|
|
I RMPRF=1!(RMPRF=10) S RMPRFLAG=1 D DIS^RMPRAP G:$D(RMPRDIE) KILL
|
|
S DIE="^RMPR(664,",DA=RMPRA
|
|
S RMPRDR=$S(RMPRF=9:"NOFORM",RMPRF=1:"[RMPR55]",RMPRF=8:"[RMPREYE]",RMPRF=2:"2421",RMPRF=10:"[RMPR 2520]",1:"NOFORM")
|
|
G:RMPRDR["2421" P24^RMPR21A
|
|
G:RMPRDR["NOFORM" COT^RMPR21A
|
|
G:RMPRDR["RMPREYE" EYE^RMPRPSC
|
|
CON K DR
|
|
S DR=RMPRDR D ^DIE G:'$P(^RMPR(664,RMPRA,0),U,4) KILL
|
|
CHK D CHK1
|
|
I 'FL W !!,$C(7),?5,"REQUIRED FIELDS DO NOT EXIST ON THIS FORM",! G KILL
|
|
S $P(^RMPR(664,RMPRA,0),U,9)=DUZ
|
|
;I $D(DTOUT)!($D(Y(0))) W !,$C(7),$C(7),"Please Try Later!" G KILL
|
|
ASK ;POST TRANSACTION QUESTION
|
|
S %=2 W !!,"Are you ready to POST to IFCAP and 10-2319 NOW"
|
|
D YN^DICN G:%=1 FILE^RMPR21B G:$D(DTOUT) KILL
|
|
I %=0 W !,"This will Create a Daily Transaction in the 1358 Module of IFCAP,",!,"and Create an Entry on the Prosthetic 10-2319 Record." G ASK
|
|
DEL ;
|
|
I %=-1 S %=2 R !,"Do you want to Delete this Transaction" D YN^DICN I $D(DTOUT)!(%=1) S:$D(RMPRA) RMPRK=RMPRA G KILL
|
|
I %=0 W !!,"ENTER YES OR NO!!",$C(7) S %=-1 G DEL
|
|
D ^RMPRLI I RMPRX]"" G ASK
|
|
L W !!!,"Enter Item to Edit: " R X:DTIME G:'$T KILL
|
|
G:X["^"!(X="") ASK I X["?" D ZDSP^RMPR21A G L
|
|
S DIC="^RMPR(664,"_RMPRA_",1,",DIC(0)="EQMZ" D ^DIC
|
|
I +Y'>0 K DA,Y G L
|
|
S DA=+Y,DA(1)=RMPRA,DIE=DIC
|
|
;HCPCS code
|
|
S DR="8;9;I $P(^RMPR(664,DA(1),1,DA,0),U,10)=4 S Y=""@1"";.01;16;1;14;3;2;4;7;S Y="""";@1;10;16;1;14;3;2;4;7"
|
|
;S DR=".01;1;14;16;8;9;I $P(^RMPR(664,DA(1),1,DA,0),U,10)=4 S Y=""@1"";3;2;4;7;S Y="""";@1;10;3;2;4;7"
|
|
;HCPCS code
|
|
S:RMPRDR["RMPREYE" DR="8;9;I $P(^RMPR(664,DA(1),1,DA,0),U,10)=4 S Y=""@1"";.01;16;1;3;2;4;7;S Y="""";@1;10;16;1;3;2;4;7" D ^DIE
|
|
;S:RMPRDR["RMPREYE" DR=".01;16;8;9;I $P(^RMPR(664,DA(1),1,DA,0),U,10)=4 S Y=""@1"";1;3;2;4;7;S Y="""";@1;10;1;3;2;4;7" D ^DIE
|
|
D CHK
|
|
I '$D(FL) W !!,$C(7),?5,"REQUIRED FIELDS DO NOT EXIST ON THIS FORM",! G KILL
|
|
S DIE="^RMPR(664,",DA=RMPRA,DR=11 D ^DIE G L
|
|
H W !,"This will create a transaction, post to IFCAP, and update the 2319 report",! G A
|
|
;
|
|
CHK1 ;CHECK FOR EXISTENCE OF ITEMS ON PURCHASING FORMS
|
|
S FL=1
|
|
I $D(^RMPR(664,RMPRA,1)) S (FL,RI)=0 F S RI=$O(^RMPR(664,RMPRA,1,RI)) Q:RI'>0 Q:'$D(^(RI,0)) D
|
|
.S FL=1
|
|
.S RB=^RMPR(664,RMPRA,1,RI,0)
|
|
.I $P(RB,U,3)=""!($P(RB,U,4)="")!($P(RB,U,5)="")!($P(RB,U,9)="")!($P(RB,U,10)="") S FL=0 Q
|
|
.S DA(1)=RMPRA,DA=RI D CHKCPT^RMPR21A
|
|
Q
|
|
;
|
|
ERROR ;ERROR MESSAGE FOR FAILED POSTING
|
|
W !,$C(7),?5,"***PLEASE CONTACT YOUR FISCAL SERVICE***",!,Y
|
|
KILL ;DELETE PURCHASING ENTRY
|
|
Q:'$D(RMPRK)
|
|
S DA=RMPRK,DIK="^RMPR(664," D ^DIK W !,$C(7),?20,"Deleted..." K RMPRDOD,RMPROB
|
|
I $D(RMPRWO),$D(^RMPR(664.2,+RMPRWO,0)) D K DIK
|
|
TMP .S DA=0
|
|
.F S DA=$O(^RMPR(664.2,RMPRWO,1,"AC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