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

BICMGR.m

Go to the documentation of this file.
  1. BICMGR ;IHS/CMI/MWR - ADD/EDIT CASE MANAGER; MAY 10, 2010
  1. ;;8.5;IMMUNIZATION;;SEP 01,2011
  1. ;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
  1. ;; CALLED BY OPTION: "BI CASE MANAGERS ADD/EDIT" TO ADD OR
  1. ;; DEACTIVATE CASE MANAGERS.
  1. ;
  1. ;
  1. ;----------
  1. START ;EP
  1. ;---> DIE Add/Edit Case Managers.
  1. D SETVARS^BIUTL5
  1. N Y
  1. F D Q:$G(Y)<0
  1. .D TITLE^BIUTL5("ADD/EDIT CASE MANAGERS")
  1. .D TEXT1
  1. .D DIC^BIFMAN(9002084.01,"QEMAL",.Y," Select CASE MANAGER: ")
  1. .Q:Y<0
  1. .D DIE^BIFMAN(9002084.01,.02,+Y,.BIPOP)
  1. .S:BIPOP Y=-1
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. TEXT1 ;EP
  1. ;;This option allows you to add new Case Managers, so that they can
  1. ;;be selected when editing a patient's Case Data.
  1. ;;
  1. ;;You may also add a "DATE INACTIVATED" here for a Case Manager who
  1. ;;is no longer active in your program. ANY DATE in a Case Manager's
  1. ;;Date Inactivated field will prevent that Case Manager from being
  1. ;;selected when editing a patient's Case Data.
  1. ;;
  1. ;;Occasionally, you may want to RE-activate a Case Manager. You may
  1. ;;do this by deleting the date in the DATE INACTIVATED field (enter
  1. ;;@ at the DATE INACTIVATED prompt).
  1. ;;
  1. ;;
  1. D PRINTX("TEXT1")
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. TRANS ;EP
  1. ;---> Transfer one Case Manager's patients to another Case Manager.
  1. ;
  1. D TITLE^BIUTL5("TRANSFER A CASE MANAGER'S PATIENTS")
  1. D TEXT2
  1. D DIC^BIFMAN(9002084.01,"QEMA",.Y," Select OLD CASE MANAGER: ")
  1. Q:Y<0
  1. S BICMGR=+Y
  1. D DIC^BIFMAN(9002084.01,"QEMA",.Y," Select NEW CASE MANAGER: ")
  1. Q:Y<0
  1. S BICMGR1=+Y
  1. W !!?3,"All patients currently assigned to: ",$$PERSON^BIUTL1(BICMGR)
  1. W !?3,"will be reassigned to.............: ",$$PERSON^BIUTL1(BICMGR1)
  1. ;
  1. W !!?3,"Do you wish to proceed?"
  1. S DIR("?")=" Enter YES to swap Case Managers."
  1. S DIR(0)="Y",DIR("A")=" Enter Yes or No"
  1. D ^DIR W !
  1. Q:$D(DIRUT)!('Y)
  1. N BILOCK S BILOCK=0
  1. S N=0,M=0
  1. F S N=$O(^BIP("C",BICMGR,N)) Q:'N D
  1. .N BIPOP S BIPOP=0
  1. .D DIE^BIFMAN(9002084,".1////"_BICMGR1,N,.BIPOP,1)
  1. .I BIPOP S BILOCK=1 Q
  1. .S M=M+1
  1. ;
  1. W !?3,M," patients transferred from ",$$PERSON^BIUTL1(BICMGR)
  1. W " to ",$$PERSON^BIUTL1(BICMGR1),"."
  1. ;---> If some patients were locked, notify user.
  1. D:BILOCK TEXT3
  1. D DIRZ^BIUTL3()
  1. D EXIT
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. TEXT2 ;EP
  1. ;;The purpose of this utility is to aid in the transfer of all of one
  1. ;;Case Manager's patients to another Case Manager, such as when there
  1. ;;is a turnover in staff. The program will ask you for an "OLD" Case
  1. ;;Manager and then for a "NEW" Case Manager. All patients who were
  1. ;;previously assigned to the "OLD" Case Manager will be reassigned to
  1. ;;the "NEW" Case Manager.
  1. ;;
  1. ;;If the "NEW" Case Manager you are looking for cannot be selected,
  1. ;;that person must first be added to the file of Case Managers by
  1. ;;using the "Add/Edit Case Managers" option.
  1. ;;
  1. D PRINTX("TEXT2")
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. TEXT3 ;EP
  1. ;;
  1. ;;NOTE! One or more patients were being edited by another user during
  1. ;; this transfer. Those patients did not get reassigned.
  1. ;; This transfer should be run again later to pick up any
  1. ;; remaining patients.
  1. D PRINTX("TEXT3",3)
  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
  1. ;
  1. ;
  1. ;----------
  1. EXIT ;EP
  1. ;---> End of job cleanup.
  1. D KILLALL^BIUTL8()
  1. Q