source: WorldVistAEHR/trunk/r/VISUAL_IMPAIRMENT_SERVICE_TEAM-ANRV/ANRVML2.m@ 691

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

initial load of WorldVistAEHR

File size: 2.0 KB
Line 
1ANRVML2 ;BIRM/LDT - VIST MAILING LABELS BY CITY ; 28 Feb 98 / 2:38 PM
2 ;;4.0; Visual Impairment Service Team ;;12 Jun 98
3EN1 ;Entry point for City List
4 K ANRVLP W @IOF,!!,"MAILING LABELS BY CITY",!!
5 D SEL I '$D(ANRVLP),SEL'="A" G QUIT
6DEV K %ZIS,IOP S %ZIS="QM",%ZIS("B")="" D ^%ZIS I POP W !,"NO DEVICE SELECTED OR REPORT PRINTED!!" G QUIT
7 I $D(IO("Q")) K IO("Q") S ZTDESC="VIST MAILING LABELS BY CITY",ZTRTN="DEQ^ANRVML2" S:$D(ANRVLP) ZTSAVE("ANRVLP(")="" S:$D(SEL) ZTSAVE("SEL")=""
8 I D ^%ZTLOAD K ZTSK G QUIT
9 U IO
10DEQ ;Entry point when queued.
11 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,MAILBL
12 ;
13QUIT K %,%H,%I,%T,%Y,ANRVP,ANRV,ANRVLP,DFN,SEL D KVAR^VADPT,KVA^VADPT
14 W:$E(IOST)'="C" @IOF D ^%ZISC S:$D(ZTQUEUED) ZTREQ="@"
15 Q
16 ;
17MAILBL ;
18 I $D(ANRVLP),VAPA(4)]"",$D(ANRVLP(VAPA(4))) D ^ANRVML
19 I $D(SEL),SEL="A" D ^ANRVML
20 Q
21 ;
22SEL W !!,"Do you want to print the mailing labels for:",!?3,"(A)ll cities or",!?3,"(S)elect city/cities",!!
23 S DIR(0)="SAOBM^A:ALL;S:SELECTED",DIR("A")="Choose A or S: ",DIR("?")="^D HELPSEL^ANRVML2" D ^DIR K DIR
24 S SEL=Y I SEL="A" Q
25 S:SEL="" SEL="^" G:SEL="^" QUIT2
26 W !
27ASKCTY S DIR(0)="FAO^2:15",DIR("A")="Select CITY NAME: " D ^DIR K DIR
28 I Y]"",Y'="^" D SETLP G ASKCTY
29QUIT2 K:SEL="^"!(SEL="") %,DIR,X,Y Q
30SETLP I Y?1U.E S ANRVLP($TR(Y,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ"))="",ANRVLP($TR($E(Y,1),"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz")_$E(Y,2,15))=""
31 I Y?1L.E S ANRVLP($TR(Y,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ"))="",ANRVLP($TR($E(Y,1),"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")_$E(Y,2,15))=""
32 I Y?1U.E S ANRVLP($E(Y)_($TR($E(Y,2,15),"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz")))="",ANRVLP($TR(Y,"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz"))=""
33 S ANRVLP(Y)=""
34 Q
35HELPSEL ;
36 W !!,"Enter:",!?3,"""A"" to print mailing labels for ALL cities.",!?3,"""S"" to select only a specific city or cities.",!?3,"""^"" or <return> to halt." Q
Note: See TracBrowser for help on using the repository browser.