BJPN10PR ;GDIT/HS/BEE-Prenatal Care Module Pre-Install ; 08 May 2012 12:00 PM
;;1.0;PRENATAL CARE MODULE;;Dec 06, 2012;Build 61
;
Q
;
PRE ;EP - PRENATAL CARE MODULE 1.0 PRE-INSTALL
;
NEW X,IEN,DA,DIK,DIU
;
;First Install - Remove any existing 9000010.43 entries
;
;Reset main problem file structure
S DIU="^BJPNPL(",DIU(0)="ST" D EN^DIU2
;
;Look for routine BJPNPRL (Present in build) - Skip if present
S X="BJPNPRL" X ^%ZOSF("TEST") I '$T D
. S IEN=0 F S IEN=$O(^AUPNVOB(IEN)) Q:'IEN S DA=IEN,DIK="^AUPNVOB(" D ^DIK
. ;
. ;Reset structure
. S DIU="^AUPNVOB(",DIU(0)="DST" D EN^DIU2
;
;BJPN(90680.02) Cleanup - Switch to new code set
;Make backup copy of current SNOMED code set build has already been installed
;If routine BJPNPRL (Present in build) - Loaded before - we need to convert
S X="BJPNPRL" X ^%ZOSF("TEST") I $T D SAVE
;
;Clear out BJPN SNOMED TERMS
S IEN=0 F S IEN=$O(^BJPN(90680.02,IEN)) Q:'IEN S DA=IEN,DIK="^BJPN(90680.02," D ^DIK
;
;Clear out BJPN PICK LIST CATEGORIES
S IEN=0 F S IEN=$O(^BJPN(90680.03,IEN)) Q:'IEN S DA=IEN,DIK="^BJPN(90680.03," D ^DIK
;
Q
;
SAVE ;Save copy of current BJPN SNOMED TERMS (if re-install)
K ^XTMP("BJPNSMD")
I $D(^BJPN(90680.02)) D
. S ^XTMP("BJPNSMD",0)=DT_U_DT_U_"BJPN INSTALLATION PATCH"
. M ^XTMP("BJPNSMD",90680.02)=^BJPN(90680.02)
Q
BJPN10PR ;GDIT/HS/BEE-Prenatal Care Module Pre-Install ; 08 May 2012 12:00 PM
+1 ;;1.0;PRENATAL CARE MODULE;;Dec 06, 2012;Build 61
+2 ;
+3 QUIT
+4 ;
PRE ;EP - PRENATAL CARE MODULE 1.0 PRE-INSTALL
+1 ;
+2 NEW X,IEN,DA,DIK,DIU
+3 ;
+4 ;First Install - Remove any existing 9000010.43 entries
+5 ;
+6 ;Reset main problem file structure
+7 SET DIU="^BJPNPL("
SET DIU(0)="ST"
DO EN^DIU2
+8 ;
+9 ;Look for routine BJPNPRL (Present in build) - Skip if present
+10 SET X="BJPNPRL"
XECUTE ^%ZOSF("TEST")
IF '$TEST
Begin DoDot:1
+11 SET IEN=0
FOR
SET IEN=$ORDER(^AUPNVOB(IEN))
IF 'IEN
QUIT
SET DA=IEN
SET DIK="^AUPNVOB("
DO ^DIK
+12 ;
+13 ;Reset structure
+14 SET DIU="^AUPNVOB("
SET DIU(0)="DST"
DO EN^DIU2
End DoDot:1
+15 ;
+16 ;BJPN(90680.02) Cleanup - Switch to new code set
+17 ;Make backup copy of current SNOMED code set build has already been installed
+18 ;If routine BJPNPRL (Present in build) - Loaded before - we need to convert
+19 SET X="BJPNPRL"
XECUTE ^%ZOSF("TEST")
IF $TEST
DO SAVE
+20 ;
+21 ;Clear out BJPN SNOMED TERMS
+22 SET IEN=0
FOR
SET IEN=$ORDER(^BJPN(90680.02,IEN))
IF 'IEN
QUIT
SET DA=IEN
SET DIK="^BJPN(90680.02,"
DO ^DIK
+23 ;
+24 ;Clear out BJPN PICK LIST CATEGORIES
+25 SET IEN=0
FOR
SET IEN=$ORDER(^BJPN(90680.03,IEN))
IF 'IEN
QUIT
SET DA=IEN
SET DIK="^BJPN(90680.03,"
DO ^DIK
+26 ;
+27 QUIT
+28 ;
SAVE ;Save copy of current BJPN SNOMED TERMS (if re-install)
+1 KILL ^XTMP("BJPNSMD")
+2 IF $DATA(^BJPN(90680.02))
Begin DoDot:1
+3 SET ^XTMP("BJPNSMD",0)=DT_U_DT_U_"BJPN INSTALLATION PATCH"
+4 MERGE ^XTMP("BJPNSMD",90680.02)=^BJPN(90680.02)
End DoDot:1
+5 QUIT