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

TIUEN113.m

Go to the documentation of this file.
  1. TIUEN113 ; SLC/JAK - Environment Check for TIU*1*113 ;28-AUG-2001 08:43
  1. ;;1.0;TEXT INTEGRATION UTILITIES;**113**;Jun 20, 1997
  1. MAIN ; -- Control Unit
  1. ; Check all Hospital Location entries for division and all
  1. ; Medical Center Division entries for institution file pointer;
  1. ; if not all data present, quit
  1. ;
  1. N CHKOK,TIULOC S CHKOK=1,TIULOC=0
  1. W !!,"Checking DIVISION for all Hospital Location file (#44)"
  1. W !,"entries <AND> INSTITUTION FILE POINTER for all Medical"
  1. W !,"Center Division file (#40.8) entries..."
  1. W !!
  1. ;
  1. F S TIULOC=$O(^SC(TIULOC)) Q:'TIULOC!('CHKOK) D
  1. . N TIUDVHL
  1. . S TIUDVHL=+$P($G(^SC(TIULOC,0)),U,15) I 'TIUDVHL S CHKOK=0 Q
  1. I CHKOK=1 D
  1. . N TIUDIV,TIUIFP S TIUDIV=0
  1. . F S TIUDIV=$O(^DG(40.8,TIUDIV)) Q:'TIUDIV!('CHKOK) D
  1. . . S TIUIFP=+$G(^DG(40.8,"ADV",TIUDIV)) I 'TIUIFP S CHKOK=0 Q
  1. ;
  1. I 'CHKOK D
  1. . S XPDQUIT=1 ; kill transport global from ^XTMP
  1. . W !,"Sorry...DIVISION cannot be determined for all Hospital"
  1. . W !,"Location file (#44) entries <AND/OR> INSTITUTION FILE"
  1. . W !,"POINTER cannot be determined for all Medical Center"
  1. . W !,"Division file (#40.8) entries. Please review and correct"
  1. . W !,"both files as necessary."
  1. . W !!,"** ABORTING INSTALLATION **"
  1. E D
  1. . W !,"** Files are OK **"
  1. Q