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

MCARENV.m

Go to the documentation of this file.
  1. MCARENV ;WISC/MLH-MEDICINE PACKAGE INSTALLATION-ENVIRONMENT CHECK ROUTINE #1 ;10/19/92 09:31
  1. ;;2.3;Medicine;;09/13/1996
  1. ;
  1. N AA,DDR,BB,FOUND
  1. W:$D(IOF) @IOF ; clear screen
  1. W !,"ENVIRONMENT CHECK:"
  1. ;
  1. ; Look at every file in Medicine (690-701 inclusive) for pointers
  1. ; to files 3-6-16. If any exist, stop here and instruct the user
  1. ; to repoint these entries to File 200 (NEW PERSON).
  1. W !,"Before initialization, this routine will verify whether the"
  1. W !,"package file entries have been converted to the NEW PERSON file."
  1. W !!,"Checking..."
  1. S (FOUND,END)=0
  1. S AA=690
  1. FOR D Q:FOUND!END
  1. . W "." ; let user know we're making progress
  1. . S BB=0
  1. . FOR S BB=$O(^DD(AA,BB)) Q:'BB D Q:FOUND
  1. .. S DDR=^DD(AA,BB,0) ; main data dictionary record
  1. .. F II=1:1:4 S DDR(II)=$P(DDR,"^",II)
  1. .. ;
  1. .. S FIL=$P($P(DDR(3),"DIC(",2),",",1)
  1. .. I (FIL=3)!(FIL=6)!(FIL=16) S FOUND=1
  1. .. Q
  1. . ;END FOR
  1. . IF 'FOUND D
  1. .. S AA=$O(^DD(AA))
  1. .. I 'AA!(AA'<705) S END=1
  1. .. Q
  1. . ;END IF
  1. . Q
  1. I FOUND D ; Abort the init with an explanation.
  1. . S OKTOGO=0
  1. E D
  1. . S OKTOGO=1
  1. . W !!,"OK, there aren't any unconverted pointers."
  1. . S DIR(0)="E",DIR("A")="Hit <RETURN> to continue" D ^DIR ; pause before the next round
  1. Q