index

Package sb_edi_immunization_rules

This package provides support for messaging and data validation for the EDI Immunization API (sb_edi_immunization).


Program units
f_seqno   Returns the sequence number for creation.
f_query_all_dcmt   Selects all records for the entity.
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_dcmt_seqno SHRIMMU.SHRIMMU_DCMT_SEQNO%TYPE,
                 p_immu_code  SHRIMMU.SHRIMMU_IMMU_CODE%TYPE) RETURN NUMBER

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

Parameters
p_dcmt_seqno   Unique ID for an incoming file. Required Key
p_immu_code   Immunization code.  Required Key

Returns
Sequence number  for creation of a new immunization.


f_query_all_dcmt

Function f_query_all_dcmt(p_dcmt_seqno shrimmu.shrimmu_dcmt_seqno%TYPE)
  RETURN sb_edi_immunization.edi_immunization_ref

Selects all records for the entity.

Parameters
p_dcmt_seqno   EDI document sequence internal identification number. NUMBER(8) Required Key

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


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_dcmt_seqno         shrimmu.shrimmu_dcmt_seqno%TYPE,
                            p_immu_code          shrimmu.shrimmu_immu_code%TYPE,
                            p_seq_no             shrimmu.shrimmu_seq_no%TYPE,
                            p_user_id            shrimmu.shrimmu_user_id%TYPE DEFAULT gb_common.f_sct_user,
                            p_immu_date          shrimmu.shrimmu_immu_date%TYPE,
                            p_imst_code          shrimmu.shrimmu_imst_code%TYPE,
                            p_rpt_cde            shrimmu.shrimmu_rpt_cde%TYPE,
                            p_comment            shrimmu.shrimmu_comment%TYPE,
                            p_data_origin        shrimmu.shrimmu_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_dcmt_seqno   EDI document sequence internal identification number. NUMBER(8) Required Key
p_immu_code   Immunization code associated with the student. VARCHAR2(10) Required Key
p_seq_no   Internal sequence number. NUMBER(2) Required Key
p_user_id   User ID of the last person who updated this record. VARCHAR2(30) Required
p_immu_date   Date associated with the immunization. DATE
p_imst_code   Immunization status code. VARCHAR2(2)
p_rpt_cde   EDI immunization report type code. VARCHAR2(2)
p_comment   Comment on the immunization record. VARCHAR2(4000)
p_data_origin   Latest source for the data contained in this record. VARCHAR2(30)
p_internal_record_id   Database ROWID. VARCHAR2(18) Required


p_validate

Procedure p_validate(p_dcmt_seqno  shrimmu.shrimmu_dcmt_seqno%TYPE,
                     p_immu_code   shrimmu.shrimmu_immu_code%TYPE,
                     p_seq_no      shrimmu.shrimmu_seq_no%TYPE,
                     p_user_id     shrimmu.shrimmu_user_id%TYPE DEFAULT gb_common.f_sct_user,
                     p_immu_date   shrimmu.shrimmu_immu_date%TYPE DEFAULT NULL,
                     p_imst_code   shrimmu.shrimmu_imst_code%TYPE DEFAULT NULL,
                     p_rpt_cde     shrimmu.shrimmu_rpt_cde%TYPE DEFAULT NULL,
                     p_comment     shrimmu.shrimmu_comment%TYPE DEFAULT NULL,
                     p_data_origin shrimmu.shrimmu_data_origin%TYPE DEFAULT NULL)

Validates all data in the record.

Parameters
p_dcmt_seqno   EDI document sequence internal identification number. NUMBER(8) Required Key
p_immu_code   Immunization code associated with the student. VARCHAR2(10) Required Key
p_seq_no   Internal sequence number. NUMBER(2) Required Key
p_user_id   User ID of the last person who updated this record. VARCHAR2(30) Required
p_immu_date   Date associated with the immunization. DATE
p_imst_code   Immunization status code. VARCHAR2(2)
p_rpt_cde   EDI immunization report type code. VARCHAR2(2)
p_comment   Comment on the immunization record. VARCHAR2(4000)
p_data_origin   Latest source for the data contained in this record. VARCHAR2(30)