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

BIPATCO.m

Go to the documentation of this file.
  1. BIPATCO ;IHS/CMI/MWR - EDIT CONTRAINDICATIONS; MAY 10, 2010
  1. ;;8.5;IMMUNIZATION;;SEP 01,2011
  1. ;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
  1. ;; EDIT PATIENT'S CONTRAINDICATIONS THROUGH LISTMANAGER.
  1. ;
  1. ;
  1. ;----------
  1. START ;EP
  1. ;---> Lookup patients and Add/Edit their Contraindications.
  1. ;---> NOT CALLED BY ANY MENU OPTION AT THIS POINT.
  1. ;
  1. D SETVARS^BIUTL5 N BIDFN
  1. F D Q:$G(BIDFN)<1
  1. .D TITLE^BIUTL5("ADD/EDIT CONTRAINDICAIONS")
  1. .D PATLKUP^BIUTL8(.BIDFN)
  1. .Q:$G(BIDFN)<1
  1. .D EN(BIDFN)
  1. D EXIT
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. HAVEPAT(BIDFN) ;EP
  1. ;---> Entry point when patient already known.
  1. D SETVARS^BIUTL5
  1. K ^TMP("BILMCO",$J)
  1. D EN(BIDFN)
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. EN(BIDFN) ;EP
  1. ;---> Entry point called by Protocol BI CONTRAINDICATIONS.
  1. ; 1 - BIDFN (req) Patient's IEN in VA PATIENT File #2.
  1. ;
  1. ;---> If <STKOV> errors appear here, increase STACK in SYSGEN,
  1. ;---> System Configuration Parameters.
  1. ;
  1. ;---> Quit if BIDFN not provided.
  1. I '$G(BIDFN) D ERRCD^BIUTL2(206,,1) Q
  1. ;
  1. ;---> Quit if this patient is Locked (being edited by another user).
  1. L +^BIP(BIDFN):0 I '$T D ERRCD^BIUTL2(212,,1) Q
  1. N BIDFNSAV S BIDFNSAV=BIDFN
  1. D
  1. .N BIDFNSAV
  1. .D EN^VALM("BI PATIENT CONTRAINDICATIONS")
  1. ;
  1. ;---> Unlock Patient.
  1. S BIDFN=BIDFNSAV
  1. L -^BIP(BIDFN)
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. HDR ;EP
  1. ;---> Header code.
  1. Q:'$D(BIDFN)
  1. N X,Y
  1. S VALMHDR(1)=""
  1. S Y=$E($$NAME^BIUTL1(BIDFN),1,25)
  1. S X=" Patient: "_IORVON_Y_IOINORM
  1. S X=X_$$SP^BIUTL5(27-$L(Y))_"DOB: "_IORVON_$$DOBF^BIUTL1(BIDFN)_IOINORM
  1. S VALMHDR(2)=X
  1. ;
  1. S X=" Chart#: "_IORVON_$$HRCN^BIUTL1(BIDFN)
  1. S Y=$E($$INSTTX^BIUTL6($G(DUZ(2))),1,17)
  1. S X=X_" at "_Y_IOINORM
  1. S X=X_$$SP^BIUTL5(20-$L(Y))_$$ACTIVE^BIUTL1(BIDFN)
  1. S X=X_" "_$$SEXW^BIUTL1(BIDFN)
  1. S VALMHDR(3)=X
  1. ;
  1. ;---> Set Screen Title.
  1. S VALM("TITLE")="CONTRAIND (IMM v"_$$VER^BILOGO_")"
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. INIT ;EP
  1. ;---> Initialize variables and list array.
  1. D INIT^BIPATCO1
  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. W !!?5,"Enter ""H"" for Help with this feature or ""??"" for more options."
  1. D DIRZ^BIUTL3()
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. HELP1 ;EP
  1. ;----> Explanation of this report.
  1. N BITEXT D TEXT1(.BITEXT)
  1. D START^BIHELP("CONTRAINDICATION SCREEN - HELP",.BITEXT)
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. TEXT1(BITEXT) ;EP
  1. ;;This is the Patient Contraindication Screen, the point from
  1. ;;which you add or delete the patient's contraindications.
  1. ;;
  1. ;;The TOP of the screen lists the patient's demographic information,
  1. ;;most of which is edited through the RPMS Patient Registration.
  1. ;;
  1. ;;The MIDDLE of the screen lists any Contraindications to vaccines
  1. ;;that the patient may have, along with the Reason for the
  1. ;;contraindication and the Date it was Noted.
  1. ;;
  1. ;;The BOTTOM of the screen provides the Actions to Add or Delete
  1. ;;Contraindications, or to view this Explanation.
  1. ;;
  1. ;;Contraindications added for the patient here will cause the
  1. ;;contraindicated vaccine to be eliminated from the Forecast
  1. ;;(in the right column of the main Patient View screen).
  1. ;;
  1. ;;HOWEVER, if the Reason chosen for a Contraindication is
  1. ;;"Patient Refusal", the vaccine will NOT be eliminated from
  1. ;;the Forecast.
  1. ;;
  1. ;;If you choose "Immune Deficiency," then MMR, Varicella, OPV, and
  1. ;;Flu-Nasal (all live vaccines) are automatically contraindicated.
  1. ;;
  1. ;;NOTE: You may select TST-PPD INTRADERMAL (PPD) as the "vaccine."
  1. ;;In this case, the only reason selectable will be "Positive TB Skin Test."
  1. ;;This allows the system to display a contraindication to future PPD tests.
  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. ;---> EOJ cleanup.
  1. K ^TMP("BILMCO",$J) D KILLALL^BIUTL8()
  1. D CLEAR^VALM1
  1. D FULL^VALM1
  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