index

Package gb_cm_source_rules

This package provides the Common Business interface for Common Matching Source Rules API (gb_cm_srce_rules).
 
The Common Matching Source Rules define the Sources that will be used for online processing of Common Matching and determine if the Source will process person, non-person, or both types of records.
The default address type, phone type, and e-mail type that will be used when creating new SPRIDEN records are also defined for the Common Matching Source code.


Program units
f_api_version   Returns the API version number.
f_exists   Checks to see if a record exists.
f_isequal   Compares two records for equality.
f_query_all   Selects all records for the entity.
f_query_one   Selects one record using key.
f_query_by_rowid   Selects one record using ROWID.
f_query_one_lock   Selects one record and locks it.
p_create   Creates a record.
p_delete   Deletes a record.
p_lock   Locks a record.
p_update   Updates a record.

Types
cm_source_rules_rec   Entity record type
cm_source_rules_ref   Entity cursor variable type
cm_source_rules_tab   Entity table type

Constants
M_ENTITY_NAME   Business Entity name


M_ENTITY_NAME

M_ENTITY_NAME    CONSTANT VARCHAR2(15) := 'CM_SOURCE_RULES';

Business Entity name


cm_source_rules_rec

TYPE cm_source_rules_rec IS RECORD (
   r_cmsc_code               gorcmsc.gorcmsc_cmsc_code%TYPE,
   r_online_match_ind        gorcmsc.gorcmsc_online_match_ind%TYPE,
   r_entity_cde              gorcmsc.gorcmsc_entity_cde%TYPE,
   r_user_id                 gorcmsc.gorcmsc_user_id%TYPE,
   r_atyp_code               gorcmsc.gorcmsc_atyp_code%TYPE,
   r_tele_code               gorcmsc.gorcmsc_tele_code%TYPE,
   r_emal_code               gorcmsc.gorcmsc_emal_code%TYPE,
   r_data_origin             gorcmsc.gorcmsc_data_origin%TYPE,
   r_transpose_date_ind      gorcmsc.gorcmsc_transpose_date_ind%TYPE,
   r_transpose_name_ind      gorcmsc.gorcmsc_transpose_name_ind%TYPE,
   r_alias_wildcard_ind      gorcmsc.gorcmsc_alias_wildcard_ind%TYPE,
   r_length_override_ind     gorcmsc.gorcmsc_length_override_ind%TYPE,
   r_api_failure_ind         gorcmsc.gorcmsc_api_failure_ind%TYPE,
   r_internal_record_id      gb_common.internal_record_id_type);

Entity record type


cm_source_rules_ref

TYPE cm_source_rules_ref IS REF CURSOR RETURN cm_source_rules_rec;

Entity cursor variable type


cm_source_rules_tab

TYPE cm_source_rules_tab IS TABLE OF cm_source_rules_rec INDEX BY BINARY_INTEGER;

Entity table type


f_api_version

FUNCTION f_api_version RETURN PLS_INTEGER

Returns the API version number.

Returns
Version of the API signature. Changes only when the signature changes.


f_exists

FUNCTION f_exists(p_cmsc_code gorcmsc.gorcmsc_cmsc_code%TYPE,
                  p_rowid     VARCHAR2 DEFAULT NULL) RETURN VARCHAR2

Checks to see if a record exists.

Parameters
p_cmsc_code   Common Matching Source Code associated with these rules.

Returns
Y if found, otherwise N


f_isequal

FUNCTION f_isequal(rec_one cm_source_rules_rec,
                   rec_two cm_source_rules_rec) RETURN VARCHAR2

Compares two records for equality.
Tests each field of rec_one against the corresponding field of rec_two. Two null values are considered equal.

Parameters
rec_one   The first record to compare. Defined as type cm_source_rules_rec.
rec_two   The second record to compare. Defined as type cm_source_rules_rec.

Returns
Y if all values in records are equal, otherwise N. Nulls match Nulls.


f_query_all

FUNCTION f_query_all(p_cmsc_code gorcmsc.gorcmsc_cmsc_code%TYPE)
  RETURN cm_source_rules_ref

Selects all records for the entity.
This query uses all the key values to locate a record.

Parameters
p_cmsc_code   Common Matching Source Code associated with these rules.

Returns
A cursor variable that will fetch the set of records


f_query_one

FUNCTION f_query_one(p_cmsc_code gorcmsc.gorcmsc_cmsc_code%TYPE)
  RETURN cm_source_rules_ref

Selects one record using key.
Always returns the current record for the source code.

Parameters
p_cmsc_code   Common Matching Source Code associated with these rules.

Returns
A cursor variable that will fetch exactly one record


f_query_by_rowid

FUNCTION f_query_by_rowid(p_rowid VARCHAR2) RETURN cm_source_rules_ref

Selects one record using ROWID.

Parameters
p_rowid   Database ROWID of record to select

Returns
A cursor variable that will fetch exactly one record


f_query_one_lock

FUNCTION f_query_one_lock(p_cmsc_code gorcmsc.gorcmsc_cmsc_code%TYPE,
                          p_rowid     VARCHAR2 DEFAULT NULL)
  RETURN cm_source_rules_ref

Selects one record and locks it.

Parameters
p_cmsc_code   Common Matching Source Code associated with these rules.
p_rowid   Database ROWID of record to select

Returns
A cursor variable for one record, locking the record


p_create

PROCEDURE p_create(p_cmsc_code           gorcmsc.gorcmsc_cmsc_code%TYPE,
                   p_online_match_ind    gorcmsc.gorcmsc_online_match_ind%TYPE DEFAULT 'Y',
                   p_entity_cde          gorcmsc.gorcmsc_entity_cde%TYPE DEFAULT 'P',
                   p_user_id             gorcmsc.gorcmsc_user_id%TYPE DEFAULT gb_common.f_sct_user,
                   p_atyp_code           gorcmsc.gorcmsc_atyp_code%TYPE DEFAULT NULL,
                   p_tele_code           gorcmsc.gorcmsc_tele_code%TYPE DEFAULT NULL,
                   p_emal_code           gorcmsc.gorcmsc_emal_code%TYPE DEFAULT NULL,
                   p_data_origin         gorcmsc.gorcmsc_data_origin%TYPE DEFAULT NULL,
                   p_transpose_date_ind  gorcmsc.gorcmsc_transpose_date_ind%TYPE DEFAULT 'N',
                   p_transpose_name_ind  gorcmsc.gorcmsc_transpose_name_ind%TYPE DEFAULT 'N',
                   p_alias_wildcard_ind  gorcmsc.gorcmsc_alias_wildcard_ind%TYPE DEFAULT 'N',
                   p_length_override_ind gorcmsc.gorcmsc_length_override_ind%TYPE DEFAULT 'N',
                   p_api_failure_ind     gorcmsc.gorcmsc_api_failure_ind%TYPE DEFAULT 'N',
                   p_rowid_out           OUT VARCHAR2)

Creates a record.
 
Creates the default values for address type, phone type, and e-mail type for the Common Matching Source Code to be used when creating new SPRIDEN records. Define if the Common Matching Source Code will be used for online matching and if matching will occur on person, non-person or both types of records.
 
When defining a default value for address type, a valid type must exist in the Address Type validation table (STVATYP).
 
When defining a default value for phone type, a valid type must exist in the Telephone Type validation table (STVTELE).
 
When defining a default value for e-mail address, a valid type must exist in the E-mail Address Type validation table (GTVEMAL).
 
The Common Matching procedure will use the Entity Code entered to determine if matching person (entity type of P), non-person (entity type of C). or both types of records (entity type of B).
 
P_Create will default in Online Match Indicator value of 'Y', Entity Code a value of 'P', and current user for User ID.

Parameters
p_cmsc_code   Common Matching Source Code associated with these rules.
p_online_match_ind   Indicates if Source Code and associated rules (GOBCMSR) will be used for Common Matching when run online from a form.
p_entity_cde   Entity Code. Defines what entity type to match when selecting SPRIDEN records.
P   The Source will be matching a person.
C   The Source will be matching a non person.
B   The Source will be matching both a person and non person.

p_user_id   Oracle user ID of the User who created or last updated the record.
p_atyp_code   Address type to use when creating a new address record for this source.
p_tele_code   Telephone type code to use when creating a new telephone record for this source.
p_emal_code   E-mail type code to use when creating a new email record for this source.
p_data_origin   Application source for this database row.
p_transpose_date_ind   Option to allow birthdate day / month to be additionally checked in month / day combination to improve matching.
Y   Allow date transposition.
N   Do not allow date transposition.

p_transpose_name_ind   Option to allow First Name / Last Name to be additionally checked in Last Name / First Name combination to improve matching.
Y   Allow name transposition.
N   Do not allow name transposition.

p_alias_wildcard_ind   Option to allow use of wildcard searching in person and non-person name alias lookups.
Y   Allow wildcard searching.
N   Do not allow wildcard searching.

p_length_override_ind   Option to allow length of data entered to override lenght provided on rule is the length of data enetered is less than rule length.
Y   Allow length override.
N   Do not allow length override.

p_api_failure_ind   Indicates whether or not the creation of an ID is allowed if any API fails in the Create ID process.
Y   Continue to create the ID.
N   Do not create the ID.

p_rowid_out   Database ROWID of record created


p_delete

PROCEDURE p_delete(p_cmsc_code gorcmsc.gorcmsc_cmsc_code%TYPE,
                   p_rowid     VARCHAR2 DEFAULT NULL)

Deletes a record.
 
Removes the rules for the Common Matching Source Code. The rules for the Common Matching Source code cannot be deleted if Matching rules exist for the Source Code in the Common Matching Rules table (GORCMSR).

Parameters
p_cmsc_code   Common Matching Source Code associated with these rules.
p_rowid   Database ROWID of record to delete


p_lock

PROCEDURE p_lock(p_cmsc_code   gorcmsc.gorcmsc_cmsc_code%TYPE,
                 p_rowid_inout IN OUT VARCHAR2)

Locks a record.
If ROWID is not passed in, the record is located using the key values and the ROWID of the locked row is passed in p_rowid_inout

Parameters
p_cmsc_code   Common Matching Source Code associated with these rules.
p_rowid_inout   Database ROWID of record to lock


p_update

PROCEDURE p_update(p_cmsc_code           gorcmsc.gorcmsc_cmsc_code%TYPE,
                   p_online_match_ind    gorcmsc.gorcmsc_online_match_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_entity_cde          gorcmsc.gorcmsc_entity_cde%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_user_id             gorcmsc.gorcmsc_user_id%TYPE DEFAULT gb_common.f_sct_user,
                   p_atyp_code           gorcmsc.gorcmsc_atyp_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_tele_code           gorcmsc.gorcmsc_tele_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_emal_code           gorcmsc.gorcmsc_emal_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_data_origin         gorcmsc.gorcmsc_data_origin%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_transpose_date_ind  gorcmsc.gorcmsc_transpose_date_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_transpose_name_ind  gorcmsc.gorcmsc_transpose_name_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_alias_wildcard_ind  gorcmsc.gorcmsc_alias_wildcard_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_length_override_ind gorcmsc.gorcmsc_length_override_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_api_failure_ind     gorcmsc.gorcmsc_api_failure_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_rowid               VARCHAR2 DEFAULT NULL)

Updates a record.
 
Updates the rules for the Common Matching Source Code to define the default address type, phone type, or e-mail type to be used when creating a new SPRIDEN record or the type of records to compare by the Common Matching procedure.

Parameters
p_cmsc_code   Common Matching Source Code associated with these rules.
p_online_match_ind   Indicates if Source Code and associated rules (GOBCMSR) will be used for Common Matching when run online from a form.
p_entity_cde   Entity Code. Defines what entity type to match when selecting SPRIDEN records.
P   The Source will be matching a person.
C   The Source will be matching a non person.
B   The Source will be matching both a person and non person.

p_user_id   Oracle user ID of the User who created or last updated the record.
p_atyp_code   Address type to use when creating a new address record for this source.
p_tele_code   Telephone type code to use when creating a new telephone record for this source.
p_emal_code   E-mail type code to use when creating a new email record for this source.
p_data_origin   Application source for this database row.
p_transpose_date_ind   Option to allow birthdate day / month to be additionally checked in month / day combination to improve matching.
Y   Allow date transposition.
N   Do not allow date transposition.

p_transpose_name_ind   Option to allow First Name / Last Name to be additionally checked in Last Name / First Name combination to improve matching.
Y   Allow name transposition.
N   Do not allow name transposition.

p_alias_wildcard_ind   Option to allow use of wildcard searching in person and non-person name alias lookups.
Y   Allow wildcard searching.
N   Do not allow wildcard searching.

p_length_override_ind   Option to allow length of data entered to override lenght provided on rule is the length of data enetered is less than rule length.
Y   Allow length override.
N   Do not allow length override.

p_api_failure_ind   Indicates whether or not the creation of an ID is allowed if any API fails in the Create ID process.
Y   Continue to create the ID.
N   Do not create the ID.

p_rowid   Database ROWID of record to update