source: WorldVistAEHR/trunk/r/VISUAL_IMPAIRMENT_SERVICE_TEAM-ANRV/ANRVRP.m@ 1361

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

initial load of WorldVistAEHR

File size: 1.7 KB
Line 
1ANRVRP ;BIRM/LDT - VIST ADDRESS/PHONE LIST ; 05 Aug 98 / 2:13 PM
2 ;;4.0; Visual Impairment Service Team ;**1**;12 Jun 98
3EN1 ;Entry point for Address List
4 W @IOF,!!,"VIST ADDRESS/PHONE LIST",!!
5 K %ZIS,IOP S %ZIS="QM",%ZIS("B")="" D ^%ZIS I POP W !,"NO DEVICE SELECTED OR REPORT PRINTED!!" G QUIT
6 I $D(IO("Q")) K IO("Q") S ZTDESC="VIST ROSTER ADDRESS/PHONE LIST",ZTRTN="DEQ^ANRVRP"
7 I D ^%ZTLOAD K ZTSK G QUIT
8 U IO
9DEQ ;Entry point when queued.
10 K ^TMP("ANRV",$J)
11 S HDR="VIST ROSTER ADDRESS/PHONE LIST"
12 S (PG,QFLG)=0,$P(LN,"-",81)="" D NOW^%DTC S Y=$E(%,1,12) X ^DD("DD") S HDT=Y
13 S ANRVP=0 F S ANRVP=$O(^ANRV(2040,ANRVP)) Q:'ANRVP I $P($G(^ANRV(2040,ANRVP,13)),U,2)'="I" S DFN=$P($G(^ANRV(2040,ANRVP,0)),U) D 4^VADPT,SETTMP
14 D HDR
15 I '$D(^TMP("ANRV",$J)) W !,"NO DATA TO PRINT!" G QUIT
16 D REPORT
17 ;
18QUIT K %,%H,%I,%T,%Y,ANRVP,ANRV,DFN,HDR,HDT,LN,NAME,PG,POP,QFLG,X,Y,XX,DTOUT,DUOUT,DIRUT,^TMP("ANRV",$J) D KVAR^VADPT,KVA^VADPT
19 W:$E(IOST)'="C" @IOF D ^%ZISC S:$D(ZTQUEUED) ZTREQ="@"
20 Q
21 ;
22SETTMP ;Set ^TMP for report
23 S ^TMP("ANRV",$J,VADM(1))=VADM(1)_U_VAPA(8)_U_VAPA(1)_U_VAPA(2)_U_VAPA(3)_U_VAPA(4)_U_$P(VAPA(5),U)_U_VAPA(6)
24 Q
25 ;
26HDR ;Report header
27 I $E(IOST)="C",PG>0 S DIR(0)="E" D ^DIR K DIR I 'Y S QFLG=1 Q
28 S PG=PG+1 W:$Y!($E(IOST)="C") @IOF Q:(PG>1)&($E(IOST)="C") W !,HDR,?44,"Printed ",HDT,?71,"Page ",PG,!!,"NAME",?22,"PHONE NO.",?44,"ADDRESS",!,LN
29 Q
30 ;
31REPORT ;Print Report
32 S NAME="" F S NAME=$O(^TMP("ANRV",$J,NAME)) Q:NAME="" D D:$Y+4>IOSL HDR Q:QFLG
33 .F XX=1:1:8 S ANRV(XX)=$P($G(^TMP("ANRV",$J,NAME)),U,XX)
34 .W !,$E(ANRV(1),1,20),?22,ANRV(2),?44,ANRV(3)
35 .W:ANRV(4)]"" !?44,ANRV(4) W:ANRV(5)]"" !?44,ANRV(5)
36 .W:ANRV(6)]"" !?44,ANRV(6)_"," W:ANRV(7)>0 " "_$P(^DIC(5,+ANRV(7),0),U,2) W:ANRV(8)]"" " "_ANRV(8)
37 .W !
38 Q
Note: See TracBrowser for help on using the repository browser.