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

XU8P137.m

Go to the documentation of this file.
  1. XU8P137 ;SF/CIOFO-JDS Post Init for XU*8*137 ;02/18/2000 10:18 [ 03/13/2003 1:26 PM ]
  1. ;KIDS POST-INIT
  1. ;
  1. ; This Post-Init routine cleans-up problem in the Patch
  1. ; Application History sub-file of the Package File and the
  1. ; State File.
  1. ;
  1. EN D PATCH
  1. D STATE
  1. D MMXREF
  1. Q
  1. ;
  1. PATCH ;
  1. ; Search Patch Application History in the PACKAGE file
  1. ; for entries that contain version number_"*"_patch number_
  1. ; sequence number. The PAH field should only have
  1. ; patch number_sequence number for released patches.
  1. ; If a "*" is found it will be removed leaving patch and sequence
  1. ; numbers.
  1. ;
  1. N X,Y,Z,PAHCOMM,PAHXX
  1. W !,"Searching PACKAGE file to correct Patch Application History .."
  1. F X=0:0 S X=$O(^DIC(9.4,X)) Q:X'>0 D
  1. . W "."
  1. . F Y=0:0 S Y=$O(^DIC(9.4,X,22,Y)) Q:Y'>0 D
  1. . . W "."
  1. . . F Z=0:0 S Z=$O(^DIC(9.4,X,22,Y,"PAH",Z)) Q:Z'>0 D
  1. . . . S PAHCOMM=$P(^DIC(9.4,X,22,Y,"PAH",Z,0),"^",1)
  1. . . . I PAHCOMM'["*" Q
  1. . . . S PAHCOMM=$P(PAHCOMM,"*",2)
  1. . . . K PAHXX
  1. . . . S PAHXX(9.4901,Z_","_Y_","_X_",",.01)=PAHCOMM
  1. . . . D FILE^DIE("","PAHXX")
  1. . . . K PAHXX
  1. . . . W "."
  1. . . . Q
  1. ;
  1. W !!,"Finished!"
  1. Q
  1. STATE ;
  1. ; This routine will remove the following corrupt DD nodes
  1. ; and Xref that reference Field #3 (COUNTY) of File #5 (STATE):
  1. ;
  1. ; 1. ^DD(5,"IX",3)
  1. ; 2. ^DD(5,0,"IX","D",5,3)
  1. ; 3. ^DD(5,3,1)
  1. ; 4. ^DIC(5,"D")
  1. ;
  1. N ZZS0
  1. S ZZS0=0
  1. W !!,"Processing State File ..."
  1. P1 ;
  1. I $D(^DD(5,"IX",3))#2 D
  1. . S ZZS0=1
  1. . S X="Removing node: ^DD(5,""IX"",3)" D MES^XPDUTL(X)
  1. . K ^DD(5,"IX",3) ;Uncomment when thru testing logic
  1. ;
  1. P2 ;
  1. I $D(^DD(5,0,"IX","D",5,3))#2 D
  1. . S ZZS0=1
  1. . S X="Removing node: ^DD(5,0,""IX"",""D"",5,3)" D MES^XPDUTL(X)
  1. . K ^DD(5,0,"IX","D",5,3) ;Uncomment when thru testing logic
  1. ;
  1. P3 ;
  1. I $D(^DD(5,3,1,0))#2 D
  1. . S ZZS0=1
  1. . S X="Removing all Cross References on Field #3 (COUNTY)" D MES^XPDUTL(X)
  1. . K ^DD(5,3,1) ;Uncomment when thru testing logic
  1. ;
  1. P4 ;
  1. I $D(^DIC(5,"D")) D
  1. . S ZZS0=1
  1. . S X="Removing the only reported ""Bad Cross Reference"" - ""D""" D MES^XPDUTL(X)
  1. . K ^DIC(5,"D") ;Uncomment when thru testing logic
  1. I 'ZZS0 S X="Everything is fine with Field #3 (COUNTY) of file #5 (STATE)." D MES^XPDUTL(X)
  1. K ZZS0
  1. Q
  1. ;
  1. MMXREF ;
  1. N DIK
  1. S DIK="^VA(200,",DIK(1)="29^E"
  1. D ENALL^DIK
  1. Q