source: WorldVistAEHR/trunk/r/HEALTH_LEVEL_SEVEN-HL/HLOPOST.m@ 1259

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

revised back to 6/30/08 version

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