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

BIREPT1.m

Go to the documentation of this file.
  1. BIREPT1 ;IHS/CMI/MWR - REPORT, TWO-YR-OLD RATES; MAY 10, 2010
  1. ;;8.5;IMMUNIZATION;;SEP 01,2011
  1. ;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
  1. ;; VIEW OR PRINT TWO-YR-OLD IMMUNIZATION RATES REPORT.
  1. ;
  1. ;
  1. ;----------
  1. START(BIX) ;EP
  1. ;---> Prepare and display or print Two-Yr-Old Rates Report.
  1. ;---> Parameters:
  1. ; 1 - BIX (req) If BIX="PRINT", then print Report.
  1. ; If BIX="VIEW", then view Report (default).
  1. ;---> Variables:
  1. ; 1 - BIQDT (req) Quarter Ending Date.
  1. ; 2 - BITAR (opt) Two-Yr-Old Report Age Range, default="19-35".
  1. ; 3 - BICC (req) Current Community array.
  1. ; 4 - BIHCF (req) Health Care Facility array.
  1. ; 5 - BICM (req) Case Manager array.
  1. ; 6 - BIBEN (req) Beneficiary Type array.
  1. ; 7 - BIPOP (ret) BIPOP=1 if error.
  1. ; 8 - BIUP (req) User Population/Group (Registered, Imm, User, Active).
  1. ;
  1. ;---> Check for required Variables.
  1. I '$G(BIQDT) D ERRCD^BIUTL2(622,,1) D RESET^BIREPT Q
  1. I '$D(BICC) D ERRCD^BIUTL2(614,,1) D RESET^BIREPT Q
  1. I '$D(BIHCF) D ERRCD^BIUTL2(625,,1) D RESET^BIREPT Q
  1. I '$D(BICM) D ERRCD^BIUTL2(615,,1) D RESET^BIREPT Q
  1. I '$D(BIBEN) D ERRCD^BIUTL2(662,,1) D RESET^BIREPT Q
  1. I '$G(BISITE) S BISITE=$G(DUZ(2))
  1. I '$G(BISITE) D ERRCD^BIUTL2(109,,1) D RESET^BIREPT Q
  1. S:$G(BIUP)="" BIUP="u"
  1. ;
  1. S:'$G(BITAR) BITAR="19-35"
  1. S BIAGRPS=$S(BITAR="19-35":"3,5,7,16,19,36",1:"3,5,7,16,19,24,36")
  1. ;
  1. ;---> BITOTPTS=Total Patients, used by HDR code after EN.
  1. N BITOTPTS
  1. ;
  1. D SETVARS^BIUTL5 N VALMCNT
  1. I $G(BIX)="PRINT" D PRINT,RESET^BIREPT Q
  1. ;
  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.
  1. N BIRPDT,BIRTN,BITITL
  1. S BIRPDT=BIQDT,BIRTN="BIREPT1",BITITL="TWO-YR-OLD"
  1. D EN
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. PRINT ;EP
  1. ;---> Main entry point for printing the Two-Yr-Old Rates 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("BIREPT1",$J),^TMP("BIDUL",$J)
  1. N VALM,VALMHDR
  1. D START^BIREPT2(BIQDT,BITAR,BIAGRPS,.BICC,.BIHCF,.BICM,.BIBEN,BISITE,BIUP),HDR
  1. ;
  1. D PRTLST^BIUTL8("BIREPT1")
  1. D EXIT,RESET^BIREPT
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. EN ;EP
  1. ;---> Main entry point for List Template BI REPORT TWO-YR-OLD RATES1.
  1. D EN^VALM("BI REPORT TWO-YR-OLD RATES1")
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. HDR ;EP
  1. ;---> Header code
  1. D HEAD^BIREPT2(BIQDT,BITAR,BIAGRPS,.BICC,.BIHCF,.BICM,.BIBEN,BIUP)
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. INIT ;EP
  1. ;---> Initialize variables and list array.
  1. S VALM("TITLE")=$$LMVER^BILOGO
  1. W !!?10,"This may take some time. Please hold on...",!
  1. K ^TMP("BIREPT1",$J),^TMP("BIDUL",$J)
  1. D START^BIREPT2(BIQDT,BITAR,BIAGRPS,.BICC,.BIHCF,.BICM,.BIBEN,BISITE,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 Q
  1. ;
  1. ;
  1. ;----------
  1. HELP ;EP
  1. N BIX S BIX=X
  1. D FULL^VALM1 N BIPOP
  1. D TITLE^BIUTL5("VIEW TWO-YR-OLD REPORT - HELP")
  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 Two-Yr-Old 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("BIREPT1",$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^BIREPT1"
  1. D ZSAVES^BIUTL3
  1. D ZIS^BIUTL2(.BIPOP,1)
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. DEQUEUE ;EP
  1. ;
  1. ;---> Prepare and print Two-Year-Old Report.
  1. K VALMHDR,^TMP("BIREPT1",$J)
  1. D HDR^BIREPT1
  1. D START^BIREPT2(BIQDT,BITAR,BIAGRPS,.BICC,.BIHCF,.BICM,.BIBEN,BISITE,BIUP)
  1. D PRTLST^BIUTL8("BIREPT1"),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