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

BIREPH1.m

Go to the documentation of this file.
  1. BIREPH1 ;IHS/CMI/MWR - REPORT, H1N1 ACCOUNTABILITY; MAY 10, 2010
  1. ;;8.5;IMMUNIZATION;;SEP 01,2011
  1. ;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
  1. ;; VIEW OR PRINT H1N1 ACCOUNTABILITY REPORT.
  1. ;; PATCH 3: BIREPH* routines are completely new for H1N1 Report.
  1. ;
  1. ;
  1. ;----------
  1. START(BIX) ;EP
  1. ;---> Prepare and display or print Vaccine Accountability 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 - BIBEGDT (req) Begin date of report.
  1. ; 2 - BIENDDT (req) End date of report.
  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 - BIHIST (req) Include Historical (1=yes,0=no).
  1. ; 8 - BIVT (req) Visit Type array.
  1. ; 9 - BIPOP (ret) BIPOP=1 if error.
  1. ;
  1. ;---> Check for required Variables.
  1. I '$G(BIBEGDT) D ERROR(626) D RESET^BIREPH Q
  1. I '$G(BIENDDT) D ERROR(627) D RESET^BIREPH Q
  1. I '$D(BICC) D ERROR(614) D RESET^BIREPH Q
  1. I '$D(BIHCF) D ERROR(625) D RESET^BIREPH Q
  1. I '$D(BICM) D ERROR(615) D RESET^BIREPH Q
  1. I '$D(BIBEN) D ERROR(662) D RESET^BIREPH Q
  1. I '$D(BIHIST) D ERROR(663) D RESET^BIREPH Q
  1. I '$D(BIVT) D ERROR(664) D RESET^BIREPH Q
  1. ;
  1. D SETVARS^BIUTL5
  1. N VALMCNT
  1. I $G(BIX)="PRINT" D PRINT,RESET^BIREPH Q
  1. D EN
  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 VALMHDR,^TMP("BIREPH1",$J)
  1. N VALM,VALMHDR
  1. D HDR
  1. D GET^BIREPH2(BIBEGDT,BIENDDT,.BICC,.BIHCF,.BICM,.BIBEN,BIHIST,.BIVT)
  1. ;
  1. D PRTLST^BIUTL8("BIREPH1")
  1. D EXIT,RESET^BIREPH
  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 H1N11")
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. HDR ;EP
  1. ;---> Header code
  1. D HEAD^BIREPH2(BIBEGDT,BIENDDT,.BICC,.BIHCF,.BICM,.BIBEN,BIHIST,.BIVT)
  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. D GET^BIREPH2(BIBEGDT,BIENDDT,.BICC,.BIHCF,.BICM,.BIBEN,BIHIST,.BIVT)
  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. ;---> Help code.
  1. N BIX S BIX=X
  1. D FULL^VALM1
  1. W !!?5,"Use arrow keys to scroll up and down through the report, or"
  1. W !?5,"type ""??"" for more actions, such as Search and Print List."
  1. D DIRZ^BIUTL3(""," Press ENTER/RETURN to continue")
  1. D:BIX'="??" RE^VALM4
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. EXIT ;EP
  1. ;---> Cleanup, EOJ.
  1. K ^TMP("BIREPH1",$J),^TMP("BIDFN",$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^BIREPH1"
  1. D ZSAVES^BIUTL3
  1. D ZIS^BIUTL2(.BIPOP,1)
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. DEQUEUE ;EP
  1. ;---> Prepare and print Quarterly Report.
  1. K VALMHDR,^TMP("BIREPH1",$J)
  1. D HDR
  1. D GET^BIREPH2(BIBEGDT,BIENDDT,.BICC,.BIHCF,.BICM,.BIBEN,BIHIST,.BIVT)
  1. D PRTLST^BIUTL8("BIREPH1"),EXIT
  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