APCLYV4 ; IHS/CMI/LAB - CLINIC VISIT COUNTS BY DATE RANGE ;
;;2.0;IHS PCC SUITE;;MAY 14, 2009
;This report is to be used to count visits by clinic
;
W:$D(IOF) @IOF W !!?20,"CLINIC VISIT COUNTS WITHIN A DATE RANGE",!!
GETDATES ;
BD ;get beginning date
W ! S DIR(0)="D^:DT:EP",DIR("A")="Enter beginning Visit Date" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
I $D(DIRUT) G END
S APCLBD=Y
ED ;get ending date
W ! S DIR(0)="DA^"_APCLBD_":DT:EP",DIR("A")="Enter ending Visit Date: " S Y=APCLBD D DD^%DT S Y="" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
I $D(DIRUT) G BD
S APCLED=Y
S X1=APCLBD,X2=-1 D C^%DTC S APCLSD=X
;
;
CLINIC ;
S DIR(0)="Y",DIR("A")="Print for ALL clinics",DIR("B")="N" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
G:$D(DIRUT) GETDATES
I Y=1 S APCLCL="A" G ZIS
K DIC S DIC=40.7,DIC(0)="AEQMZ",DIC("A")="Which Clinic: " D ^DIC
G CLINIC:Y<1 S APCLCL=+Y
ZIS ;
DEMO ;
D DEMOCHK^APCLUTL(.APCLDEMO)
I APCLDEMO=-1 G CLINIC
S XBRC="^APCLYV41",XBRP="^APCLYV42",XBRX="END^APCLYV4",XBNS="APCL"
D ^XBDBQUE
;
END K Y,APCLBD,APCLED,APCLCL,IO("Q")
Q
APCLYV4 ; IHS/CMI/LAB - CLINIC VISIT COUNTS BY DATE RANGE ;
+1 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
+2 ;This report is to be used to count visits by clinic
+3 ;
+4 IF $DATA(IOF)
WRITE @IOF
WRITE !!?20,"CLINIC VISIT COUNTS WITHIN A DATE RANGE",!!
GETDATES ;
BD ;get beginning date
+1 WRITE !
SET DIR(0)="D^:DT:EP"
SET DIR("A")="Enter beginning Visit Date"
DO ^DIR
KILL DIR
IF $DATA(DUOUT)
SET DIRUT=1
+2 IF $DATA(DIRUT)
GOTO END
+3 SET APCLBD=Y
ED ;get ending date
+1 WRITE !
SET DIR(0)="DA^"_APCLBD_":DT:EP"
SET DIR("A")="Enter ending Visit Date: "
SET Y=APCLBD
DO DD^%DT
SET Y=""
DO ^DIR
KILL DIR
IF $DATA(DUOUT)
SET DIRUT=1
+2 IF $DATA(DIRUT)
GOTO BD
+3 SET APCLED=Y
+4 SET X1=APCLBD
SET X2=-1
DO C^%DTC
SET APCLSD=X
+5 ;
+6 ;
CLINIC ;
+1 SET DIR(0)="Y"
SET DIR("A")="Print for ALL clinics"
SET DIR("B")="N"
DO ^DIR
KILL DIR
IF $DATA(DUOUT)
SET DIRUT=1
+2 IF $DATA(DIRUT)
GOTO GETDATES
+3 IF Y=1
SET APCLCL="A"
GOTO ZIS
+4 KILL DIC
SET DIC=40.7
SET DIC(0)="AEQMZ"
SET DIC("A")="Which Clinic: "
DO ^DIC
+5 IF Y<1
GOTO CLINIC
SET APCLCL=+Y
ZIS ;
DEMO ;
+1 DO DEMOCHK^APCLUTL(.APCLDEMO)
+2 IF APCLDEMO=-1
GOTO CLINIC
+3 SET XBRC="^APCLYV41"
SET XBRP="^APCLYV42"
SET XBRX="END^APCLYV4"
SET XBNS="APCL"
+4 DO ^XBDBQUE
+5 ;
END KILL Y,APCLBD,APCLED,APCLCL,IO("Q")
+1 QUIT