- BJPN20PR ;GDIT/HS/BEE-Prenatal Care Module 2.0 Pre-Install ; 08 May 2012 12:00 PM
- ;;2.0;PRENATAL CARE MODULE;;Feb 24, 2015;Build 63
- ;
- Q
- ;
- PRE ;EP - PRENATAL CARE MODULE 2.0 PRE-INSTALL
- ;
- NEW X,X1,X2,%H
- ;
- ;Check if PRENATAL 1.0 was installed
- ;If not, remove any existing 9000010.43 entries to clean up old file
- S X="BJPNPRL" X ^%ZOSF("TEST") I '$T D Q
- . ;
- . NEW X,IEN,DA,DIK,DIU
- . ;
- . ;Remove any existing 9000010.43 entries
- . 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
- ;
- ;PRENATAL 1.0 was installed. Conversion is required
- ;
- ;Get a later date
- S X1=DT,X2=60 D C^%DTC
- ;
- ;Make a copy of the v1.0 files
- K ^XTMP("BJPN")
- S ^XTMP("BJPN")=X_U_DT_U_"BJPN 2.0 Installation files"
- M ^XTMP("BJPN","BJPNPL")=^BJPNPL
- M ^XTMP("BJPN","BJPNVOB")=^AUPNVOB
- ;
- Q
- BJPN20PR ;GDIT/HS/BEE-Prenatal Care Module 2.0 Pre-Install ; 08 May 2012 12:00 PM
- +1 ;;2.0;PRENATAL CARE MODULE;;Feb 24, 2015;Build 63
- +2 ;
- +3 QUIT
- +4 ;
- PRE ;EP - PRENATAL CARE MODULE 2.0 PRE-INSTALL
- +1 ;
- +2 NEW X,X1,X2,%H
- +3 ;
- +4 ;Check if PRENATAL 1.0 was installed
- +5 ;If not, remove any existing 9000010.43 entries to clean up old file
- +6 SET X="BJPNPRL"
- XECUTE ^%ZOSF("TEST")
- IF '$TEST
- Begin DoDot:1
- +7 ;
- +8 NEW X,IEN,DA,DIK,DIU
- +9 ;
- +10 ;Remove any existing 9000010.43 entries
- +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
- QUIT
- +15 ;
- +16 ;PRENATAL 1.0 was installed. Conversion is required
- +17 ;
- +18 ;Get a later date
- +19 SET X1=DT
- SET X2=60
- DO C^%DTC
- +20 ;
- +21 ;Make a copy of the v1.0 files
- +22 KILL ^XTMP("BJPN")
- +23 SET ^XTMP("BJPN")=X_U_DT_U_"BJPN 2.0 Installation files"
- +24 MERGE ^XTMP("BJPN","BJPNPL")=^BJPNPL
- +25 MERGE ^XTMP("BJPN","BJPNVOB")=^AUPNVOB
- +26 ;
- +27 QUIT