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

AGNDX4.m

Go to the documentation of this file.
AGNDX4 ; IHS/ASDS/EFG - PRINT ALL PATIENTS REGISTERED BY DAY(S) ;  
 ;;7.1;PATIENT REGISTRATION;;AUG 25,2005
 S AG("FD")="W !!,*7,""Do not use future dates.""" I '$D(DT) S %DT="",X="T" D ^%DT S DT=Y
A2 W !!,"Enter the BEGINNING DATE for these cards: " D READ^AG Q:$D(DUOUT)!$D(DFOUT)!$D(DTOUT)!$D(DLOUT)  S:$D(DQOUT) Y="?" S X=Y,%DT="XEP" D ^%DT G A2:Y<1 S AGBDATE=Y I Y>DT X AG("FD") G A2
A3 W !!,"Enter the ENDING DATE for these cards: " D READ^AG Q:$D(DFOUT)!$D(DTOUT)!$D(DLOUT)  G A2:$D(DUOUT) S:$D(DQOUT) Y="?" S:$D(DTIME) DTIME=300,X=Y,%DT="XEP" D ^%DT G A3:Y<1 S AGEDATE=Y I Y>DT X AG("FD") G A3
 I AGBDATE>AGEDATE W !!,*7,"INVALID ENTRY - The END is before the BEGINNING." G A2
 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^AGNDX4",ZTUCI=Y,ZTDESC="Print Index Cards for Patients Registered from "_AGBDATE_" to "_AGEDATE_"." S:$D(AGALIAS) ZTSAVE("AGALIAS")="" F G="AGBDATE","AGEDATE" S ZTSAVE(G)=""
 D ^%ZTLOAD G:'$D(ZTSK) DEV K AG,AGALIAS,AGBDATE,AGEDATE,G,ZTDESC,ZTRTN,ZTSAVE,ZTSK,ZTUCI D ^%ZISC
 Q
START ;EP - From TaskMan.
 K ^TMP($J)
 F AGDT=AGBDATE-1:0 S AGDT=$O(^AUPNPAT("ADTE",AGDT)) Q:AGDT=""  I ((AGDT'<AGBDATE)&(AGDT'>AGEDATE)) F IEN=0:0 S IEN=$O(^AUPNPAT("ADTE",AGDT,IEN)) Q:+IEN=0  S ^TMP($J,$P(^DPT(IEN,0),U),IEN)=""
 S AGNAME="" U IO
 F I=0:0 S AGNAME=$O(^TMP($J,AGNAME)) Q:AGNAME=""  F IEN=0:0 S IEN=$O(^TMP($J,AGNAME,IEN)) Q:+IEN=0  S DFN=IEN D ^AGNDXP
 D ^%ZISC
END K ^TMP($J),AG,AGALIAS,AGDT,AGBDATE,AGEDATE,I,IEN,IOP,AGNAME,X,Y D:$D(ZTQUEUED) KILL^%ZTLOAD
 Q