V3.1-Style and Pre-V3.1-Style Procedures

Oracle Clinical V3.1 introduced a new style of Procedure, with functional enhancements. V3.1-style Procedures consist of static packages in the database rather than anonymous PL/SQL blocks, eliminating the need to parse a Procedure each time it is executed, for greater efficiency and speed.

You can continue to run existing pre-V3.1-style Procedures in V3.2 and later releases with their current functionality, or you can explicitly convert them to the V3.1 style for enhanced performance. After converting a Procedure to the V3.1 style, you can modify it to take advantage of the additional functionality. You can create new Procedures in either the newer V3.1 style (the default) or the old (pre-V3.1) style.

For more information, see:

V3.1-Style Procedure Enhancements

  • Increased speed of execution

  • Possible to add custom code in more locations in the code without editing generated PL/SQL

  • Separate Report?, Test Not Null?, Continue If Discrepancy? boxes and other settings for each variable as it is associated with each detail, making it possible to include more details in a single Procedure

  • Ability to prevent processing Question responses with current univariate discrepancies, and a multipick list of values to select which univariate discrepancies prevent processing in each detail

  • Option to choose which detail to process next, if Oracle Clinical finds a discrepancy and the Continue If Discrepancy? box is selected

  • Embedded data values in discrepancy messages to improve context sensitivity

  • Additional event order processing choices based on:

    • the leading fields DCM Date and Time, plus Visit and Subevent Numbers

    • acceptance of manually coded processing order based on trailing fields, usually Qualifying_Value and/or Repeat_SN

  • Single repeat only option for repeating Question Groups

  • Capacity to correlate Questions with the previous or next event, as well as the actual event

  • A new standard variable, question$exc_val, which provides the EXCEPTION_VALUE_TEXT field value for all Question Group Questions

  • An extended multipick list of values for variables, including Question Group Cursor key fields, Patient Position Cursor fields, internal Procedure variables, and DVG information, customized according to the field from which it is invoked

  • Optional re-execution of Procedures for patient records affected by lab range and lab range subset changes made since the last batch validation

Converting to the V3.1 Style

When converting a pre-V3.1-style Procedure to the V3.1 style, it is helpful to understand what Oracle Clinical does internally to accomplish the conversion:

  1. Populates the data structure, Variable Settings, for each detail, as appropriate.

  2. Generates the Procedure in V3.1 style, as a packaged object. This step occurs only if the Procedure being converted has been successfully generated; if not, you are prompted to generate the Procedure after conversion. Oracle Clinical will not generate Global Library Procedures.

  3. Switches the Ver 3.1 Style? box to selected if the conversion was successful.

    Note:

    Oracle Clinical saves the pre-V3.1 version of the Procedure, and reverts to it if problems are encountered in conversion.

Oracle Clinical preserves all current discrepancies associated with a Procedure when you convert the Procedure.

To convert a single existing pre-V3.1-style Procedure to the V3.1 style:

  1. Before beginning the automatic Procedure conversion, if the following three internal variable names appear in existing Pre-Details or Post-Details custom code, manually change them from the pre-V3.1-style to their V3.1-style names.

    Table 16-1 Style Variables Comparison

    Pre-V3.1-style Variable V3.1-style Variable Name

    patients_rec

    rxcpdstd.patients_rec

    test_or_prod

    rxcpdstd.v_mode

    batch_start_ts

    rxcpdstd.v_current_batch_ts

  2. Start the automatic Procedure conversion process by choosing Convert to 3.1 Style from the Special menu in the Procedure Definitions window.

    Note:

    You can convert only Procedures with a status of Active or Provisional (not Retired).

  3. If the original Procedure had Pre- or Post-Details custom code (Pre-Code or Post-Code), and that code accessed database tables (such as Patient_Positions, Responses, or Received_DCMs), you must edit the code to explicitly account for Production and Test environments. (In pre-V3.1-style Procedures, Oracle Clinical pointed to test or production tables through synonyms, which is no longer possible in the Packaged Object Model.)

    Note:

    Convert Procedures in bulk with the GEN_PROCS utility. See Chapter 8, "Utilities" in the Administrator's Guide.

For more information , see:

Conversion Example

Original, pre-V3.1-style Procedure Pre-Details custom code:

...
SELECT DATA_COMMENT_TEXT
INTO COMMENT_VAR
FROM RESPONSES
WHERE RESPONSE_ID = A.QUESTION1$RESP_ID
AND RESPONSE_TS = A.QUESTION1$ENT_TS;
...

The code after conversion by Oracle Clinical (the same, in this case; if the code had included the variables PATIENTS_REC., TEST_OR_PROD, or BATCH_START_TS, they would have been renamed RXCPDSTD.PATIENTS_REC., RXCPDSTD.V_MODE, or RXCPDSTD.V_CURRENT_BATCH_TS, respectively):

...
SELECT DATA_COMMENT_TEXT
INTO COMMENT_VAR
FROM RESPONSES
WHERE RESPONSE_ID = A.QUESTION1$RESP_ID
AND RESPONSE_TS = A.QUESTION1$ENT_TS;
...

The code after you have made the required edits to account for test and production tables' references:

IF RXCPDSTD.V_MODE = 'P' 
THEN /* PRODUCTION RUN*/
...
SELECT DATA_COMMENT_TEXT
INTO COMMENT_VAR
FROM RESPONSES
WHERE RESPONSE_ID = A.QUESTION1$RESP_ID
AND RESPONSE_TS = A.QUESTION1$ENT_TS;
...
ELSE /* TEST RUN*/
...
SELECT DATA_COMMENT_TEXT
INTO COMMENT_VAR
FROM RESPONSEST
WHERE RESPONSE_ID = A.QUESTION1$RESP_ID
AND RESPONSE_TS = A.QUESTION1$ENT_TS;
...
END IF;

Note:

For a test run, add a "T" to the name of the table to indicate the test table with the same type of data as the production table of the same name. For example, ResponsesT, not Responses.

Creating a New Pre-V3.1-Style Procedure

The default style for new Procedures from 3.1 on is the 3.1 style. However, you can create a new, pre-V3.1-style Procedure by deselecting the Ver 3.1 Enabled? box for the Procedure in the Procedure Definitions window.

You can do this only when you first create the Procedure definition, before saving it.