ADEPQA1B ; IHS/HQT/MJL - OUTPUT TYPE ;09:31 AM [ 03/24/1999 9:04 AM ]
;;6.0;ADE;;APRIL 1999
;
OUTPUT ;EP
;Sets up variables for DIP call. Options are Visit count, Code count
;Patient Count, Patient listing. Variables returned are BY, FLDS
;The first comma element of BY is a sort template which contains the
;hits from the search. Subsequent elements set up subtotal fields
;First, have to get the template name & DFN
;The template name may be user-specified. If user doesn't want
;to save results, program generates its own template.
W !!,?5,"***STEP TWO: Specify OUTPUT FORMAT***"
S ADEROPT=$$ROPT^ADEPQA2() Q:$$HAT^ADEPQA() ;Get report options
S ADETFIL=9002007
I $P(ADEROPT,U,2)="PATIENT" S ADETFIL=9000001
S ADETNAM=$$USRTMP^ADEPQA1A(ADETFIL) G:$$HAT^ADEPQA() OUTPUT ; Create template on file ADETFILE
S ADETDFN=$P(ADETNAM,U,2)
S ADETNAM=$P(ADETNAM,U)
D BY^ADEPQA2
Q
;
ASKDEV ;EP
K IOP
S %ZIS="NQ" D ^%ZIS Q:POP
S IOP=ION
S %ZIS("IOPAR")=IOPAR
;FHL 9/9/98 I $D(IO("Q")) D QUE I '$D(ZTSK) K IOP G ASKDEV
I $D(IO("Q")) D QUE I '$D(ZTQUEUED) K IOP G ASKDEV
I $D(IO("Q")) D HOME^%ZIS
Q
;
QUE ;
N ADEJ
S ZTRTN="ZTM^ADEPQA",ZTDESC="DENTAL QA REPORT"
F ADEJ="ADESTP","ADEDATE","ADEAGE","ADEPROV","ADEHYG","ADELOC","ADEROPT","ADETFIL","ADETNAM","ADETDFN","ADEADA(","BY","FR","TO","FLDS","DIC","DHD","DIOBEG" S ZTSAVE(ADEJ)=""
S ZTSAVE("IOP")=""
D ^%ZTLOAD
Q
ADEPQA1B ; IHS/HQT/MJL - OUTPUT TYPE ;09:31 AM [ 03/24/1999 9:04 AM ]
+1 ;;6.0;ADE;;APRIL 1999
+2 ;
OUTPUT ;EP
+1 ;Sets up variables for DIP call. Options are Visit count, Code count
+2 ;Patient Count, Patient listing. Variables returned are BY, FLDS
+3 ;The first comma element of BY is a sort template which contains the
+4 ;hits from the search. Subsequent elements set up subtotal fields
+5 ;First, have to get the template name & DFN
+6 ;The template name may be user-specified. If user doesn't want
+7 ;to save results, program generates its own template.
+8 WRITE !!,?5,"***STEP TWO: Specify OUTPUT FORMAT***"
+9 ;Get report options
SET ADEROPT=$$ROPT^ADEPQA2()
IF $$HAT^ADEPQA()
QUIT
+10 SET ADETFIL=9002007
+11 IF $PIECE(ADEROPT,U,2)="PATIENT"
SET ADETFIL=9000001
+12 ; Create template on file ADETFILE
SET ADETNAM=$$USRTMP^ADEPQA1A(ADETFIL)
IF $$HAT^ADEPQA()
GOTO OUTPUT
+13 SET ADETDFN=$PIECE(ADETNAM,U,2)
+14 SET ADETNAM=$PIECE(ADETNAM,U)
+15 DO BY^ADEPQA2
+16 QUIT
+17 ;
ASKDEV ;EP
+1 KILL IOP
+2 SET %ZIS="NQ"
DO ^%ZIS
IF POP
QUIT
+3 SET IOP=ION
+4 SET %ZIS("IOPAR")=IOPAR
+5 ;FHL 9/9/98 I $D(IO("Q")) D QUE I '$D(ZTSK) K IOP G ASKDEV
+6 IF $DATA(IO("Q"))
DO QUE
IF '$DATA(ZTQUEUED)
KILL IOP
GOTO ASKDEV
+7 IF $DATA(IO("Q"))
DO HOME^%ZIS
+8 QUIT
+9 ;
QUE ;
+1 NEW ADEJ
+2 SET ZTRTN="ZTM^ADEPQA"
SET ZTDESC="DENTAL QA REPORT"
+3 FOR ADEJ="ADESTP","ADEDATE","ADEAGE","ADEPROV","ADEHYG","ADELOC","ADEROPT","ADETFIL","ADETNAM","ADETDFN","ADEADA(","BY","FR","TO","FLDS","DIC","DHD","DIOBEG"
SET ZTSAVE(ADEJ)=""
+4 SET ZTSAVE("IOP")=""
+5 DO ^%ZTLOAD
+6 QUIT