- BIREPF1 ;IHS/CMI/MWR - REPORT, FLU IMM; AUG 10,2010
- ;;8.5;IMMUNIZATION;;SEP 01,2011
- ;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
- ;; VIEW OR PRINT INFLUENZA IMMUNIZATION REPORT.
- ;; PATCH 1: Include Flu/H1N1 parameter for body of report when queued.
- ;; DEQUEUE+6
- ;
- ;----------
- START(BIX) ;EP
- ;---> VIEW Influenza Report.
- ;---> Prepare and display Influenza Report.
- ;---> Parameters:
- ; 1 - BIX (req) If BIX="PRINT", then print Qtr Report.
- ; If BIX="VIEW", then view Qtr Report (default).
- ;---> Variables:
- ; 1 - BIYEAR (req) Report Year^m (if 2nd pc="m", then End Date=March 31 of
- ; the report year; otherwise End Date=Dec 31 of BIYEAR)
- ; 2 - BICC (req) Current Community array.
- ; 3 - BIHCF (req) Health Care Facility array.
- ; 4 - BICM (req) Case Manager array.
- ; 5 - BIBEN (req) Beneficiary Type array.
- ; 6 - BIFH (opt) F=report on Flu Vaccine Group (default), H=H1N1 group.
- ; 7 - BIPOP (ret) BIPOP=1 if error.
- ;
- ;---> Check for required Variables.
- I '$G(BIYEAR) D ERROR(679) D RESET^BIREPF Q
- I '$D(BICC) D ERROR(614) D RESET^BIREPF Q
- I '$D(BIHCF) D ERROR(625) D RESET^BIREPF Q
- I '$D(BICM) D ERROR(615) D RESET^BIREPF Q
- I '$D(BIBEN) D ERROR(662) D RESET^BIREPF Q
- S:($G(BIFH)="") BIFH="F"
- S:$G(BIUP)="" BIUP="u"
- ;
- D SETVARS^BIUTL5 N VALMCNT
- I $G(BIX)="PRINT" D PRINT,RESET^BIREPF Q
- ;
- ;---> Set BIAG for Age Range in header of report.
- ;---> Set BIRPDT for Report Date ("Quarterly, etc.).
- ;---> Set BIRTN in case user runs Patient List then needs to return
- ;---> to INIT here.
- ;---> Set BITITL for Report Name in Patient List, if called. vvv83
- N BIAG,BIRPDT,BIRTN,BITITL
- S BIAG="ALL",BIRPDT=$G(DT),BIRTN="BIREPF1",BITITL="INFLUENZA"
- D EN
- D RESET^BIREPF
- 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 ^TMP("BIREPF1",$J),^TMP("BIDUL",$J)
- N VALM,VALMHDR
- D HDR,START^BIREPF2(BIYEAR,.BICC,.BIHCF,.BICM,.BIBEN,BIFH,BIUP)
- ;
- D PRTLST^BIUTL8("BIREPF1")
- D EXIT,RESET^BIREPF
- Q
- ;
- ;
- ;----------
- EN ;EP
- ;---> Main entry point for List Template BI REPORT QUARTERLY IMM1.
- D EN^VALM("BI REPORT FLU IMM1")
- Q
- ;
- ;
- ;----------
- HDR ;EP
- ;---> Header code
- D HEAD^BIREPF2(BIYEAR,.BICC,.BIHCF,.BICM,.BIBEN,BIFH,BIUP)
- Q
- ;
- ;
- ;----------
- INIT ;EP
- ;---> Initialize variables and list array.
- K ^TMP("BIREPF1",$J),^TMP("BIDUL",$J)
- S VALM("TITLE")=$$LMVER^BILOGO
- S VALMSG="To view patient rosters, select a group below:"
- W !!?10,"This may take some time. Please hold on...",!
- D START^BIREPF2(BIYEAR,.BICC,.BIHCF,.BICM,.BIBEN,BIFH,BIUP)
- ;---> 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
- ;
- ;
- ;----------
- RESET1 ;EP
- ;---> Update partition for return to Listmanager.
- I $D(VALMQUIT) S VALMBCK="Q" Q
- D TERM^VALM0 S VALMBCK="R"
- S VALM("TITLE")=$$LMVER^BILOGO
- S VALMSG="To view patient lists, select a group below:"
- D HDR
- Q
- ;
- ;
- ;----------
- HELP ;EP
- N BIX S BIX=X
- D FULL^VALM1 N BIPOP
- D TITLE^BIUTL5("INFLUENZA REPORT - HELP, page 1 of 1")
- D TEXT1,DIRZ^BIUTL3()
- D:BIX'="??" RE^VALM4
- Q
- ;
- ;
- ;----------
- TEXT1 ;EP
- ;;You have chosen to View the Influenza Report rather than Print it.
- ;;(You may print the report from here as well by entering "PL".)
- ;;
- ;;Also, you may:
- ;;
- ;;Enter "N" to view the list of Patients who were NOT Current
- ;; or "NOT up-to-date" with their immunizations, according
- ;; to recommendeded guidelines for their age.
- ;;
- ;;Enter "C" to view the list of Patients who were CURRENT or
- ;; "up-to-date" with their immunizations, according to
- ;; recommendeded guidelines for their age.
- ;;
- ;;Enter "B" to view a list of both groups of patients combined.
- ;;
- ;;
- D PRINTX("TEXT1")
- Q
- ;
- ;
- ;----------
- EXIT ;EP
- ;---> Cleanup, EOJ.
- K ^TMP("BIREPF1",$J),^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^BIREPF1"
- D ZSAVES^BIUTL3
- D ZIS^BIUTL2(.BIPOP,1)
- Q
- ;
- ;
- ;----------
- DEQUEUE ;EP
- ;
- ;---> Prepare and print Quarterly Report.
- K VALMHDR,^TMP("BIREPF1",$J)
- ;
- ;********** PATCH 1, v8.4, AUG 01,2010, IHS/CMI/MWR
- ;---> Include Flu/H1N1 parameter for body of report when queued.
- ;D HDR^BIREPF1,START^BIREPF2(BIYEAR,.BICC,.BIHCF,.BICM,.BIBEN)
- D HDR^BIREPF1,START^BIREPF2(BIYEAR,.BICC,.BIHCF,.BICM,.BIBEN,BIFH,BIUP)
- ;**********
- ;
- D PRTLST^BIUTL8("BIREPF1"),EXIT
- Q
- ;
- ;
- ;----------
- PRINTX(BILINL,BITAB) ;EP
- Q:$G(BILINL)=""
- N I,T,X S T="" S:'$D(BITAB) BITAB=5 F I=1:1:BITAB S T=T_" "
- F I=1:1 S X=$T(@BILINL+I) Q:X'[";;" W !,T,$P(X,";;",2)
- 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
- BIREPF1 ;IHS/CMI/MWR - REPORT, FLU IMM; AUG 10,2010
- +1 ;;8.5;IMMUNIZATION;;SEP 01,2011
- +2 ;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
- +3 ;; VIEW OR PRINT INFLUENZA IMMUNIZATION REPORT.
- +4 ;; PATCH 1: Include Flu/H1N1 parameter for body of report when queued.
- +5 ;; DEQUEUE+6
- +6 ;
- +7 ;----------
- START(BIX) ;EP
- +1 ;---> VIEW Influenza Report.
- +2 ;---> Prepare and display Influenza Report.
- +3 ;---> Parameters:
- +4 ; 1 - BIX (req) If BIX="PRINT", then print Qtr Report.
- +5 ; If BIX="VIEW", then view Qtr Report (default).
- +6 ;---> Variables:
- +7 ; 1 - BIYEAR (req) Report Year^m (if 2nd pc="m", then End Date=March 31 of
- +8 ; the report year; otherwise End Date=Dec 31 of BIYEAR)
- +9 ; 2 - BICC (req) Current Community array.
- +10 ; 3 - BIHCF (req) Health Care Facility array.
- +11 ; 4 - BICM (req) Case Manager array.
- +12 ; 5 - BIBEN (req) Beneficiary Type array.
- +13 ; 6 - BIFH (opt) F=report on Flu Vaccine Group (default), H=H1N1 group.
- +14 ; 7 - BIPOP (ret) BIPOP=1 if error.
- +15 ;
- +16 ;---> Check for required Variables.
- +17 IF '$GET(BIYEAR)
- DO ERROR(679)
- DO RESET^BIREPF
- QUIT
- +18 IF '$DATA(BICC)
- DO ERROR(614)
- DO RESET^BIREPF
- QUIT
- +19 IF '$DATA(BIHCF)
- DO ERROR(625)
- DO RESET^BIREPF
- QUIT
- +20 IF '$DATA(BICM)
- DO ERROR(615)
- DO RESET^BIREPF
- QUIT
- +21 IF '$DATA(BIBEN)
- DO ERROR(662)
- DO RESET^BIREPF
- QUIT
- +22 IF ($GET(BIFH)="")
- SET BIFH="F"
- +23 IF $GET(BIUP)=""
- SET BIUP="u"
- +24 ;
- +25 DO SETVARS^BIUTL5
- NEW VALMCNT
- +26 IF $GET(BIX)="PRINT"
- DO PRINT
- DO RESET^BIREPF
- QUIT
- +27 ;
- +28 ;---> Set BIAG for Age Range in header of report.
- +29 ;---> Set BIRPDT for Report Date ("Quarterly, etc.).
- +30 ;---> Set BIRTN in case user runs Patient List then needs to return
- +31 ;---> to INIT here.
- +32 ;---> Set BITITL for Report Name in Patient List, if called. vvv83
- +33 NEW BIAG,BIRPDT,BIRTN,BITITL
- +34 SET BIAG="ALL"
- SET BIRPDT=$GET(DT)
- SET BIRTN="BIREPF1"
- SET BITITL="INFLUENZA"
- +35 DO EN
- +36 DO RESET^BIREPF
- +37 QUIT
- +38 ;
- +39 ;
- +40 ;----------
- 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 ^TMP("BIREPF1",$JOB),^TMP("BIDUL",$JOB)
- +10 NEW VALM,VALMHDR
- +11 DO HDR
- DO START^BIREPF2(BIYEAR,.BICC,.BIHCF,.BICM,.BIBEN,BIFH,BIUP)
- +12 ;
- +13 DO PRTLST^BIUTL8("BIREPF1")
- +14 DO EXIT
- DO RESET^BIREPF
- +15 QUIT
- +16 ;
- +17 ;
- +18 ;----------
- EN ;EP
- +1 ;---> Main entry point for List Template BI REPORT QUARTERLY IMM1.
- +2 DO EN^VALM("BI REPORT FLU IMM1")
- +3 QUIT
- +4 ;
- +5 ;
- +6 ;----------
- HDR ;EP
- +1 ;---> Header code
- +2 DO HEAD^BIREPF2(BIYEAR,.BICC,.BIHCF,.BICM,.BIBEN,BIFH,BIUP)
- +3 QUIT
- +4 ;
- +5 ;
- +6 ;----------
- INIT ;EP
- +1 ;---> Initialize variables and list array.
- +2 KILL ^TMP("BIREPF1",$JOB),^TMP("BIDUL",$JOB)
- +3 SET VALM("TITLE")=$$LMVER^BILOGO
- +4 SET VALMSG="To view patient rosters, select a group below:"
- +5 WRITE !!?10,"This may take some time. Please hold on...",!
- +6 DO START^BIREPF2(BIYEAR,.BICC,.BIHCF,.BICM,.BIBEN,BIFH,BIUP)
- +7 ;---> Set up ZTSAVE in case user Queues from PL in List.
- +8 DO ZSAVES^BIUTL3
- +9 QUIT
- +10 ;
- +11 ;
- +12 ;----------
- 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
- +5 QUIT
- +6 ;
- +7 ;
- +8 ;----------
- RESET1 ;EP
- +1 ;---> Update partition for return to Listmanager.
- +2 IF $DATA(VALMQUIT)
- SET VALMBCK="Q"
- QUIT
- +3 DO TERM^VALM0
- SET VALMBCK="R"
- +4 SET VALM("TITLE")=$$LMVER^BILOGO
- +5 SET VALMSG="To view patient lists, select a group below:"
- +6 DO HDR
- +7 QUIT
- +8 ;
- +9 ;
- +10 ;----------
- HELP ;EP
- +1 NEW BIX
- SET BIX=X
- +2 DO FULL^VALM1
- NEW BIPOP
- +3 DO TITLE^BIUTL5("INFLUENZA REPORT - HELP, page 1 of 1")
- +4 DO TEXT1
- DO DIRZ^BIUTL3()
- +5 IF BIX'="??"
- DO RE^VALM4
- +6 QUIT
- +7 ;
- +8 ;
- +9 ;----------
- TEXT1 ;EP
- +1 ;;You have chosen to View the Influenza Report rather than Print it.
- +2 ;;(You may print the report from here as well by entering "PL".)
- +3 ;;
- +4 ;;Also, you may:
- +5 ;;
- +6 ;;Enter "N" to view the list of Patients who were NOT Current
- +7 ;; or "NOT up-to-date" with their immunizations, according
- +8 ;; to recommendeded guidelines for their age.
- +9 ;;
- +10 ;;Enter "C" to view the list of Patients who were CURRENT or
- +11 ;; "up-to-date" with their immunizations, according to
- +12 ;; recommendeded guidelines for their age.
- +13 ;;
- +14 ;;Enter "B" to view a list of both groups of patients combined.
- +15 ;;
- +16 ;;
- +17 DO PRINTX("TEXT1")
- +18 QUIT
- +19 ;
- +20 ;
- +21 ;----------
- EXIT ;EP
- +1 ;---> Cleanup, EOJ.
- +2 KILL ^TMP("BIREPF1",$JOB),^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^BIREPF1"
- +7 DO ZSAVES^BIUTL3
- +8 DO ZIS^BIUTL2(.BIPOP,1)
- +9 QUIT
- +10 ;
- +11 ;
- +12 ;----------
- DEQUEUE ;EP
- +1 ;
- +2 ;---> Prepare and print Quarterly Report.
- +3 KILL VALMHDR,^TMP("BIREPF1",$JOB)
- +4 ;
- +5 ;********** PATCH 1, v8.4, AUG 01,2010, IHS/CMI/MWR
- +6 ;---> Include Flu/H1N1 parameter for body of report when queued.
- +7 ;D HDR^BIREPF1,START^BIREPF2(BIYEAR,.BICC,.BIHCF,.BICM,.BIBEN)
- +8 DO HDR^BIREPF1
- DO START^BIREPF2(BIYEAR,.BICC,.BIHCF,.BICM,.BIBEN,BIFH,BIUP)
- +9 ;**********
- +10 ;
- +11 DO PRTLST^BIUTL8("BIREPF1")
- DO EXIT
- +12 QUIT
- +13 ;
- +14 ;
- +15 ;----------
- PRINTX(BILINL,BITAB) ;EP
- +1 IF $GET(BILINL)=""
- QUIT
- +2 NEW I,T,X
- SET T=""
- IF '$DATA(BITAB)
- SET BITAB=5
- FOR I=1:1:BITAB
- SET T=T_" "
- +3 FOR I=1:1
- SET X=$TEXT(@BILINL+I)
- IF X'[";;"
- QUIT
- WRITE !,T,$PIECE(X,";;",2)
- +4 QUIT
- +5 ;
- +6 ;
- +7 ;----------
- 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