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

APCLAP4P.m

Go to the documentation of this file.
  1. APCLAP4P ; IHS/CMI/LAB - print apc report ;
  1. ;;2.0;IHS PCC SUITE;;MAY 14, 2009
  1. START ;
  1. S APCL80S="*******************************************************************************"
  1. S APCLDT=$$FMTE^XLFDT(DT)
  1. S Y=APCLBD D DD^%DT S APCLBDD=Y S Y=APCLED D DD^%DT S APCLEDD=Y
  1. S (APCLTOT,APCLPG)=0 D HEAD
  1. S APCLDAY=0 K APCLQUIT
  1. F APCLDAY="MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY" Q:$D(APCLQUIT) D
  1. .I '$D(^XTMP("APCLAP4",APCLJOB,APCLBTH,"DOW #",APCLDAY)) S APCLTOT=0,APCLTOT=$J(APCLTOT,6,0) D P Q
  1. .S APCLTOT=^XTMP("APCLAP4",APCLJOB,APCLBTH,"VISITS DOW",APCLDAY)/^XTMP("APCLAP4",APCLJOB,APCLBTH,"DOW #",APCLDAY) S APCLTOT=$J(APCLTOT,6,0) D P
  1. .Q
  1. DONE ;
  1. D DONE^APCLOSUT
  1. K ^XTMP("APCLAP4",APCLJOB,APCLBTH)
  1. Q
  1. P ;
  1. I $Y>(IOSL-5) D HEAD Q:$D(APCLQUIT)
  1. W !!?10,APCLDAY,?40,APCLTOT
  1. Q
  1. 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
  1. HEAD1 ;
  1. W:$D(IOF) @IOF S APCLPG=APCLPG+1
  1. W !,APCL80S,!
  1. W "*",?3,$P(^DIC(4,APCLSITE,0),U),?56,APCLDT,?72,"Page ",APCLPG,?78,"*",!
  1. W "*",?78,"*",!
  1. W "*",?22,"AVERAGE DAILY OUTPATIENT (APC) VISITS",?78,"*",!
  1. S APCLLOCT=$S(APCLLOC=0:"ALL",1:"SELECTED")
  1. S APCLLENG=21+$L(APCLLOCT)
  1. W "*",?((80-APCLLENG)/2),"LOCATION OF VISITS: ",APCLLOCT,?78,"*",!
  1. I $D(APCLCLNT) D DISPCLN
  1. W "*",?18,"REPORT DATE: ",APCLBDD," TO ",APCLEDD,?78,"*",!
  1. W APCL80S,!
  1. W !!
  1. W ?10,"DAY-OF-WEEK",?35,"AVERAGE # VISITS PER DAY"
  1. Q
  1. DISPCLN ;
  1. NEW X S X=0 F S X=$O(APCLCLNT(X)) Q:X'=+X D
  1. .S APCLLENG=9+$L($P(^DIC(40.7,X,0),U))
  1. .W "*",?((80-APCLLENG)/2),"CLINIC: ",$P(^DIC(40.7,X,0),U),?78,"*",!
  1. .Q
  1. Q