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

APCLRPLP.m

Go to the documentation of this file.
APCLRPLP ; IHS/CMI/LAB - print patient list ;
 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
 ;IHS/CMI/LAB - y2k
 ;
 ;
 S APCLPG=0
 K APCLQUIT
 I '$D(^XTMP("APCLRPL",APCLJOB,APCLBTH)) D HEAD W !!,"NO PATIENTS TO REPORT",!! G DONE
 D PROC
 G:$D(APCLQUIT) DONE
 W !!,"TOTAL NUMBER OF PATIENTS: ",APCLPTCT,!
DONE ;
 D DONE^APCLOSUT
 K ^XTMP("APCLRPL",APCLJOB,APCLBT)
 Q
PROC ;
 D HEAD
 Q:$D(APCLQUIT)
 S (APCLSRTV,APCLFRST)="" K APCLQUIT
 F  S APCLSRTV=$O(^XTMP("APCLRPL",APCLJOB,APCLBTH,"DATA HITS",APCLSRTV)) Q:APCLSRTV=""!($D(APCLQUIT))  D V
 G:$D(APCLQUIT) DONE
 Q
V ;
 S DFN=0 F  S DFN=$O(^XTMP("APCLRPL",APCLJOB,APCLBTH,"DATA HITS",APCLSRTV,DFN)) Q:DFN'=+DFN!($D(APCLQUIT))  D
 .S X=$$PREC^APCLVDR(DFN,"R-DMG-510")
 .Q:X=""
 .Q:X=-1
 .I $Y>(IOSL-5) D HEAD Q:$D(APCLQUIT)
 .W !,X
 .Q
 Q
 I $E(IOST)="C",IO=IO(0) W ! S DIR(0)="EO" D ^DIR K DIR I Y=0!(Y="^")!($D(DTOUT)) S APCLQUIT="" Q
HEAD1 ;
 W:$D(IOF) @IOF S APCLPG=APCLPG+1
 W !?45,"*****   CONFIDENTIAL PATIENT DATA   *****"
 W !!?55,"INDIAN HEALTH SERVICE",?100,"PAGE:",?111,APCLPG
 ;begin Y2K
 W !?52,"PATIENT REGISTRATION SYSTEM",?100,"DATE:",?111,$$FMTE^XLFDT(DT,1) ;CMI/TUCSON/LAB - 4 digit year ;Y2000
 ;end Y2K
 W !,"AREA: ",$P(^AUTTAREA($P(^AUTTLOC(APCLLOC,0),U,4),0),U),?52,"SU: ",$P(^AUTTSU($P(^AUTTLOC(APCLLOC,0),U,5),0),U),?100,"FACILITY:",?111,$E($P(^DIC(4,APCLLOC,0),U),1,21)
 W !!?46,"BIRTH",?72,"BLOOD",?80,"--- ELIGIBILITY ---"
 W !,?1,"HRN NO",?20,"NAME",?46,"DATE",?56,"SEX",?62,"TRB",?67,"BEN",?72,"QUNTM",?80,"MCR",?84,"MCD",?88,"PVT",?92,"VET",?96,"CHS",?100,"RESIDENCE",?117,"SOC SEC NO"
 W !,$TR($J("",132)," ","-")
 Q