source: FOIAVistA/trunk/r/HEALTH_LEVEL_SEVEN-HL/HLOPOST.m@ 1492

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

initial load of FOIAVistA 6/30/08 version

File size: 3.2 KB
Line 
1HLOPOST ;IRMFO-ALB/CJM -Post-Install routine for HLO;03/24/2004 14:43 ;07/20/2007
2 ;;1.6;HEALTH LEVEL SEVEN;**126,134,136,137**;Oct 13, 1995;Build 21
3 ;Per VHA Directive 2004-038, this routine should not be modified.
4 ;
5 N SYSTEM,DATA,VASITE,OLDSITE
6 D IDXLINKS
7 D SYSPARMS^HLOSITE(.SYSTEM)
8 S VASITE=$$SITE^VASITE
9 S OLDSITE=$G(^HLCS(869.3,1,0))
10 S DATA(.01)=SYSTEM("DOMAIN")
11 I DATA(.01)="" D
12 .I $P(OLDSITE,"^",2) S DATA(.01)="HL7."_$P($G(^DIC(4.2,$P(OLDSITE,"^",2),0)),"^")
13 I DATA(.01)="" D
14 .N INST,DOMAIN
15 .S INST=$P(VASITE,"^")
16 .Q:'INST
17 .S DOMAIN=$P($G(^DIC(4,INST,6)),"^")
18 .I DOMAIN S DOMAIN=$P($G(^DIC(4.2,DOMAIN,0)),"^") I DOMAIN'="" S DATA(.01)="HL7."_DOMAIN
19 I DATA(.01)="" D BMES^XPDUTL("Post-Install failed, system missing INSTITUTION or DOMAIN file entry") Q
20 S DATA(.02)=SYSTEM("STATION")
21 I DATA(.02)="",$P(OLDSITE,"^",4) S DATA(.02)=$P($G(^DIC(4,$P(OLDSITE,"^",4),99)),"^")
22 I DATA(.02)="" S DATA(.02)=$P(VASITE,"^",3)
23 S DATA(.03)=$P(OLDSITE,"^",3)
24 S DATA(.04)=SYSTEM("MAXSTRING")
25 S DATA(.05)=SYSTEM("HL7 BUFFER")
26 S DATA(.06)=SYSTEM("USER BUFFER")
27 S DATA(.07)=SYSTEM("NORMAL PURGE")
28 S DATA(.08)=SYSTEM("ERROR PURGE")
29 I $D(^HLD(779.1,1,0)) D
30 .N ERROR
31 .I '$$UPD^HLOASUB1(779.1,1,.DATA,.ERROR) D BMES^XPDUTL("Post-Install failed -"_$G(ERROR))
32 E D
33 .N ERROR
34 .I '$$ADD^HLOASUB1(779.1,,.DATA,.ERROR,1) D BMES^XPDUTL("Post-Install failed -"_$G(ERROR))
35 Q
36IDXLINKS ;
37 ;set the "AC" and "AD" indicies on the HL Logical Link file
38 N DIK
39 S DIK="^HLCS(870,"
40 S DIK(1)=".01^AC^AD^AD1^AD2"
41 D ENALL^DIK
42 Q
43 ;
44P134 ;
45 N DAILY,STARTUP,IEN,DATA
46 S DAILY=$O(^DIC(19,"B","HLO DAILY STARTUP",0))
47 I 'DAILY D BMES^XPDUTL("Failed to schedule the HLO DAILY STARTUP option!")
48 S STARTUP=$O(^DIC(19,"B","HLO SYSTEM STARTUP",0))
49 I 'STARTUP D BMES^XPDUTL("Failed to schedule the HLO SYSTEM STARTUP option!")
50 I STARTUP D
51 .S IEN=$O(^DIC(19.2,"B",STARTUP,0))
52 .S DATA(.01)=STARTUP
53 .S DATA(2)=""
54 .S DATA(6)=""
55 .S DATA(9)=$S($P($G(^HLD(779.1,1,0)),"^",3)="P":"S",1:"")
56 .I IEN D
57 ..I '$$UPD^HLOASUB1(19.2,IEN,.DATA) D BMES^XPDUTL("Failed to schedule the HLO SYSTEM STARTUP option!")
58 .E D
59 ..I '$$ADD^HLOASUB1(19.2,,.DATA) D BMES^XPDUTL("Failed to schedule the HLO SYSTEM STARTUP option!")
60 I DAILY D
61 .S IEN=$O(^DIC(19.2,"B",DAILY,0))
62 .S DATA(.01)=DAILY
63 .S DATA(2)=$$NOW^XLFDT
64 .S DATA(6)="1D"
65 .S DATA(9)=""
66 .I IEN D
67 ..I '$$UPD^HLOASUB1(19.2,IEN,.DATA) D BMES^XPDUTL("Failed to schedule the HLO DAILY STARTUP option!")
68 .E D
69 ..I '$$ADD^HLOASUB1(19.2,,.DATA) D BMES^XPDUTL("Failed to schedule the HLO DAILY STARTUP option!")
70 Q
71 ;
72P136 ;post-install routine for HL*1.6*136
73 N ERROR,DIFROM,IEN
74 I $P($G(^HLD(779.1,1,0)),"^",3)="P" D
75 .D RESCH^XUTMOPT("HLO DAILY STARTUP",$$FMADD^XLFDT($$NOW^XLFDT,,1),,"1D","L",.ERROR)
76 .I $G(ERROR)<0 D BMES^XPDUTL("Failed to schedule the HLO DAILY STARTUP option! Please do so manually")
77 ;
78 S IEN=$O(^HLD(779.3,"B","PURGE OLD MESSAGES",0))
79 Q:'IEN
80 S ^HLD(779.3,IEN,0)="PURGE OLD MESSAGES^1^0^2^20^^5^GETWORK^HLOPURGE^DOWORK^HLOPURGE^1^0"
81 Q
82 ;
83P137 ;
84 ;move the existing errros to the new structure
85 N TYPE
86 K ^TMP($J,"HLO ERRORS")
87 F TYPE="TF","SE","AE" D
88 .M ^TMP($J,"HLO ERRORS",TYPE)=^HLB("ERRORS",TYPE)
89 .M ^HLB("ERRORS")=^TMP($J,"HLO ERRORS",TYPE)
90 .K ^TMP($J,"HLO ERRORS",TYPE)
91 .K ^HLB("ERRORS",TYPE)
92 Q
Note: See TracBrowser for help on using the repository browser.