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

BGUGFAC.m

Go to the documentation of this file.
  1. BGUGFAC ; IHS/OIT/MJL - GETS FACILITIES FOR A USER ;
  1. ;;1.5;BGU;;MAY 26, 2005
  1. GETFC(DUZ) ;EP Called by BGUXUSRB
  1. ;Gets all facilities for a user
  1. ; Input DUZ - user IEN from the NEW PERSON FILE
  1. ; Output - Number of facilities;facility1 name&facility1 IEN;...facilityN&facilityN IEN
  1. S U="^",BGUFN=0,BGUFACS="" F BGUN=1:1 S BGUFN=$O(^VA(200,DUZ,2,BGUFN)) Q:'BGUFN D GETFC1
  1. I BGUN=1 S BGUFN=$P(^AUTTSITE(1,0),U,1) D GETFC1
  1. S BGUFACS=BGUN-(BGUN>1)_";"_BGUFACS
  1. K BGUN,BGUFN
  1. Q BGUFACS
  1. GETFC1 ;
  1. S:BGUN>1 BGUFACS=BGUFACS_";" S BGUFACS=BGUFACS_$P(^DIC(4,BGUFN,0),U,1)_"&"_BGUFN
  1. Q