source: FOIAVistA/tag/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPR9CL.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: 1.5 KB
Line 
1RMPR9CL ;HOIFO/SPS - GUI 2319 TAB 2 LETTER LIST & DISPLAY ;9/26/02 10:09
2 ;;3.0;PROSTHETICS;**59**;Feb 09, 1996
3A1(IEN) G A2
4EN(RESULTS,IEN) ;broker entry point
5A2 ;
6 S DFN=$P($G(^RMPR(668,IEN,0)),U,2)
7 I DFN="" S RESULTS(0)="NOTHING TO REPORT" G EXIT
8 ;List of Letters on File
9 S RMPRDFN=DFN
10 I '$D(^RMPR(665.4,"AH",RMPRDFN)) S RESULTS(0)="NOTHING TO REPORT" G EXIT
11 N RMPRBDT,DIC,RB,RI,DR,DA,RMPLET,DIQ,Y,RO
12 S (CNT,RMPRBDT,RI,RB,RO)=0,RMPRIN=-1,DIC=665.4,DR=".01;1;2;4;11",DIQ="RMPRLET"
13 F S RMPRBDT=$O(^RMPR(665.4,"AH",RMPRDFN,RMPRBDT)) Q:RMPRBDT="" D Q:RO=1
14 .S DA=0
15 .F S DA=$O(^RMPR(665.4,"AH",RMPRDFN,RMPRBDT,DA)) Q:'DA D Q:RO=1
16 ..S RI=RI+1,RI(RI)=DA D EN^DIQ1 Q:'$D(RMPRLET)
17 ..S RESULTS(CNT)=DA_"^"_RMPRLET(665.4,DA,.01)_"^"_$G(RMPRLET(665.4,DA,1))_"^"_$E($G(RMPRLET(665.4,DA,4)),1,15)_"^"_$G(RMPRLET(665.4,DA,2))_$G(RMPRLET(665.4,DA,11))
18 ..S CNT=CNT+1
19 ..K RMPRLET
20 Q
21A3(IEN) G A4
22EN1(RESULTS,IEN) ;
23A4 ;Print letter, IEN=internal entrie number of file 665.4
24 I '$D(^RMPR(665.4,IEN)) S RESULTS(0)="NOTHING TO REPORT" G EXIT
25 M RMPRTMP=^RMPR(665.4,IEN,1)
26 K RMPRTMP(0)
27 S RTST=0
28 F S RTST=$O(RMPRTMP(RTST)) Q:RTST="" D
29 . I '$D(RMPRTMP(RTST,0)) Q
30 . S RF=$L(RMPRTMP(RTST,0),"|")
31 . F RP=0:1:RF I $P(RMPRTMP(RTST,0),"|",RP)["TAB" D
32 .. S $P(RMPRTMP(RTST,0),"|",RP)=" "
33 . S RMPRTMP(RTST,0)=$TR(RMPRTMP(RTST,0),"|","")
34 . S RMPRTMP(RTST)=RMPRTMP(RTST,0)
35 . K RMPRTMP(RTST,0)
36 M RESULTS=RMPRTMP
37EXIT ;common exit point
38 I '$D(RESULTS) S RESULTS(0)="NOTHING TO REPORT"
39 K CNT,DFN,RMPRTMP,RF,RO,RP
40 ;END
Note: See TracBrowser for help on using the repository browser.