Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: MASETUP1

MASETUP1.m

Go to the documentation of this file.
  1. MASETUP1 ;IHS/ADC/PDW/ENM - Routine to install MAS modelling KIDS [ 05/13/1999 2:44 PM ]
  1. ;;5.0;MAS INSTALLATION;**1**;MAY 04, 1999
  1. ;IHS/DSD/ENM This setup program is a copy of MASSETUP.
  1. ;It was created to do a different environment check for
  1. ;outpatient only sites!
  1. ;searhc/maw added call to POST for post processing
  1. Q
  1. EN ;EP START
  1. W !,?10,"Welcome to the MAS Installation Shell",!
  1. W !,?10,"Doing ^XUP ... >> DO NOT PICK AN OPTION !! <<",!
  1. D ^XUP
  1. W !,?10,"Doing P^DI ... >> DO NOT PICK AN OPTION, Press 'Return' !! <<",! ;IHS/DSD/ENM 05/06/99
  1. D Q^DI ;IHS/DSD/ENM 05/06/99
  1. W !!
  1. I $G(DUZ)'>0 W !,"Not a valid user ... Stopping Installation" Q
  1. S MASSITETYPE=2 ;IHS/DSD/ENM 05/03/99
  1. S X="ADMISSION/DISCHARGE/TRANSFER"
  1. S DIC=$$DIC^XBDIQ1(9.4),DIC(0)="MX" D ^DIC
  1. I Y'>0 W !,"Possible Problem with ADT package not found in Package File"
  1. S XBDGDA=+Y
  1. S X="IHS SCHEDULING"
  1. S DIC=$$DIC^XBDIQ1(9.4),DIC(0)="MX" D ^DIC
  1. I Y'>0 W !,"Possible Problem with IHS SCHEDULING package not found in Package File"
  1. S XBSDDA=+Y
  1. S XBDGVER=$$VAL^XBDIQ1(9.4,XBDGDA,13)
  1. S XBSDVER=$$VAL^XBDIQ1(9.4,XBSDDA,13)
  1. W !!,?5,"Package",?40,"Current Version"
  1. W !!,?5,"ADMISSION/DISCHARGE/TRANSFER",?40,XBDGVER
  1. W !,?5,"IHS SCHEDULING",?40,XBSDVER
  1. I +XBDGVER I XBDGVER'>4.1 W !!,"Stopping Installation ... ADT not 4.2 or later" G EXIT ;====>> ;IHS/DSD/ENM 07/24/98 VERSION #CHANGED
  1. I '$D(^XTMP("MAS_INSTAL")) D SET
  1. STAT ;EP scan the footprint and process
  1. W !!,?10,"MAS Installation Shell Tracking"
  1. W !,?5,"Step",?15,"Function",?35,"Completed"
  1. S MASNEXT=0,MASLAST=0
  1. S I=0 F S I=$O(^XTMP("MAS_INSTAL",I)) Q:I'>0 D WRITE
  1. S MASNEXT=MASLAST+1
  1. ; if a previous installation was started MASNEXT = the nextstep
  1. ;
  1. W !!,"The next step is step ",MASNEXT,!
  1. I MASNEXT=1 G MAS2
  1. W !,?5,"C -Continue E -Exit S -Start Over R -Rerun Last Step",!
  1. K DIR S DIR(0)="SB^C:Continue;E:Exit;S:Start Over;R:Rerun Last Step" D ^DIR
  1. I Y="E" W !!,"EXITING",! G EXIT
  1. I Y="S" W !!,"Starting Over",! K ^XTMP("MAS_INSTAL") G EN
  1. I Y="R" W !!,"Rerun Last Step" S MASNEXT=MASNEXT-1 G MAS2
  1. I Y'="C" G EXIT
  1. MAS2 ;EP picking up where the instal left off
  1. S MAS2=$O(^XTMP("MAS_INSTAL",MASNEXT,0)),MAS3=$O(^(MAS2,0))
  1. ; branch to the next step in MAS3
  1. G @MAS3 ;====>> @MAS3
  1. ;
  1. ;
  1. WRITE ;EP
  1. S MAS2=$O(^XTMP("MAS_INSTAL",I,0)),MAS3=$O(^(MAS2,0))
  1. W !?5,I,?15,MAS2
  1. S MAST=$G(^XTMP("MAS_INSTAL",I))
  1. I 'MAST W ?35,"NO" Q
  1. E W ?35,"YES"
  1. I MAST S MASLAST=I
  1. Q
  1. ; **** entry to the entry points is controlled by STAT
  1. DGYPINIT ;EP
  1. ;
  1. S MAS1="MAS_INSTAL",MASI=1,MAS2="D ^DGYPINIT",MAS3="DGYPINIT"
  1. S ^XTMP(MAS1,MASI,MAS2,MAS3)=0
  1. S DIR(0)="E",DIR("A")="<CR> to Continue ""^"" to Exit" D ^DIR I Y'=1 G EXIT
  1. W @IOF,?10,MAS2
  1. W !,"Ready to run ^DGYPINIT .. answer yes to all questions,"
  1. S DIR(0)="E",DIR("A")="<CR> to Continue ""^"" to Exit" D ^DIR I Y'=1 G EXIT ;====>>
  1. D ^DGYPINIT
  1. S ^XTMP(MAS1,MASI)=1
  1. ;
  1. ORINIT ;EP
  1. ;
  1. S MAS1="MAS_INSTAL",MASI=2,MAS2="D ^ORINIT",MAS3="ORINIT"
  1. S ^XTMP(MAS1,MASI,MAS2,MAS3)=0
  1. S DIR(0)="E",DIR("A")="<CR> to Continue ""^"" to Exit" D ^DIR I Y'=1 G EXIT ;====>>
  1. W @IOF,?10,MAS2
  1. W !,"Ready to run ^ORINIT .. answer yes to all questions (5+ MIN),"
  1. S DIR(0)="E",DIR("A")="<CR> to Continue ""^"" to Exit" D ^DIR I Y'=1 G EXIT ;====>>
  1. D ^ORINIT
  1. S ^XTMP(MAS1,MASI)=1
  1. ;
  1. DPTINIT ;EP
  1. ;
  1. S MAS1="MAS_INSTAL",MASI=3,MAS2="D ^DPTINIT",MAS3="DPTINIT"
  1. S ^XTMP(MAS1,MASI,MAS2,MAS3)=0
  1. S DIR(0)="E",DIR("A")="<CR> to Continue ""^"" to Exit" D ^DIR I Y'=1 G EXIT ;====>>
  1. W @IOF,?10,MAS2
  1. W !,"Ready to run ^DPTINIT .. answer yes to all questions (3+ MIN),"
  1. S DIR(0)="E",DIR("A")="<CR> to Continue ""^"" to Exit" D ^DIR I Y'=1 G EXIT ;====>>
  1. D ^DPTINIT
  1. S ^XTMP(MAS1,MASI)=1
  1. ;
  1. DGINIT ;EP
  1. ;
  1. S MAS1="MAS_INSTAL",MASI=4,MAS2="D ^DGINIT",MAS3="DGINIT"
  1. S ^XTMP(MAS1,MASI,MAS2,MAS3)=0
  1. S DIR(0)="E",DIR("A")="<CR> to Continue ""^"" to Exit" D ^DIR I Y'=1 G EXIT ;====>>
  1. W @IOF,?10,MAS2
  1. W !,"Ready to run ^DGINIT .. answer yes to all questions (>>1 & 1/2 HOURS<<),"
  1. S DIR(0)="E",DIR("A")="<CR> to Continue ""^"" to Exit" D ^DIR I Y'=1 G EXIT ;====>>
  1. D ^DGINIT
  1. S ^XTMP(MAS1,MASI)=1
  1. ;
  1. DG5INIT ;EP
  1. ;
  1. S MAS1="MAS_INSTAL",MASI=5,MAS2="D ^DG5INIT",MAS3="DG5INIT"
  1. S ^XTMP(MAS1,MASI,MAS2,MAS3)=0
  1. S DIR(0)="E",DIR("A")="<CR> to Continue ""^"" to Exit" D ^DIR I Y'=1 G EXIT ;====>>
  1. W @IOF,?10,MAS2
  1. W !,"Ready to run ^DG5INIT .. answer yes to all questions (30+ MIN),"
  1. S DIR(0)="E",DIR("A")="<CR> to Continue ""^"" to Exit" D ^DIR I Y'=1 G EXIT ;====>>
  1. D ^DG5INIT
  1. S ^XTMP(MAS1,MASI)=1
  1. ;
  1. SDINIT ;EP
  1. ;
  1. S MAS1="MAS_INSTAL",MASI=6,MAS2="D ^SDINIT",MAS3="SDINIT",MAS3="SDINIT"
  1. S ^XTMP(MAS1,MASI,MAS2,MAS3)=0
  1. S DIR(0)="E",DIR("A")="<CR> to Continue ""^"" to Exit" D ^DIR I Y'=1 G EXIT ;====>>
  1. W @IOF,?10,MAS2
  1. W !,"Ready to run ^SDINIT .. answer yes to all questions (40+ MIN),"
  1. I '+$G(XBSDVER) D I Y'>1 G SKIPSD ;====>>
  1. . W !,"Scheduling is not previously installed on your system",!
  1. . S DIR(0)="E",DIR("A")="Enter ""^"" to Skip SDINIT" D ^DIR
  1. S DIR(0)="E",DIR("A")="<CR> to Continue ""^"" to Exit" D ^DIR I Y'=1 G EXIT ;====>>
  1. D ^SDINIT
  1. SKIPSD ;EP skipping SDINIT
  1. S ^XTMP(MAS1,MASI)=1
  1. ;
  1. DGPM5P1 ;EP
  1. ;
  1. S MAS1="MAS_INSTAL",MASI=7,MAS2="D ^DGPM5 part 1",MAS3="DGPM5P1"
  1. S ^XTMP(MAS1,MASI,MAS2,MAS3)=0
  1. S DIR(0)="E",DIR("A")="<CR> to Continue ""^"" to Exit" D ^DIR I Y'=1 G EXIT ;====>>
  1. W @IOF,?10,MAS2
  1. W !,"Ready to run ^DGPM5 part 1 .."
  1. S DIR(0)="E",DIR("A")="<CR> to Continue ""^"" to Exit" D ^DIR I Y'=1 G EXIT ;====>>
  1. D ^DGPM5
  1. S ^XTMP(MAS1,MASI)=1
  1. ;
  1. DGPM5P2 ;EP
  1. ;
  1. S MAS1="MAS_INSTAL",MASI=8,MAS2="D ^DGPM5 part 2",MAS3="DGPM5P2"
  1. S ^XTMP(MAS1,MASI,MAS2,MAS3)=0
  1. S DIR(0)="E",DIR("A")="<CR> to Continue ""^"" to Exit" D ^DIR I Y'=1 G EXIT ;====>>
  1. W @IOF,?10,MAS2
  1. W !,"Ready to run ^DGPM5 part 2 .."
  1. S DIR(0)="E",DIR("A")="<CR> to Continue ""^"" to Exit" D ^DIR I Y'=1 G EXIT ;====>>
  1. D ^DGPM5
  1. S ^XTMP(MAS1,MASI)=1
  1. S DIR(0)="E",DIR("A")="<CR> to Continue ""^"" to Exit" D ^DIR I Y'=1 G EXIT ;====>>
  1. ;
  1. ;
  1. POST ;EP
  1. ;searhc/maw this should be called last, it will convert the pointers
  1. ;in the V Hospitalization file, patient movement and provider
  1. ;pointers
  1. S MAS1="MAS_INSTAL",MASI=8,MAS2="POST^MASSETUP",MAS3="POST"
  1. S ^XTMP(MAS1,MASI,MAS2,MAS3)=0
  1. W @IOF,?10,MAS2
  1. W !,"Ready to run MAS Post Init Processing .."
  1. S DIR(0)="E",DIR("A")="<CR> to Continue ""^"" to Exit"
  1. D ^DIR
  1. I Y'=1 G EXIT
  1. D ^ADGGFL
  1. S DIR(0)="E",DIR("A")="<CR> to Continue ""^"" to Exit"
  1. I Y'=1 G EXIT
  1. D ^ADGCP
  1. S ^XTMP(MAS1,MASI)=1
  1. S DIR(0)="E",DIR("A")="<CR> to Continue ""^"" to Exit"
  1. I Y'=1 G EXIT
  1. ;
  1. DELINI ;EP delete routines
  1. S MAS1="MAS_INSTAL",MASI=9,MAS2="Delete Inits",MAS3="DELINI"
  1. S ^XTMP(MAS1,MASI,MAS2,MAS3)=0
  1. S DIR(0)="E",DIR("A")="<CR> to Continue ""^"" to Exit" D ^DIR I Y'=1 G EXIT ;====>>
  1. W @IOF,?10,MAS2
  1. W !,"Ready to Delete Inits .."
  1. S DIR(0)="E",DIR("A")="<CR> to Continue ""^"" to Exit" D ^DIR I Y'=1 G EXIT ;====>>
  1. K DIR
  1. S DIR(0)="Y"
  1. K ^XTMP("ZIBRSEL",$J)
  1. S Z=$$RSEL^ZIBRSEL("DGINI-DGINIZZ") D DEL
  1. S Z=$$RSEL^ZIBRSEL("DGONI-DGONIZZ") D DEL
  1. S Z=$$RSEL^ZIBRSEL("DG5INI-DG5INIZZ") D DEL
  1. S Z=$$RSEL^ZIBRSEL("DGYP-DGYPZZZ") D DEL
  1. S Z=$$RSEL^ZIBRSEL("SDINI-SDINIZZZ") D DEL
  1. S Z=$$RSEL^ZIBRSEL("SDONI-SDONIZZZ") D DEL
  1. S Z=$$RSEL^ZIBRSEL("ORINI-ORINIZZZ") D DEL
  1. S Z=$$RSEL^ZIBRSEL("DPTIN-DPTINZZZ") D DEL
  1. K ^XTMP("ZIBRSEL",$J)
  1. S ^XTMP(MAS1,MASI)=1
  1. ;
  1. FINISH ;EP
  1. W !,"MAS VERSION 5.0 Installation has been completed"
  1. W !,"Proceed with step 11 of the installation instructions"
  1. S DIR(0)="E",DIR("A")="<CR>" D ^DIR
  1. ;
  1. EXIT ;EP
  1. D EN^XBVK("MAS"),EN^XBVK("XB")
  1. Q
  1. DEL ;EP
  1. W !!,Z S X="" F I=1:1 S X=$O(^TMP("ZIBRSEL",$J,X)) Q:X="" D
  1. . W ?(10*I),X
  1. . X ^%ZOSF("DEL")
  1. . I I=7 W ! S I=0
  1. Q
  1. SET ;EP
  1. S X1=DT,X2=30 D C^%DTC
  1. S MAS1="MAS_INSTAL",MASI=1,MAS2="D ^DGYPINIT",MAS3="DGYPINIT"
  1. S ^XTMP(MAS1,MASI,MAS2,MAS3)=0
  1. S MAS1="MAS_INSTAL",MASI=2,MAS2="D ^ORINIT",MAS3="ORINIT"
  1. S ^XTMP(MAS1,MASI,MAS2,MAS3)=0
  1. S MAS1="MAS_INSTAL",MASI=3,MAS2="D ^DPTINIT",MAS3="DPTINIT"
  1. S ^XTMP(MAS1,MASI,MAS2,MAS3)=0
  1. S MAS1="MAS_INSTAL",MASI=4,MAS2="D ^DGINIT",MAS3="DGINIT"
  1. S ^XTMP(MAS1,MASI,MAS2,MAS3)=0
  1. S MAS1="MAS_INSTAL",MASI=5,MAS2="D ^DG5INIT",MAS3="DG5INIT"
  1. S ^XTMP(MAS1,MASI,MAS2,MAS3)=0
  1. S MAS1="MAS_INSTAL",MASI=6,MAS2="D ^SDINIT",MAS3="SDINIT",MAS3="SDINIT"
  1. S ^XTMP(MAS1,MASI,MAS2,MAS3)=0
  1. S MAS1="MAS_INSTAL",MASI=7,MAS2="D ^DGPM5 part 1",MAS3="DGPM5P1"
  1. S ^XTMP(MAS1,MASI,MAS2,MAS3)=0
  1. S MAS1="MAS_INSTAL",MASI=8,MAS2="D ^DGPM5 part 2",MAS3="DGPM5P2"
  1. S ^XTMP(MAS1,MASI,MAS2,MAS3)=0
  1. S MAS1="MAS_INSTAL",MASI=9,MAS2="D POST^MASSETUP",MAS3="POST"
  1. S ^XTMP(MAS1,MASI,MAS2,MAS3)=0
  1. S MAS1="MAS_INSTAL",MASI=10,MAS2="Delete Inits",MAS3="DELINI"
  1. S ^XTMP(MAS1,MASI,MAS2,MAS3)=0
  1. Q