BIREPF ;IHS/CMI/MWR - REPORT, FLU IMM; MAY 10, 2010
;;8.5;IMMUNIZATION;**5**;JUL 01,2013
;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
;; VIEW INFLUENZA IMMUNIZATION REPORT.
;; PATCH 5: Display new beginning date as July 1. INIT+20, TEXT1.
;
;
;----------
START ;EP
;---> Listman Screen for printing Immunization Due Letters.
D SETVARS^BIUTL5 N BIRTN
;
;---> If Vaccine Table is not standard, display Error Text and quit.
I $D(^BISITE(-1)) D ERRCD^BIUTL2(503,,1) Q
;
D EN
D EXIT
Q
;
;
;----------
EN ;EP
;---> Main entry point for BI LETTER PRINT DU
D EN^VALM("BI REPORT FLU IMM")
Q
;
;
;----------
INIT ;EP
;---> Initialize variables and list array. vvv83
S VALM("TITLE")=$$LMVER^BILOGO
S VALMSG="Select a left column number to change an item."
N BILINE,X S BILINE=0
D WRITE(.BILINE)
S X=IOUON_"INFLUENZA IMMUNIZATION REPORT" D CENTERT^BIUTL5(.X,42)
D WRITE(.BILINE,X_IOINORM)
K X
;
D WRITE(.BILINE,,1)
;---> Year.
I '$G(BIYEAR),$G(DT) D
.;---> If today is Jan=Aug, set default year=last year.
.I +$E(DT,4,5)<9 S BIYEAR=1700+$E(DT,1,3)-1 Q
.;---> If today is Sept=Dec, set default year=this year.
.S BIYEAR=1700+$E(DT,1,3)
;
S X=" 1 - Report Year (Flu Season).......: "_+BIYEAR_"/"_(BIYEAR+1)
;
;********** PATCH 5, v8.5, JUL 01,2013, IHS/CMI/MWR
;---> Display new beginning date as July 1.
;S X=X_" (09/01/"_$E(BIYEAR,3,4)
S X=X_" (07/01/"_$E(BIYEAR,3,4)
;**********
D
.I $P(BIYEAR,U,2)="m" S X=X_" - 03/31/"_$E((BIYEAR+1),3,4)_")" Q
.S X=X_" - 12/31/"_$E(BIYEAR,3,4)_")"
D WRITE(.BILINE,X,1)
K X
;
;---> Current Community.
D DISP^BIREP(.BILINE,"BIREPF",.BICC,"Community",2,1,,,40)
;
;---> Health Care Facility.
N A,B S A="Health Care Facility",B="Facilities"
D DISP^BIREP(.BILINE,"BIREPF",.BIHCF,A,3,2,,,40,B) K A,B
;
;---> Case Manager.
D DISP^BIREP(.BILINE,"BIREPF",.BICM,"Case Manager",4,3,,,40)
;
;---> Beneficiary Type.
S:$O(BIBEN(0))="" BIBEN(1)=""
D DISP^BIREP(.BILINE,"BIREPF",.BIBEN,"Beneficiary Type",5,4,,,40)
;
;---> User Population.
D:($G(BIUP)="")
.I $$GPRAIEN^BIUTL6 S BIUP="a" Q
.S BIUP="u"
;
S X=" 6 - Patient Population Group.......: "
D
.I BIUP="r" S X=X_"Registered Patients (All)" Q
.I BIUP="i" S X=X_"Immunization Register Patients (Active)" Q
.I BIUP="u" S X=X_"User Population (1 visit, 3 yrs)" Q
.I BIUP="a" S X=X_"Active Users (2+ visits, 3 yrs)" Q
D WRITE(.BILINE,X,1)
K X
;
;---> Report Type.
S:($G(BIFH)="") BIFH="F"
S X=" 7 - Report Type (Standard or H1N1).: "_$S(BIFH="H":"H1N1",1:"Standard Flu")
D WRITE(.BILINE,X,1)
K X
;
;---> Finish up Listmanager List Count.
S VALMCNT=BILINE
S BIRTN="BIREPF"
Q
;
;
;----------
WRITE(BILINE,BIVAL,BIBLNK) ;EP
;---> Write lines to ^TMP (see documentation in ^BIW).
;---> Parameters:
; 1 - BILINE (ret) Last line# written.
; 2 - BIVAL (opt) Value/text of line (Null=blank line).
; 3 - BIBLNK (opt) Number of blank lines to add after line sent.
;
Q:'$D(BILINE)
D WL^BIW(.BILINE,"BIREPF",$G(BIVAL),$G(BIBLNK))
Q
;
;
;----------
RESET ;EP
;---> Update partition for return to Listmanager.
I $D(VALMQUIT) S VALMBCK="Q" Q
D TERM^VALM0 S VALMBCK="R"
D INIT Q
;
;
;----------
HELP ;EP
;---> Help code.
N BIX S BIX=X
D FULL^VALM1
W !!?5,"Enter ""V"" to view this report on screen, ""P"" to print it,"
W !?5,"or ""H"" to view the Help Text for this report and its parameters."
D DIRZ^BIUTL3(""," Press ENTER/RETURN to continue")
D:BIX'="??" RE^VALM4
Q
;
;
;----------
HELP1 ;EP
;----> Explanation of this report. vvv83
N BITEXT D TEXT1(.BITEXT)
D START^BIHELP("INFLUENZA IMMUNIZATION REPORT - HELP",.BITEXT)
Q
;
;********** PATCH 5, v8.5, JUL 01,2013, IHS/CMI/MWR
;---> Correct items in Help Text below to reflect new begin date as July 1.
;
;----------
TEXT1(BITEXT) ;EP
;;
;;INFLUENZA IMMUNIZATION REPORT
;;
;;This Influenza Report is designed to comply with influenza vaccination
;;recommendations for patients of all ages. The report examines the
;;influenza season (7/1 - 12/31) for the year selected. (An end date of
;;3/31 may also be selected.)
;;
;;
;;Report Columns
;;--------------_
;;The "Age in Months" is calculated on 12/31 of the year selected,
;;in order to include children who were at least 6 months of age during
;;entire influenza season (7/1 - 12/31).
;;
;;The first column, 10-23 months, includes children who were 6-23 months
;;old during the influenza season of the selected year.
;;
;;The second column, 24-59 months, includes children who were 24-59
;;months during the entire influenza season of the selected year, and
;;so on for the remaining age groups.
;;
;;NOTE: The column headed "18-49hr" represents patients whose history
;;puts them in the High Risk category. Patient statistics in this
;;column are NOT include in the "18-49y" column.
;;
;;
;;Report Rows
;;------------
;;The "Denominator" row of the report is the number of patients within
;;that age group who are included in the report.
;; NOTE: Any patient who was Inactivated prior to 12/31 of the year
;; selected will not be included in the report.
;;
;;The "1-Influenza year season" row of the report includes all patients
;;who received at least one dose during the influenza season of the year
;;selected (Sept-Dec).
;;
;;The "Fully immunized" row of the report includes children ages who are:
;;
;; 10-23 Months Old:
;; 1) Received 2 doses during the influenza season of the year selected.
;; (Sept 1 - Dec 31 or Mar 31, whichever is selected),
;; or
;; 2) Received 1+ dose before Sept 1 and 1+ dose during Sept-Dec/March.
;;
;; 24-59 Months Old:
;; 1) Received 2 doses during the influenza season of the year selected.
;; (July 1 - Dec 31 or Mar 31, whichever is selected),
;; or
;; 2) Received 2+ dose before Sept 1 and 1+ dose during Sept-Dec/March.
;;
;;All other age columns reflect patients who were fully immunized by
;;receiving a signal dose in the current season.
;;
;;The INFLUENZA IMMUNIZATION REPORT screen allows you to adjust the
;;report to your needs.
;;
;;There are 7 items or "parameters" on the screen that you may
;;change in order to select for a specific group of patients.
;;To change an item, enter its left column number (1-7) at the
;;prompt on the bottom of the screen. Use "?" at any prompt where
;;you would like help or more information on the parameter you are
;;changing.
;;
;;Once you have the parameters set to retrieve the group of patients
;;you want, select V to View the Influenza Report or P to print it.
;;
;;If it customarily takes a long time for your computer to prepare
;;this report, it may be preferable to Print and Queue the report
;;to a printer, rather than Viewing it on screen. (This would avoid
;;tying up your screen while the report is being prepared.)
;;
;;REPORT YEAR: The report will compile influenza immunization rates
;;for the year entered, in the date range of 7/1 to 12/31. An optional
;;End Date of 3/31 following the selected report year is also available.
;;
;;COMMUNITY: If you select for specific Communities, only patients
;;whose Current Community matches one of the Communities selected will
;;be included in the report. "Current Community" is refers to Item 6
;;on Page 1 of the RPMS Patient Registration.
;;
;;HEALTH CARE FACILITY: If you select for specific Health Care
;;Facilities, only Patients who have active Chart#'s at one or more
;;of the selected Facilities will be included in the report.
;;
;;CASE MANAGER: If you select for specific Case Managers, only
;;patients who have the selected Case Managers will be included
;;in the report.
;;
;;BENEFICIARY TYPE: If you select for specific Beneficiary Types,
;;only patients whose Beneficiary Type is one of those you select
;;will be included in the report. "Beneficiary Type" refers to
;;Item 3 on Page 2 of the RPMS Patient Registration.
;;
;;PATIENT POPULATION GROUP: You may select one of four patient groups
;;to be considered in the report: Registered Patients (All),
;;Immunization Register Patients (Active), User Population (1+ visits
;;in 3 yrs), or Active Clinical Users (2+ visits in 3 yrs).
;;Active Clinical Users is the default.
;;
;;REPORT TYPE: If you select Standard Report, the report will display
;;statistics for standard influenza immunizations (excluding H1N1).
;;If you select H1N1, then only statistics for H1N1 immunizations
;;will be displayed.
;;
;;
D LOADTX("TEXT1",,.BITEXT)
Q
;
;
;----------
LOADTX(BILINL,BITAB,BITEXT) ;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'[";;" S BITEXT(I)=T_$P(X,";;",2)
Q
;
;
;----------
EXIT ;EP
;---> End of job cleanup.
D KILLALL^BIUTL8(1)
K ^TMP("BIREPF",$J)
D CLEAR^VALM1
D FULL^VALM1
Q
BIREPF ;IHS/CMI/MWR - REPORT, FLU IMM; MAY 10, 2010
+1 ;;8.5;IMMUNIZATION;**5**;JUL 01,2013
+2 ;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
+3 ;; VIEW INFLUENZA IMMUNIZATION REPORT.
+4 ;; PATCH 5: Display new beginning date as July 1. INIT+20, TEXT1.
+5 ;
+6 ;
+7 ;----------
START ;EP
+1 ;---> Listman Screen for printing Immunization Due Letters.
+2 DO SETVARS^BIUTL5
NEW BIRTN
+3 ;
+4 ;---> If Vaccine Table is not standard, display Error Text and quit.
+5 IF $DATA(^BISITE(-1))
DO ERRCD^BIUTL2(503,,1)
QUIT
+6 ;
+7 DO EN
+8 DO EXIT
+9 QUIT
+10 ;
+11 ;
+12 ;----------
EN ;EP
+1 ;---> Main entry point for BI LETTER PRINT DU
+2 DO EN^VALM("BI REPORT FLU IMM")
+3 QUIT
+4 ;
+5 ;
+6 ;----------
INIT ;EP
+1 ;---> Initialize variables and list array. vvv83
+2 SET VALM("TITLE")=$$LMVER^BILOGO
+3 SET VALMSG="Select a left column number to change an item."
+4 NEW BILINE,X
SET BILINE=0
+5 DO WRITE(.BILINE)
+6 SET X=IOUON_"INFLUENZA IMMUNIZATION REPORT"
DO CENTERT^BIUTL5(.X,42)
+7 DO WRITE(.BILINE,X_IOINORM)
+8 KILL X
+9 ;
+10 DO WRITE(.BILINE,,1)
+11 ;---> Year.
+12 IF '$GET(BIYEAR)
IF $GET(DT)
Begin DoDot:1
+13 ;---> If today is Jan=Aug, set default year=last year.
+14 IF +$EXTRACT(DT,4,5)<9
SET BIYEAR=1700+$EXTRACT(DT,1,3)-1
QUIT
+15 ;---> If today is Sept=Dec, set default year=this year.
+16 SET BIYEAR=1700+$EXTRACT(DT,1,3)
End DoDot:1
+17 ;
+18 SET X=" 1 - Report Year (Flu Season).......: "_+BIYEAR_"/"_(BIYEAR+1)
+19 ;
+20 ;********** PATCH 5, v8.5, JUL 01,2013, IHS/CMI/MWR
+21 ;---> Display new beginning date as July 1.
+22 ;S X=X_" (09/01/"_$E(BIYEAR,3,4)
+23 SET X=X_" (07/01/"_$EXTRACT(BIYEAR,3,4)
+24 ;**********
+25 Begin DoDot:1
+26 IF $PIECE(BIYEAR,U,2)="m"
SET X=X_" - 03/31/"_$EXTRACT((BIYEAR+1),3,4)_")"
QUIT
+27 SET X=X_" - 12/31/"_$EXTRACT(BIYEAR,3,4)_")"
End DoDot:1
+28 DO WRITE(.BILINE,X,1)
+29 KILL X
+30 ;
+31 ;---> Current Community.
+32 DO DISP^BIREP(.BILINE,"BIREPF",.BICC,"Community",2,1,,,40)
+33 ;
+34 ;---> Health Care Facility.
+35 NEW A,B
SET A="Health Care Facility"
SET B="Facilities"
+36 DO DISP^BIREP(.BILINE,"BIREPF",.BIHCF,A,3,2,,,40,B)
KILL A,B
+37 ;
+38 ;---> Case Manager.
+39 DO DISP^BIREP(.BILINE,"BIREPF",.BICM,"Case Manager",4,3,,,40)
+40 ;
+41 ;---> Beneficiary Type.
+42 IF $ORDER(BIBEN(0))=""
SET BIBEN(1)=""
+43 DO DISP^BIREP(.BILINE,"BIREPF",.BIBEN,"Beneficiary Type",5,4,,,40)
+44 ;
+45 ;---> User Population.
+46 IF ($GET(BIUP)="")
Begin DoDot:1
+47 IF $$GPRAIEN^BIUTL6
SET BIUP="a"
QUIT
+48 SET BIUP="u"
End DoDot:1
+49 ;
+50 SET X=" 6 - Patient Population Group.......: "
+51 Begin DoDot:1
+52 IF BIUP="r"
SET X=X_"Registered Patients (All)"
QUIT
+53 IF BIUP="i"
SET X=X_"Immunization Register Patients (Active)"
QUIT
+54 IF BIUP="u"
SET X=X_"User Population (1 visit, 3 yrs)"
QUIT
+55 IF BIUP="a"
SET X=X_"Active Users (2+ visits, 3 yrs)"
QUIT
End DoDot:1
+56 DO WRITE(.BILINE,X,1)
+57 KILL X
+58 ;
+59 ;---> Report Type.
+60 IF ($GET(BIFH)="")
SET BIFH="F"
+61 SET X=" 7 - Report Type (Standard or H1N1).: "_$SELECT(BIFH="H":"H1N1",1:"Standard Flu")
+62 DO WRITE(.BILINE,X,1)
+63 KILL X
+64 ;
+65 ;---> Finish up Listmanager List Count.
+66 SET VALMCNT=BILINE
+67 SET BIRTN="BIREPF"
+68 QUIT
+69 ;
+70 ;
+71 ;----------
WRITE(BILINE,BIVAL,BIBLNK) ;EP
+1 ;---> Write lines to ^TMP (see documentation in ^BIW).
+2 ;---> Parameters:
+3 ; 1 - BILINE (ret) Last line# written.
+4 ; 2 - BIVAL (opt) Value/text of line (Null=blank line).
+5 ; 3 - BIBLNK (opt) Number of blank lines to add after line sent.
+6 ;
+7 IF '$DATA(BILINE)
QUIT
+8 DO WL^BIW(.BILINE,"BIREPF",$GET(BIVAL),$GET(BIBLNK))
+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
QUIT
+5 ;
+6 ;
+7 ;----------
HELP ;EP
+1 ;---> Help code.
+2 NEW BIX
SET BIX=X
+3 DO FULL^VALM1
+4 WRITE !!?5,"Enter ""V"" to view this report on screen, ""P"" to print it,"
+5 WRITE !?5,"or ""H"" to view the Help Text for this report and its parameters."
+6 DO DIRZ^BIUTL3(""," Press ENTER/RETURN to continue")
+7 IF BIX'="??"
DO RE^VALM4
+8 QUIT
+9 ;
+10 ;
+11 ;----------
HELP1 ;EP
+1 ;----> Explanation of this report. vvv83
+2 NEW BITEXT
DO TEXT1(.BITEXT)
+3 DO START^BIHELP("INFLUENZA IMMUNIZATION REPORT - HELP",.BITEXT)
+4 QUIT
+5 ;
+6 ;********** PATCH 5, v8.5, JUL 01,2013, IHS/CMI/MWR
+7 ;---> Correct items in Help Text below to reflect new begin date as July 1.
+8 ;
+9 ;----------
TEXT1(BITEXT) ;EP
+1 ;;
+2 ;;INFLUENZA IMMUNIZATION REPORT
+3 ;;
+4 ;;This Influenza Report is designed to comply with influenza vaccination
+5 ;;recommendations for patients of all ages. The report examines the
+6 ;;influenza season (7/1 - 12/31) for the year selected. (An end date of
+7 ;;3/31 may also be selected.)
+8 ;;
+9 ;;
+10 ;;Report Columns
+11 ;;--------------_
+12 ;;The "Age in Months" is calculated on 12/31 of the year selected,
+13 ;;in order to include children who were at least 6 months of age during
+14 ;;entire influenza season (7/1 - 12/31).
+15 ;;
+16 ;;The first column, 10-23 months, includes children who were 6-23 months
+17 ;;old during the influenza season of the selected year.
+18 ;;
+19 ;;The second column, 24-59 months, includes children who were 24-59
+20 ;;months during the entire influenza season of the selected year, and
+21 ;;so on for the remaining age groups.
+22 ;;
+23 ;;NOTE: The column headed "18-49hr" represents patients whose history
+24 ;;puts them in the High Risk category. Patient statistics in this
+25 ;;column are NOT include in the "18-49y" column.
+26 ;;
+27 ;;
+28 ;;Report Rows
+29 ;;------------
+30 ;;The "Denominator" row of the report is the number of patients within
+31 ;;that age group who are included in the report.
+32 ;; NOTE: Any patient who was Inactivated prior to 12/31 of the year
+33 ;; selected will not be included in the report.
+34 ;;
+35 ;;The "1-Influenza year season" row of the report includes all patients
+36 ;;who received at least one dose during the influenza season of the year
+37 ;;selected (Sept-Dec).
+38 ;;
+39 ;;The "Fully immunized" row of the report includes children ages who are:
+40 ;;
+41 ;; 10-23 Months Old:
+42 ;; 1) Received 2 doses during the influenza season of the year selected.
+43 ;; (Sept 1 - Dec 31 or Mar 31, whichever is selected),
+44 ;; or
+45 ;; 2) Received 1+ dose before Sept 1 and 1+ dose during Sept-Dec/March.
+46 ;;
+47 ;; 24-59 Months Old:
+48 ;; 1) Received 2 doses during the influenza season of the year selected.
+49 ;; (July 1 - Dec 31 or Mar 31, whichever is selected),
+50 ;; or
+51 ;; 2) Received 2+ dose before Sept 1 and 1+ dose during Sept-Dec/March.
+52 ;;
+53 ;;All other age columns reflect patients who were fully immunized by
+54 ;;receiving a signal dose in the current season.
+55 ;;
+56 ;;The INFLUENZA IMMUNIZATION REPORT screen allows you to adjust the
+57 ;;report to your needs.
+58 ;;
+59 ;;There are 7 items or "parameters" on the screen that you may
+60 ;;change in order to select for a specific group of patients.
+61 ;;To change an item, enter its left column number (1-7) at the
+62 ;;prompt on the bottom of the screen. Use "?" at any prompt where
+63 ;;you would like help or more information on the parameter you are
+64 ;;changing.
+65 ;;
+66 ;;Once you have the parameters set to retrieve the group of patients
+67 ;;you want, select V to View the Influenza Report or P to print it.
+68 ;;
+69 ;;If it customarily takes a long time for your computer to prepare
+70 ;;this report, it may be preferable to Print and Queue the report
+71 ;;to a printer, rather than Viewing it on screen. (This would avoid
+72 ;;tying up your screen while the report is being prepared.)
+73 ;;
+74 ;;REPORT YEAR: The report will compile influenza immunization rates
+75 ;;for the year entered, in the date range of 7/1 to 12/31. An optional
+76 ;;End Date of 3/31 following the selected report year is also available.
+77 ;;
+78 ;;COMMUNITY: If you select for specific Communities, only patients
+79 ;;whose Current Community matches one of the Communities selected will
+80 ;;be included in the report. "Current Community" is refers to Item 6
+81 ;;on Page 1 of the RPMS Patient Registration.
+82 ;;
+83 ;;HEALTH CARE FACILITY: If you select for specific Health Care
+84 ;;Facilities, only Patients who have active Chart#'s at one or more
+85 ;;of the selected Facilities will be included in the report.
+86 ;;
+87 ;;CASE MANAGER: If you select for specific Case Managers, only
+88 ;;patients who have the selected Case Managers will be included
+89 ;;in the report.
+90 ;;
+91 ;;BENEFICIARY TYPE: If you select for specific Beneficiary Types,
+92 ;;only patients whose Beneficiary Type is one of those you select
+93 ;;will be included in the report. "Beneficiary Type" refers to
+94 ;;Item 3 on Page 2 of the RPMS Patient Registration.
+95 ;;
+96 ;;PATIENT POPULATION GROUP: You may select one of four patient groups
+97 ;;to be considered in the report: Registered Patients (All),
+98 ;;Immunization Register Patients (Active), User Population (1+ visits
+99 ;;in 3 yrs), or Active Clinical Users (2+ visits in 3 yrs).
+100 ;;Active Clinical Users is the default.
+101 ;;
+102 ;;REPORT TYPE: If you select Standard Report, the report will display
+103 ;;statistics for standard influenza immunizations (excluding H1N1).
+104 ;;If you select H1N1, then only statistics for H1N1 immunizations
+105 ;;will be displayed.
+106 ;;
+107 ;;
+108 DO LOADTX("TEXT1",,.BITEXT)
+109 QUIT
+110 ;
+111 ;
+112 ;----------
LOADTX(BILINL,BITAB,BITEXT) ;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
SET BITEXT(I)=T_$PIECE(X,";;",2)
+4 QUIT
+5 ;
+6 ;
+7 ;----------
EXIT ;EP
+1 ;---> End of job cleanup.
+2 DO KILLALL^BIUTL8(1)
+3 KILL ^TMP("BIREPF",$JOB)
+4 DO CLEAR^VALM1
+5 DO FULL^VALM1
+6 QUIT