Creating an Activity Tag Function

If the existing activity tags do not provide what you are looking for, you can create a new activity tag and corresponding activity tag functions. You should create your own package and not use those packages included with Oracle Clinical.

Activity tag functions commonly execute a SQL statement to count the applicable activity.

If the activity count causes performance problems, there are various ways to improve performance if tuning the specific SQL statement does not work. You can limit the count to first 1,001 rows, and return >1,000 if more than 1,000. If two activities require processing a similar set of records, you could calculate two counts simultaneously, return the first count, and buffer the second count. The function for the second activity could return the buffered value. This technique requires that the activities are displayed in a specific order.

The following table lists the functions included in the RDC_USER_ACTIVITY_TAGS package that you can use in your activity tag function.

Functions Description

ANY_DISCREPS

Populates the activity with patients/CRFs having the type of discrepancy passed as parameter: ACTIVE/OTHER.

ENFORCEREQUERY

Force refreshes the results returned by the activity.

NEXT_PATIENT

Returns the next available unused patient position in the study.

OPEN_DISCREPS

Populates the activity with patients/CRFs having ACTIVE discrepancies.

OTHER_DISCREPS

Populates activity with patients/CRFs having OTHER discrepancies.

PATIENT_DATA

Returns all if the current patient in context has data and new if the patient doesn't have data entered.

PAT_STATUS_ICON

Returns blank if the current patient in context has no data, red patient if the patient has active discrepancies, yellow patient if the patient has other discrepancies, and white patient if the patient data has no discrepancies.

PROCESS_CURR_PATIENT

Adds the current site and patient in context to the activity query built.

PROCESS_CURR_SITE

Adds the current site (or the passed site) to the activity query built.

PROCESS_CURR_STUDY

Resets the site to ALL, to process the activities query for all the sites in the study.

PROCESS_NEXT_PATIENT

Sets the site passed to the activities search context, fetches the next available patient, and sets the next available patient also in context.

PROCESS_OPEN_DISCREPS

Assigns the site passed (if any) to the activity search context and sets the activity to search for ACTIVE discrepancies. Also, sets the current patient (if set) to the search context.

PROCESS_OTHER_DISCREPS

Assigns the site passed (if any) to the activity search context and sets the activity to search for OTHER discrepancies. Also, sets the current patient (if set) to the search context.

FILTERINCLUDESPATIENT

Returns flag that indicates if patients are included in the activity search.

RESETINCLUDESPATIENT

Sets flag that indicates if patients are to included in the activity search to TRUE to improve the performance of the activity queries.

SETINCLUDESPATIENT

Sets flag that indicates if patients are to included in the activity search to FALSE. Also, to improve the performance of the activity queries.