source: FOIAVistA/trunk/r/VISUAL_IMPAIRMENT_SERVICE_TEAM-ANRV/ANRVML4.m@ 1553

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

initial load of FOIAVistA 6/30/08 version

File size: 1.6 KB
Line 
1ANRVML4 ;BIRM/LDT - VIST MAILING LABELS BY PATIENT ; 27 Apr 98 / 9:20 AM
2 ;;4.0; Visual Impairment Service Team ;;12 Jun 98
3EN1 ;Entry point for Mailing Labels by Patient.
4 K ANRVLP W @IOF,!!,"MAILING LABLES BY PATIENT",!!
5 D SEL I '$D(ANRVLP),SEL'="A" G QUIT
6 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 PATIENT",ZTRTN="DEQ^ANRVML4" 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(ANRVLP(ANRVP)) Q:'ANRVP S DFN=$P($G(^ANRV(2040,ANRVP,0)),U) D 2^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 D ^ANRVML
19 Q
20 ;
21SEL W !!,"Do you want to print the mailing lables for:",!?3,"(A)ll patients, or",!?3,"(S)elect patients",!!
22 S DIR(0)="SAOBM^A:ALL;S:SELECTED",DIR("A")="Choose A or S: ",DIR("?")="^D HELPSEL^ANRVML4" D ^DIR K DIR
23 S SEL=Y I SEL="A" G ANRVLP
24 S:SEL="" SEL="^" G:SEL="^" QUIT2
25 W !
26ASKPT S DIC="^ANRV(2040,",DIC(0)="QEAM",DIC("S")="I $P($G(^ANRV(2040,+Y,13)),U,2)'=""I""" D ^DIC K DIC I Y<0 Q
27 S DFN=$P($G(^ANRV(2040,+Y,0)),U),ANRVP=+Y
28 S ANRVLP(ANRVP)="" G ASKPT
29QUIT2 K:SEL="^"!(SEL="") %,DIC,X,Y Q
30HELPSEL ;
31 W !!,"Enter ""A"" to print mailing labels for all patients.",!?6,"""S"" to select only specific patients.",!?6,"""^"" or <return> to halt." Q
32ANRVLP ;Set ANRVLP for all patients who are not inactive for AMIS
33 S JJ=0 F S JJ=$O(^ANRV(2040,JJ)) Q:'JJ I $P($G(^ANRV(2040,JJ,13)),U,2)'="I" S ANRVLP(JJ)=""
34 Q
Note: See TracBrowser for help on using the repository browser.