D Appendix D: Running HDR Terminology Jobs

Note:

Before or after running HDR Terminology Jobs, always call the ETSAdministrationService.invalidateETSCache() API to refresh the cached ETS data. Otherwise, ETS service will contain stale data in cache.

Running HDR Loader Job

You can find the database scripts in Artifacts.zip /artifacts/db or in $HDR_HOME/database/db, if the HDR database is installed using Oracle Universal Installer.

To run a HDR loader job, perform the following:

  1. Log in to the database as ORACLE_OWNER user and navigate to the $HDR_HOME/database/db/hct/execute folder.

    Execute the following command:

  2. su $ORACLE_OWNER
    

    Use the preceding command if you are not logged in as $ORACLE_OWNER user.

    cd $HDR_HOME/database/db/hct/execute
    

    Update the run_ets_loade.sql script with required job arguments.

    Substitute &1 with absolute path of the control file, &2 with the coding scheme name, and &3 with the version name.

  3. Log in to the database as sysdba user.

    Execute the following command:

    sqlplus sys@$SID as sysdba
    

    Provide the password when prompted.

  4. Execute the following script:

    @ run_ets_loader.sql;
    

    Check the log file and execution report for status.

    The log file is generated when the job starts and the execution report is generated when the job ends. These files are located in the $HDR_HOME/database/hdr_cp_lib folder.

Running HDR Importer Jobs

To run a HDR importer job, perform the following:

  1. Log in to the database as ORACLE_OWNER user and navigate to the $HDR_HOME/database/db/hct/execute folder.

  2. Execute the following commands:

    su $ORACLE_OWNER
    

    Use the preceeding command if you are not logged in as $ORACLE_OWNER user.

    cd $HDR_HOME/database/db/hct/execute
    
  3. Update the run_ets_importer.sql script with required job arguments.

    Substitute &1 with the load sequence number, which is available from execution report of the HDR loader job.

  4. Log in to the database as sysdba user.

  5. Execute the following command:

    sqlplus sys@$SID as sysdba
    

    Provide the password when prompted.

  6. Execute the following script:

    @ run_ets_importer.sql;
    
  7. Check the log file and execution report for status.

    The log file is generated when the job starts and the execution report is generated when the job ends. These files are located in the $HDR_HOME/database/hdr_cp_lib folder.

Running HDR Maintenance Job

To run a HDR maintenance job, perform the following:

  1. Log in to the database as ORACLE_OWNER user and navigate to the $HDR_HOME/database/db/hct/execute folder.

  2. Execute the following commands:

    su $ORACLE_OWNER
    

    Use the preceeding command if you are not logged in as $ ORACLE_OWNER user.

    cd $HDR_HOME/database/db/hct/execute
    
  3. Update the run_ets_maintenance.sql script with required job arguments.

    Substitute FULL with the desired mode, if you are not running in Full mode.

    The available modes are FULL, DEFAULT, CLEAN_STAGE, TRUNCATE_STAGE, CLEAN_ACTIVE, and CLASSIFICATIONS.

  4. Log in to the database as sysdba user.

  5. Execute the following command:

    sqlplus sys@$SID as sysdba
    

    Provide the password when prompted.

  6. Execute the following script:

    @ run_ets_maintenance.sql;
    
  7. Check the log file and execution report for status.

    The log file is generated when the job starts and the execution report is generated when the job ends. These files are located in the $HDR_HOME/database/hdr_cp_lib folder.

Running HDR ETS Programs Using Scripts

You can run the ETS loader, importer, and maintenance programs from the middle tier or from the database tier using the following scripts:

Middle Tier

If you want to run the ETS programs from the middle tier, ensure that HDR_HOME, WL_HOME (where WebLogic is installed), and JAVA_HOME are set properly. Before running the following scripts, edit the <HDR_HOME>/weblogic/scripts/bc4j.properties file to pass the database host name, port number, database SERVICE_NAME, and HCT schema user name.

  1. HDR Loader Script

    #!/bin/sh
    
            if [ -z "$HDR_HOME" ] || [ ! -d "$HDR_HOME" ];
            then
                    echo HDR_HOME is not set or not accessible, set to the location where HDR is installed.
                    exit
            fi
    
            if [ -z "$WL_HOME" ] || [ ! -d "$WL_HOME" ];
            then
                    echo WL_HOME is not set or not accessible, set to the location where WebLogic is installed.
                    exit
            fi
    
            if [ -z "$JAVA_HOME" ] || [ ! -d "$JAVA_HOME" ];
            then
                    echo JAVA_HOME is not set or not accessible, set to the location where JDK is installed.
                    exit
            fi
    
            JAVA=$JAVA_HOME/bin/java
            CLASSPATH="$HDR_HOME/hdr_exploded_app $HDR_HOME/hdr_exploded_app/lib/adf-share-base.jar $HDR_HOME/hdr_exploded_app/lib/adf-share-ca.jar $HDR_HOME/hdr_exploded_app/lib/adf-share-support.jar $HDR_HOME/hdr_exploded_app/lib/adflogginghandler.jar $HDR_HOME/hdr_exploded_app/lib/adfm.jar $HDR_HOME/hdr_exploded_app/lib/commons-el.jar $HDR_HOME/hdr_exploded_app/lib/dms.jar $HDR_HOME/hdr_exploded_app/lib/groovy-all-2.0.5.jar $HDR_HOME/hdr_exploded_app/lib/javatools-nodeps.jar $HDR_HOME/hdr_exploded_app/lib/jsp-el-api.jar $HDR_HOME/hdr_exploded_app/lib/mdsrt.jar $HDR_HOME/hdr_exploded_app/lib/ojdl.jar $HDR_HOME/hdr_exploded_app/lib/oracle-el.jar $HDR_HOME/hdr_exploded_app/lib/resourcebundle.jar $HDR_HOME/hdr_exploded_app/lib/share.jar $HDR_HOME/hdr_exploded_app/lib/xmlef.jar $HDR_HOME/hdr_exploded_app/lib/xmlparserv2.jar $WL_HOME/coherence/lib/coherence.jar $WL_HOME/oracle_common/modules/javax.jsp_3.0.0.0_2-2.jar $WL_HOME/oracle_common/modules/oracle.jdbc_11.2.0/ojdbc6.jar $WL_HOME/oracle_common/modules/oracle.nlsrtl_11.2.0/orai18n-mapping.jar $WL_HOME/oracle_common/modules/oracle.nlsrtl_11.2.0/orai18n.jar $WL_HOME/oracle_common/modules/javax.servlet_2.1.0.0_3-0.jar"
            BC4J_CFG=$HDR_HOME/weblogic/scripts/bc4j.properties
            LOG_CFG=$HDR_HOME/weblogic/scripts/logging.properties
            EXEC_REPORT=$HDR_HOME/hdr_ets_loader_program.rpt
            LOG_FILE=$HDR_HOME/hdr_ets_loader_program.log
            LOG_FORMAT="%5\$s%n"
    
            if [ ! -x $JAVA ]
            then
                    echo $JAVA is not executable
                    exit
            fi
    
            if [ ! -f $BC4J_CFG ] || [ ! -f $LOG_CFG ];
            then
                    echo Configuration files not readable.
                    echo $BC4J_CFG
                    echo $LOG_CFG
                    exit
            fi
    
            # get all of the files in the classpath and convert to the correct UNIX format
            HDRCP=""
            for j in $CLASSPATH
            do
                    HDRCP=$j:$HDRCP
            done
    
            echo HDR ETS Loader
            echo Report file: $EXEC_REPORT
            echo Log file: $LOG_FILE
            echo
    
            read -s -p "Enter HCT user DB password (not echoed to screen): " DB_PWD && echo
            read -p "Enter control file path: " CNTRL_FILE
            read -p "Enter Coding Scheme name: " CODING_SCHEME
            read -p "Enter Coding Scheme Version name: " VERSION_NAME
    
            if [ -z "$CNTRL_FILE" ] || [ ! -f $CNTRL_FILE ];
            then
                    echo Control file not readable.
                    echo $CNTRL_FILE
                    exit
            fi
    
            if [ -z "$CODING_SCHEME" ] || [ -z "$VERSION_NAME" ];
            then
                    echo Coding Scheme and Version names must be specified
                    exit
            fi
    
            echo
            echo Running ETS Loader as a background process
            $JAVA -classpath $HDRCP -Djava.util.logging.SimpleFormatter.format="$LOG_FORMAT" -DBC4JConfig=$BC4J_CFG -DExecutionReport=$EXEC_REPORT -DLogFile=$LOG_FILE -DDB_USER=hct -DDB_PASSWORD=$DB_PWD -Djava.util.logging.config.file=$LOG_CFG oracle.apps.hct.util.LoadManagerLauncher "$CNTRL_FILE" "$CODING_SCHEME" "$VERSION_NAME" > /dev/null 2>&1 &
            echo Process ID for ETS Loader: $!
            tail --retry -q -n 0 -f $LOG_FILE --pid=$!
    
  2. HDR Importer Script

    #!/bin/sh
    
            if [ -z "$HDR_HOME" ] || [ ! -d "$HDR_HOME" ];
            then
                    echo HDR_HOME is not set or not accessible, set to the location where HDR is installed.
                    exit
            fi
    
            if [ -z "$WL_HOME" ] || [ ! -d "$WL_HOME" ];
            then
                    echo WL_HOME is not set or not accessible, set to the location where WebLogic is installed.
                    exit
            fi
    
            if [ -z "$JAVA_HOME" ] || [ ! -d "$JAVA_HOME" ];
            then
                    echo JAVA_HOME is not set or not accessible, set to the location where JDK is installed.
                    exit
            fi
    
            JAVA=$JAVA_HOME/bin/java
            CLASSPATH="$HDR_HOME/hdr_exploded_app $HDR_HOME/hdr_exploded_app/lib/adf-share-base.jar $HDR_HOME/hdr_exploded_app/lib/adf-share-ca.jar $HDR_HOME/hdr_exploded_app/lib/adf-share-support.jar $HDR_HOME/hdr_exploded_app/lib/adflogginghandler.jar $HDR_HOME/hdr_exploded_app/lib/adfm.jar $HDR_HOME/hdr_exploded_app/lib/commons-el.jar $HDR_HOME/hdr_exploded_app/lib/dms.jar $HDR_HOME/hdr_exploded_app/lib/groovy-all-2.0.5.jar $HDR_HOME/hdr_exploded_app/lib/javatools-nodeps.jar $HDR_HOME/hdr_exploded_app/lib/jsp-el-api.jar $HDR_HOME/hdr_exploded_app/lib/mdsrt.jar $HDR_HOME/hdr_exploded_app/lib/ojdl.jar $HDR_HOME/hdr_exploded_app/lib/oracle-el.jar $HDR_HOME/hdr_exploded_app/lib/resourcebundle.jar $HDR_HOME/hdr_exploded_app/lib/share.jar $HDR_HOME/hdr_exploded_app/lib/xmlef.jar $HDR_HOME/hdr_exploded_app/lib/xmlparserv2.jar $WL_HOME/coherence/lib/coherence.jar $WL_HOME/oracle_common/modules/javax.jsp_3.0.0.0_2-2.jar $WL_HOME/oracle_common/modules/oracle.jdbc_11.2.0/ojdbc6.jar $WL_HOME/oracle_common/modules/oracle.nlsrtl_11.2.0/orai18n-mapping.jar $WL_HOME/oracle_common/modules/oracle.nlsrtl_11.2.0/orai18n.jar $WL_HOME/oracle_common/modules/javax.servlet_2.1.0.0_3-0.jar"
            BC4J_CFG=$HDR_HOME/weblogic/scripts/bc4j.properties
            LOG_CFG=$HDR_HOME/weblogic/scripts/logging.properties
            EXEC_REPORT=$HDR_HOME/hdr_ets_importer_program.rpt
            LOG_FILE=$HDR_HOME/hdr_ets_importer_program.log
            LLOG_FILE=$HDR_HOME/hdr_ets_loader_program.log
            LOG_FORMAT="%5\$s%n"
            SEQNO=`tail -n 100 $LLOG_FILE|grep "Load Sequence"|tail -n 1|sed 's/^.*Sequence.\+\ \([0-9]\+\)$/\1/'`
    
            if [ ! -f $LLOG_FILE ]
            then
                    echo Importer cannot be run without running the loader first
                    echo Run the loader or check that the loader log file is readable
                    exit
            fi
    
            if [ ! -x $JAVA ]
            then
                    echo $JAVA is not executable
                    exit
            fi
    
            if [ ! -f $BC4J_CFG ] || [ ! -f $LOG_CFG ];
            then
                    echo Configuration files not readable.
                    echo $BC4J_CFG
                    echo $LOG_CFG
                    exit
            fi
    
            # get all of the files in the classpath and convert to the correct UNIX format
            HDRCP=""
            for j in $CLASSPATH
            do
                    HDRCP=$j:$HDRCP
            done
    
            echo HDR ETS Importer
            echo Report file: $EXEC_REPORT
            echo Log file: $LOG_FILE
            echo Loader Log file: $LLOG_FILE
            echo
    
            read -s -p "Enter HCT user DB password (not echoed to screen): " DB_PWD && echo
            read -p "Enter Load Sequence Number (default=$SEQNO): " SEQ_N
    
            if [ ! -z "$SEQ_N" ]
            then
                    SEQNO=$SEQ_N
            fi
    
            echo
            echo Running ETS Importer as a background process
            $JAVA -classpath $HDRCP -Djava.util.logging.SimpleFormatter.format="$LOG_FORMAT" -DBC4JConfig=$BC4J_CFG -DExecutionReport=$EXEC_REPORT -DLogFile=$LOG_FILE -DDB_USER=hct -DDB_PASSWORD=$DB_PWD -Djava.util.logging.config.file=$LOG_CFG oracle.apps.hct.util.ImportManagerLauncher $SEQNO > /dev/null 2>&1 &
            echo Process ID for ETS Importer: $!
            tail --retry -q -n 0 -f $LOG_FILE --pid=$!
            
    
  3. HDR Maintenance Script

    Note:

    ETS Maintenance Job prompts for the run mode. For run mode details, see Scheduling the Maintenance Job in the Oracle Healthcare Data Repository Implementation Guide.
    #!/bin/sh
            if [ -z "$HDR_HOME" ] || [ ! -d "$HDR_HOME" ];
            then
                    echo HDR_HOME is not set or not accessible, set to the location where HDR is installed.
                    exit
            fi
    
            if [ -z "$WL_HOME" ] || [ ! -d "$WL_HOME" ];
            then
                    echo WL_HOME is not set or not accessible, set to the location where WebLogic is installed.
                    exit
            fi
    
            if [ -z "$JAVA_HOME" ] || [ ! -d "$JAVA_HOME" ];
            then
                    echo JAVA_HOME is not set or not accessible, set to the location where JDK is installed.
                    exit
            fi
    
            JAVA=$JAVA_HOME/bin/java
            CLASSPATH="$HDR_HOME/hdr_exploded_app $HDR_HOME/hdr_exploded_app/lib/adf-share-base.jar $HDR_HOME/hdr_exploded_app/lib/adf-share-ca.jar $HDR_HOME/hdr_exploded_app/lib/adf-share-support.jar $HDR_HOME/hdr_exploded_app/lib/adflogginghandler.jar $HDR_HOME/hdr_exploded_app/lib/adfm.jar $HDR_HOME/hdr_exploded_app/lib/commons-el.jar $HDR_HOME/hdr_exploded_app/lib/dms.jar $HDR_HOME/hdr_exploded_app/lib/groovy-all-2.0.5.jar $HDR_HOME/hdr_exploded_app/lib/javatools-nodeps.jar $HDR_HOME/hdr_exploded_app/lib/jsp-el-api.jar $HDR_HOME/hdr_exploded_app/lib/mdsrt.jar $HDR_HOME/hdr_exploded_app/lib/ojdl.jar $HDR_HOME/hdr_exploded_app/lib/oracle-el.jar $HDR_HOME/hdr_exploded_app/lib/resourcebundle.jar $HDR_HOME/hdr_exploded_app/lib/share.jar $HDR_HOME/hdr_exploded_app/lib/xmlef.jar $HDR_HOME/hdr_exploded_app/lib/xmlparserv2.jar $WL_HOME/coherence/lib/coherence.jar $WL_HOME/oracle_common/modules/javax.jsp_3.0.0.0_2-2.jar $WL_HOME/oracle_common/modules/oracle.jdbc_11.2.0/ojdbc6.jar $WL_HOME/oracle_common/modules/oracle.nlsrtl_11.2.0/orai18n-mapping.jar $WL_HOME/oracle_common/modules/oracle.nlsrtl_11.2.0/orai18n.jar $WL_HOME/oracle_common/modules/javax.servlet_2.1.0.0_3-0.jar"
            BC4J_CFG=$HDR_HOME/weblogic/scripts/bc4j.properties
            LOG_CFG=$HDR_HOME/weblogic/scripts/logging.properties
            EXEC_REPORT=$HDR_HOME/hdr_ets_maintenance_program.rpt
            LOG_FILE=$HDR_HOME/hdr_ets_maintenance_program.log
            LOG_FORMAT="%5\$s%n"
            RUNMODE=FULL
    
            if [ ! -x $JAVA ]
            then
                    echo $JAVA is not executable
                    exit
            fi
    
            if [ ! -f $BC4J_CFG ] || [ ! -f $LOG_CFG ];
            then
                    echo Configuration files not readable.
                    echo $BC4J_CFG
                    echo $LOG_CFG
                    exit
            fi
    
            # get all of the files in the classpath and convert to the correct UNIX format
            HDRCP=""
            for j in $CLASSPATH
            do
                    HDRCP=$j:$HDRCP
            done
    
            echo HDR ETS Maintenance
            echo Report file: $EXEC_REPORT
            echo Log file: $LOG_FILE
            echo
    
            read -s -p "Enter HCT user DB password (not echoed to screen): " DB_PWD && echo
            read -p "Enter maintenance run mode (default=$RUNMODE): " RUN_MODE
            if [ ! -z "$RUN_MODE" ]
            then
                    RUNMODE=$RUN_MODE
            fi
    
            echo
            echo Running ETS Maintenance as a background process
            $JAVA -classpath $HDRCP -Djava.util.logging.SimpleFormatter.format="$LOG_FORMAT" -DBC4JConfig=$BC4J_CFG -DExecutionReport=$EXEC_REPORT -DLogFile=$LOG_FILE -DDB_USER=hct -DDB_PASSWORD=$DB_PWD -Djava.util.logging.config.file=$LOG_CFG oracle.apps.hct.util.MaintenanceManagerLauncher $RUNMODE > /dev/null 2>&1 &
            echo Process ID for ETS Maintenance: $!
            tail --retry -q -n 0 -f $LOG_FILE --pid=$!
                    
    

Database Tier

If you want to run the HDR ETS programs from the database tier, ensure that HDR_HOME and JAVA_HOME are set properly.

If the database tier installation was manual, then save HDR_HOME to the location where the artifacts.zip was extracted, and edit the following scripts to replace the text database with db to set right values for CLASSPATH, BC4J_CFG, LOG_CFG, EXEC_REPORT, and LOG_FILE.

  1. HDR Loader Script

    #!/bin/sh
    
            if [ -z "$HDR_HOME" ] && [ -d $HDR_HOME ];
            then
                    echo HDR_HOME is not set or not accessible, set to the location where HDR is installed.
                    exit
            fi
    
            if [ -z "$JAVA_HOME" ] && [ -d $JAVA_HOME ];
            then
                    echo JAVA_HOME is not set or not accessible, set to the location where JDK is installed.
                    exit
            fi
    
            JAVA=$JAVA_HOME/bin/java
            CLASSPATH="$HDR_HOME/database/hdr_cp_lib/*"
            BC4J_CFG=$HDR_HOME/database/hdr_cp_lib/bc4j.properties
            LOG_CFG=$HDR_HOME/database/hdr_cp_lib/logging.properties
            EXEC_REPORT=$HDR_HOME/database/hdr_cp_lib/hdr_ets_loader_program.rpt
            LOG_FILE=$HDR_HOME/database/hdr_cp_lib/hdr_ets_loader_program.log
            LOG_FORMAT="%5\$s%n"
    
            if [ ! -x $JAVA ]
            then
                    echo $JAVA is not executable
                    exit
            fi
    
            if [ ! -f $BC4J_CFG ] || [ ! -f $LOG_CFG ];
            then
                    echo Configuration files not readable.
                    echo $BC4J_CFG
                    echo $LOG_CFG
                    exit
            fi
    
            echo HDR ETS Loader
            echo HDR_HOME : $HDR_HOME
            echo Report file: $EXEC_REPORT
            echo Log file: $LOG_FILE
            echo
    
            read -s -p "Enter HCT user DB password (not echoed to screen): " DB_PWD && echo
            read -p "Enter control file path: " CNTRL_FILE
            read -p "Enter Coding Scheme name: " CODING_SCHEME
            read -p "Enter Coding Scheme Version name: " VERSION_NAME
    
            if [ -z "$CNTRL_FILE" ] || [ ! -f $CNTRL_FILE ];
            then
                    echo Control file not readable.
                    echo $CNTRL_FILE
                    exit
            fi
    
            if [ -z "$CODING_SCHEME" ] || [ -z "$VERSION_NAME" ];
            then
                    echo Coding Scheme and Version names must be specified
                    exit
            fi
    
            # get all of the files in the classpath and convert to the correct UNIX format
            HDRCP=""
            for j in $CLASSPATH
            do
                    HDRCP=$j:$HDRCP
            done
    
            echo
            echo Running ETS Loader as a background process
            $JAVA -classpath $HDRCP -Djava.util.logging.SimpleFormatter.format="$LOG_FORMAT" -DBC4JConfig=$BC4J_CFG -DExecutionReport=$EXEC_REPORT -DLogFile=$LOG_FILE -DDB_USER=hct -DDB_PASSWORD=$DB_PWD -Djava.util.logging.config.file=$LOG_CFG oracle.apps.hct.util.LoadManagerLauncher "$CNTRL_FILE" "$CODING_SCHEME" "$VERSION_NAME" > /dev/null 2>&1 &
            echo Process ID for ETS Loader: $!
            tail --retry -q -n 0 -f $LOG_FILE --pid=$!
    
  2. HDR Importer Script

    #!/bin/sh
    
            if [ -z "$HDR_HOME" ] && [ -d $HDR_HOME ];
            then
                    echo HDR_HOME is not set or not accessible, set to the location where HDR is installed.
                    exit
            fi
    
            if [ -z "$JAVA_HOME" ] && [ -d $JAVA_HOME ];
            then
                    echo JAVA_HOME is not set or not accessible, set to the location where JDK is installed.
                    exit
            fi
    
            JAVA=$JAVA_HOME/bin/java
            CLASSPATH="$HDR_HOME/database/hdr_cp_lib/*"
            BC4J_CFG=$HDR_HOME/database/hdr_cp_lib/bc4j.properties
            LOG_CFG=$HDR_HOME/database/hdr_cp_lib/logging.properties
            EXEC_REPORT=$HDR_HOME/database/hdr_cp_lib/hdr_ets_importer_program.rpt
            LOG_FILE=$HDR_HOME/database/hdr_cp_lib/hdr_ets_importer_program.log
            LLOG_FILE=$HDR_HOME/database/hdr_cp_lib/hdr_ets_loader_program.log
            LOG_FORMAT="%5\$s%n"
            SEQNO=`tail -n 100 $LLOG_FILE|grep "Load Sequence"|tail -n 1|sed 's/^.*Sequence.\+\ \([0-9]\+\)$/\1/'`
    
            if [ ! -f $LLOG_FILE ]
            then
                    echo Importer cannot be run without running the loader first
                    echo Run the loader or check that the loader log file is readable
                    exit
            fi
    
            if [ ! -x $JAVA ]
            then
                    echo $JAVA is not executable
                    exit
            fi
    
            if [ ! -f $BC4J_CFG ] || [ ! -f $LOG_CFG ];
            then
                    echo Configuration files not readable.
                    echo $BC4J_CFG
                    echo $LOG_CFG
                    exit
            fi
    
            echo HDR ETS Importer
            echo HDR_HOME : $HDR_HOME
            echo Report file: $EXEC_REPORT
            echo Log file: $LOG_FILE
            echo Loader Log file: $LLOG_FILE
            echo
    
            read -s -p "Enter HCT user DB password (not echoed to screen): " DB_PWD && echo
            read -p "Enter Load Sequence Number (default=$SEQNO): " SEQ_N
    
            if [ ! -z "$SEQ_N" ]
            then
                    SEQNO=$SEQ_N
            fi
    
            # get all of the files in the classpath and convert to the correct UNIX format
            HDRCP=""
            for j in $CLASSPATH
            do
                    HDRCP=$j:$HDRCP
            done
    
            echo
            echo Running ETS Importer as a background process
            $JAVA -classpath $HDRCP -Djava.util.logging.SimpleFormatter.format="$LOG_FORMAT" -DBC4JConfig=$BC4J_CFG -DExecutionReport=$EXEC_REPORT -DLogFile=$LOG_FILE -DDB_USER=hct -DDB_PASSWORD=$DB_PWD -Djava.util.logging.config.file=$LOG_CFG oracle.apps.hct.util.ImportManagerLauncher $SEQNO > /dev/null 2>&1 &
            echo Process ID for ETS Importer: $!
            tail --retry -q -n 0 -f $LOG_FILE --pid=$!
            
    
  3. HDR Maintenance Script

    Note:

    ETS Maintenance Job prompts for the run mode. For run mode details, see Scheduling the Maintenance Job in the Oracle Healthcare Data Repository Implementation Guide.
    #!/bin/sh
    
            if [ -z "$HDR_HOME" ] && [ -d $HDR_HOME ];
            then
                    echo HDR_HOME is not set or not accessible, set to the location where HDR is installed.
                    exit
            fi
    
            if [ -z "$JAVA_HOME" ] && [ -d $JAVA_HOME ];
            then
                    echo JAVA_HOME is not set or not accessible, set to the location where JDK is installed.
                    exit
            fi
    
            JAVA=$JAVA_HOME/bin/java
            CLASSPATH="$HDR_HOME/database/hdr_cp_lib/*"
            BC4J_CFG=$HDR_HOME/database/hdr_cp_lib/bc4j.properties
            LOG_CFG=$HDR_HOME/database/hdr_cp_lib/logging.properties
            EXEC_REPORT=$HDR_HOME/database/hdr_cp_lib/hdr_ets_maintenance_program.rpt
            LOG_FILE=$HDR_HOME/database/hdr_cp_lib/hdr_ets_maintenance_program.log
            LOG_FORMAT="%5\$s%n"
            RUNMODE=FULL
    
            if [ ! -x $JAVA ]
            then
                    echo $JAVA is not executable
                    exit
            fi
    
            if [ ! -f $BC4J_CFG ] || [ ! -f $LOG_CFG ];
            then
                    echo Configuration files not readable.
                    echo $BC4J_CFG
                    echo $LOG_CFG
                    exit
            fi
    
            echo HDR ETS Maintenance
            echo HDR_HOME : $HDR_HOME
            echo Report file: $EXEC_REPORT
            echo Log file: $LOG_FILE
            echo
    
            read -s -p "Enter HCT user DB password (not echoed to screen): " DB_PWD && echo
            read -p "Enter maintenance run mode (default=$RUNMODE): " RUN_MODE
            if [ ! -z "$RUN_MODE" ]
            then
                    RUNMODE=$RUN_MODE
            fi
            # get all of the files in the classpath and convert to the correct UNIX format 
            HDRCP=""
            for j in $CLASSPATH
            do
                    HDRCP=$j:$HDRCP
            done
    
            echo
            echo Running ETS Maintenance as a background process
            $JAVA -classpath $HDRCP -Djava.util.logging.SimpleFormatter.format="$LOG_FORMAT" -DBC4JConfig=$BC4J_CFG -DExecutionReport=$EXEC_REPORT -DLogFile=$LOG_FILE -DDB_USER=hct -DDB_PASSWORD=$DB_PWD -Djava.util.logging.config.file=$LOG_CFG oracle.apps.hct.util.MaintenanceManagerLauncher $RUNMODE > /dev/null 2>&1 &
            echo Process ID for ETS Maintenance: $!
            tail --retry -q -n 0 -f $LOG_FILE --pid=$!