source: FOIAVistA/tag/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGREGFAC.m@ 1569

Last change on this file since 1569 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 684 bytes
Line 
1DGREGFAC ;BAY/JT; 12/18/03 8:16am ; 12/18/03 9:55am
2 ;;5.3;Registration;**574**;Aug 13, 1993
3DIVCHK(DFN,DFN1) ; call to validate 'facility applying to' (division)
4 ; DFN = ien of patient file
5 ; DFN1 = ien of Disposition multiple
6 ; returns 1 if division is inactive, 0 otherwise
7 ;
8 N DGDIV,DGINST
9 I '$G(DFN)!('$G(DFN1)) Q 0
10 ; site not multi-divisional
11 I $P($G(^DG(43,1,"GL")),U,2)=0 Q 0
12 ; determine division chosen
13 S DGDIV=$P($G(^DPT(DFN,"DIS",DFN1,0)),U,4)
14 I DGDIV'>0 Q 0
15 ; division has no pointer to Institution file
16 I $P($G(^DG(40.8,DGDIV,0)),U,7)'>0 Q 1
17 S DGINST=$P($G(^DG(40.8,DGDIV,0)),U,7)
18 ; Institution file is inactive
19 I $P($G(^DIC(4,DGINST,99)),U,4)=1 Q 1
20 Q 0
Note: See TracBrowser for help on using the repository browser.