Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: BIREPF

BIREPF.m

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