source: FOIAVistA/trunk/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPOLF0.m@ 1611

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

initial load of FOIAVistA 6/30/08 version

File size: 3.7 KB
Line 
1RMPOLF0 ;HIN CIOFO/RVD-DRIVER FOR HO LETTERS ;06/22/99
2 ;;3.0;PROSTHETICS;**29,55,115**;Feb 09, 1996
3 ;
4 ; ODJ - patch 55 - 1/29/01 - replace 121 hard code mail symbol with
5 ; call to site param. extrinsic
6 ; see nois AUG-1097-32118
7 ;
8 D HOME^%ZIS S RMPRIN=0
9 K VADM,^TMP("RL",$J)
10 S Y=DT D DD^%DT S NAME=Y D TRANS^RMPRUTL1 S (RMPODT,RMPODATE)=RMPRNAME
11 D PIKSOM Q:$$QUIT I Y="" S VALMBCK="R" Q
12 M ^TMP("RL",$J)=^TMP($J)
13 S LFNS=Y I 'JOB D FULL^VALM1
14 ;
15QUED ;
16 F ZI=1:1:$L(LFNS,",")-1 D
17 . S LFN=$P(LFNS,",",ZI) Q:LFN'>0
18 . S RMPONAM="",CNT=0 F S RMPONAM=$O(^TMP("RL",$J,RMPOXITE,"RMPOLST",RMPOLCD,RMPONAM)) Q:RMPONAM="" D
19 .. S RMPOLTR=$P(^TMP("RL",$J,RMPOXITE,"RMPOLST",RMPOLCD,RMPONAM),U,1)
20 .. S RMPODFN=$P(^TMP("RL",$J,RMPOXITE,"RMPOLST",RMPOLCD,RMPONAM),U,2)
21 .. S RMDA=$P(^TMP("RL",$J,RMPOXITE,"RMPOLST",RMPOLCD,RMPONAM),U,3)
22 .. S CNT=CNT+1
23 .. S:CNT=LFN ^TMP("RL",$J,RMPOXITE,"LTR",RMPONAM)=RMPODFN_"^"_RMPOLTR_"^"_RMDA
24 S (RMBLNK,RMPONAM)="",RMQUIT=0
25 F S RMPONAM=$O(^TMP("RL",$J,RMPOXITE,"LTR",RMPONAM)) Q:RMPONAM=""!$G(RMQUIT) D CUM
26 ;end
27EXIT ;
28 K LFNS,LFN,ZI,RTN,DIR,RMLET,^TMP($J)
29 K %X,RMPRFFL,RMPRHED,RMPRPRIN,%Y,RMPRDEL,RMPRRVA,DIC,RMPRFA,KILL,DIE,DA
30 K DR,DIK,RMPR1,RMPR2,RMPRDATE,RMPRIN,RMPRL,RMPRNAME,RMPRU,RMPRDELE,FR
31 K RMPREND,VADM,VAPA,VA,NAME,RMPRGO,NAME1,RMPONAM
32 K RMPRDEN,RMPRFLAG,RMPRNAM1,RMPRNAM2,RMPRFF,J,RP,RO,RZ D KVAR^VADPT
33 M ^TMP($J)=^TMP("RL",$J) K ^TMP("RL",$J)
34 D ^%ZISC S:$D(ZTQUEUED) ZTREQ="@" Q:$D(ZTQUEUED)
35 D HOME^%ZIS D CLEAN^VALM10,INIT^RMPOLT S VALMBCK="R"
36 Q
37 ;
38CUM ;
39 K RMPRNT S RDATA=^TMP("RL",$J,RMPOXITE,"LTR",RMPONAM)
40 S DFN=$P(RDATA,U,1),RMPOLTR=$P(RDATA,U,2),RMDA=$P(RDATA,U,3)
41 S RMREC=^TMP("RL",$J,RMPOXITE,"RMPODEMO",DFN)
42 S RMPORX=$P(RMREC,U,6) S:RMPORX="" RMPORX="Not on file"
43 S RMPORXDT=$P(RMREC,U,4)
44 I RMPORXDT="" S RMPORXDT="n/a"
45 E S Y=RMPORXDT X ^DD("DD") S RMPORXDT=Y
46 S RMPRFA=RMPOLTR
47 D DEM^VADPT,ADD^VADPT
48 F RI=1:1:21 S ^TMP($J,"DW",RI,0)=" "
49HEADER1 ;
50 S RMPRHED=$G(^TMP("RL",$J,RMPOXITE,"HEADER",RMPOLTR))
51 W @IOF I 'RMPRHED G HEADER
52 S ^TMP($J,"DW",1,0)="|SETTAB(""C"")|"
53 S ^TMP($J,"DW",2,0)="|TAB|Department of Veterans Affairs"
54 S NAME=$P(^RMPR(669.9,RMPOXITE,2),U,4) I NAME]"" S NAME=$S($D(^DIC(5,NAME)):$P(^DIC(5,NAME,0),U),1:"STATE") S RMFXN=$$PARS^RMPRUTL1(NAME)
55 S ^TMP($J,"DW",3,0)="|TAB|"_$P(^RMPR(669.9,RMPOXITE,0),U)
56 S ^TMP($J,"DW",4,0)="|TAB|"_$P(^RMPR(669.9,RMPOXITE,2),U,2)
57 S ^TMP($J,"DW",5,0)="|TAB|"_$P(^RMPR(669.9,RMPOXITE,2),U,3)_", "_RMFXN_" "_$P(^RMPR(669.9,RMPOXITE,2),U,5) K RMFXN
58HEADER ;
59 S ^TMP($J,"DW",9,0)="|SETTAB(5,50)||TAB|"_RMPODT
60 S STATNID=$P(^RMPR(669.9,RMPOXITE,0),U,2) I $D(^DIC(4,STATNID,99)) S STATNID=$P(^DIC(4,STATNID,99),U)
61 S ^TMP($J,"DW",11,0)="|TAB|"_$P(VADM(1),",",2)_" "_$P(VADM(1),",",1)_"|TAB|In Reply Refer To: "_STATNID_"/"_$$ROU^RMPRUTIL(RMPOXITE)
62 K STATNID
63 S ^TMP($J,"DW",12,0)="|TAB|"_VAPA(1)_"|TAB|SSN: "_$P(VADM(2),U,2)
64 I VAPA(2)]"" S ^TMP($J,"DW",13,0)="|TAB|"_VAPA(2)_"|TAB|"_VADM(1),^TMP($J,"DW",14,0)="|TAB|"_VAPA(4)_","_" "_$P(VAPA(5),U,2)_" "_VAPA(6)
65 E S ^TMP($J,"DW",13,0)="|TAB|"_VAPA(4)_","_" "_$P(VAPA(5),U,2)_" "_VAPA(6)_"|TAB|"_VADM(1)
66 ;
67 S ^TMP($J,"DW",15,0)="|TAB|"_RMBLNK_"|TAB|"_DFN
68 S ^TMP($J,"DW",16,0)="|TAB|"_RMBLNK_"|TAB|Current Home Oxygen Rx#: "_RMPORX
69 S ^TMP($J,"DW",17,0)="|TAB|"_RMBLNK_"|TAB|Rx Expiration Date: "_RMPORXDT
70 ;
71 S NAME=$P(VADM(1),",")
72 I $P(NAME," ",2)?1A.A D
73 .S NAME1=NAME,NAME=$P(NAME," ",1) D TRANS^RMPRUTL1 S RMPRNAM1=RMPRNAME,NAME=NAME1,NAME=$P(NAME," ",2) D TRANS^RMPRUTL1 S RMPRNAM2=RMPRNAME,RMPRNAME=RMPRNAM1_" "_RMPRNAM2
74 E D TRANS^RMPRUTL1
75 D NAME^RMPOLF1
76 Q
77QUIT() S QUIT=$D(DTOUT)!$D(DUOUT)!$D(DIROUT) Q QUIT
78 Q
79PIKSOM ; ALLOW SELECTION FROM DISPLAYED ENTRIES
80 K DIR S DIR(0)="LO^"_VALMBG_":"_VALMLST D ^DIR
81 Q
Note: See TracBrowser for help on using the repository browser.