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

BISITE3.m

Go to the documentation of this file.
  1. BISITE3 ;IHS/CMI/MWR - EDIT SITE PARAMETERS; MAY 10, 2010
  1. ;;8.5;IMMUNIZATION;**9**;OCT 01,2014
  1. ;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
  1. ;; EDIT SITE PARAMETERS.
  1. ; PATCH 2: Fix SET of default Low Supply Alert. LOTREQ+21
  1. ;; PATCH 8: Change to limit Pneumo prompt to 65 yrs. PNUFLU+10
  1. ;; PATCH 9: Add ability to edit IP address for TCH Forecaster. IPTCH
  1. ;
  1. ;
  1. ;----------
  1. FORECAS ;EP
  1. ;---> Edit the parameter that determines whether the ImmServe
  1. ;---> Forecasting utility is called ("enabled") or not.
  1. ;---> Called by Protocol BI SITE FORECAST ENABLE.
  1. ;
  1. Q:$$BISITE^BISITE2
  1. D FULL^VALM1,TITLE^BIUTL5("ENABLE/DISABLE FORECASTING"),TEXT1
  1. N BIDFLT,DIR,DIRUT,Y
  1. S DIR(0)="SOA^E:Enable;D:Disable"
  1. S DIR("A")=" Please select either Enable or Disable: "
  1. S DIR("B")=$S($$FORECAS^BIUTL2(BISITE):"Enable",1:"Disable")
  1. D ^DIR
  1. D:'$D(DIRUT)
  1. .N BIFLD,BIERR S BIFLD(.11)=Y
  1. .D FDIE^BIFMAN(9002084.02,BISITE,.BIFLD,.BIERR,1)
  1. .I BIERR]"" W !!?3,BIERR D DIRZ^BIUTL3()
  1. D RESET^BISITE
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. TEXT1 ;EP
  1. ;;
  1. ;;If the ImmServe Forecasting Utility is properly installed and
  1. ;;Immunizations Due should be forecast when viewing and editing
  1. ;;patient histories, printing Due Lists, etc., choose "Enable" below.
  1. ;;If the ImmServe Utility is not installed, choose "Disable" below.
  1. ;;
  1. ;;NOTE: If at any point in the software an <XCALL> error occurs,
  1. ;; this is due to the ImmServe Utility being called without
  1. ;; it being installed. In this case, either the ImmServe
  1. ;; Utility should be installed (see Installation Notes in
  1. ;; the Technical Manual), or this parameter should be Disabled.
  1. ;;
  1. D PRINTX("TEXT1")
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. DASHES ;EP
  1. ;---> Edit the parameter that determines whether Chart#s should
  1. ;---> be displayed with dashes inserted or not.
  1. ;---> Called by Protocol BI SITE CHART# DASHES.
  1. ;
  1. Q:$$BISITE^BISITE2
  1. D FULL^VALM1,TITLE^BIUTL5("DISPLAY CHART# WITH DASHES"),TEXT2
  1. N BIDFLT,DIR,DIRUT,Y
  1. S DIR(0)="SOA^0:No Dashes;1:Dashes Included"
  1. S DIR("A")=" Please select No Dashes or Dashes Included: "
  1. S DIR("B")=$S($$DASH^BIUTL1(BISITE):"Dashes Included",1:"No Dashes")
  1. D ^DIR
  1. D:'$D(DIRUT)
  1. .N BIFLD,BIERR S BIFLD(.12)=Y
  1. .D FDIE^BIFMAN(9002084.02,BISITE,.BIFLD,.BIERR)
  1. .I BIERR]"" W !!?3,BIERR D DIRZ^BIUTL3()
  1. D RESET^BISITE
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. TEXT2 ;EP
  1. ;;You may select whether Chart#'s (Health Record Numbers) are
  1. ;;displayed throughout the Immunization package with dashes or not.
  1. ;;
  1. ;;Chart# displayed without dashes..: 12345
  1. ;;Same Chart# displayed with dashes: 01-23-45
  1. ;;
  1. ;;
  1. D PRINTX("TEXT2")
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. OFFREC ;EP
  1. ;---> Select the Letter that will serve as the Official Immunization
  1. ;---> Record.
  1. ;---> Called by Protocol BI SITE OFFICIAL PT RECORD.
  1. ;
  1. Q:$$BISITE^BISITE2
  1. D FULL^VALM1,TITLE^BIUTL5("OFFICIAL IMMUNIZATION RECORD"),TEXT3
  1. D DIE^BIFMAN(9002084.02,".13",BISITE)
  1. D RESET^BISITE
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. TEXT3 ;EP
  1. ;;The Official Immunization Record is the letter that presents all of
  1. ;;a patient's Immunization information and is generally used to send
  1. ;;to schools, parents, other clinics, etc.
  1. ;;
  1. ;;The letter selected here will be used as the patient's Official
  1. ;;Immunization Record whenever users select that action.
  1. ;;
  1. ;;In order to select the letter for this Site Parameter, it must
  1. ;;already have been created. To create the Official Immunization
  1. ;;Record letter, select LET under the Manager Menu (MGR-->LET).
  1. ;;Create a new letter named "Official Immunization Record," and then
  1. ;;return to this site parameter to choose it.
  1. ;;
  1. D PRINTX("TEXT3")
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. PNUFLU ;EP
  1. ;---> Edit Pneumo, Flu, and Zoster site parameters. v8.5
  1. ;
  1. ;---> Edit the age at which adults should be forecast to receive
  1. ;---> pneumococcal vaccines.
  1. ;---> Called by Protocol BI SITE PNEUMO AGE.
  1. ;
  1. Q:$$BISITE^BISITE2
  1. D FULL^VALM1,TITLE^BIUTL5("EDIT AGE APPROPRIATE FOR PNEUMO"),TEXT4
  1. N BIDFLT,BIPOP,DIR,DIRUT,Y
  1. ;********** PATCH 8, v8.5, MAR 15,2014, IHS/CMI/MWR
  1. ;---> Only allow age range up to 65.
  1. ;S DIR(0)="NOA^1:9999:0"
  1. S DIR(0)="NOA^1:65:0"
  1. S DIR("A")=" Adult Age for Pneumo: "
  1. S DIR("B")=$P($$PNMAGE^BIPATUP2(BISITE),U)
  1. ;S DIR("?")=" Enter a number between 1 and 99 years of age."
  1. S DIR("?")=" Enter a number between 1 and 65 years of age."
  1. D ^DIR
  1. I $D(DIRUT) D RESET^BISITE Q
  1. ;
  1. N BIFLD,BIERR S BIFLD(.1)=+Y
  1. D FDIE^BIFMAN(9002084.02,BISITE,.BIFLD,.BIERR)
  1. I BIERR]"" W !!?3,BIERR D DIRZ^BIUTL3(),RESET^BISITE Q
  1. ;
  1. ;---> Flu Forecast for ALL question.
  1. ;D TITLE^BIUTL5("SELECT FLU FORECASTING AGES"),TEXT11
  1. ;N BIDFLT,BIHELP,BIHELP1,BIPRMPT,X,Y
  1. ;S BIPRMPT=" Forecast Flu vaccination for ALL patients"
  1. ;S BIHELP1=" Enter Yes to forecast Flu for ALL patients."
  1. ;S BIHELP=" Enter No to limit Flu forecasting (6m-18y, 50y+)."
  1. ;S BIDFLT=$S($$FLUALL^BIPATUP2(BISITE):"YES",1:"NO")
  1. ;W !
  1. ;D DIR^BIFMAN("YO",.Y,,BIPRMPT,BIDFLT,BIHELP,BIHELP1)
  1. ;I $G(Y)="^" D RESET^BISITE Q
  1. ;D DIE^BIFMAN(9002084.02,".27///"_Y,BISITE)
  1. ;
  1. ;---> Zoster Vaccine Forecast question.
  1. ;D TITLE^BIUTL5("SELECT FORECASTING FOR ZOSTER VACCINE"),TEXT12
  1. ;N BIDFLT,BIHELP,BIHELP1,BIPRMPT,X,Y
  1. ;S BIPRMPT=" Forecast Zoster vaccine for ALL patients over age 60"
  1. ;S BIHELP1=" Enter Yes to forecast Zoster vaccine for ALL patients over age 60."
  1. ;S BIHELP=" Enter No to disable Zoster vaccine forecasting."
  1. ;S BIDFLT=$S($$ZOSTER^BIPATUP2(BISITE):"YES",1:"NO")
  1. ;W !
  1. ;D DIR^BIFMAN("YO",.Y,,BIPRMPT,BIDFLT,BIHELP,BIHELP1)
  1. ;I $G(Y)="^" D RESET^BISITE Q
  1. ;D DIE^BIFMAN(9002084.02,".29///"_Y,BISITE)
  1. ;**********
  1. ;
  1. D RESET^BISITE
  1. Q
  1. ;
  1. ;---> q6-year parameter no longer used. Feb 2010.
  1. ;W !!?5,"For people "_+Y_" years of age and older, should Pneumo-PS"
  1. ;W !?5,"be routinely forecast every 6 years after the age of "_+Y_", "
  1. ;W !?5,"or should it be a one-time immunization?"
  1. ;S BIDFLT=$P($G(^BISITE(BISITE,0)),U,22)
  1. ;S BIDFLT=$S(BIDFLT:"YES",1:"NO")
  1. ;W !
  1. ;D DIR^BIFMAN("YO",.Y,.BIPOP," Forecast every 6 years",BIDFLT)
  1. ;D:'$G(BIPOP)
  1. ;.N BIFLD,BIERR S BIFLD(.22)=+Y
  1. ;.D FDIE^BIFMAN(9002084.02,BISITE,.BIFLD,.BIERR)
  1. ;.I BIERR]"" W !!?3,BIERR D DIRZ^BIUTL3()
  1. ;D RESET^BISITE
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. TEXT4 ;EP
  1. ;;Enter the adult age at which you wish pneumococcal immunizations
  1. ;;to be routinely forecast (prescribed). Typically this is set to
  1. ;;65 years of age.
  1. ;;
  1. D PRINTX("TEXT4")
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. TEXT11 ;EP
  1. ;;Influenza vaccine is recommend for ALL ages.
  1. ;;You can, however, choose to limit influenza vaccine forecasting to
  1. ;;patients ages 6 months to 18 years and to those 50 years and older.
  1. ;;
  1. ;;Do you wish to forecast Flu vaccination for ALL patients (over 6 months)?
  1. ;;
  1. D PRINTX("TEXT11")
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. TEXT12 ;EP
  1. ;;A single dose of Zoster vaccine vaccination is recommended for ALL
  1. ;;patients over 60 years of age.
  1. ;;
  1. ;;Do you wish to forecast Zoster vaccine for ALL patients over age 60?
  1. ;;
  1. D PRINTX("TEXT12")
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. DEFPRV ;EP
  1. ;---> Edit the parameter that determines whether the User
  1. ;---> should appear as the Default Provider.
  1. ;---> Called by Protocol BI SITE DEFAULT PROVIDER.
  1. ;
  1. Q:$$BISITE^BISITE2
  1. D FULL^VALM1,TITLE^BIUTL5("USER AS DEFAULT PROVIDER"),TEXT5
  1. N BIDFLT,DIR,DIRUT,Y
  1. S DIR(0)="SOA^0:No;1:Yes"
  1. S DIR("A")=" Should the User appear as the Default Provider: "
  1. S DIR("B")=$S($$DEFPROV^BIUTL6(BISITE):"Yes",1:"No")
  1. D ^DIR
  1. D:'$D(DIRUT)
  1. .N BIFLD,BIERR S BIFLD(.16)=Y
  1. .D FDIE^BIFMAN(9002084.02,BISITE,.BIFLD,.BIERR,1)
  1. .I BIERR]"" W !!?3,BIERR D DIRZ^BIUTL3()
  1. D RESET^BISITE
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. TEXT5 ;EP
  1. ;;When new Immunizations or new Skin Tests are being added,
  1. ;;it is possible to have the User appear as the Default Provider.
  1. ;;In other words, when the screen for a new Visit first comes up,
  1. ;;the Provider field is already filled in with the User's name.
  1. ;;(The User is the person logged on and entering the data.)
  1. ;;
  1. ;;This will ONLY occur if the User is a Provider (has been given
  1. ;;the Provider Key). This will NOT occur on edits of pre-existing
  1. ;;Visits, whether they have a Provider or not.
  1. ;;
  1. D PRINTX("TEXT5")
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. IMMSVDIR ;EP
  1. ;---> Edit the parameter indicating the Immserve Directory.
  1. ;
  1. K BIDFLT,DIR,DIRUT,X,Y
  1. ;
  1. ;********** PATCH 8, v8.5, MAR 15,2014, IHS/CMI/MWR
  1. ;---> The Immserve Directory is no longer relevant.
  1. D TITLE^BIUTL5("INDICATE IMMSERVE DIRECTORY")
  1. W !!?20,"This parameter is no longer in use.",!!
  1. D DIRZ^BIUTL3()
  1. D RESET^BISITE
  1. Q
  1. ;**********
  1. ;
  1. D TITLE^BIUTL5("INDICATE IMMSERVE DIRECTORY"),TEXT7
  1. S DIR(0)="FOA^3:70"
  1. S DIR("A")=" "
  1. S DIR("B")=$$IMMSVDIR^BIUTL8(BISITE)
  1. S X=" Enter the path for ImmServe files. Simply enter the directory"
  1. S DIR("?",1)=X
  1. S X=" name with its path. Terminate the path with a slash."
  1. S DIR("?")=X K X
  1. D ^DIR
  1. S:Y="" Y="@"
  1. S Z=0
  1. D CHKSLASH^BISITE2(.Y,.Z)
  1. G:Z IMMSVDIR
  1. D:'$D(DIRUT)
  1. .N BIFLD,BIERR S BIFLD(.18)=Y
  1. .D FDIE^BIFMAN(9002084.02,BISITE,.BIFLD,.BIERR)
  1. .I BIERR]"" W !!?3,BIERR D DIRZ^BIUTL3()
  1. D RESET^BISITE
  1. Q
  1. ;
  1. ;
  1. ;********** PATCH 9, v8.5, OCT 01,2014, IHS/CMI/MWR
  1. ;---> Add ability to edit IP address for TCH Forecaster.
  1. IPTCH ;EP
  1. D TITLE^BIUTL5("INDICATE IP ADDRESS FOR TCH FORECASTER"),TEXT13
  1. N DIR,DIRUT,X
  1. S DIR(0)="FOA^7:25",DIR("A")=" "
  1. D
  1. .N Y S Y=$$IPTCH^BIUTL8(BISITE)
  1. .I Y]"" S DIR("B")=Y Q
  1. .S DIR("B")="127.0.0.1"
  1. S DIR("?")=" Enter the IP address of the machine hosting the TCH Forecaster."
  1. D ^DIR
  1. ;W R ZZZ
  1. I X="^" D RESET^BISITE Q
  1. S:X="@" Y="127.0.0.1" K DIRUT
  1. D:'$D(DIRUT)
  1. .N BIFLD,BIERR S BIFLD(.30)=Y
  1. .D FDIE^BIFMAN(9002084.02,BISITE,.BIFLD,.BIERR)
  1. .I BIERR]"" W !!?3,BIERR D DIRZ^BIUTL3()
  1. D RESET^BISITE
  1. Q
  1. ;
  1. ;----------
  1. TEXT13 ;EP
  1. ;;Enter the IP Address of the server hosting the TCH Forecaster.
  1. ;;A typical installation has the forecaster running on the same
  1. ;;machine as Ensemble, EHR and RPMS. In that case the address
  1. ;;would be 127.0.0.1 (which is the default).
  1. ;;
  1. ;;However, if your network is configured correctly, RPMS can access the
  1. ;;TCH Forecaster hosted on another machine at a different IP address.
  1. ;;
  1. ;;Enter a different IP address for the TCH Forecaster below, if you wish
  1. ;;to change it:
  1. ;;
  1. D PRINTX("TEXT13")
  1. Q
  1. ;**********
  1. ;
  1. ;----------
  1. TEXT7 ;EP
  1. ;;
  1. ;;Enter or edit, if necessary, the full path of the directory in which
  1. ;;the ImmServe Files will be stored. (Path length may not be more than
  1. ;;70 characters long.)
  1. ;;
  1. ;;For Immunization v8.1 the settings should be:
  1. ;;
  1. ;; AIX: /usr/local/immserve84/
  1. ;; NT/XP: C:\Program Files\Immserve84\
  1. ;;
  1. ;;
  1. ;;Enter or edit the Immserve Directory Path below:
  1. ;;
  1. D PRINTX("TEXT7")
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. LOTREQ ;EP
  1. ;---> Edit the parameter for whether Lot Numbers should be required.
  1. ;---> Called by Protocol BI SITE LOT# REQ'D.
  1. ;
  1. Q:$$BISITE^BISITE2
  1. D FULL^VALM1,TITLE^BIUTL5("LOT NUMBER REQUIRED"),TEXT9
  1. N BIDFLT,DIR,DIRUT,Y
  1. S DIR(0)="SOA^Y:YES;N:NO"
  1. S DIR("A")=" Please select either Yes or No: "
  1. S DIR("B")=$S($$LOTREQ^BIUTL2(BISITE):"Yes",1:"No")
  1. D ^DIR
  1. D:'$D(DIRUT)
  1. .N BIFLD,BIERR S BIFLD(.09)=Y
  1. .D FDIE^BIFMAN(9002084.02,BISITE,.BIFLD,.BIERR,1)
  1. .I BIERR]"" W !!?3,BIERR D DIRZ^BIUTL3()
  1. ;
  1. D FULL^VALM1,TITLE^BIUTL5("LOT NUMBER LOW SUPPLY ALERT"),TEXT10
  1. N BIDFLT,DIR,DIRUT,Y
  1. S DIR(0)="NOA^0:9999"
  1. S DIR("A")=" Please enter a Low Supply Alert number: "
  1. ;
  1. ;********** PATCH 2, v8.5, MAY 15,2012, IHS/CMI/MWR
  1. ;---> Fix SET of default Low Supply Alert.
  1. ;S DIR("B")=$$LOTLOW^BIUTL2(BISITE)
  1. S DIR("B")=$$LOTSDEF^BISITE1(BISITE)
  1. ;**********
  1. ;
  1. D ^DIR
  1. D:'$D(DIRUT)
  1. .N BIFLD,BIERR S BIFLD(.25)=Y
  1. .D FDIE^BIFMAN(9002084.02,BISITE,.BIFLD,.BIERR,1)
  1. .I BIERR]"" W !!?3,BIERR D DIRZ^BIUTL3()
  1. D RESET^BISITE
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. TEXT9 ;EP
  1. ;;
  1. ;;If Lot Numbers should be required when entering Immunization visits,
  1. ;;enter YES for this parameter. If Lot Numbers should be optional,
  1. ;;enter NO.
  1. ;;
  1. ;;Note: Lot Numbers will NOT be required for Immunizations with a
  1. ;; Category of "Historical Event", even if this site parameter
  1. ;; is to YES.
  1. ;;
  1. ;;
  1. D PRINTX("TEXT9")
  1. Q
  1. ;
  1. ;
  1. ;---------- vvv83
  1. TEXT10 ;EP
  1. ;;
  1. ;;When the number of remaining doses of a given Lot falls below
  1. ;;its Low Supply Alert (set by the manager when editing Lot Numbers),
  1. ;;a "Low Supply Alert" will pop up on the screen as a user is
  1. ;;adding or editing an immunization with that particular Lot Number.
  1. ;;
  1. ;;The number entered here, under the Site Parameters, is the Low
  1. ;;Supply Alert DEFAULT. In the absence of a specific Low Supply Alert
  1. ;;for a given Lot Number, this Default will be used.
  1. ;;
  1. ;;NOTE: No alert will occur if a "Starting Amount" has not been entered
  1. ;;for the particular Lot Number in the EDIT LOT NUMBER TABLE.
  1. ;;
  1. ;;
  1. D PRINTX("TEXT10")
  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