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

DIPR11.m

Go to the documentation of this file.
  1. DIPR11 ;SFISC/MKO-PRE INSTALL ROUTINE FOR PATCH DI*22.0*11 ;2/15/00 10:22
  1. ;;22.0;VA FileMan;**11**;Mar 30, 1999;Build 1
  1. ;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. ;Modify the trigger logic of fields that trigger fields with
  1. ;New-Style Indexes, so that they call ^DICR unconditionally,
  1. ;This ensures that New-Style Indexes on the triggered fields are
  1. ;are fired when the trigger logic is executed.
  1. ;Also, recompile any input templates that contain fields that trigger
  1. ;fields with new-style indexes.
  1. TRIG N FIL,FLD,NAM,OUT,TEM
  1. K ^TMP("DIPR11",$J)
  1. S FIL=.9999 F S FIL=$O(^DD("IX","F",FIL)) Q:'FIL D
  1. . S FLD=0 F S FLD=$O(^DD("IX","F",FIL,FLD)) Q:'FLD D
  1. .. Q:$D(^TMP("DIPR11",$J,FIL,FLD)) S ^(FLD)=""
  1. .. K OUT D TRMOD^DICR(FIL,FLD,.OUT) Q:'$D(OUT)
  1. .. M ^TMP("DIPR11",$J)=OUT
  1. ;
  1. S FIL=0 F S FIL=$O(^TMP("DIPR11",$J,FIL)) Q:'FIL D
  1. . S FLD=$O(^TMP("DIPR11",$J,FIL,FLD)) Q:'FLD D
  1. .. S TEM=0 F S TEM=$O(^DIE("AF",FIL,FLD,TEM)) Q:'TEM D
  1. ... Q:$D(^TMP("DIPR11",$J,"TEM",TEM)) S ^(TEM)=""
  1. ... S NAM=$G(^DIE(TEM,"ROUOLD")) Q:NAM=""
  1. ... D EN2^DIEZ(TEM,"",NAM)
  1. K ^TMP("DIPR11",$J)
  1. ;
  1. NODE0 ; Repair 0 node of INDEX and KEY files
  1. N I,DICNT,DILAST S DICNT=0,DILAST="",I=0
  1. F S I=$O(^DD("IX",I)) Q:'I I $D(^DD("IX",I,0))#2 S DICNT=DICNT+1,DILAST=I
  1. S $P(^DD("IX",0),"^",3,4)=DILAST_"^"_DICNT
  1. S DICNT=0,DILAST="",I=0
  1. F S I=$O(^DD("KEY",I)) Q:'I I $D(^DD("KEY",I,0))#2 S DICNT=DICNT+1,DILAST=I
  1. S $P(^DD("KEY",0),"^",3,4)=DILAST_"^"_DICNT
  1. Q
  1. ;