source: WorldVistAEHR/trunk/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPRFO2.m@ 824

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

initial load of WorldVistAEHR

File size: 4.2 KB
Line 
1RMPRFO2 ;PHX/RFM,HPL-CONTINUATION OF RMPRFO1 ;11/01/1994
2 ;;3.0;PROSTHETICS;**77,105**;Feb 09, 1996
3 ;
4 ;RVD patch #77 - check for variable %
5VIEW ;VIEW LETTERS FROM ELIG SCREEN2 UNDER ISSUE FROM STOCK
6 N RMPRDA,DA,RMPRIN,RMPRAA68
7 S:$D(%) RMPRAA68=%
8 ;Q:'$D(RMPRAA68)
9 Q:$G(DFN)=""
10 S RMPRFF=1 I '$D(^RMPR(665.4,"B",DFN)) G RO1
11 K KILL
12 W !!,"Letters on file:"
13 ;!,?5,"Type",?29,"Employee",?55,"Date or Vendor"
14ASK1 ;SET UP REVERSE LETTER LIST & ASK IF USER WANTS TO VIEW MORE LETTERS
15 D EN^RMPRUTL2
16 S DA=RMPRIN G:$G(DA)'>0 ASK2
17 S RMPRIN=DA D PRINT^RMPRFO1
18MOLET K DA,RMPRDA,RMPRIN
19 S %=2 W !,"Would you like to see more letters" D YN^DICN
20 S RMPRAA68=% I RMPRAA68=-1 S KILL=1 Q
21 I RMPRAA68=0 W !,"'YES' will let you review another letter for this patient",!,"'NO' will let you continue the program"
22 I W !,"Enter '^' to exit the correspondence screen totally" G MOLET
23 I RMPRAA68=2 S KILL=1 D RO1 Q
24 I RMPRAA68=1 G ASK1
25 G RO1
26ASK2 ;Q:RMPRIN=-1
27 S %=2 W !,"Do you wish to view a letter" D YN^DICN Q:$D(DTOUT) S RMPRAA68=% S:RMPRAA68<0 KILL=1 G:RMPRAA68=2!(RMPRAA68<0) RO1
28 I RMPRAA68=0 W !,"Answer `YES` or `NO`" G ASK2
29 I RMPRAA68=1 G VIEW
30 ;I %=1 S %=3 G VIEW
31ASK3 S RMPRAA68=% I RMPRAA68=2 K X R !!,"Enter the number: ",X:DTIME Q:'$T!(X="") Q:X="^" I X>(I-1)!(+X<1)!(X'?1N.N) W !,$C(7),"Enter a number between 1 and ",(I-1)_" or `^` to quit." G ASK3
32 I RMPRAA68=1 I $G(X)'="" I $G(RMPR9VA($G(X)))=""&($G(RMPRDFN)'="") S RMPR9VA($G(X))=RMPRDFN
33 I RMPRAA68=1,$D(^RMPR(665.4,RMPR9VA(+X),0)) S RMPRIN=RMPR9VA(+X),RMPREN=1 D PRINT^RMPRFO1 G VIEW
34RO1 K RMPREN S %=2 W !,"Do you wish to create a correspondence letter" D YN^DICN
35 S RMPRAA68=% I RMPRAA68=1 D CUM^RMPRFO Q
36 S RMPRAA68=% I RMPRAA68=0 W !,"Answer `YES` to create a form letter, `NO` to continue." G RO1
37 I RMPRAA68=2 K RMPRBB,RMPRFF,RMPR9ZRO,RMPR9VA(1),RMPR9VA(2)
38 S RMPRAA68=3 Q
39EN4 ;EDIT A SKELETON
40 K DIC S DIC="^RMPR(665.2,",DIC(0)="AEQLM",DLAYGO=665.2 D ^DIC K DLAYGO
41 I +Y<0!($P(Y,U,4)["1") W !!,"SORRY, THIS IS A NON-EDITABLE LETTER" G EXIT^RMPRFO1
42 S RMPRIN=+Y L +^RMPR(665.2,RMPRIN,0):1 I $T=0 W !,$C(7),?5,"Someone else is Editing this entry!" K RMPRIN G EXIT^RMPRFO1
43 S DIE="^RMPR(665.2,",DA=RMPRIN,DR=".01;1",DIE("NO^")="" D ^DIE L -^RMPR(665.2,RMPRIN,0) I '$D(DA)!($D(DTOUT))!($D(DUOUT)) G EXIT^RMPRFO1
44DEN S %=$S($P(^RMPR(665.2,RMPRIN,0),U,2)=1:1,1:2) W !,"Is this a Denial type of letter" D YN^DICN
45 S RMPRAA68=% G:RMPRAA68<0 EXIT^RMPRFO1
46 I RMPRAA68=0 G QUES1
47 S $P(^RMPR(665.2,RMPRIN,0),U,2)=$S(RMPRAA68=2:0,RMPRAA68=1:1,1:"")
48 G EXIT^RMPRFO1
49QUES1 W !,"Enter `YES` if letter is an AMIS Denial" G DEN
50EN3 ;PRINT FORM LETTER
51 I '$D(RMPR("SIG")) D DIV4^RMPRSIT Q:$D(X)
52 D HOME^%ZIS
53 ;CHECK IF IT IS THE ADP FL 10-90
54 K DIC S DIC="^RMPR(665.2,",DIC(0)="AEQM" D ^DIC G:+Y<0 EXIT^RMPRFO1
55 S RMPRIN=+Y K DIC
56 ;check if it is the ADP FL 10-90
57 I $P(^RMPR(665.2,RMPRIN,0),U,4)["1" K DA D PRNT1^RMPRFO3 D EXIT^RMPRFO1 Q
58PR S DIWF="^RMPR(665.2,RMPRIN,1,",DIWF(1)=665.2,BY="@NUMBER",FR=RMPRIN,TO=RMPRIN D EN2^DIWF
59 G EXIT^RMPRFO1
60SET K DIC S DIC="^RMPR(665.4,",DIC(0)="L",X=DFN,DLAYGO=665.4 K DD,DO,DINUM D FILE^DICN K DLAYGO
61 G:Y<0 EXIT^RMPRFO1
62 S RMPRIN=+Y,$P(^RMPR(665.4,RMPRIN,0),U,2)=RMPRFA,$P(^(0),U,3)=DT,$P(^(0),U,4)=DUZ,$P(^RMPR(665.4,RMPRIN,0),U,5)=$P(^RMPR(665.2,RMPRFA,0),U,2),$P(^RMPR(665.4,RMPRIN,0),U,6)=RMPR("STA") S DIK=DIC,DA=RMPRIN D IX1^DIK
63 S %X="^TMP($J,1,",%Y="^RMPR(665.4,+Y,1," D %XY^%RCR
64 G PRINT^RMPRFO1
65WRITE S:$G(RMPR9ZRO)'=""&(RO="") RO=RMPR9ZRO
66 I I#15=0 S DIR(0)="FAOU^1:245",DIR("A")="End of page: select a letter by number or enter'^' to continue listing" D I $G(X)="^" Q
67 .D ^DIR
68 .I $G(X)="" Q
69 .I $G(X)>0&($G(RO)>0&($G(X)<(RO+1))) S DA=^TMP($J,"RMPR",RO) W !,"***",DA Q
70 W !,I_" ",?4,$S($D(^RMPR(665.2,+$P(^RMPR(665.4,^TMP($J,"RMPR",RO),0),U,2),0)):$E($P(^(0),U,1),1,20),1:"UNKNOWN")
71 S:$D(^RMPR(665.4,^TMP($J,"RMPR",RO),2)) RMPR2=$P(^RMPR(665.4,^TMP($J,"RMPR",RO),2),U,1)
72 ;W ?27,$S($D(^VA(200,+$P(^RMPR(665.4,^TMP($J,"RMPR",RO),0),U,4),0)):$E($P(^(0),U),1,15),1:"")
73 S RMPRPP=$G(^VA(200,+$P(^RMPR(665.4,^TMP($J,"RMPR",RO),0),U,4),0))'="" W ?27,$E($P(^(0),U),1,15) K RMPRPP
74 S Y=$S($P(^RMPR(665.4,^TMP($J,"RMPR",RO),0),U,3):$P(^RMPR(665.4,^TMP($J,"RMPR",RO),0),U,3),$D(RMPR2):$P(^PRC(440,RMPR2,0),U,1),1:"") D DD^%DT W ?55,$E(Y,1,24) S RMPR9VA(I)=^TMP($J,"RMPR",RO)
75 Q
Note: See TracBrowser for help on using the repository browser.