source: WorldVistAEHR/trunk/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XIPPOST.m@ 1111

Last change on this file since 1111 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.1 KB
RevLine 
[613]1XIPPOST ;ALB/BRM/OIFO/SO - STANDARD POST INSTALL FOR XIP;12:26 PM 20 Oct 2005
2 ;;8.0;KERNEL;**292,378**;Jul 10, 1995;Build 59
3 ;
4POST ; post install - correct state file pointers for 5.12 and 5.13
5 K ^DD(5.12,0,"ID",8) ; IA #4140
6 D
7 . N DIK
8 . S DIK="^DIC(5,"
9 . S DIK(0)="1^ADUALC"
10 . D ENALL^DIK
11 . Q
12 D RP512
13 D RP513
14 D ADDID
15 Q
16 ;
17RP512 ;Repoint Field #3 to proper STATE(#5) file entry
18 N IEN512,XIPSEED
19 S XIPSEED=1 ; Prevent "AD" xref from firing
20 D BMES^XPDUTL(" Updating State File pointers in file #5.12")
21 S IEN512=0
22 F S IEN512=$O(^XIP(5.12,IEN512)) Q:'IEN512 D
23 . N IEN5,IEN513,VACODE
24 . S IEN513=$P($G(^XIP(5.12,IEN512,0)),"^",3) ;Get pointer to 5.13
25 . D
26 .. N DIERR,XIPERR
27 .. S VACODE=$$GET1^DIQ(5.13,IEN513_",",.01,"","","XIPERR")
28 .. S VACODE=$E(VACODE,1,2)
29 . S IEN5=0,IEN5=+$O(^DIC(5,"C",VACODE,IEN5))
30 . I IEN5 D Q
31 .. N DIERR,XIPERR,FDA
32 .. S FDA("XIP",5.12,IEN512_",",3)=IEN5
33 .. D FILE^DIE("","FDA(""XIP"")","XIPERR")
34 .. I $D(XIPERR) D
35 ... N X
36 ... S X="File: 5.12 IEN: "_IEN512_" "_XIPERR("DIERR",1,"TEXT",1)
37 ... D BMES^XPDUTL(X)
38 . I 'IEN5 D Q
39 .. N X
40 .. S X="File: 5.12 IEN: "_IEN512_" VA STATE CODE: "_VACODE_" is invalid."
41 .. D BMES^XPDUTL(X)
42 D BMES^XPDUTL(" Finished repointing file #5.12")
43 Q
44 ;
45RP513 ;Repoint Field #2 to proper STATE(#5) file entry
46 N IEN513,XIPSEED,VACODE
47 S XIPSEED=1 ; Prevent "AC" xref from firing
48 S IEN513=0
49 D BMES^XPDUTL(" Updating State File pointers in file #5.13")
50 F S IEN513=$O(^XIP(5.13,IEN513)) Q:'IEN513 D
51 . N IEN5
52 . S VACODE=$P(^XIP(5.13,IEN513,0),"^")
53 . S VACODE=$E(VACODE,1,2)
54 . S IEN5=0,IEN5=+$O(^DIC(5,"C",VACODE,0))
55 . I 'IEN5 D Q
56 .. S X="File: 5.13 IEN: "_IEN513_" VA STATE CODE: "_VACODE_" is invalid."
57 .. D BMES^XPDUTL(X)
58 . D
59 .. N DIERR,XIPERR,FDA
60 .. S FDA("XIP",5.13,IEN513_",",2)=IEN5
61 .. D FILE^DIE("","FDA(""XIP"")","XIPERR")
62 .. I $D(XIPERR) D
63 ... S X="File: 5.13 IEN: "_IEN513_" "_XIPERR("DIERR",1,"TEXT",1)
64 ... D BMES^XPDUTL(X)
65 D BMES^XPDUTL(" Finished repointing file #5.13")
66 Q
67 ;
68ADDID ; Add Write ID node & Up date $P#2 of File Header
69 S ^DD(5.12,0,"ID","W1")="D EN^DDIOL($P(^(0),U,2)_"" ""_$P(^(0),U,6)_"" ""_$P(^(0),U,7),"""",""?0"")"
70 S $P(^XIP(5.12,0),"^",2)="5.12I"
71 Q
Note: See TracBrowser for help on using the repository browser.