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

BIELIG.m

Go to the documentation of this file.
  1. BIELIG ;IHS/CMI/MWR - EDIT ELIGIBILITY CODES.; MAY 10, 2010
  1. ;;8.5;IMMUNIZATION;**3**;SEP 10,2012
  1. ;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
  1. ;; EDIT ELIGIBILITY FIELDS: ACTIVE, LOCAL TEXT, REPORT ABBREVIATION.
  1. ;; PATCH 3: This entire routine to edit Eligibility Codes is new.
  1. ;
  1. ;
  1. ;----------
  1. START ;EP
  1. ;---> Lookup Eligibility Codes and edit their fields.
  1. D SETVARS^BIUTL5 K ^TMP("BIELIG",$J) N BIELIG,BITMP
  1. D EN
  1. D EXIT
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. EN ;EP
  1. D EN^VALM("BI ELIGIBILITY TABLE EDIT")
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. PRINT ;EP
  1. ;---> Print Eligibility Table.
  1. ;---> Called by Protocol BI VACCINE TABLE PRINT, which is the
  1. ;---> Print List Protocol for the List: BI VACCINE TABLE EDIT.
  1. ;
  1. D DEVICE(.BIPOP)
  1. I $G(BIPOP) D RESET Q
  1. ;
  1. D HDR(1),INIT^BIELIG1
  1. D PRTLST^BIUTL8("BIELIG")
  1. D RESET
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. HDR(BIPRT) ;EP
  1. ;---> Header code for both Listman Screen and Print List.
  1. ;---> Parameters:
  1. ; 1 - BIPRT (opt) If BIPRT=1 array is for print: Change column
  1. ; header line and add Site Header line.
  1. ;
  1. N BILINE,X,Y S BILINE=0 K VALMHDR
  1. N BICRT S BICRT=$S(($E($G(IOST))="C")!(IOST["BROWSER"):1,1:0)
  1. ;
  1. D WH^BIW(.BILINE)
  1. S X=$$REPHDR^BIUTL6(DUZ(2)),BIDASH=$L(X)+2 D CENTERT^BIUTL5(.X)
  1. D WH^BIW(.BILINE,X)
  1. S X=$$SP^BIUTL5(BIDASH,"-") D CENTERT^BIUTL5(.X)
  1. D WH^BIW(.BILINE,X)
  1. ;
  1. S X="ELIGIBILITY CODE TABLE" S:'$G(BIPRT) X="EDIT "_X D CENTERT^BIUTL5(.X)
  1. S:BICRT X=IOINHI_X_IOINORM
  1. D WH^BIW(.BILINE,X)
  1. ;
  1. D:$G(BIPRT)
  1. .S X=$$SP^BIUTL5(51)_"Printed: "_$$NOW^BIUTL5()
  1. .D WH^BIW(.BILINE,X,1)
  1. .S X=" # Eligibility Code Label of Cdoe Status Local Text Report Text"
  1. .D WH^BIW(.BILINE,X)
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. INIT ;EP
  1. ;---> Initialize variables and list array.
  1. D INIT^BIELIG1
  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. 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^BIELIG"
  1. D ZSAVES^BIUTL3
  1. D ZIS^BIUTL2(.BIPOP,1)
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. DEQUEUE ;EP
  1. ;---> Print Patient Data screen.
  1. D HDR(1),INIT^BIELIG1
  1. D PRTLST^BIUTL8("BIELIG"),EXIT
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. HELP ;EP
  1. ;---> Help code.
  1. N BIX S BIX=X
  1. D FULL^VALM1
  1. W !!?5,"Enter ""E"" to edit a Eligibility Code, enter ""C"" to change the order of"
  1. W !?5,"the list, ""H"" to view the full help text for the Eligibility list and"
  1. W !?5,"its parameters, ""F"" to turn on/off the forecasting of vaccines"
  1. W !?5,"and enter ""P"" to print the list."
  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.
  1. N BITEXT D TEXT1(.BITEXT)
  1. D START^BIHELP("EDIT VACCINE TABLE - HELP",.BITEXT)
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. TEXT1(BITEXT) ;EP
  1. ;;
  1. ;;This screen allows you to edit 3 fields for each Eligibility Code.
  1. ;;To Edit a particular Code, type "E", then select the left
  1. ;;column number that corresponds to the Code you wish to edit.
  1. ;;
  1. ;;* Active/Inactive - If a Code is set to "Inactive", users will
  1. ;; not be able to select this Elligibility Code when entering or
  1. ;; editing immunizations. However, previous immunizations with
  1. ;; Code will continue to display it.
  1. ;;
  1. ;;* Local Text - This is an optional, locally meaningful text that
  1. ;; may be entered to help staff recognize Codes. It may be the
  1. ;; proper name of a local or State program, a regional or clinic
  1. ;; name, or whatever is helpful. It may be up to 20 characters
  1. ;; in length. It is not exported, nor does it appear anywhere
  1. ;; except during the Eligibility Code selection (along side the
  1. ;; true Code) when immunizations are entered or edited.
  1. ;;
  1. ;;* Report Abbreviation - This is an optional, locally meaningful text
  1. ;; that can be entered to help make information in the Eligibility
  1. ;; Report more recognizable. Text entered here will show up in
  1. ;; the fourth column of the Vaccine Eligibility Report. (If no Report
  1. ;; Abbreviation has been entered, then the standard Eligibility Code
  1. ;; will appear in column four of the report.)
  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. K ^TMP("BIELIG",$J)
  1. D CLEAR^VALM1
  1. D FULL^VALM1
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. ELIGC(IEN,FORM) ;EP
  1. ;---> Return Eligibility values from BI TABLE ELIGIBILITY CODES File.
  1. ;---> Parameters:
  1. ; 1 - IEN (req) IEN of Elig Code.
  1. ; 2 - FORM (opt) FORM of Code to return:
  1. ; 1=Actual Code (also default)
  1. ; 2=Label Text of Code
  1. ; 3=Active/Inactive Status (1
  1. ; 4=Local Text
  1. ; 5=Local Report Abbreviation
  1. ;
  1. Q:'$G(IEN) ""
  1. Q:'$D(^BIELIG(IEN,0)) "NO GLOBAL"
  1. N Y S Y=^BIELIG(IEN,0)
  1. ;
  1. Q:$G(FORM)=2 $P(Y,U,2)
  1. Q:$G(FORM)=3 $P(Y,U,3)
  1. Q:$G(FORM)=4 $P(Y,U,4)
  1. Q:$G(FORM)=5 $P(Y,U,5)
  1. Q:$G(FORM)=6 $S($P(Y,U,5)]"":$P(Y,U,5),1:$P(Y,U))
  1. Q $P(Y,U)