index

Package gb_immunization_rules

This package provides support for messaging and data validation for the IMMUNIZATION API (gb_immunization).


Program units
f_seqno   Returns the sequence number for creation.
p_register_entity   Registers the attribute value pairs to the message cache for delete operations.
p_register_entity   Registers the attribute/value pairs to the message cache for create and update operations.
p_validate   Validates all data in the record.


f_seqno

FUNCTION f_seqno(p_pidm      gorimmu.gorimmu_pidm%TYPE,
                 p_immu_code gorimmu.gorimmu_immu_code%TYPE) RETURN NUMBER

Returns the sequence number for creation.  The key to the immunization record is the PIDM, immunization code, and a sequence number.  The sequence is a one-up by PIDM and immunization code.

Parameters
p_pidm   PIDM: Unique internal ID for an individual who has records in the system. Required Key.
p_immu_code   IMMU CODE:  Immunization code.  Required Key.

Returns
Sequence number  for creation of a new immunization.


p_register_entity

PROCEDURE p_register_entity(p_operation_type     NUMBER,
                            p_internal_record_id gb_common.internal_record_id_type)

Registers the attribute value pairs to the message cache for delete operations.
This signature uses the ROWID only, for delete operations.

Parameters
p_operation_type   Type of DML operation: create,update,delete. NUMBER Required.
p_internal_record_id   Database ROWID. VARCHAR2(18) Required.


p_register_entity

PROCEDURE p_register_entity(p_operation_type     NUMBER,
                            p_pidm               gorimmu.gorimmu_pidm%TYPE,
                            p_immu_code          gorimmu.gorimmu_immu_code%TYPE,
                            p_seq_no             gorimmu.gorimmu_seq_no%TYPE,
                            p_user_id            gorimmu.gorimmu_user_id%TYPE DEFAULT gb_common.f_sct_user,
                            p_immu_date          gorimmu.gorimmu_immu_date%TYPE,
                            p_imst_code          gorimmu.gorimmu_imst_code%TYPE,
                            p_comment            gorimmu.gorimmu_comment%TYPE,
                            p_data_origin        gorimmu.gorimmu_data_origin%TYPE,
                            p_internal_record_id gb_common.internal_record_id_type)

Registers the attribute/value pairs to the message cache for create and update operations.
 
This signature registers all parameters.

Parameters
p_operation_type   Type of DML operation: create,update,delete. NUMBER Required.
p_pidm   Internal Identification number. NUMBER(8) Required Key.
p_immu_code   Gtvimmu Immunization Code. VARCHAR2(10) Required Key.
p_seq_no   Gtvimmu code innoculation sequence number. NUMBER(2) Required Key.
p_user_id   User ID of the person who created or last updated this record. VARCHAR2(30) Required.
p_immu_date   Date of immunization. DATE.
p_imst_code   Gtvimst status code. VARCHAR2(2).
p_comment   Immunization Comment. VARCHAR2(4000).
p_data_origin   Source system that generated the data. VARCHAR2(30).
p_internal_record_id   Database ROWID. VARCHAR2(18) Required.


p_validate

PROCEDURE p_validate(p_pidm        gorimmu.gorimmu_pidm%TYPE,
                     p_immu_code   gorimmu.gorimmu_immu_code%TYPE,
                     p_seq_no      gorimmu.gorimmu_seq_no%TYPE,
                     p_user_id     gorimmu.gorimmu_user_id%TYPE DEFAULT gb_common.f_sct_user,
                     p_immu_date   gorimmu.gorimmu_immu_date%TYPE DEFAULT NULL,
                     p_imst_code   gorimmu.gorimmu_imst_code%TYPE DEFAULT NULL,
                     p_comment     gorimmu.gorimmu_comment%TYPE DEFAULT NULL,
                     p_data_origin gorimmu.gorimmu_data_origin%TYPE DEFAULT NULL)

Validates all data in the record.

Parameters
p_pidm   Internal Identification number. NUMBER(8) Required Key.
p_immu_code   Gtvimmu Immunization Code. VARCHAR2(10) Required Key.
p_seq_no   Gtvimmu code innoculation sequence number. NUMBER(2) Required Key.
p_user_id   User ID of the person who created or last updated this record. VARCHAR2(30) Required.
p_immu_date   Date of immunization. DATE.
p_imst_code   Gtvimst status code. VARCHAR2(2).
p_comment   Immunization Comment. VARCHAR2(4000).
p_data_origin   Source system that generated the data. VARCHAR2(30).