BIREPH1 ;IHS/CMI/MWR - REPORT, H1N1 ACCOUNTABILITY; MAY 10, 2010
;;8.5;IMMUNIZATION;;SEP 01,2011
;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
;; VIEW OR PRINT H1N1 ACCOUNTABILITY REPORT.
;; PATCH 3: BIREPH* routines are completely new for H1N1 Report.
;
;
;----------
START(BIX) ;EP
;---> Prepare and display or print Vaccine Accountability Report.
;---> Parameters:
; 1 - BIX (req) If BIX="PRINT", then print Report.
; If BIX="VIEW", then view Report (default).
;---> Variables:
; 1 - BIBEGDT (req) Begin date of report.
; 2 - BIENDDT (req) End date of report.
; 3 - BICC (req) Current Community array.
; 4 - BIHCF (req) Health Care Facility array.
; 5 - BICM (req) Case Manager array.
; 6 - BIBEN (req) Beneficiary Type array.
; 7 - BIHIST (req) Include Historical (1=yes,0=no).
; 8 - BIVT (req) Visit Type array.
; 9 - BIPOP (ret) BIPOP=1 if error.
;
;---> Check for required Variables.
I '$G(BIBEGDT) D ERROR(626) D RESET^BIREPH Q
I '$G(BIENDDT) D ERROR(627) D RESET^BIREPH Q
I '$D(BICC) D ERROR(614) D RESET^BIREPH Q
I '$D(BIHCF) D ERROR(625) D RESET^BIREPH Q
I '$D(BICM) D ERROR(615) D RESET^BIREPH Q
I '$D(BIBEN) D ERROR(662) D RESET^BIREPH Q
I '$D(BIHIST) D ERROR(663) D RESET^BIREPH Q
I '$D(BIVT) D ERROR(664) D RESET^BIREPH Q
;
D SETVARS^BIUTL5
N VALMCNT
I $G(BIX)="PRINT" D PRINT,RESET^BIREPH Q
D EN
Q
;
;
;----------
PRINT ;EP
;---> Main entry point for printing the Quarterly Immunization Report.
D DEVICE(.BIPOP)
Q:$G(BIPOP)
;
D:$G(IO)'=$G(IO(0))
.W !!?10,"This may take some time. Please hold on...",!
;
;---> Prepare report.
K VALMHDR,^TMP("BIREPH1",$J)
N VALM,VALMHDR
D HDR
D GET^BIREPH2(BIBEGDT,BIENDDT,.BICC,.BIHCF,.BICM,.BIBEN,BIHIST,.BIVT)
;
D PRTLST^BIUTL8("BIREPH1")
D EXIT,RESET^BIREPH
Q
;
;
;----------
EN ;EP
;---> Main entry point for List Template BI REPORT QUARTERLY IMM1.
D EN^VALM("BI REPORT H1N11")
Q
;
;
;----------
HDR ;EP
;---> Header code
D HEAD^BIREPH2(BIBEGDT,BIENDDT,.BICC,.BIHCF,.BICM,.BIBEN,BIHIST,.BIVT)
Q
;
;
;----------
INIT ;EP
;---> Initialize variables and list array.
S VALM("TITLE")=$$LMVER^BILOGO
W !!?10,"This may take some time. Please hold on...",!
D GET^BIREPH2(BIBEGDT,BIENDDT,.BICC,.BIHCF,.BICM,.BIBEN,BIHIST,.BIVT)
;---> Set up ZTSAVE in case user Queues from PL in List.
D ZSAVES^BIUTL3
Q
;
;
;----------
RESET ;EP
;---> Update partition for return to Listmanager.
I $D(VALMQUIT) S VALMBCK="Q" Q
D TERM^VALM0 S VALMBCK="R"
D INIT,HDR Q
;
;
;----------
HELP ;EP
;---> Help code.
N BIX S BIX=X
D FULL^VALM1
W !!?5,"Use arrow keys to scroll up and down through the report, or"
W !?5,"type ""??"" for more actions, such as Search and Print List."
D DIRZ^BIUTL3(""," Press ENTER/RETURN to continue")
D:BIX'="??" RE^VALM4
Q
;
;
;----------
EXIT ;EP
;---> Cleanup, EOJ.
K ^TMP("BIREPH1",$J),^TMP("BIDFN",$J)
D CLEAR^VALM1
D FULL^VALM1
Q
;
;
;----------
DEVICE(BIPOP) ;EP
;---> Get Device and possibly queue to Taskman.
;---> Parameters:
; 1 - BIPOP (ret) If error or Queue, BIPOP=1
;
K %ZIS,IOP S BIPOP=0
S ZTRTN="DEQUEUE^BIREPH1"
D ZSAVES^BIUTL3
D ZIS^BIUTL2(.BIPOP,1)
Q
;
;
;----------
DEQUEUE ;EP
;---> Prepare and print Quarterly Report.
K VALMHDR,^TMP("BIREPH1",$J)
D HDR
D GET^BIREPH2(BIBEGDT,BIENDDT,.BICC,.BIHCF,.BICM,.BIBEN,BIHIST,.BIVT)
D PRTLST^BIUTL8("BIREPH1"),EXIT
Q
;
;
;----------
ERROR(BIERR) ;EP
;---> Report error, either to screen or print.
;---> Parameters:
; 1 - BIERR (ret) Text of Error Code if any, otherwise null.
;
D ERRCD^BIUTL2($G(BIERR),,1) S BIPOP=1
Q
BIREPH1 ;IHS/CMI/MWR - REPORT, H1N1 ACCOUNTABILITY; MAY 10, 2010
+1 ;;8.5;IMMUNIZATION;;SEP 01,2011
+2 ;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
+3 ;; VIEW OR PRINT H1N1 ACCOUNTABILITY REPORT.
+4 ;; PATCH 3: BIREPH* routines are completely new for H1N1 Report.
+5 ;
+6 ;
+7 ;----------
START(BIX) ;EP
+1 ;---> Prepare and display or print Vaccine Accountability Report.
+2 ;---> Parameters:
+3 ; 1 - BIX (req) If BIX="PRINT", then print Report.
+4 ; If BIX="VIEW", then view Report (default).
+5 ;---> Variables:
+6 ; 1 - BIBEGDT (req) Begin date of report.
+7 ; 2 - BIENDDT (req) End date of report.
+8 ; 3 - BICC (req) Current Community array.
+9 ; 4 - BIHCF (req) Health Care Facility array.
+10 ; 5 - BICM (req) Case Manager array.
+11 ; 6 - BIBEN (req) Beneficiary Type array.
+12 ; 7 - BIHIST (req) Include Historical (1=yes,0=no).
+13 ; 8 - BIVT (req) Visit Type array.
+14 ; 9 - BIPOP (ret) BIPOP=1 if error.
+15 ;
+16 ;---> Check for required Variables.
+17 IF '$GET(BIBEGDT)
DO ERROR(626)
DO RESET^BIREPH
QUIT
+18 IF '$GET(BIENDDT)
DO ERROR(627)
DO RESET^BIREPH
QUIT
+19 IF '$DATA(BICC)
DO ERROR(614)
DO RESET^BIREPH
QUIT
+20 IF '$DATA(BIHCF)
DO ERROR(625)
DO RESET^BIREPH
QUIT
+21 IF '$DATA(BICM)
DO ERROR(615)
DO RESET^BIREPH
QUIT
+22 IF '$DATA(BIBEN)
DO ERROR(662)
DO RESET^BIREPH
QUIT
+23 IF '$DATA(BIHIST)
DO ERROR(663)
DO RESET^BIREPH
QUIT
+24 IF '$DATA(BIVT)
DO ERROR(664)
DO RESET^BIREPH
QUIT
+25 ;
+26 DO SETVARS^BIUTL5
+27 NEW VALMCNT
+28 IF $GET(BIX)="PRINT"
DO PRINT
DO RESET^BIREPH
QUIT
+29 DO EN
+30 QUIT
+31 ;
+32 ;
+33 ;----------
PRINT ;EP
+1 ;---> Main entry point for printing the Quarterly Immunization Report.
+2 DO DEVICE(.BIPOP)
+3 IF $GET(BIPOP)
QUIT
+4 ;
+5 IF $GET(IO)'=$GET(IO(0))
Begin DoDot:1
+6 WRITE !!?10,"This may take some time. Please hold on...",!
End DoDot:1
+7 ;
+8 ;---> Prepare report.
+9 KILL VALMHDR,^TMP("BIREPH1",$JOB)
+10 NEW VALM,VALMHDR
+11 DO HDR
+12 DO GET^BIREPH2(BIBEGDT,BIENDDT,.BICC,.BIHCF,.BICM,.BIBEN,BIHIST,.BIVT)
+13 ;
+14 DO PRTLST^BIUTL8("BIREPH1")
+15 DO EXIT
DO RESET^BIREPH
+16 QUIT
+17 ;
+18 ;
+19 ;----------
EN ;EP
+1 ;---> Main entry point for List Template BI REPORT QUARTERLY IMM1.
+2 DO EN^VALM("BI REPORT H1N11")
+3 QUIT
+4 ;
+5 ;
+6 ;----------
HDR ;EP
+1 ;---> Header code
+2 DO HEAD^BIREPH2(BIBEGDT,BIENDDT,.BICC,.BIHCF,.BICM,.BIBEN,BIHIST,.BIVT)
+3 QUIT
+4 ;
+5 ;
+6 ;----------
INIT ;EP
+1 ;---> Initialize variables and list array.
+2 SET VALM("TITLE")=$$LMVER^BILOGO
+3 WRITE !!?10,"This may take some time. Please hold on...",!
+4 DO GET^BIREPH2(BIBEGDT,BIENDDT,.BICC,.BIHCF,.BICM,.BIBEN,BIHIST,.BIVT)
+5 ;---> Set up ZTSAVE in case user Queues from PL in List.
+6 DO ZSAVES^BIUTL3
+7 QUIT
+8 ;
+9 ;
+10 ;----------
RESET ;EP
+1 ;---> Update partition for return to Listmanager.
+2 IF $DATA(VALMQUIT)
SET VALMBCK="Q"
QUIT
+3 DO TERM^VALM0
SET VALMBCK="R"
+4 DO INIT
DO HDR
QUIT
+5 ;
+6 ;
+7 ;----------
HELP ;EP
+1 ;---> Help code.
+2 NEW BIX
SET BIX=X
+3 DO FULL^VALM1
+4 WRITE !!?5,"Use arrow keys to scroll up and down through the report, or"
+5 WRITE !?5,"type ""??"" for more actions, such as Search and Print List."
+6 DO DIRZ^BIUTL3(""," Press ENTER/RETURN to continue")
+7 IF BIX'="??"
DO RE^VALM4
+8 QUIT
+9 ;
+10 ;
+11 ;----------
EXIT ;EP
+1 ;---> Cleanup, EOJ.
+2 KILL ^TMP("BIREPH1",$JOB),^TMP("BIDFN",$JOB)
+3 DO CLEAR^VALM1
+4 DO FULL^VALM1
+5 QUIT
+6 ;
+7 ;
+8 ;----------
DEVICE(BIPOP) ;EP
+1 ;---> Get Device and possibly queue to Taskman.
+2 ;---> Parameters:
+3 ; 1 - BIPOP (ret) If error or Queue, BIPOP=1
+4 ;
+5 KILL %ZIS,IOP
SET BIPOP=0
+6 SET ZTRTN="DEQUEUE^BIREPH1"
+7 DO ZSAVES^BIUTL3
+8 DO ZIS^BIUTL2(.BIPOP,1)
+9 QUIT
+10 ;
+11 ;
+12 ;----------
DEQUEUE ;EP
+1 ;---> Prepare and print Quarterly Report.
+2 KILL VALMHDR,^TMP("BIREPH1",$JOB)
+3 DO HDR
+4 DO GET^BIREPH2(BIBEGDT,BIENDDT,.BICC,.BIHCF,.BICM,.BIBEN,BIHIST,.BIVT)
+5 DO PRTLST^BIUTL8("BIREPH1")
DO EXIT
+6 QUIT
+7 ;
+8 ;
+9 ;----------
ERROR(BIERR) ;EP
+1 ;---> Report error, either to screen or print.
+2 ;---> Parameters:
+3 ; 1 - BIERR (ret) Text of Error Code if any, otherwise null.
+4 ;
+5 DO ERRCD^BIUTL2($GET(BIERR),,1)
SET BIPOP=1
+6 QUIT