Populate a Calculated Column in RM

You can populate customized calculated column(s) to the existing RM tables that do not exist in the Oracle Argus Safety database. You can also populate column(s) which are calculated on the basis of the existing columns in a table.

To populate such custom columns, create a procedure, and use ETL Hooks to execute them.

Example 5-2 Create a custom procedure

Creating a procedure called P_UPD_RM_CASE_PAT_INFO, to populate a new column called PAT_FULL_NAME in the table RM_CASE_PAT_INFO. The value of this column is calculated, and populated from the existing columns of RM_CASE_PAT_INFO. Here, we concatenate three columns PAT_INITIALS, PAT_FIRSTNAME, and PAT_LASTNAME to populate this value as PAT_FULL_NAME.

  1. Create a procedure called P_UPD_RM_CASE_PAT_INFO.

  2. In the table RM_CASE_PAT_INFO, populate a new column called PAT_FULL_NAME.

    The value of this column is calculated, and populated from the existing columns of RM_CASE_PAT_INFO.

  3. Concatenate three columns PAT_INITIALS, PAT_FIRSTNAME, and PAT_LASTNAME to populate this value as PAT_FULL_NAME.

    Figure 5-2 Create Custom Procedure

    SQL to Create Custom Procedure
  4. Once this procedure is created, call this procedure using ETL Hook PRE_REPORTING_TABLES_POPULATION.

    The ETL Hook will populate this new column PAT_FULL_NAME in SDLP_CASE_PAT_INFO.