BPHR1POS ;GDIT/HS/ALA-Post install program ; 23 Aug 2013 9:12 AM
;;2.1;IHS PERSONAL HEALTH RECORD;;Apr 01, 2014;Build 10
;
ENV ;EP - Environment check
NEW VERSION
; Add code to check for Ensemble version greater or equal to 2012
S VERSION=$$VERSION^%ZOSV
I VERSION<2012 D BMES^XPDUTL("Ensemble 2012 or later is required!") S XPDQUIT=2
Q
;
EN ;EP - Postinstall
;Delete existing BPHR classes
S EXEC="DO $SYSTEM.OBJ.DeletePackage(""BPHR"")" X EXEC
;
; Import BPHR classes
K ERR
D IMPORT^BPHRCLAS(1,.ERR)
I $G(ERR) Q
Q
;
PRE ;EP - Preinstall
NEW DA,DIK
S DIK="^BPHR(90670.2,"
S DA=0 F S DA=$O(^BPHR(90670.2,DA)) Q:'DA D ^DIK
Q
;
BPHR1POS ;GDIT/HS/ALA-Post install program ; 23 Aug 2013 9:12 AM
+1 ;;2.1;IHS PERSONAL HEALTH RECORD;;Apr 01, 2014;Build 10
+2 ;
ENV ;EP - Environment check
+1 NEW VERSION
+2 ; Add code to check for Ensemble version greater or equal to 2012
+3 SET VERSION=$$VERSION^%ZOSV
+4 IF VERSION<2012
DO BMES^XPDUTL("Ensemble 2012 or later is required!")
SET XPDQUIT=2
+5 QUIT
+6 ;
EN ;EP - Postinstall
+1 ;Delete existing BPHR classes
+2 SET EXEC="DO $SYSTEM.OBJ.DeletePackage(""BPHR"")"
XECUTE EXEC
+3 ;
+4 ; Import BPHR classes
+5 KILL ERR
+6 DO IMPORT^BPHRCLAS(1,.ERR)
+7 IF $GET(ERR)
QUIT
+8 QUIT
+9 ;
PRE ;EP - Preinstall
+1 NEW DA,DIK
+2 SET DIK="^BPHR(90670.2,"
+3 SET DA=0
FOR
SET DA=$ORDER(^BPHR(90670.2,DA))
IF 'DA
QUIT
DO ^DIK
+4 QUIT
+5 ;