Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: RMPR9CL

RMPR9CL.m

Go to the documentation of this file.
RMPR9CL ;HOIFO/SPS - GUI 2319 TAB 2 LETTER LIST & DISPLAY ;9/26/02  10:09
 ;;3.0;PROSTHETICS;**59**;Feb 09, 1996
A1(IEN) G A2
EN(RESULTS,IEN) ;broker entry point
A2 ;
 S DFN=$P($G(^RMPR(668,IEN,0)),U,2)
 I DFN="" S RESULTS(0)="NOTHING TO REPORT" G EXIT
 ;List of Letters on File
 S RMPRDFN=DFN
 I '$D(^RMPR(665.4,"AH",RMPRDFN)) S RESULTS(0)="NOTHING TO REPORT" G EXIT
 N RMPRBDT,DIC,RB,RI,DR,DA,RMPLET,DIQ,Y,RO
 S (CNT,RMPRBDT,RI,RB,RO)=0,RMPRIN=-1,DIC=665.4,DR=".01;1;2;4;11",DIQ="RMPRLET"
 F  S RMPRBDT=$O(^RMPR(665.4,"AH",RMPRDFN,RMPRBDT)) Q:RMPRBDT=""  D  Q:RO=1
 .S DA=0
 .F  S DA=$O(^RMPR(665.4,"AH",RMPRDFN,RMPRBDT,DA)) Q:'DA  D  Q:RO=1
 ..S RI=RI+1,RI(RI)=DA D EN^DIQ1 Q:'$D(RMPRLET)
 ..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))
 ..S CNT=CNT+1
 ..K RMPRLET
 Q
A3(IEN) G A4
EN1(RESULTS,IEN) ;
A4 ;Print letter, IEN=internal entrie number of file 665.4
 I '$D(^RMPR(665.4,IEN)) S RESULTS(0)="NOTHING TO REPORT" G EXIT
 M RMPRTMP=^RMPR(665.4,IEN,1)
 K RMPRTMP(0)
 S RTST=0
 F  S RTST=$O(RMPRTMP(RTST)) Q:RTST=""  D
 . I '$D(RMPRTMP(RTST,0)) Q
 . S RF=$L(RMPRTMP(RTST,0),"|")
 . F RP=0:1:RF I $P(RMPRTMP(RTST,0),"|",RP)["TAB" D
 .. S $P(RMPRTMP(RTST,0),"|",RP)="    "
 . S RMPRTMP(RTST,0)=$TR(RMPRTMP(RTST,0),"|","")
 . S RMPRTMP(RTST)=RMPRTMP(RTST,0)
 . K RMPRTMP(RTST,0)
 M RESULTS=RMPRTMP
EXIT ;common exit point
 I '$D(RESULTS) S RESULTS(0)="NOTHING TO REPORT"
 K CNT,DFN,RMPRTMP,RF,RO,RP
 ;END