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

DG832P2.m

Go to the documentation of this file.
  1. DG832P2 ;;ALB/RGB - POST-INSTALL DG*5.3*832 ; 6/24/10 6:42pm
  1. ;;5.3;Registration;**832**;Aug 13, 1993;Build 9
  1. ;;Check for updated X-REFS (Fields: .01,.04,.06,.14,.18) used in Input Templates
  1. ;;
  1. ; IA #2796 for use of calls to RGHLLOG in UPDBAI
  1. POST ;Post init
  1. N DGFLD,DGMFLD,DGOUT,DGFILE
  1. D TEMPL
  1. Q
  1. ;
  1. TEMPL ;Determine templates on the FILE file to be compiled.
  1. N GLOBAL,FIELD,NFIELD,FILE,CNT
  1. D BMES^XPDUTL("Beginning to compile templates on the PATIENT MOVEMENT (#405) file.")
  1. ;
  1. S NFIELD=".01,.04,.06,.14,.18",FILE=405,FIELD="",CNT=1
  1. F S FIELD=$P(NFIELD,",",CNT) Q:FIELD="" D LOOP(FIELD,FILE) S CNT=CNT+1
  1. W !!
  1. S (X,Y)=""
  1. D BMES^XPDUTL("The following routine namespace compiled:")
  1. F S X=$O(CFIELD(X)) Q:X="" S Y=$G(Y)+1 S PRINT(Y)=" "_X_"*"
  1. ;
  1. D MES^XPDUTL(.PRINT)
  1. K X,Y,PRINT,CFIELD
  1. Q
  1. LOOP(FIELD,FILE) ;Compile templates.
  1. N GLOBAL,TEMPLATP,TEMPLATN,X,Y,DMAX,TYPE
  1. F GLOBAL="^DIE","^DIPT" D
  1. . S TYPE="Input" S:GLOBAL="^DIPT" TYPE="Print"
  1. . I $D(@GLOBAL@("AF",FILE,FIELD)) D
  1. .. S TEMPLATP=0
  1. .. F S TEMPLATP=$O(@GLOBAL@("AF",FILE,FIELD,TEMPLATP)) Q:'TEMPLATP DO
  1. ... S TEMPLATN=$P($G(@GLOBAL@(TEMPLATP,0)),"^",1)
  1. ... I TEMPLATN="" D BMES^XPDUTL("Could not compile template "_TEMPLATN_$C(13,10)_"Please review!") Q
  1. ... S X=$P($G(@GLOBAL@(TEMPLATP,"ROUOLD")),"^")
  1. ... I X=""&($D(@GLOBAL@(TEMPLATP,"ROU"))'=0) D BMES^XPDUTL("Could not find routine for template "_TEMPLATN_$C(13,10)_"Please review!") Q
  1. ... I X=""&($D(@GLOBAL@(TEMPLATP,"ROU"))=0) Q
  1. ... I $D(CFIELD(X)) Q ;already compiled
  1. ... S CFIELD(X)="" ; remember the template was compiled
  1. ... S Y=TEMPLATP ; set up the call for FileMan
  1. ... S DMAX=$$ROUSIZE^DILF
  1. ... I GLOBAL="^DIE" D BMES^XPDUTL(" "),BMES^XPDUTL(" Compiling Input Templates") D EN^DIEZ Q
  1. ... I GLOBAL="^DIPT" D BMES^XPDUTL(" "),BMES^XPDUTL(" Compiling Print Templates") D EN^DIPZ Q
  1. Q
  1. ;
  1. ;