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

BIREPF1.m

Go to the documentation of this file.
  1. BIREPF1 ;IHS/CMI/MWR - REPORT, FLU IMM; AUG 10,2010
  1. ;;8.5;IMMUNIZATION;;SEP 01,2011
  1. ;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
  1. ;; VIEW OR PRINT INFLUENZA IMMUNIZATION REPORT.
  1. ;; PATCH 1: Include Flu/H1N1 parameter for body of report when queued.
  1. ;; DEQUEUE+6
  1. ;
  1. ;----------
  1. START(BIX) ;EP
  1. ;---> VIEW Influenza Report.
  1. ;---> Prepare and display Influenza Report.
  1. ;---> Parameters:
  1. ; 1 - BIX (req) If BIX="PRINT", then print Qtr Report.
  1. ; If BIX="VIEW", then view Qtr Report (default).
  1. ;---> Variables:
  1. ; 1 - BIYEAR (req) Report Year^m (if 2nd pc="m", then End Date=March 31 of
  1. ; the report year; otherwise End Date=Dec 31 of BIYEAR)
  1. ; 2 - BICC (req) Current Community array.
  1. ; 3 - BIHCF (req) Health Care Facility array.
  1. ; 4 - BICM (req) Case Manager array.
  1. ; 5 - BIBEN (req) Beneficiary Type array.
  1. ; 6 - BIFH (opt) F=report on Flu Vaccine Group (default), H=H1N1 group.
  1. ; 7 - BIPOP (ret) BIPOP=1 if error.
  1. ;
  1. ;---> Check for required Variables.
  1. I '$G(BIYEAR) D ERROR(679) D RESET^BIREPF Q
  1. I '$D(BICC) D ERROR(614) D RESET^BIREPF Q
  1. I '$D(BIHCF) D ERROR(625) D RESET^BIREPF Q
  1. I '$D(BICM) D ERROR(615) D RESET^BIREPF Q
  1. I '$D(BIBEN) D ERROR(662) D RESET^BIREPF Q
  1. S:($G(BIFH)="") BIFH="F"
  1. S:$G(BIUP)="" BIUP="u"
  1. ;
  1. D SETVARS^BIUTL5 N VALMCNT
  1. I $G(BIX)="PRINT" D PRINT,RESET^BIREPF Q
  1. ;
  1. ;---> Set BIAG for Age Range in header of report.
  1. ;---> Set BIRPDT for Report Date ("Quarterly, etc.).
  1. ;---> Set BIRTN in case user runs Patient List then needs to return
  1. ;---> to INIT here.
  1. ;---> Set BITITL for Report Name in Patient List, if called. vvv83
  1. N BIAG,BIRPDT,BIRTN,BITITL
  1. S BIAG="ALL",BIRPDT=$G(DT),BIRTN="BIREPF1",BITITL="INFLUENZA"
  1. D EN
  1. D RESET^BIREPF
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. PRINT ;EP
  1. ;---> Main entry point for printing the Quarterly Immunization Report.
  1. D DEVICE(.BIPOP)
  1. Q:$G(BIPOP)
  1. ;
  1. D:$G(IO)'=$G(IO(0))
  1. .W !!?10,"This may take some time. Please hold on...",!
  1. ;
  1. ;---> Prepare report.
  1. K ^TMP("BIREPF1",$J),^TMP("BIDUL",$J)
  1. N VALM,VALMHDR
  1. D HDR,START^BIREPF2(BIYEAR,.BICC,.BIHCF,.BICM,.BIBEN,BIFH,BIUP)
  1. ;
  1. D PRTLST^BIUTL8("BIREPF1")
  1. D EXIT,RESET^BIREPF
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. EN ;EP
  1. ;---> Main entry point for List Template BI REPORT QUARTERLY IMM1.
  1. D EN^VALM("BI REPORT FLU IMM1")
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. HDR ;EP
  1. ;---> Header code
  1. D HEAD^BIREPF2(BIYEAR,.BICC,.BIHCF,.BICM,.BIBEN,BIFH,BIUP)
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. INIT ;EP
  1. ;---> Initialize variables and list array.
  1. K ^TMP("BIREPF1",$J),^TMP("BIDUL",$J)
  1. S VALM("TITLE")=$$LMVER^BILOGO
  1. S VALMSG="To view patient rosters, select a group below:"
  1. W !!?10,"This may take some time. Please hold on...",!
  1. D START^BIREPF2(BIYEAR,.BICC,.BIHCF,.BICM,.BIBEN,BIFH,BIUP)
  1. ;---> Set up ZTSAVE in case user Queues from PL in List.
  1. D ZSAVES^BIUTL3
  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,HDR
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. RESET1 ;EP
  1. ;---> Update partition for return to Listmanager.
  1. I $D(VALMQUIT) S VALMBCK="Q" Q
  1. D TERM^VALM0 S VALMBCK="R"
  1. S VALM("TITLE")=$$LMVER^BILOGO
  1. S VALMSG="To view patient lists, select a group below:"
  1. D HDR
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. HELP ;EP
  1. N BIX S BIX=X
  1. D FULL^VALM1 N BIPOP
  1. D TITLE^BIUTL5("INFLUENZA REPORT - HELP, page 1 of 1")
  1. D TEXT1,DIRZ^BIUTL3()
  1. D:BIX'="??" RE^VALM4
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. TEXT1 ;EP
  1. ;;You have chosen to View the Influenza Report rather than Print it.
  1. ;;(You may print the report from here as well by entering "PL".)
  1. ;;
  1. ;;Also, you may:
  1. ;;
  1. ;;Enter "N" to view the list of Patients who were NOT Current
  1. ;; or "NOT up-to-date" with their immunizations, according
  1. ;; to recommendeded guidelines for their age.
  1. ;;
  1. ;;Enter "C" to view the list of Patients who were CURRENT or
  1. ;; "up-to-date" with their immunizations, according to
  1. ;; recommendeded guidelines for their age.
  1. ;;
  1. ;;Enter "B" to view a list of both groups of patients combined.
  1. ;;
  1. ;;
  1. D PRINTX("TEXT1")
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. EXIT ;EP
  1. ;---> Cleanup, EOJ.
  1. K ^TMP("BIREPF1",$J),^TMP("BIDUL",$J)
  1. D CLEAR^VALM1
  1. D FULL^VALM1
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. DEVICE(BIPOP) ;EP
  1. ;---> Get Device and possibly queue to Taskman.
  1. ;---> Parameters:
  1. ; 1 - BIPOP (ret) If error or Queue, BIPOP=1
  1. ;
  1. K %ZIS,IOP S BIPOP=0
  1. S ZTRTN="DEQUEUE^BIREPF1"
  1. D ZSAVES^BIUTL3
  1. D ZIS^BIUTL2(.BIPOP,1)
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. DEQUEUE ;EP
  1. ;
  1. ;---> Prepare and print Quarterly Report.
  1. K VALMHDR,^TMP("BIREPF1",$J)
  1. ;
  1. ;********** PATCH 1, v8.4, AUG 01,2010, IHS/CMI/MWR
  1. ;---> Include Flu/H1N1 parameter for body of report when queued.
  1. ;D HDR^BIREPF1,START^BIREPF2(BIYEAR,.BICC,.BIHCF,.BICM,.BIBEN)
  1. D HDR^BIREPF1,START^BIREPF2(BIYEAR,.BICC,.BIHCF,.BICM,.BIBEN,BIFH,BIUP)
  1. ;**********
  1. ;
  1. D PRTLST^BIUTL8("BIREPF1"),EXIT
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. PRINTX(BILINL,BITAB) ;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'[";;" W !,T,$P(X,";;",2)
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. ERROR(BIERR) ;EP
  1. ;---> Report error, either to screen or print.
  1. ;---> Parameters:
  1. ; 1 - BIERR (ret) Text of Error Code if any, otherwise null.
  1. ;
  1. D ERRCD^BIUTL2($G(BIERR),,1) S BIPOP=1
  1. Q