index

Package gb_bio

Common business interface for the BIOGRAPHICAL API (gb_bio).
This API provides the interface to the SPBPERS table, which contains biographical information about people such as citizenship, height, legal name, ethnicity etc.


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 the 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
bio_rec   Business Entity record type
bio_ref   Entity cursor variable type
bio_tab   Entity table type

Constants
M_ENTITY_NAME   Business Entity name


M_ENTITY_NAME

M_ENTITY_NAME    CONSTANT VARCHAR2(3) := 'BIO';

Business Entity name


bio_rec

TYPE bio_rec IS RECORD (
  r_pidm                          spbpers.spbpers_pidm%TYPE,
  r_ssn                           spbpers.spbpers_ssn%TYPE,
  r_birth_date                    spbpers.spbpers_birth_date%TYPE,
  r_lgcy_code                     spbpers.spbpers_lgcy_code%TYPE,
  r_ethn_code                     spbpers.spbpers_ethn_code%TYPE,
  r_mrtl_code                     spbpers.spbpers_mrtl_code%TYPE,
  r_relg_code                     spbpers.spbpers_relg_code%TYPE,
  r_sex                           spbpers.spbpers_sex%TYPE,
  r_confid_ind                    spbpers.spbpers_confid_ind%TYPE,
  r_dead_ind                      spbpers.spbpers_dead_ind%TYPE,
  r_vetc_file_number              spbpers.spbpers_vetc_file_number%TYPE,
  r_legal_name                    spbpers.spbpers_legal_name%TYPE,
  r_pref_first_name               spbpers.spbpers_pref_first_name%TYPE,
  r_name_prefix                   spbpers.spbpers_name_prefix%TYPE,
  r_name_suffix                   spbpers.spbpers_name_suffix%TYPE,
  r_vera_ind                      spbpers.spbpers_vera_ind%TYPE,
  r_citz_ind                      spbpers.spbpers_citz_ind%TYPE,
  r_dead_date                     spbpers.spbpers_dead_date%TYPE,
  r_citz_code                     spbpers.spbpers_citz_code%TYPE,
  r_hair_code                     spbpers.spbpers_hair_code%TYPE,
  r_eyes_code                     spbpers.spbpers_eyes_code%TYPE,
  r_city_birth                    spbpers.spbpers_city_birth%TYPE,
  r_stat_code_birth               spbpers.spbpers_stat_code_birth%TYPE,
  r_driver_license                spbpers.spbpers_driver_license%TYPE,
  r_stat_code_driver              spbpers.spbpers_stat_code_driver%TYPE,
  r_natn_code_driver              spbpers.spbpers_natn_code_driver%TYPE,
  r_uoms_code_height              spbpers.spbpers_uoms_code_height%TYPE,
  r_height                        spbpers.spbpers_height%TYPE,
  r_uoms_code_weight              spbpers.spbpers_uoms_code_weight%TYPE,
  r_weight                        spbpers.spbpers_weight%TYPE,
  r_sdvet_ind                     spbpers.spbpers_sdvet_ind%TYPE,
  r_license_issued_date           spbpers.spbpers_license_issued_date%TYPE,
  r_license_expires_date          spbpers.spbpers_license_expires_date%TYPE,
  r_incar_ind                     spbpers.spbpers_incar_ind%TYPE,
  r_itin                          spbpers.spbpers_itin%TYPE,
  r_active_duty_sepr_date         spbpers.spbpers_active_duty_sepr_date%TYPE,
  r_data_origin                   spbpers.spbpers_data_origin%TYPE,
  r_user_id                       spbpers.spbpers_user_id%TYPE,
  r_ethn_cde                      spbpers.spbpers_ethn_cde%TYPE,
  r_confirmed_re_cde              spbpers.spbpers_confirmed_re_cde%TYPE,
  r_confirmed_re_date             spbpers.spbpers_confirmed_re_date%TYPE,
  r_armed_serv_med_vet_ind        spbpers.spbpers_armed_serv_med_vet_ind%TYPE,
  r_internal_record_id            gb_common.internal_record_id_type );

Business Entity record type


bio_ref

TYPE bio_ref IS REF CURSOR RETURN bio_rec;

Entity cursor variable type


bio_tab

TYPE bio_tab IS TABLE OF bio_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_pidm  spbpers.spbpers_pidm%TYPE,
                  p_rowid gb_common.internal_record_id_type DEFAULT NULL)
  RETURN VARCHAR2

Checks to see if a record exists.

Parameters
p_pidm   Internal Identification Number of the person. NUMBER(8) Required Key
p_rowid   Database ROWID of the record to be selected. VARCHAR2(18)

Returns
Y if found, otherwise N.


f_isequal

FUNCTION f_isequal(rec_one bio_rec,
                   rec_two bio_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. Type bio_rec. Required
rec_two   The second record to compare. Type bio_rec. Required

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


f_query_all

FUNCTION f_query_all(p_pidm spbpers.spbpers_pidm%TYPE) RETURN bio_ref

Selects all records for the entity.

Parameters
p_pidm   Internal Identification Number of the person. NUMBER(8) Required Key

Returns
A cursor variable that will fetch the set of records.


f_query_one

FUNCTION f_query_one(p_pidm spbpers.spbpers_pidm%TYPE) RETURN bio_ref

Selects one record using key.

Parameters
p_pidm   Internal Identification Number of the person. NUMBER(8) Required Key

Returns
A cursor variable that will fetch exactly one record.


f_query_by_rowid

FUNCTION f_query_by_rowid(p_rowid gb_common.internal_record_id_type)
  RETURN bio_ref

Selects one record using the ROWID.

Parameters
p_rowid   Database ROWID of the record to be selected. VARCHAR2(18) Required

Returns
A cursor variable that will fetch exactly one record.


f_query_one_lock

FUNCTION f_query_one_lock(p_pidm  spbpers.spbpers_pidm%TYPE,
                          p_rowid gb_common.internal_record_id_type DEFAULT NULL)
  RETURN bio_ref

Selects one record and locks it.

Parameters
p_pidm   Internal Identification Number of the person. NUMBER(8) Required Key
p_rowid   Database ROWID of the record to select. VARCHAR2(18)

Returns
A cursor variable for one record, locking the record.


p_create

PROCEDURE p_create(p_pidm                   spbpers.spbpers_pidm%TYPE,
                   p_ssn                    spbpers.spbpers_ssn%TYPE DEFAULT NULL,
                   p_birth_date             spbpers.spbpers_birth_date%TYPE DEFAULT NULL,
                   p_lgcy_code              spbpers.spbpers_lgcy_code%TYPE DEFAULT NULL,
                   p_ethn_code              spbpers.spbpers_ethn_code%TYPE DEFAULT NULL,
                   p_mrtl_code              spbpers.spbpers_mrtl_code%TYPE DEFAULT NULL,
                   p_relg_code              spbpers.spbpers_relg_code%TYPE DEFAULT NULL,
                   p_sex                    spbpers.spbpers_sex%TYPE DEFAULT 'N',
                   p_confid_ind             spbpers.spbpers_confid_ind%TYPE DEFAULT 'N',
                   p_dead_ind               spbpers.spbpers_dead_ind%TYPE DEFAULT NULL,
                   p_vetc_file_number       spbpers.spbpers_vetc_file_number%TYPE DEFAULT NULL,
                   p_legal_name             spbpers.spbpers_legal_name%TYPE DEFAULT NULL,
                   p_pref_first_name        spbpers.spbpers_pref_first_name%TYPE DEFAULT NULL,
                   p_name_prefix            spbpers.spbpers_name_prefix%TYPE DEFAULT NULL,
                   p_name_suffix            spbpers.spbpers_name_suffix%TYPE DEFAULT NULL,
                   p_vera_ind               spbpers.spbpers_vera_ind%TYPE DEFAULT NULL,
                   p_citz_ind               spbpers.spbpers_citz_ind%TYPE DEFAULT NULL,
                   p_dead_date              spbpers.spbpers_dead_date%TYPE DEFAULT NULL,
                   p_citz_code              spbpers.spbpers_citz_code%TYPE DEFAULT NULL,
                   p_hair_code              spbpers.spbpers_hair_code%TYPE DEFAULT NULL,
                   p_eyes_code              spbpers.spbpers_eyes_code%TYPE DEFAULT NULL,
                   p_city_birth             spbpers.spbpers_city_birth%TYPE DEFAULT NULL,
                   p_stat_code_birth        spbpers.spbpers_stat_code_birth%TYPE DEFAULT NULL,
                   p_driver_license         spbpers.spbpers_driver_license%TYPE DEFAULT NULL,
                   p_stat_code_driver       spbpers.spbpers_stat_code_driver%TYPE DEFAULT NULL,
                   p_natn_code_driver       spbpers.spbpers_natn_code_driver%TYPE DEFAULT NULL,
                   p_uoms_code_height       spbpers.spbpers_uoms_code_height%TYPE DEFAULT NULL,
                   p_height                 spbpers.spbpers_height%TYPE DEFAULT NULL,
                   p_uoms_code_weight       spbpers.spbpers_uoms_code_weight%TYPE DEFAULT NULL,
                   p_weight                 spbpers.spbpers_weight%TYPE DEFAULT NULL,
                   p_sdvet_ind              spbpers.spbpers_sdvet_ind%TYPE DEFAULT NULL,
                   p_license_issued_date    spbpers.spbpers_license_issued_date%TYPE DEFAULT NULL,
                   p_license_expires_date   spbpers.spbpers_license_expires_date%TYPE DEFAULT NULL,
                   p_incar_ind              spbpers.spbpers_incar_ind%TYPE DEFAULT NULL,
                   p_itin                   spbpers.spbpers_itin%TYPE DEFAULT NULL,
                   p_active_duty_sepr_date  spbpers.spbpers_active_duty_sepr_date%TYPE DEFAULT NULL,
                   p_data_origin            spbpers.spbpers_data_origin%TYPE DEFAULT NULL,
                   p_user_id                spbpers.spbpers_user_id%TYPE DEFAULT gb_common.f_sct_user,
                   p_ethn_cde               spbpers.spbpers_ethn_cde%TYPE DEFAULT NULL,
                   p_confirmed_re_cde       spbpers.spbpers_confirmed_re_cde%TYPE DEFAULT NULL,
                   p_confirmed_re_date      spbpers.spbpers_confirmed_re_date%TYPE DEFAULT NULL,
                   p_armed_serv_med_vet_ind spbpers.spbpers_armed_serv_med_vet_ind%TYPE DEFAULT 'N',
                   p_rowid_out              OUT gb_common.internal_record_id_type)

Creates a record.

Parameters
p_pidm   Internal Identification Number of the person. NUMBER(8) Required Key
p_ssn   The person's social security number. VARCHAR2(9)
p_birth_date   The person's birth date. DATE
p_lgcy_code   The legacy code associated with person. VARCHAR2(1)
p_ethn_code   The ethnicity code associated with person. VARCHAR2(2)
p_mrtl_code   The martial status associated with person. VARCHAR2(1)
p_relg_code   The religious affiliation associated with person. VARCHAR2(2)
p_sex   Gender of the person. VARCHAR2(1)
M   Male
F   Female
N   Unknown

p_confid_ind   Confidentiality indicator. VARCHAR2(1) DEFAULT 'N'
null   Not confidential
Y   Confidential
N   Not confidential

p_dead_ind   Deceased indicator. VARCHAR2(1)
null   Not deceased
Y   Deceased

p_vetc_file_number   The veteran identification number associated with person. VARCHAR2(10)
p_legal_name   The legal name associated with person. VARCHAR2(60)
p_pref_first_name   Preferred first name associated with person. VARCHAR2(15)
p_name_prefix   Prefix (Mr, Mrs, etc) used before the person's name. VARCHAR2(20)
p_name_suffix   Suffix (Jr, Sr, etc) used after the person's name. VARCHAR2(20)
p_vera_ind   Veteran Category. VARCHAR2(1)
null   None
O   Other Protected Veteran Only
V   Vietnam Veteran only
B   Both Vietnam and Other Eligible Veteran

p_citz_ind   Citizen Indicator. VARCHAR2(1)
p_dead_date   Person's Deceased Date. DATE
p_citz_code   Person's Citizen Type. VARCHAR2(2)
p_hair_code   The hair color of the person being defined. VARCHAR2(2)
p_eyes_code   The eye color of the person being defined. VARCHAR2(2)
p_city_birth   The city where the person was born. VARCHAR2(20)
p_stat_code_birth   The state in which the person was born. VARCHAR2(3)
p_driver_license   The Driver License Number as it appears on the actual license. VARCHAR2(20)
p_stat_code_driver   The State code describing the state the driver license was issued. VARCHAR2(3)
p_natn_code_driver   The Nation code associated with the Nation the Driver license was issued. VARCHAR2(5)
p_uoms_code_height   The Unit of Measure describing the height value. VARCHAR2(4)
p_height   The number value describing the height of the person. NUMBER(2)
p_uoms_code_weight   The Unit of Measure describing the weight value. VARCHAR2(4)
p_weight   The number value describing the weight of the person. NUMBER(4)
p_sdvet_ind   Indicator to identify an individual as a special disabled veteran. VARCHAR2(1)
p_license_issued_date   The issue date of the individuals driver license. DATE
p_license_expires_date   The expiration date of the individuals driver license. DATE
p_incar_ind   The indication of the individuals incarceration. VARCHAR2(1)
p_itin   The international tax id number. NUMBER(9)
p_active_duty_sepr_date   The date that the person was separated from active duty. DATE
p_data_origin   Source system that created or updated the row. VARCHAR2(30)
p_user_id   Oracle User ID of the person who last inserted or last updated the data. VARCHAR2(30)
p_ethn_cde   The ethnic code defined by the United States government.  VARCHAR2(1)
null   None
1   Not Hispanic or Latino
2   Hispanic or Latino

p_confirmed_re_cde   The race and ethnicity has been confirmed. VARCHAR2(1)
null   Not Confirmed
Y   Confirmed
N   Not Confirmed

p_confirmed_re_date   When the race and ethnicity has been confirmed. DATE
p_armed_serv_med_vet_ind   Armed Forces Service Medal Indicator. VARCHAR2(1)
p_rowid_out   Database ROWID of the record created. VARCHAR2(18) Required


p_delete

PROCEDURE p_delete(p_pidm  spbpers.spbpers_pidm%TYPE,
                   p_rowid gb_common.internal_record_id_type DEFAULT NULL)

Deletes a record.

Parameters
p_pidm   Internal Identification Number of the person. NUMBER(8) Required Key
p_rowid   Database ROWID of the record to be deleted. VARCHAR2(18)


p_lock

PROCEDURE p_lock(p_pidm        spbpers.spbpers_pidm%TYPE,
                 p_rowid_inout IN OUT gb_common.internal_record_id_type)

Locks a record.
If the 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_pidm   Internal Identification Number of the person. NUMBER(8) Required Key
p_rowid_inout   Database ROWID of the record to be locked. VARCHAR2(18) Required


p_update

PROCEDURE p_update(p_pidm                   spbpers.spbpers_pidm%TYPE,
                   p_ssn                    spbpers.spbpers_ssn%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_birth_date             spbpers.spbpers_birth_date%TYPE DEFAULT dml_common.f_unspecified_date,
                   p_lgcy_code              spbpers.spbpers_lgcy_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_ethn_code              spbpers.spbpers_ethn_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_mrtl_code              spbpers.spbpers_mrtl_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_relg_code              spbpers.spbpers_relg_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_sex                    spbpers.spbpers_sex%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_confid_ind             spbpers.spbpers_confid_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_dead_ind               spbpers.spbpers_dead_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_vetc_file_number       spbpers.spbpers_vetc_file_number%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_legal_name             spbpers.spbpers_legal_name%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_pref_first_name        spbpers.spbpers_pref_first_name%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_name_prefix            spbpers.spbpers_name_prefix%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_name_suffix            spbpers.spbpers_name_suffix%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_vera_ind               spbpers.spbpers_vera_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_citz_ind               spbpers.spbpers_citz_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_dead_date              spbpers.spbpers_dead_date%TYPE DEFAULT dml_common.f_unspecified_date,
                   p_citz_code              spbpers.spbpers_citz_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_hair_code              spbpers.spbpers_hair_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_eyes_code              spbpers.spbpers_eyes_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_city_birth             spbpers.spbpers_city_birth%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_stat_code_birth        spbpers.spbpers_stat_code_birth%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_driver_license         spbpers.spbpers_driver_license%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_stat_code_driver       spbpers.spbpers_stat_code_driver%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_natn_code_driver       spbpers.spbpers_natn_code_driver%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_uoms_code_height       spbpers.spbpers_uoms_code_height%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_height                 spbpers.spbpers_height%TYPE DEFAULT dml_common.f_unspecified_number,
                   p_uoms_code_weight       spbpers.spbpers_uoms_code_weight%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_weight                 spbpers.spbpers_weight%TYPE DEFAULT dml_common.f_unspecified_number,
                   p_sdvet_ind              spbpers.spbpers_sdvet_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_license_issued_date    spbpers.spbpers_license_issued_date%TYPE DEFAULT dml_common.f_unspecified_date,
                   p_license_expires_date   spbpers.spbpers_license_expires_date%TYPE DEFAULT dml_common.f_unspecified_date,
                   p_incar_ind              spbpers.spbpers_incar_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_itin                   spbpers.spbpers_itin%TYPE DEFAULT dml_common.f_unspecified_number,
                   p_active_duty_sepr_date  spbpers.spbpers_active_duty_sepr_date%TYPE DEFAULT dml_common.f_unspecified_date,
                   p_data_origin            spbpers.spbpers_data_origin%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_user_id                spbpers.spbpers_user_id%TYPE DEFAULT gb_common.f_sct_user,
                   p_ethn_cde               spbpers.spbpers_ethn_cde%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_confirmed_re_cde       spbpers.spbpers_confirmed_re_cde%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_confirmed_re_date      spbpers.spbpers_confirmed_re_date%TYPE DEFAULT dml_common.f_unspecified_date,
                   p_armed_serv_med_vet_ind spbpers.spbpers_armed_serv_med_vet_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_rowid                  gb_common.internal_record_id_type DEFAULT NULL)

Updates a record.

Parameters
p_pidm   Internal Identification Number of the person. NUMBER(8) Required Key
p_ssn   The person's social security number. VARCHAR2(9)
p_birth_date   The person's birth date. DATE
p_lgcy_code   The legacy code associated with the person. VARCHAR2(1)
p_ethn_code   The ethnicity code associated with the person. VARCHAR2(2)
p_mrtl_code   The martial status associated with the person. VARCHAR2(1)
p_relg_code   The religious affiliation associated with the person. VARCHAR2(2)
p_sex   Gender of the person. VARCHAR2(1)
M   Male
F   Female
N   Unknown

p_confid_ind   Confidentiality indicator. VARCHAR2(1)
null   Not confidential
Y   Confidential

p_dead_ind   Y - deceased. VARCHAR2(1)
null   Not deceased
Y   Deceased

p_vetc_file_number   The veteran identification number associated with person. VARCHAR2(10)
p_legal_name   The legal name associated with person. VARCHAR2(60)
p_pref_first_name   Preferred first name associated with person. VARCHAR2(15)
p_name_prefix   Prefix (Mr, Mrs, etc) used before the person's name. VARCHAR2(20)
p_name_suffix   Suffix (Jr, Sr, etc) used after the person's name. VARCHAR2(20)
p_vera_ind   Veteran Category. VARCHAR2(1)
null   None
O   Other Protected Veteran Only
V   Vietnam Veteran only
B   Both Vietnam and Other Eligible Veteran

p_citz_ind   Citizen Indicator. VARCHAR2(1)
p_dead_date   Person's Deceased Date. DATE
p_citz_code   Person's Citizen Type. VARCHAR2(2)
p_hair_code   The hair color of the person being defined. VARCHAR2(2)
p_eyes_code   The eye color of the person being defined. VARCHAR2(2)
p_city_birth   The city where the person was born. VARCHAR2(20)
p_stat_code_birth   The state in which the person was born. VARCHAR2(3)
p_driver_license   The Driver License Number as it appears on the actual license. VARCHAR2(20)
p_stat_code_driver   The State code describing the state the driver license was issued. VARCHAR2(3)
p_natn_code_driver   The Nation code associated with the Nation the Driver license was issued. VARCHAR2(5)
p_uoms_code_height   The Unit of Measure describing the height value. VARCHAR2(4)
p_height   The number value describing the height of the person. NUMBER(2)
p_uoms_code_weight   The Unit of Measure describing the weight value. VARCHAR2(4)
p_weight   The number value describing the weight of the person. NUMBER(4)
p_sdvet_ind   Indicator to identify an individual as a special disabled veteran. VARCHAR2(1)
p_license_issued_date   The issue date of the individuals driver license. DATE
p_license_expires_date   The expiration date of the individuals driver license. DATE
p_incar_ind   The indication of the individuals incarceration. VARCHAR2(1)
p_itin   The international tax id number. NUMBER(9)
p_active_duty_sepr_date   The date that the person was separated from active duty. DATE
p_data_origin   Source system that created or updated the row. VARCHAR2(30)
p_user_id   Oracle User ID of the person who last inserted or last updated the data. VARCHAR2(30)
p_ethn_cde   The ethnic code defined by the United States government.  VARCHAR2(1)
null   None
1   Not Hispanic or Latino
2   Hispanic or Latino

p_confirmed_re_cde   The race and ethnicity has been confirmed. VARCHAR2(1)
null   Not Confirmed
Y   Confirmed
N   Not Confirmed

p_confirmed_re_date   When the race and ethnicity has been confirmed. DATE
p_armed_serv_med_vet_ind   Armed Forces Service Medal Indicator. VARCHAR2(1)
p_rowid   Database ROWID of the record to be updated. VARCHAR2(18)