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

AGNDX3.m

Go to the documentation of this file.
AGNDX3 ; IHS/ASDS/EFG - PRINT RANGE OF PATIENTS BY NAME ;  
 ;;7.1;PATIENT REGISTRATION;;AUG 25,2005
 W !!,"YOU MAY SELECT A RANGE OF NAMES FOR WHICH YOU WOULD LIKE TO PRINT INDEX CARDS.  SIMPLY ENTER THE BEGINNING AND ENDING NAMES AS THEY ARE REQUESTED."
CC W !!,"START WITH WHAT PATIENT NAME? " D PTLK^AG
 G:'$D(DFN) END S AGBEG=$P(^DPT(DFN,0),U)
D W !!,"END WITH WHAT PATIENT NAME? " D PTLK^AG
 G:'$D(DFN) END S AGEND=$P(^DPT(DFN,0),U) I AGBEG]AGEND W !!,*7,"THE ENDING NAME PRECEDES THE BEGINNING NAME." G CC
 D ALIAS^AGNDXP
 G END:$D(DTOUT)!$D(DFOUT)!$D(DUOUT)
DEV S %ZIS="OPQ" D ^%ZIS I POP S IOP=ION D ^%ZIS Q
 G:'$D(IO("Q")) START K IO("Q") I $D(IO("S"))!($E(IOST)'="P") W *7,!,"Please queue to system printers." D ^%ZISC G DEV
 X ^%ZOSF("UCI") S ZTRTN="START^AGNDX3",ZTUCI=Y,ZTDESC="Index Cards from "_AGBEG_" to "_AGEND_"." S:$D(AGALIAS) ZTSAVE("AGALIAS")="" F G="AGBEG","AGEND" S ZTSAVE(G)=""
 D ^%ZTLOAD G:'$D(ZTSK) DEV K AG,AGALIAS,AGBEG,AGEND,G,ZTDESC,ZTRTN,ZTSAVE,ZTSK,ZTUCI D ^%ZISC
 Q
START ;EP - From TaskMan.
 U IO F AGCTR3=0:1 S:AGCTR3>0 AGBEG=$O(^DPT("B",AGBEG)) Q:AGBEG=""!(AGBEG]AGEND)  F IEN=0:0 S IEN=$O(^DPT("B",AGBEG,IEN)) Q:IEN=""  I $D(^(IEN))=1 S DFN=IEN D ^AGNDXP
 D ^%ZISC
END K AG,AGALIAS,AGBEG,AGEND,AGCTR3,IEN,X,Y D:$D(ZTQUEUED) KILL^%ZTLOAD
 Q