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

AGCO.m

Go to the documentation of this file.
AGCO ; IHS/ASDS/EFG - ALPHA LIST OF COMM OFFICERS & DEPENDENTS ;  
 ;;7.1;PATIENT REGISTRATION;**4**;AUG 25,2005
 S AGIO=IO,AG("HAT")=""
DEV S %ZIS="OPQ" D ^%ZIS I POP S IOP=ION D ^%ZIS G K
 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^AGCO",ZTUCI=Y,ZTIO="",ZTDESC="LIST OF COMMISSIONED OFFICERS AND DEPENDANTS.",AGQIO=IO S G="AGQIO",ZTSAVE(G)=""
 D ^%ZTLOAD G:'$D(ZTSK) DEV
 K ZTDESC,ZTIO,ZTRTN,ZTSK,ZTUCI
 G K
START ;EP - From TaskMan.
 K ^TMP($J) F AGBEN=3,4,28,29 F DFN=0:0 S DFN=$O(^AUPNPAT("AD",AGBEN,DFN)) Q:'DFN  I $D(^DPT(DFN,0)),$D(^AUPNPAT(DFN,41,DUZ(2),0)),$P(^(0),U,3)="",$P(^AUPNPAT(DFN,11),U,11)=AGBEN S ^TMP($J,AGBEN,$P(^DPT(DFN,0),U),DFN)=""
 S (AGPGPG,N,AGTOT)=0,X=$P(^DIC(4,DUZ(2),0),U) D CTR^AG S AG("LOC")=X,AG("USR")=$P(^VA(200,DUZ,0),U) K ^UTILITY("DIQ1",$J)
 X ^%ZOSF("UCI") S X="UCI: "_$P(Y,",",1) D CTR^AG S AGUCI=X
 D NOW^AG S X="as of "_AGTIME D CTR^AG S AGTIME=X,AGBEN=0
 I $D(AGQIO) F AGZ("I")=1:1 S IOP=AGQIO D ^%ZIS Q:'POP  H 30
 S AGBM=IOSL-10 I $D(AGIO),AGIO'=IO S AGBM=IOSL-4
 U IO D HDR
 F AGBEN=3,4,28,29 S AGNAME="" F AG=0:0 S AGNAME=$O(^TMP($J,AGBEN,AGNAME)) G:AGNAME=""&(AGBEN=29) END Q:AGNAME=""  S DFN=$O(^(AGNAME,0)) D PRINT G:$D(DUOUT)!$D(DFOUT)!$D(DTOUT) K
PRINT W $P(^DPT(DFN,0),U),?45,$J($P(^AUPNPAT(DFN,41,DUZ(2),0),U,2),6)
 ;I $D(^AUPNPAT(DFN,11)) S DIC=2,DR=.09,DA=DFN K ^UTILITY("DIQ1",$J,DR) D EN^DIQ1 W:$D(^(DR)) ?54,^(DR) W ?68,$S(AGBEN=3:"C. O.",AGBEN=4:"DEPENDENT",AGBEN=28:"RET C. O.",AGBEN=29:"RET C. O. DEP",1:"")
 I $D(^AUPNPAT(DFN,11)) S DIC=9000001,DR=1107.3,DA=DFN K ^UTILITY("DIQ1",$J,DR) D EN^DIQ1 W:$D(^(DR)) ?54,^(DR) W ?68,$S(AGBEN=3:"C. O.",AGBEN=4:"DEPENDENT",AGBEN=28:"RET C. O.",AGBEN=29:"RET C. O. DEP",1:"")  ;IHS/SD/TPF AG*7.1*4
 W ! S AGTOT=AGTOT+1 I $Y>AGBM D RTRN^AG Q:$D(DUOUT)!$D(DTOUT)!$D(DFOUT)  D HDR
 Q
END W !!,"Total Listings: ",AGTOT K AG("HAT") D RTRN^AG W $$S^AGVDF("IOF")
K D ^%ZISC K ^UTILITY("DIQ1",$J),^TMP($J),AG,AGBM,AGIO,AGQIO,AGTIME,AGTOT,AGBEN,DA,DFN,DIC,DR,AG("LOC"),AGNAME,AGPGPG,AGUCI,AG("USR"),X,Y D:$D(ZTQUEUED) KILL^%ZTLOAD
 Q
HDR S AGPGPG=AGPGPG+1
 W $$S^AGVDF("IOF"),!!,AG("USR"),?72,"page ",AGPGPG,!,AG("LOC"),!?27,"COMM. OFFICERS & DEPENDENTS",!,AGUCI,!?32,"(""*"" = INACTIVE)",!,AGTIME
 W !!!?18,"Name",?46,"IHS #",?58,"SSN",?69,"CLASS.",!,"----------------------------------------",?45,"------   -----------   ----------",!
 Q