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

DG53P273.m

Go to the documentation of this file.
  1. DG53P273 ;BP-CIOFO/KEITH - Pre/post inits ; 21 May 2001 7:11 PM
  1. ;;5.3;Registration;**273,1015**;AUG 13, 1993;Build 21
  1. ;
  1. POST ;Post init
  1. N DGFLD,DGOUT,DGFILE
  1. ;File cross references
  1. F DGFLD=.01,.03,.09,.351 D XR(.DGFLD)
  1. ;Recompile templates
  1. I $O(DGFLD(2,0)) D
  1. .D MES^XPDUTL(" >>> Recompiling templates...")
  1. .D DIEZ^DIKCUTL3(2,.DGFLD)
  1. .Q
  1. ;Check/update triggering field definitions
  1. D MES^XPDUTL(" >>> Checking triggering field definitions...")
  1. D TRIG^DICR(.DGFLD,.DGOUT)
  1. S DGFILE=0 F S DGFILE=$O(DGOUT(DGFILE)) Q:'DGFILE D
  1. .S DGFLD=0 F S DGFLD=$O(DGOUT(DGFILE,DGFLD)) Q:'DGFLD D
  1. ..D MES^XPDUTL(" Field #"_DGFLD_" of file #"_DGFILE_" updated.")
  1. ..Q
  1. .Q
  1. Q
  1. ;
  1. XR(DGFLD) ;File index type cross references
  1. ;
  1. N DGFDA,DGIEN,DGWP,DGERR,DGXR,DGVAL,DGOUT,DIERR
  1. ;Set up x-refs. Any value that has a ".", will have the period
  1. ;replaved with a "D" to prevent x-ref's such as .11 and 11 having
  1. ;identical xref names
  1. S DGXR=$S(DGFLD[".":"ADGFMD"_$P(DGFLD,".",2),1:"ADGFM"_DGFLD)
  1. ;Check for existing x-ref
  1. S DGVAL(1)=2,DGVAL(2)=DGXR
  1. D FIND^DIC(.11,"","@;IXIE","KP",.DGVAL,"","","","","DGOUT")
  1. I $D(DGOUT("DILIST",1)) D Q
  1. .D MES^XPDUTL(" >>> Cross reference "_DGXR_" already exists, nothing filed.")
  1. .Q
  1. ;Create filer array
  1. S DGFDA(.11,"+1,",.01)=2 ;FILE
  1. S DGFDA(.11,"+1,",.02)=DGXR ;NAME
  1. S DGFDA(.11,"+1,",.11)="This x-ref calls the DG FIELD MONITOR event point." ;SHORT DESCRIPTION
  1. S DGFDA(.11,"+1,",.2)="MU" ;TYPE
  1. S DGFDA(.11,"+1,",.4)="F" ;EXECUTION
  1. S DGFDA(.11,"+1,",.41)="I" ;ACTIVITY
  1. S DGFDA(.11,"+1,",.5)="I" ;ROOT TYPE
  1. S DGFDA(.11,"+1,",.51)=2 ;ROOT FILE
  1. S DGFDA(.11,"+1,",.42)="A" ;USE
  1. S DGFDA(.11,"+1,",1.1)="D FC^DGFCPROT(.DA,2,"_DGFLD_",""SET"",$H,$G(DUZ),.X,.X1,.X2,$G(XQY0)) Q" ;SET LOGIC
  1. S DGFDA(.11,"+1,",2.1)="D FC^DGFCPROT(.DA,2,"_DGFLD_",""KILL"",$H,$G(DUZ),.X,.X1,.X2,$G(XQY0)) Q" ;KILL LOGIC
  1. ;CROSS REFERENCE VALUES
  1. S DGFDA(.114,"+2,+1,",.01)=1 ;ORDER NUMBER
  1. S DGFDA(.114,"+2,+1,",1)="F" ;TYPE OF VALUE
  1. S DGFDA(.114,"+2,+1,",2)=2 ;FILE NUMBER
  1. S DGFDA(.114,"+2,+1,",3)=DGFLD ;FIELD NUMBER
  1. S DGFDA(.114,"+2,+1,",7)="F" ;COLLATION
  1. ;DESCRIPTION
  1. S DGWP(1)="This cross reference activates the DG FIELD MONITOR event point."
  1. S DGWP(2)="Applications that wish to monitor edit activity related to this field may"
  1. S DGWP(3)="subscribe to that event point and take action as indicated by the changes"
  1. S DGWP(4)="that occur. Refer to the DG FIELD MONITOR protocol for a description of"
  1. S DGWP(5)="the information available at the time of the event."
  1. ;File INDEX record
  1. D UPDATE^DIE("","DGFDA","DGIEN","DGERR")
  1. I $D(DIERR) D Q
  1. .N DGI S DGI=""
  1. .D MES^XPDUTL(" >>> A problem has occurred during the filing of x-ref. "_DGXR_"!")
  1. .D MES^XPDUTL(" Please contact Customer Support.")
  1. .F S DGI=$O(DGERR("DIERR",1,"TEXT",DGI)) Q:DGI="" D
  1. ..D MES^XPDUTL(DGERR("DIERR",1,"TEXT",DGI))
  1. ..Q
  1. .Q
  1. S DGFLD(2,DGFLD)="" ;Create list to recompile templates
  1. D MES^XPDUTL(" >>> "_DGXR_" cross reference filed.")
  1. ;File DESCRIPTION field
  1. D WP^DIE(.11,DGIEN(1)_",",.1,"","DGWP")
  1. Q