HLOPOST ;IRMFO-ALB/CJM -Post-Install routine for HLO;03/24/2004 14:43
;;1.6;HEALTH LEVEL SEVEN;**126**;Oct 13, 1995
;
N SYSTEM,DATA,VASITE,OLDSITE
D IDXLINKS
D SYSPARMS^HLOSITE(.SYSTEM)
S VASITE=$$SITE^VASITE
S OLDSITE=$G(^HLCS(869.3,1,0))
S DATA(.01)=SYSTEM("DOMAIN")
I DATA(.01)="" D
.I $P(OLDSITE,"^",2) S DATA(.01)="HL7."_$P($G(^DIC(4.2,$P(OLDSITE,"^",2),0)),"^")
I DATA(.01)="" D
.N INST,DOMAIN
.S INST=$P(VASITE,"^")
.Q:'INST
.S DOMAIN=$P($G(^DIC(4,INST,6)),"^")
.I DOMAIN S DOMAIN=$P($G(^DIC(4.2,DOMAIN,0)),"^") I DOMAIN'="" S DATA(.01)="HL7."_DOMAIN
I DATA(.01)="" D BMES^XPDUTL("Post-Install failed, system missing INSTITUTION or DOMAIN file entry") Q
S DATA(.02)=SYSTEM("STATION")
I DATA(.02)="",$P(OLDSITE,"^",4) S DATA(.02)=$P($G(^DIC(4,$P(OLDSITE,"^",4),99)),"^")
I DATA(.02)="" S DATA(.02)=$P(VASITE,"^",3)
S DATA(.03)=$P(OLDSITE,"^",3)
S DATA(.04)=SYSTEM("MAXSTRING")
S DATA(.05)=SYSTEM("HL7 BUFFER")
S DATA(.06)=SYSTEM("USER BUFFER")
S DATA(.07)=SYSTEM("NORMAL PURGE")
S DATA(.08)=SYSTEM("ERROR PURGE")
I $D(^HLD(779.1,1,0)) D
.N ERROR
.I '$$UPD^HLOASUB1(779.1,1,.DATA,.ERROR) D BMES^XPDUTL("Post-Install failed -"_$G(ERROR))
E D
.N ERROR
.I '$$ADD^HLOASUB1(779.1,,.DATA,.ERROR,1) D BMES^XPDUTL("Post-Install failed -"_$G(ERROR))
Q
IDXLINKS ;
;set the "AC" and "AD" indicies on the HL Logical Link file
N DIK
S DIK="^HLCS(870,"
S DIK(1)=".01^AC^AD^AD1^AD2"
D ENALL^DIK
Q
HLOPOST ;IRMFO-ALB/CJM -Post-Install routine for HLO;03/24/2004 14:43
+1 ;;1.6;HEALTH LEVEL SEVEN;**126**;Oct 13, 1995
+2 ;
+3 NEW SYSTEM,DATA,VASITE,OLDSITE
+4 DO IDXLINKS
+5 DO SYSPARMS^HLOSITE(.SYSTEM)
+6 SET VASITE=$$SITE^VASITE
+7 SET OLDSITE=$GET(^HLCS(869.3,1,0))
+8 SET DATA(.01)=SYSTEM("DOMAIN")
+9 IF DATA(.01)=""
Begin DoDot:1
+10 IF $PIECE(OLDSITE,"^",2)
SET DATA(.01)="HL7."_$PIECE($GET(^DIC(4.2,$PIECE(OLDSITE,"^",2),0)),"^")
End DoDot:1
+11 IF DATA(.01)=""
Begin DoDot:1
+12 NEW INST,DOMAIN
+13 SET INST=$PIECE(VASITE,"^")
+14 IF 'INST
QUIT
+15 SET DOMAIN=$PIECE($GET(^DIC(4,INST,6)),"^")
+16 IF DOMAIN
SET DOMAIN=$PIECE($GET(^DIC(4.2,DOMAIN,0)),"^")
IF DOMAIN'=""
SET DATA(.01)="HL7."_DOMAIN
End DoDot:1
+17 IF DATA(.01)=""
DO BMES^XPDUTL("Post-Install failed, system missing INSTITUTION or DOMAIN file entry")
QUIT
+18 SET DATA(.02)=SYSTEM("STATION")
+19 IF DATA(.02)=""
IF $PIECE(OLDSITE,"^",4)
SET DATA(.02)=$PIECE($GET(^DIC(4,$PIECE(OLDSITE,"^",4),99)),"^")
+20 IF DATA(.02)=""
SET DATA(.02)=$PIECE(VASITE,"^",3)
+21 SET DATA(.03)=$PIECE(OLDSITE,"^",3)
+22 SET DATA(.04)=SYSTEM("MAXSTRING")
+23 SET DATA(.05)=SYSTEM("HL7 BUFFER")
+24 SET DATA(.06)=SYSTEM("USER BUFFER")
+25 SET DATA(.07)=SYSTEM("NORMAL PURGE")
+26 SET DATA(.08)=SYSTEM("ERROR PURGE")
+27 IF $DATA(^HLD(779.1,1,0))
Begin DoDot:1
+28 NEW ERROR
+29 IF '$$UPD^HLOASUB1(779.1,1,.DATA,.ERROR)
DO BMES^XPDUTL("Post-Install failed -"_$GET(ERROR))
End DoDot:1
+30 IF '$TEST
Begin DoDot:1
+31 NEW ERROR
+32 IF '$$ADD^HLOASUB1(779.1,,.DATA,.ERROR,1)
DO BMES^XPDUTL("Post-Install failed -"_$GET(ERROR))
End DoDot:1
+33 QUIT
IDXLINKS ;
+1 ;set the "AC" and "AD" indicies on the HL Logical Link file
+2 NEW DIK
+3 SET DIK="^HLCS(870,"
+4 SET DIK(1)=".01^AC^AD^AD1^AD2"
+5 DO ENALL^DIK
+6 QUIT