source: WorldVistAEHR/trunk/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPRAP.m@ 1766

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

initial load of WorldVistAEHR

File size: 1.7 KB
Line 
1RMPRAP ;PHX/RFM-ADD NEW PROSTHETIC PATIENT ;8/29/1994
2 ;;3.0;PROSTHETICS;;Feb 09, 1996
3 I '$D(RMPR) D DIV4^RMPRSIT Q:$D(X)
4 K DIE,DIC,RMPRSSN,RMPRF,RMPRDOB,RMPRNAM,RMPRDFN,DA,X,Y
5 D GETPAT^RMPRUTIL S RMPRF="X"
6 I '$D(RMPRDFN) G EXIT L +^RMPR(665,DA,0):1 I $T=0 W !,?5,"Some one else is editing this entry!" G EXIT
7 S DA=RMPRDFN,DIE="^RMPR(665,",DR=2 D ^DIE L -^RMPR(665,RMPRDFN,0) I X="" G EXIT
8DIS ;ADD PSC ITEMS TO PROSTHETICS PATIENT FILE
9 S:'$D(RMPRFLAG) RMPRF="" I '$D(RMPRFLAG) S RMPRBAC1=1 D ^RMPRPAT
10 S %=2 R !,"Add/Edit/View Patient PSC" D YN^DICN
11 I $D(RMPRFLAG) Q:%=2 G:%=1 COD G:%=0 MES I %=-1 S RMPRDIE=1 Q
12 G EXIT:$D(DTOUT),RMPRAP:%<0,MES:%=0,RMPRAP:%=2
13COD S RFL=1 D DT^RMPRPSC Q:$D(RMPRFLAG)
14PSC I '$D(RFL) K DIE S RFL=1 D DT^RMPRPSC Q:$D(RMPRFLAG) G RMPRAP
15EXIT Q:$D(RMPRFLAG)
16END K RMPRF,%,X,Y,RFL,RMPRDFN,RMPRDOB,RMPRE,RMPRNAM,RMPRSSN,RMPRX,RMPRHIS,RMPRDIS,PRC,RMPR1,RMPR2,RMPR3,RMPR4,DIR,DR,DIC,DIE,PRCSI,PRCSQTT,RMPR660,RMPRDA,RMPRDELN,RMPRKILL Q
17MES W !,"Enter `YES` or `NO`" G DIS
18CLA ;CLOTHING ALLOWANCE ENTER/EDIT
19 K RMPRDFN W ! D GETPAT^RMPRUTIL G:'$D(RMPRDFN) END
20 S DIC="^RMPR(665,"_RMPRDFN_",6," S:'$D(^RMPR(665,RMPRDFN,6,0)) ^RMPR(665,RMPRDFN,6,0)="^665.02DA^^"
21CAE S DA(1)=RMPRDFN,DIC="^RMPR(665,"_DA(1)_",6," S:'$D(^RMPR(665,RMPRDFN,6,0)) ^RMPR(665,RMPRDFN,6,0)="^665.02DA^^" S DIC(0)="AEQMZL",DLAYGO=665 D ^DIC K DLAYGO G:+Y'>0 CLA S DA(1)=RMPRDFN,(RMPRDA,DA)=+Y,DIE=DIC
22 L +^RMPR(665,DA(1),6):1 I $T=0 W !,$C(7),"Someone else is Editing this entry!" G END
23 S DR=".01;1;I $P(^RMPR(665,DA(1),6,DA,0),U,2)=""N"" S Y=""@1"";2;@1;4;I $P(^RMPR(665,DA(1),6,DA,0),U,4)=""N"" S Y=""@2"";5;6;@2;3;"
24 D ^DIE L -^RMPR(665,RMPRDFN,6)
25 I $D(DA) I $P(^RMPR(665,RMPRDFN,6,DA,0),U,2)="" S DIK=DIC,DA(1)=RMPRDFN D ^DIK W !,$C(7),?5,"Deleted..."
26 W ! G CAE
Note: See TracBrowser for help on using the repository browser.