BIREPE1 ;IHS/CMI/MWR - REPORT, VAC ELIGIBILITY; MAY 10, 2010
;;8.5;IMMUNIZATION;**2**;MAY 15,2012
;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
;; VIEW OR PRINT VACCINE ELIGIBILITY 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).
; If BIX="LOTS", then view Report by individual lot numbers.
;---> 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 - BIU19 (req) Include Adults parameter (1=yes,0=no).
; 10 - BIDELIM (req) Deliniter (1="caret ^", 2="2 spaces").
;
;---> Check for required Variables.
I '$G(BIBEGDT) D ERROR(626) D RESET^BIREPE Q
I '$G(BIENDDT) D ERROR(627) D RESET^BIREPE Q
I '$D(BICC) D ERROR(614) D RESET^BIREPE Q
I '$D(BIHCF) D ERROR(625) D RESET^BIREPE Q
I '$D(BICM) D ERROR(615) D RESET^BIREPE Q
I '$D(BIBEN) D ERROR(662) D RESET^BIREPE Q
I '$D(BIHIST) D ERROR(663) D RESET^BIREPE Q
I '$D(BIVT) D ERROR(664) D RESET^BIREPE Q
I '$D(BIU19) D ERROR(682) D RESET^BIREPE Q
I '$D(BIDELIM) D ERROR(683) D RESET^BIREPE Q
;I '$D(BIDLOT) S BIDLOT=0
;
D SETVARS^BIUTL5 K ^TMP("BIDUL",$J)
N VALMCNT
I $G(BIX)="PRINT" D PRINT,RESET^BIREPE 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("BIREPE1",$J)
N VALM,VALMHDR
D GET^BIREPE2(BIBEGDT,BIENDDT,.BICC,.BIHCF,.BICM,.BIBEN,BIHIST,.BIVT,BIU19,BIDELIM)
D HDR
;
D PRTLST^BIUTL8("BIREPE1")
D EXIT,RESET^BIREPE
Q
;
;
;----------
EN ;EP
;---> Main entry point for List Template BI REPORT QUARTERLY IMM1.
D EN^VALM("BI REPORT ELIGIBILITY1")
Q
;
;
;----------
HDR ;EP
;---> Header code
D HEAD^BIREPE2(BIBEGDT,BIENDDT,.BICC,.BIHCF,.BICM,.BIBEN,BIHIST,.BIVT,BIU19)
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^BIREPE2(BIBEGDT,BIENDDT,.BICC,.BIHCF,.BICM,.BIBEN,BIHIST,.BIVT,BIU19,BIDELIM)
;---> 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("BIREPE1",$J) K ^TMP("BIDUL",$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^BIREPE1"
D ZSAVES^BIUTL3
D ZIS^BIUTL2(.BIPOP,1)
Q
;
;
;----------
DEQUEUE ;EP
;---> Prepare and print Quarterly Report.
K VALMHDR,^TMP("BIREPE1",$J)
D HDR
D GET^BIREPE2(BIBEGDT,BIENDDT,.BICC,.BIHCF,.BICM,.BIBEN,BIHIST,.BIVT,BIU19,BIDELIM)
D PRTLST^BIUTL8("BIREPE1"),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
BIREPE1 ;IHS/CMI/MWR - REPORT, VAC ELIGIBILITY; MAY 10, 2010
+1 ;;8.5;IMMUNIZATION;**2**;MAY 15,2012
+2 ;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
+3 ;; VIEW OR PRINT VACCINE ELIGIBILITY REPORT.
+4 ;
+5 ;
+6 ;----------
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 ; If BIX="LOTS", then view Report by individual lot numbers.
+6 ;---> Variables:
+7 ; 1 - BIBEGDT (req) Begin date of report.
+8 ; 2 - BIENDDT (req) End date of report.
+9 ; 3 - BICC (req) Current Community array.
+10 ; 4 - BIHCF (req) Health Care Facility array.
+11 ; 5 - BICM (req) Case Manager array.
+12 ; 6 - BIBEN (req) Beneficiary Type array.
+13 ; 7 - BIHIST (req) Include Historical (1=yes,0=no).
+14 ; 8 - BIVT (req) Visit Type array.
+15 ; 9 - BIU19 (req) Include Adults parameter (1=yes,0=no).
+16 ; 10 - BIDELIM (req) Deliniter (1="caret ^", 2="2 spaces").
+17 ;
+18 ;---> Check for required Variables.
+19 IF '$GET(BIBEGDT)
DO ERROR(626)
DO RESET^BIREPE
QUIT
+20 IF '$GET(BIENDDT)
DO ERROR(627)
DO RESET^BIREPE
QUIT
+21 IF '$DATA(BICC)
DO ERROR(614)
DO RESET^BIREPE
QUIT
+22 IF '$DATA(BIHCF)
DO ERROR(625)
DO RESET^BIREPE
QUIT
+23 IF '$DATA(BICM)
DO ERROR(615)
DO RESET^BIREPE
QUIT
+24 IF '$DATA(BIBEN)
DO ERROR(662)
DO RESET^BIREPE
QUIT
+25 IF '$DATA(BIHIST)
DO ERROR(663)
DO RESET^BIREPE
QUIT
+26 IF '$DATA(BIVT)
DO ERROR(664)
DO RESET^BIREPE
QUIT
+27 IF '$DATA(BIU19)
DO ERROR(682)
DO RESET^BIREPE
QUIT
+28 IF '$DATA(BIDELIM)
DO ERROR(683)
DO RESET^BIREPE
QUIT
+29 ;I '$D(BIDLOT) S BIDLOT=0
+30 ;
+31 DO SETVARS^BIUTL5
KILL ^TMP("BIDUL",$JOB)
+32 NEW VALMCNT
+33 IF $GET(BIX)="PRINT"
DO PRINT
DO RESET^BIREPE
QUIT
+34 DO EN
+35 QUIT
+36 ;
+37 ;
+38 ;----------
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("BIREPE1",$JOB)
+10 NEW VALM,VALMHDR
+11 DO GET^BIREPE2(BIBEGDT,BIENDDT,.BICC,.BIHCF,.BICM,.BIBEN,BIHIST,.BIVT,BIU19,BIDELIM)
+12 DO HDR
+13 ;
+14 DO PRTLST^BIUTL8("BIREPE1")
+15 DO EXIT
DO RESET^BIREPE
+16 QUIT
+17 ;
+18 ;
+19 ;----------
EN ;EP
+1 ;---> Main entry point for List Template BI REPORT QUARTERLY IMM1.
+2 DO EN^VALM("BI REPORT ELIGIBILITY1")
+3 QUIT
+4 ;
+5 ;
+6 ;----------
HDR ;EP
+1 ;---> Header code
+2 DO HEAD^BIREPE2(BIBEGDT,BIENDDT,.BICC,.BIHCF,.BICM,.BIBEN,BIHIST,.BIVT,BIU19)
+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^BIREPE2(BIBEGDT,BIENDDT,.BICC,.BIHCF,.BICM,.BIBEN,BIHIST,.BIVT,BIU19,BIDELIM)
+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("BIREPE1",$JOB)
KILL ^TMP("BIDUL",$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^BIREPE1"
+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("BIREPE1",$JOB)
+3 DO HDR
+4 DO GET^BIREPE2(BIBEGDT,BIENDDT,.BICC,.BIHCF,.BICM,.BIBEN,BIHIST,.BIVT,BIU19,BIDELIM)
+5 DO PRTLST^BIUTL8("BIREPE1")
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