BRNPOST3 ; IHS/PHXAO/TMJ - Post Init Routine ;
;;2.0T1;RELEASE OF INFO SYSTEM;;JAN 21, 2003
;Installs Package Protocols and List Templates
;
;
D CONV
;
D POST1 ;Populates the Site Parameter as Conversion Done
;
D XREF
;
D OPTION
;
D DONE
Q
;
PROT ;Protocol Install
;W !!,"I WILL NOW DO THE PROTOCOL INSTALLATION...",!!
;D ^BRNONIT
;W !,"FINISHED INSTALLING ONITS",!!
;
ONIT ;List Template Install
;W !,"I WILL NOW DO THE LIST TEMPLATE INSTALL...",!!
;D ^BRNL
;W !,"DON WITH TEMPLATE INSTALL",!
;
;
CONV ;Conversion of old Data to new BRN Globals
;
Q:'$D(^AZXAREC(0)) ;Quit if Virgin Install-No Conversion Needed
;
;
Q:'$D(^AZXAPARM) ;Quit if no previous ROI vs. 1.0
Q:'$D(^AZXAREQ) ;Quit if no previous ROI vs. 1.0
Q:'$D(^AZXAREC) ;Quit if no previous ROI vs. 1.0
;
;
S BRNIEN=$O(^BRNPARM("B",0))
I BRNIEN="" D CONV1 Q ;New Previous Site entry
;
Q ;Conversion ran already - just quit
;
;
;
CONV1 ;Run Conversion - Never completed
;
;Site Parameter Conversion from AZXAPARM to BRNPARM
S BRNOGBL=^AZXAPARM(0) ;Old Global
S BRNNGBL=^BRNPARM(0) ; New Global
S BRNOREC=$P($G(BRNOGBL),"^",3) ;Last IEN
I BRNOREC="" S BRNOREC=0
S BRNOCT=$P($G(BRNOGBL),"^",4) ;Number of Records
I BRNOCT="" S BRNOCT=0
;
;Run Conversion of Site Parameter
S %X="^AZXAPARM(" S %Y="^BRNPARM(" D %XY^%RCR
;
S ^BRNPARM(0)=BRNNGBL ;Set Zero Node Back to correct Name and Number
S $P(^BRNPARM(0),"^",3)=BRNOREC ;Old Last IEN Number
S $P(^BRNPARM(0),"^",4)=BRNOCT ;Old Count of Records
W !,"Conversion of Site Parameters Completed!",!
;
;Requesting and Receiving Conversion AZXAREQ TO BRNTREQ
S ^BRNPARM(0)=""""_BRNNAME_"^"_BRNFILE_"^"_BRNOREC_"^"_BRNOCT_""""
S %X="^AZXAREQ(" S %Y="^BRNTREQ(" D %XY^%RCR
W !,"Conversion of Table File Completed!",!
;
S %X="^AZXAREC(" S %Y="^BRNREC(" D %XY^%RCR
W !,"Conversion of Disclosure Data Completed!",!
;
;K ^AZXAPARM ;Kill Old Global ;Don't kill old Global yet
;K ^AZXAREQ ;Kill Old Global
;K ^AZXAREC ;Kill Old Global
;
W !,"Conversion successfully Completed",!
Q
POST1 ;Run BRNPOST1 to Populate the File Conversion Field
;
D ^BRNPOST1
Q
XREF ;REINDEX AP XREF
W !,"I WILL NOW REINDEX THE AP CROSS REFERENCE",!
K ^BRNREC("AP")
S DIK="^BRNREC(",DIK(1)=".06^AP" D ENALL^DIK K DA,DIK
W !,"FINSIHED WITH CROSS REFERENCE!",!!
Q
;
OPTION ;Delete old AZXA Namespace Menu Options
;
S BRNOPT=$O(^DIC(19,"B","AZXAMENU",0))
Q:BRNOPT="" ;Quit if AZXA Options non existent
;
S XBPKNSP="AZXA" D ^XBPKDEL
Q
DONE ;
W !,"INSTALLATION OF THE ROI PROGRAM IS SUCCESSFULL",!
W "IF FIRST TIME INSTALL THE SITE PARAMETERS MUST BE COMPLETED PRIOR TO RUNNING PROGRAM",!
K BRNIEN,BRNDFN,BRNOPT
Q
BRNPOST3 ; IHS/PHXAO/TMJ - Post Init Routine ;
+1 ;;2.0T1;RELEASE OF INFO SYSTEM;;JAN 21, 2003
+2 ;Installs Package Protocols and List Templates
+3 ;
+4 ;
+5 DO CONV
+6 ;
+7 ;Populates the Site Parameter as Conversion Done
DO POST1
+8 ;
+9 DO XREF
+10 ;
+11 DO OPTION
+12 ;
+13 DO DONE
+14 QUIT
+15 ;
PROT ;Protocol Install
+1 ;W !!,"I WILL NOW DO THE PROTOCOL INSTALLATION...",!!
+2 ;D ^BRNONIT
+3 ;W !,"FINISHED INSTALLING ONITS",!!
+4 ;
ONIT ;List Template Install
+1 ;W !,"I WILL NOW DO THE LIST TEMPLATE INSTALL...",!!
+2 ;D ^BRNL
+3 ;W !,"DON WITH TEMPLATE INSTALL",!
+4 ;
+5 ;
CONV ;Conversion of old Data to new BRN Globals
+1 ;
+2 ;Quit if Virgin Install-No Conversion Needed
IF '$DATA(^AZXAREC(0))
QUIT
+3 ;
+4 ;
+5 ;Quit if no previous ROI vs. 1.0
IF '$DATA(^AZXAPARM)
QUIT
+6 ;Quit if no previous ROI vs. 1.0
IF '$DATA(^AZXAREQ)
QUIT
+7 ;Quit if no previous ROI vs. 1.0
IF '$DATA(^AZXAREC)
QUIT
+8 ;
+9 ;
+10 SET BRNIEN=$ORDER(^BRNPARM("B",0))
+11 ;New Previous Site entry
IF BRNIEN=""
DO CONV1
QUIT
+12 ;
+13 ;Conversion ran already - just quit
QUIT
+14 ;
+15 ;
+16 ;
CONV1 ;Run Conversion - Never completed
+1 ;
+2 ;Site Parameter Conversion from AZXAPARM to BRNPARM
+3 ;Old Global
SET BRNOGBL=^AZXAPARM(0)
+4 ; New Global
SET BRNNGBL=^BRNPARM(0)
+5 ;Last IEN
SET BRNOREC=$PIECE($GET(BRNOGBL),"^",3)
+6 IF BRNOREC=""
SET BRNOREC=0
+7 ;Number of Records
SET BRNOCT=$PIECE($GET(BRNOGBL),"^",4)
+8 IF BRNOCT=""
SET BRNOCT=0
+9 ;
+10 ;Run Conversion of Site Parameter
+11 SET %X="^AZXAPARM("
SET %Y="^BRNPARM("
DO %XY^%RCR
+12 ;
+13 ;Set Zero Node Back to correct Name and Number
SET ^BRNPARM(0)=BRNNGBL
+14 ;Old Last IEN Number
SET $PIECE(^BRNPARM(0),"^",3)=BRNOREC
+15 ;Old Count of Records
SET $PIECE(^BRNPARM(0),"^",4)=BRNOCT
+16 WRITE !,"Conversion of Site Parameters Completed!",!
+17 ;
+18 ;Requesting and Receiving Conversion AZXAREQ TO BRNTREQ
+19 SET ^BRNPARM(0)=""""_BRNNAME_"^"_BRNFILE_"^"_BRNOREC_"^"_BRNOCT_""""
+20 SET %X="^AZXAREQ("
SET %Y="^BRNTREQ("
DO %XY^%RCR
+21 WRITE !,"Conversion of Table File Completed!",!
+22 ;
+23 SET %X="^AZXAREC("
SET %Y="^BRNREC("
DO %XY^%RCR
+24 WRITE !,"Conversion of Disclosure Data Completed!",!
+25 ;
+26 ;K ^AZXAPARM ;Kill Old Global ;Don't kill old Global yet
+27 ;K ^AZXAREQ ;Kill Old Global
+28 ;K ^AZXAREC ;Kill Old Global
+29 ;
+30 WRITE !,"Conversion successfully Completed",!
+31 QUIT
POST1 ;Run BRNPOST1 to Populate the File Conversion Field
+1 ;
+2 DO ^BRNPOST1
+3 QUIT
XREF ;REINDEX AP XREF
+1 WRITE !,"I WILL NOW REINDEX THE AP CROSS REFERENCE",!
+2 KILL ^BRNREC("AP")
+3 SET DIK="^BRNREC("
SET DIK(1)=".06^AP"
DO ENALL^DIK
KILL DA,DIK
+4 WRITE !,"FINSIHED WITH CROSS REFERENCE!",!!
+5 QUIT
+6 ;
OPTION ;Delete old AZXA Namespace Menu Options
+1 ;
+2 SET BRNOPT=$ORDER(^DIC(19,"B","AZXAMENU",0))
+3 ;Quit if AZXA Options non existent
IF BRNOPT=""
QUIT
+4 ;
+5 SET XBPKNSP="AZXA"
DO ^XBPKDEL
+6 QUIT
DONE ;
+1 WRITE !,"INSTALLATION OF THE ROI PROGRAM IS SUCCESSFULL",!
+2 WRITE "IF FIRST TIME INSTALL THE SITE PARAMETERS MUST BE COMPLETED PRIOR TO RUNNING PROGRAM",!
+3 KILL BRNIEN,BRNDFN,BRNOPT
+4 QUIT