View
325
Download
8
Tags:
Embed Size (px)
DESCRIPTION
Ensuring the validity of patient data in your clinical data management and EDC system is essential. However, without a way to programmatically identify discrepancies and inconsistencies, such a task can inadvertently leave bad data in your system. Through validation procedures, an endless assortment of expressions and formulas, Oracle Clinical offers the powerful ability to clean and compare patient data. In this slideshare, Perficient's Dr. Steve Rifkin, a leading expert in Oracle Clinical, demonstrates the structure of validation procedures, as well as provides various tips and techniques for developing procedures that improve the performance of edit checks.
Citation preview
Tips and Techniques for Improving the Performance of Validation Procedures in Oracle Clinical
Steve Rifkin, Lead Technical Analyst, Clinical Data Management & EDCLife Sciences Business Unit
facebook.com/perficient twitter.com/perficient_LSlinkedin.com/company/perficient
Welcome & Introduction
Steve RifkinLead Technical AnalystClinical Data Management & EDCLife Sciences, Perficient
• Extensive Oracle Clinical/RDC experience– 18+ years of experience with Oracle Clinical/RDC
– Member of the team that implements, supports,
enhances and integrates Oracle Clinical/RDC solutions
– 50+ implementations and integrations
Perficient is a leading information technology consulting firm serving clients throughout
North America and Europe.
We help clients implement business-driven technology solutions that integrate business
processes, improve worker productivity, increase customer loyalty and create a more agile
enterprise to better respond to new business opportunities.
About Perficient
• Founded in 1997
• Public, NASDAQ: PRFT
• 2013 revenue ~$373 million
• Major market locations throughout North America• Atlanta, Boston, Charlotte, Chicago, Cincinnati, Cleveland,
Columbus, Dallas, Denver, Detroit, Fairfax, Houston, Indianapolis, Los Angeles, Minneapolis, New Orleans, New York City, Northern California, Philadelphia, Southern California, St. Louis, Toronto and Washington, D.C.
• Global delivery centers in China, Europe and India
• >2,100 colleagues
• Dedicated solution practices
• ~85% repeat business rate
• Alliance partnerships with major technology vendors
• Multiple vendor/industry technology and growth awards
Perficient Profile
BUSINESS SOLUTIONSBusiness IntelligenceBusiness Process ManagementCustomer Experience and CRMEnterprise Performance ManagementEnterprise Resource PlanningExperience Design (XD)Management Consulting
TECHNOLOGY SOLUTIONSBusiness Integration/SOACloud ServicesCommerceContent ManagementCustom Application DevelopmentEducationInformation ManagementMobile PlatformsPlatform IntegrationPortal & Social
Our Solutions Expertise
Life SciencesPr
actic
es /
Solu
tions
ImplementationMigration
Integration
ValidationConsultingUpgrades
Managed ServicesApplication Development
Private Cloud Hosting
Application SupportSub-licensingStudy Setup
Services
Deep Clinical and Pharmacovigilance Applications Expertise
Clinical TrialManagement
Clinical Trial Planning and BudgetingOracle ClearTrial
CTMSOracle Siebel CTMS / ASCEND
Mobile CRA
Clinical Data Management & Electronic Data Capture
CDMSOracle Clinical
Electronic Data CaptureOracle Remote Data Capture
Oracle InForm
Medical CodingOracle Thesaurus Management System
Safety &Pharmacovigilance
Adverse Event ReportingOracle Argus Safety Suite
Oracle AERS / Empirica TraceAxway Synchrony Gateway
Signal ManagementOracle Empirica Signal/Topics
Medical CodingOracle Thesaurus Management System
Clinical DataWarehousing & Analytics
Clinical Data WarehousingOracle Life Sciences Data Hub
Clinical Data AnalyticsOracle Clinical Development Analytics
JReview
Data Review and CleansingOracle Data Management Workbench
Clients
Agenda
• What is an Oracle Clinical Procedure• Review of PL/SQL Concepts
– Cursors and Package Structure• Oracle Clinical Cursors• Structure of Oracle Clinical MAIN Procedure• Retrieval Techniques
– Correlations– Qualifying Expressions– WHERE clause extension– Visit Limitations
• Performance Considerations
What is an Oracle Clinical Procedure?
Definition => Validation Procs => Procedures
Definition => Validation Procs => Procedures
It’s a program!
What is an Oracle Clinical Procedure?
• Procedure templates are completed • Procedure is “generated” and
What is an Oracle Clinical Procedure?
A PL/SQL Program is created!
To get the most out of OC procedures, you need to understand the structure of the program you create.
Review of PL/SQL Concepts
• Detailed knowledge of PL/SQL syntax is not required for understanding the overall program structure.– However, knowledge of PL/SQL cursors and of the
PL/SQL Package structure is required.
PL/SQL Cursors
In SQL*Plus, a “select statement” retrieves an entire set of records:
SQL> select patient, patient_position_id from patient_positions; PATIENT PATIENT_POSITION_ID---------- -------------------100 5001101 5101102 5201103 5301104 5401105 5501106 5601107 5701108 5801109 5901
Cursors also retrieve of a set of records; but unlike SQL*Plus, cursors allow access to one record at a time for procedural operations on data within the record.
• Cursors are objects in a PL/SQL program• To use, cursors must be
1. Declared (to define the set of results)2. Opened (to initialize)3. Fetched (to retrieve one row for operations)4. Closed (to release)
PL/SQL Cursors
• Cursor declaration defines the set of records to be retrieved from the database:
• Like a “file” a cursor must be opened before it can be used:
CURSOR cHeight IS SELECT height, height_unitFROM height_table WHERE patient=‘100’ ORDER BY visit_number;
OPEN cHeight;
PL/SQL Cursors
PL/SQL Cursors
• A “fetch” on the cursor retrieves a single row from the set of selected records and places the result into program variables:
FETCH cHeight INTO height_var, height_unit_var;
CLOSE cHeight;
• Cursors are closed to release memory and perform internal cleanup:
PL/SQL Cursors
• Cursors are often fetched in a “loop” which processes the record:
LOOP FETCH cHeight INTO height_var, height_unit_var ; IF cHeight%NOTFOUND THEN
EXIT LOOP; ELSE
<process current height_var, height_unit_var> END IF;
END LOOP;
PAT_LOOP FETCH cPatient_data into patient_var;
IF cPatient_data%FOUND THEN
ELSE EXIT PAT_LOOP;
END IF; END PAT_LOOP;
HEIGHT_LOOP FETCH cHeight INTO height_var, height_unit_var ;
IF cHeight%FOUND THEN<process patient_var, height_var, height_unit_var>
ELSE EXIT HEIGHT_LOOP;
END IF; END HEIGHT_LOOP
Nesting PL/SQL Cursors
Cursors used by Oracle Clinical
• Patient Information Cursor– Retrieves a record with all the information recorded for a
single patient• DCM Cursor(s)
– A DCM cursor for each “alias” listed on the procedure question group form
– Retrieves the DCM responses (for the questions on the procedure question screen) and DCM header information
Fields Retrieved by the Patient Cursor
• V_CLINICAL_STUDY_VERSION_ID• V_DATA_MODIFIED_FLAG• V_PROCEDURE_ID• V_PROCEDURE_VERSION_SN• V_PROCEDURE_TYPE_CODE• V_USERNAME• V_DEBUG• V_LAST_BATCH_TS• V_CURRENT_LOCATION• V_MODE• V_LAB_DEPENDENT_FLAG• REPORTED_SEX• REPORTED_BIRTH_DATE• PATIENT_POSITION_ID
• CLINICAL_STUDY_ID• REPORTED_DEATH_DATE• PATIENT• INVESTIGATOR_ID• SITE_ID• EARLY_TERMINATION_FLAG• PATIENT_ENROLLMENT_DATE• CLINICAL_SUBJECT_ID• INCLUSION_EXCLUSION_DATE• REPORTED_PATIENT_REFERENCE• REPORTED_INITIALS• REPORTED_DATE_LAST_PREGNACY• FIRST_SCREENING_DATE• TERMINATION_DATE
Fields Retrieved by a DCM Cursor
• ACTUAL_EVENT_ID• CLIN_PLAN_EVE_ID• CLIN_PLAN_EVE_NAME• DCM_DATE• DCM_ID• DCM_SUBSET_SN• DCM_TIME• INVESTIGATOR_ID• LAB• LAB_ID• LAB_RANGE_SUBSET_NUM
• QUALIFYING_VALUE• RECEIVED_DCM_ENTRY_TS• RECEIVED_DCM_ID• REPEAT_SN• SITE_ID• SUBEVENT_NUMBER• VISIT_NUMBER
Using Patient Cursor Fields
• To use a value for a “V_” field, prefix the field name with “rxcpdstd.”– e.g., rxcpdstd.v_data_modified_flag
• To use all other variables, prefix the name with “rxcpdstd.patients_rec.” – e.g., rxcpdstd.patients_rec.reported_birth_date
Fields retrieved in the patient information cursor can be used to perform tests or calculations in your procedures or can be
used as arguments to custom functions you may write.
Structure of PL/SQL Packages
• Generation of an Oracle Clinical procedure results in a PL/SQL package
• PL/SQL packages contain one or more functions and/or procedures and have two sections– Specification
• Lists all procedures and functions in the package• Declares all cursors and variables to be available to all the
functions and procedures (i.e. the “common” area)
– Body • Contains all the procedural code for the procedures and
functions listed in the specification
Package Specification in Oracle Clinical
CREATE PACKAGE rxcpd_xxx_xx as CURSOR 1 is . . . . CURSOR 2 is . . . .
CURSOR n is . . . .
PROCEDURE main (… … …); PROCEDURE insert_discrepancy(… … …); PROCEDURE exception_handling (… … …); END rxcpd_xxx_xx;
. . .
Package is named with internal id and version numbers
Definition and number of cursors declared depends on the number of “aliases” on the procedure question group form
Three PL/SQL procedures are part of each Oracle Clinical package
Body for a Package in Oracle Clinical
INSERT_DISCREPANCY and EXCEPTION_HANDLING procedures call Oracle Clinical built-in packages and cannot be readily changed
CREATE PACKAGE BODY rxcpd_xxx_xx as PROCEDURE main (… … …); <Program Code >END main; PROCEDURE insert_discrepancy(… … …); < Program Code>END insert_discrepancy; PROCEDURE exception_handling (… … …); <Program Code>END exception_handling; END rxcpd_xxx_xx;
Program code in the MAINprocedure depends on options chosen on the procedure definition forms
• MAIN procedure is a series of nested loops• For a simple procedure, outermost loop fetches the
patient information– Next loop fetches DCM information as defined by the
first procedure question group definition• After fetching the innermost loop, the expression
details are evaluated
Simplified Structure of a MAIN Procedure
LOOP<Patient> Fetch Patient cursor
LOOP <DCM1> Fetch DCM1 Cursor
Execute Details
End <DCM1> LoopEnd <Patient> Loop
Simplified Structure of a MAIN Procedure …
One DCM Procedure Question Group
LOOP<Patient> Fetch Patient cursor
LOOP <DCM1> Fetch DCM1 Cursor
Execute Details
End <DCM1> LoopEnd <Patient> Loop
LOOP <DCM2> Fetch DCM2 Cursor
End <DCM2> Loop
Two DCM Procedure Question Groups
Simplified Structure of a MAIN Procedure
Some Techniques to Limit Retrievals
• Correlate inner loop with a more outer loop– On event– On qualifying question value– On question values
• Qualifying expressions• WHERE clause extension• Limit visits retrieved by the cursor
Correlations
• Can correlate on events– Inner cursor retrieves only a visit retrieved by the outer correlated cursor
• Can correlate on qualifying questions– Inner cursor only retrieves DCMs which have the same value for the DCM
qualifying question
• Can correlate on question values– Inner cursor fetches only if a question’s value is equal to a question’s value
in the outer cursor
Correlation limits the fetches for inner cursors based on data obtained by a fetch in a more outer cursor.
Fetch data for Patient 100Fetch SYSTOLIC_BP from VITALS DCM for Visit 1, Pt 100
Correlation on Event
Retrieval with No Correlation
Fetch HYPERTENSIVE_YN from HYPERTENSION DCM for Visit 1, Pt 100 Test
Fetch SYSTOLIC_BP from VITALS DCM for Visit 2, Pt 100Fetch HYPERTENSIVE_YN from HYPERTENSION DCM for Visit 1, Pt 100
Test
Fetch HYPERTENSIVE_YN from HYPERTENSION DCM for Visit 2, Pt 100 Test
Fetch HYPERTENSIVE_YN from HYPERTENSION DCM for Visit 2, Pt 100 Test
Fetch data for Patient 100Fetch SYSTOLIC_BP from VITALS DCM for Visit 1, Pt 100
Correlation on Event
Retrieval with Correlation on Event
Fetch HYPERTENSIVE_YN from HYPERTENSION DCM for Visit 1, Pt 100 Test
Fetch SYSTOLIC_BP from VITALS DCM for Visit 2, Pt 100
Fetch HYPERTENSIVE_YN from HYPERTENSION DCM for Visit 2, Pt 100 Test
Fetch HYPERTENSIVE_YN from HYPERTENSION DCM for Visit 2, Pt 100 TestX
Fetch HYPERTENSIVE_YN from HYPERTENSION DCM for Visit 1, Pt 100 TestX
Correlation on Event
Definition => Validation Procs => Procedures, Press [Q-Groups]
Alias to correlate toInner loops use the same event (including subevent) as retrieved for the outer (correlated) loop
Correlation on Qualifying Question Value
• Assume two qualified DCMs recorded at a visit– Vitals DCM: qualified at Pre-Dose, 1 Hr Post-dose– EKG DCM: qualified at Pre-Dose, 1 Hr Post-dose
• Correlate on both visit and qualifying question
Fetch data for Patient 100Fetch SYSTOLIC_BP from VITALS DCM for Visit 1, Pt 100, Pre-Dose
X
Fetch EKG from EKG DCM for Visit 1, Pt 100, Pre-doseFetch EKG from EKG DCM for Visit 1, Pt 100, Post-doseFetch EKG from EKG DCM for Visit 2, Pt 100, Pre-doseFetch EKG from EKG DCM for Visit 2, Pt 100, Post-dose
XX
Fetch SYSTOLIC_BP from VITALS DCM for Visit 1, Pt 100, Post-Dose
Fetch SYSTOLIC_BP from VITALS DCM for Visit 2, Pt 100, Pre-Dose
Fetch EKG from EKG DCM for Visit 1, Pt 100, Pre-doseFetch EKG from EKG DCM for Visit 1, Pt 100, Post-doseFetch EKG from EKG DCM for Visit 2, Pt 100, Pre-doseFetch EKG from EKG DCM for Visit 2, Pt 100, Post-dose
XX
XFetch SYSTOLIC_BP from VITALS DCM for Visit 2, Pt 100, Post-Dose
X
Fetch EKG from EKG DCM for Visit 1, Pt 100, Pre-doseFetch EKG from EKG DCM for Visit 1, Pt 100, Post-doseFetch EKG from EKG DCM for Visit 2, Pt 100, Pre-doseFetch EKG from EKG DCM for Visit 2, Pt 100, Post-dose
X
X
X
Fetch EKG from EKG DCM for Visit 1, Pt 100, Pre-doseFetch EKG from EKG DCM for Visit 1, Pt 100, Post-doseFetch EKG from EKG DCM for Visit 2, Pt 100, Pre-doseFetch EKG from EKG DCM for Visit 2, Pt 100, Post-dose
XX
Correlation on Qualifying Question Value
Correlating Questions
• Use responses to DCM questions to correlate between outer and inner fetch loops– May want to fetch AE records where AE description
matches the indication given for ConMed
Definition => Validation Procs => Procedures, Press [Q-Groups]
Definition => Validation Procs => Procedures, Press [Q-Groups], [Correlating Questions]
Inner loop will fetch records only if the values of the responses to the two pairs of questions are the same!
Outer LoopOuter LoopInner Loop
Correlating Questions
Correlations
• Can correlate on Events– Inner cursor retrieves only a visit retrieved by the outer correlated cursor
• Can correlate on Qualifying Questions– Inner cursor only retrieves DCMs which have the same value for the DCM
Qualifying Question
• Can correlate on Questions– Inner cursor fetches only if a question’s value is equal to a question’s value
in the outer cursor
Correlation limits the fetches for inner cursors based on data obtained by a fetch in a more outer cursor
Effect of Correlation on Event
ACTUAL_EVENT_ID is retrieved as part of the standard cursor variables in the outer cursor
…….
Outer Cursor Definition
Cursor variable i_actual_event_id specified when cursor is opened
used in the where clause
…….
Inner Cursor Definition
Effect of Correlation on Event
Call to open inner (CM) cursor uses the actual_event_id retrieved by the outer_cursor
Fetch on the outer (AE) cursor retrieves a value of actual_event_id
);
Effect of Correlation on Event
Effect of Qualifying Question Value and Question Value Correlation
• Other types of correlation (on qualifying question value or question values) work in the same way– When procedure compiled using these techniques, the
procedure question group cursors are restricted– Opening of cursors in the MAIN procedure use cursor
variables
Qualifying Expressions
• Allow selection of records based on any information retrieved by the current or any more outer cursor– Can join values between cursors in the qualifying
expression
Continue only if medication on the AE form is not null
Qualifying Expressions
• Allow selection of records based on any information retrieved by the current or any more outer cursor– Can join values between cursors in the qualifying expression
Continue only if Medication on the AE form is not null
Patient Record Loop
Details
Fetch Qualify Loop
Inner CM Cursor Loop
Outer AE Cursor Loop
Effect of Qualifying Expressions
Fetch an AE record
Exit AE Fetch Qualify loop if no more AEs
Exit AE Fetch Qualify loop if fetch qualifies
Process inner loops/details or exit the cursor loop
Effect of Qualifying Expressions
• Limit cursor fetch with SQL expression comprised of key DCM fields– An LOV is available for fields which can be used in the
Extension– With caution, can use other variables in the
RECEIVED_DCMS and RESPONSES tables, but only for the current cursor
• One way to limit retrievals to specific visits
WHERE Clause Extension
Can join only fields from the current cursor
WHERE Clause Extension
• Limit cursor fetch with SQL expression comprised of key DCM fields– An LOV is available for fields which can be used in the
Extension– With caution, can use other variables in the
RECEIVED_DCMS and RESPONSES tables, but only for the current cursor
• One way to limit retrievals to specific visits
WHERE Clause Extension …
Extension of “where visit_number=1”
Added to the default cursor definition
Effect of Where Clause Extensions
• Can limit to a range of visits fetched by providing the names of the first and last visits on the procedure question group form
By default, all patient visits will be retrieved by the DCM cursor
Controlling Range of Visits
Definition => Validation Procs => Procedures, Press [Q-Groups]
Only DCMs recorded for visits starting at “Visit 1” and going through “Visit 3” will be retrieved
Controlling Range of Visits
• Can limit to a range of visits fetched by providing the names of the first and last visits on the Procedure Question Group form
By default, all patient visits will be retrieved by the DCM cursor
Controlling Range of Visits …
Effect of Range of Visits Control
These are passed as input when the DCM cursor is opened by the main procedure
Performance
• Generated PL/SQL code contains a multitude of loops– Cursors are opened, fetched and closed many times in
the internal fetch loops• Use as much correlation as possible to improve
performance– Some types of correlations affect performance more
than others– Correlation may be necessary to make sure the
procedure does what is expected
Effecting Performance
Event Range In DCM Cursors Large Correlation
Event In DCM Cursor LargeQualifying Value In DCM Cursor Large Correlating Questions In DCM Cursor Large
Where Clause Extension In DCM Cursor LargeQualifying Expression Test after DCM Fetch Smaller
Where Effect on Parameter Implemented Performance
Note: In many cases, parameters must be changed so procedure performs correctly
Summary
• Procedure generation produces a complex PL/SQL program
• Program makes extensive use of cursors and looping structure
• Program performance can be changed by correct use of many techniques available from the form templates
www.facebook.com/perficientwww.perficient.com
www.twitter.com/perficient_LS
Thank You!For more information, please contact:
[email protected]@perficient.com (Sales)
+44 (0) 1865 910200 (U.K. Sales)+1 877 654 0033 (U.S. Sales)