BIVGRP ;IHS/CMI/MWR - EDIT VACCINE GROUPS.; MAY 10, 2010
;;8.5;IMMUNIZATION;;SEP 01,2011
;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
;; EDIT VACCINE GROUPS TO TURN ON/OFF FORECASTING FOR EACH GROUP.
;
;
;
;----------
START ;EP
;---> Lookup Vaccines and edit their fields.
D SETVARS^BIUTL5 K ^TMP("BIVGRP",$J) N BITMP
;
;---> 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
D EN^VALM("BI VACCINE GROUP TABLE EDIT")
Q
;
;
;----------
PRINT ;EP
;---> Print Vaccine Table.
;---> Called by Protocol BI VACCINE TABLE PRINT, which is the
;---> Print List Protocol for the List: BI VACCINE TABLE EDIT.
;
D DEVICE(.BIPOP)
I $G(BIPOP) D RESET Q
;
D HDR(1),INIT^BIVGRP1
D PRTLST^BIUTL8("BIVGRP")
D RESET
Q
;
;
;----------
HDR(BIPRT) ;EP
;---> Header code for both Listman Screen and Print List.
;---> Parameters:
; 1 - BIPRT (opt) If BIPRT=1 array is for print: Change column
; header line and add Site Header line.
;
N BILINE,X,Y S BILINE=0 K VALMHDR
N BICRT S BICRT=$S(($E($G(IOST))="C")!(IOST["BROWSER"):1,1:0)
;
D WH^BIW(.BILINE)
S X=$$REPHDR^BIUTL6(DUZ(2)),BIDASH=$L(X)+2 D CENTERT^BIUTL5(.X)
D WH^BIW(.BILINE,X)
S X=$$SP^BIUTL5(BIDASH,"-") D CENTERT^BIUTL5(.X)
D WH^BIW(.BILINE,X)
;
S X="VACCINE GROUP FORCASTING" S:'$G(BIPRT) X="EDIT "_X D CENTERT^BIUTL5(.X)
S:BICRT X=IOINHI_X_IOINORM
D WH^BIW(.BILINE,X)
;
D:$G(BIPRT)
.S X=$$SP^BIUTL5(51)_"Printed: "_$$NOW^BIUTL5()
.D WH^BIW(.BILINE,X,1)
.S X=" # Vaccine Group Forecast"
.D WH^BIW(.BILINE,X)
Q
;
;
;----------
INIT ;EP
;---> Initialize variables and list array.
D INIT^BIVGRP1
Q
;
;
;----------
RESET ;EP
;---> Update partition for return to Listmanager.
I $D(VALMQUIT) S VALMBCK="Q" Q
D TERM^VALM0 S VALMBCK="R"
D INIT,HDR() Q
;
;
;----------
DEVICE(BIPOP) ;EP
;---> Get Device and possibly queue to Taskman.
;---> Parameters:
; 1 - BIPOP (ret) If error or Queue, BIPOP=1
;
K %ZIS,IOP S BIPOP=0
S ZTRTN="DEQUEUE^BIVGRP"
D ZSAVES^BIUTL3
D ZIS^BIUTL2(.BIPOP,1)
Q
;
;
;----------
DEQUEUE ;EP
;---> Print Patient Data screen.
D HDR(1),INIT^BIVGRP1
D PRTLST^BIUTL8("BIVGRP"),EXIT
Q
;
;
;----------
HELP ;EP
;---> Help code.
N BIX S BIX=X
D FULL^VALM1
W !!?5,"To turn On or Off forecasting for a Vaccine Group, enter ""C"" then enter"
W !?5,"the left column number of the Vaccine Group you wish to change."
D DIRZ^BIUTL3(""," Press ENTER/RETURN to continue")
D:BIX'="??" RE^VALM4
Q
;
;
;----------
EXPL ;EP
;----> Explanation of this report.
N BITEXT D TEXT1(.BITEXT)
D START^BIHELP("EDIT VACCINE GROUP TABLE - HELP",.BITEXT)
Q
;
;
;----------
TEXT1(BITEXT) ;EP
;;
;;This screen allows you to turn on or off forecasting for a particular
;;Vaccine Group.
;;
;;* CHANGE ALL THIS...IF USED. FOR NOW, NO "EXPLANATION" ON THIS LIST TEMPLATE.
;;
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()
K ^TMP("BIVGRP",$J)
D CLEAR^VALM1
D FULL^VALM1
;---> Update the Vaccine Edit Screen with any Vaccine Group changes.
D RESET^BIVACED
Q
BIVGRP ;IHS/CMI/MWR - EDIT VACCINE GROUPS.; MAY 10, 2010
+1 ;;8.5;IMMUNIZATION;;SEP 01,2011
+2 ;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
+3 ;; EDIT VACCINE GROUPS TO TURN ON/OFF FORECASTING FOR EACH GROUP.
+4 ;
+5 ;
+6 ;
+7 ;----------
START ;EP
+1 ;---> Lookup Vaccines and edit their fields.
+2 DO SETVARS^BIUTL5
KILL ^TMP("BIVGRP",$JOB)
NEW BITMP
+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 DO EN^VALM("BI VACCINE GROUP TABLE EDIT")
+2 QUIT
+3 ;
+4 ;
+5 ;----------
PRINT ;EP
+1 ;---> Print Vaccine Table.
+2 ;---> Called by Protocol BI VACCINE TABLE PRINT, which is the
+3 ;---> Print List Protocol for the List: BI VACCINE TABLE EDIT.
+4 ;
+5 DO DEVICE(.BIPOP)
+6 IF $GET(BIPOP)
DO RESET
QUIT
+7 ;
+8 DO HDR(1)
DO INIT^BIVGRP1
+9 DO PRTLST^BIUTL8("BIVGRP")
+10 DO RESET
+11 QUIT
+12 ;
+13 ;
+14 ;----------
HDR(BIPRT) ;EP
+1 ;---> Header code for both Listman Screen and Print List.
+2 ;---> Parameters:
+3 ; 1 - BIPRT (opt) If BIPRT=1 array is for print: Change column
+4 ; header line and add Site Header line.
+5 ;
+6 NEW BILINE,X,Y
SET BILINE=0
KILL VALMHDR
+7 NEW BICRT
SET BICRT=$SELECT(($EXTRACT($GET(IOST))="C")!(IOST["BROWSER"):1,1:0)
+8 ;
+9 DO WH^BIW(.BILINE)
+10 SET X=$$REPHDR^BIUTL6(DUZ(2))
SET BIDASH=$LENGTH(X)+2
DO CENTERT^BIUTL5(.X)
+11 DO WH^BIW(.BILINE,X)
+12 SET X=$$SP^BIUTL5(BIDASH,"-")
DO CENTERT^BIUTL5(.X)
+13 DO WH^BIW(.BILINE,X)
+14 ;
+15 SET X="VACCINE GROUP FORCASTING"
IF '$GET(BIPRT)
SET X="EDIT "_X
DO CENTERT^BIUTL5(.X)
+16 IF BICRT
SET X=IOINHI_X_IOINORM
+17 DO WH^BIW(.BILINE,X)
+18 ;
+19 IF $GET(BIPRT)
Begin DoDot:1
+20 SET X=$$SP^BIUTL5(51)_"Printed: "_$$NOW^BIUTL5()
+21 DO WH^BIW(.BILINE,X,1)
+22 SET X=" # Vaccine Group Forecast"
+23 DO WH^BIW(.BILINE,X)
End DoDot:1
+24 QUIT
+25 ;
+26 ;
+27 ;----------
INIT ;EP
+1 ;---> Initialize variables and list array.
+2 DO INIT^BIVGRP1
+3 QUIT
+4 ;
+5 ;
+6 ;----------
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
DO HDR()
QUIT
+5 ;
+6 ;
+7 ;----------
DEVICE(BIPOP) ;EP
+1 ;---> Get Device and possibly queue to Taskman.
+2 ;---> Parameters:
+3 ; 1 - BIPOP (ret) If error or Queue, BIPOP=1
+4 ;
+5 KILL %ZIS,IOP
SET BIPOP=0
+6 SET ZTRTN="DEQUEUE^BIVGRP"
+7 DO ZSAVES^BIUTL3
+8 DO ZIS^BIUTL2(.BIPOP,1)
+9 QUIT
+10 ;
+11 ;
+12 ;----------
DEQUEUE ;EP
+1 ;---> Print Patient Data screen.
+2 DO HDR(1)
DO INIT^BIVGRP1
+3 DO PRTLST^BIUTL8("BIVGRP")
DO EXIT
+4 QUIT
+5 ;
+6 ;
+7 ;----------
HELP ;EP
+1 ;---> Help code.
+2 NEW BIX
SET BIX=X
+3 DO FULL^VALM1
+4 WRITE !!?5,"To turn On or Off forecasting for a Vaccine Group, enter ""C"" then enter"
+5 WRITE !?5,"the left column number of the Vaccine Group you wish to change."
+6 DO DIRZ^BIUTL3(""," Press ENTER/RETURN to continue")
+7 IF BIX'="??"
DO RE^VALM4
+8 QUIT
+9 ;
+10 ;
+11 ;----------
EXPL ;EP
+1 ;----> Explanation of this report.
+2 NEW BITEXT
DO TEXT1(.BITEXT)
+3 DO START^BIHELP("EDIT VACCINE GROUP TABLE - HELP",.BITEXT)
+4 QUIT
+5 ;
+6 ;
+7 ;----------
TEXT1(BITEXT) ;EP
+1 ;;
+2 ;;This screen allows you to turn on or off forecasting for a particular
+3 ;;Vaccine Group.
+4 ;;
+5 ;;* CHANGE ALL THIS...IF USED. FOR NOW, NO "EXPLANATION" ON THIS LIST TEMPLATE.
+6 ;;
+7 DO LOADTX("TEXT1",,.BITEXT)
+8 QUIT
+9 ;
+10 ;
+11 ;----------
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()
+3 KILL ^TMP("BIVGRP",$JOB)
+4 DO CLEAR^VALM1
+5 DO FULL^VALM1
+6 ;---> Update the Vaccine Edit Screen with any Vaccine Group changes.
+7 DO RESET^BIVACED
+8 QUIT