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

DGREGFAC.m

Go to the documentation of this file.
  1. DGREGFAC ;BAY/JT; 12/18/03 8:16am ; 12/18/03 9:55am
  1. ;;5.3;Registration;**574**;Aug 13, 1993
  1. DIVCHK(DFN,DFN1) ; call to validate 'facility applying to' (division)
  1. ; DFN = ien of patient file
  1. ; DFN1 = ien of Disposition multiple
  1. ; returns 1 if division is inactive, 0 otherwise
  1. ;
  1. N DGDIV,DGINST
  1. I '$G(DFN)!('$G(DFN1)) Q 0
  1. ; site not multi-divisional
  1. I $P($G(^DG(43,1,"GL")),U,2)=0 Q 0
  1. ; determine division chosen
  1. S DGDIV=$P($G(^DPT(DFN,"DIS",DFN1,0)),U,4)
  1. I DGDIV'>0 Q 0
  1. ; division has no pointer to Institution file
  1. I $P($G(^DG(40.8,DGDIV,0)),U,7)'>0 Q 1
  1. S DGINST=$P($G(^DG(40.8,DGDIV,0)),U,7)
  1. ; Institution file is inactive
  1. I $P($G(^DIC(4,DGINST,99)),U,4)=1 Q 1
  1. Q 0