[Home] [Help]
851: END;
852:
853: procedure process_nfc_auth_date(
854: --p_person_id in per_people_f.person_id%type,
855: p_effective_date in ghr_pa_requests.effective_date%type,
856: p_pa_request_id in ghr_pa_requests.pa_request_id%type)
857: is
858: cursor get_next_auth_date is
859: select nvl(max(fnd_date.canonical_to_date(rei_information3))+1,p_effective_date)
852:
853: procedure process_nfc_auth_date(
854: --p_person_id in per_people_f.person_id%type,
855: p_effective_date in ghr_pa_requests.effective_date%type,
856: p_pa_request_id in ghr_pa_requests.pa_request_id%type)
857: is
858: cursor get_next_auth_date is
859: select nvl(max(fnd_date.canonical_to_date(rei_information3))+1,p_effective_date)
860: authentication_date
857: is
858: cursor get_next_auth_date is
859: select nvl(max(fnd_date.canonical_to_date(rei_information3))+1,p_effective_date)
860: authentication_date
861: from ghr_pa_requests par, ghr_pa_request_extra_info rei
862: where par.person_id in ( select person_id from ghr_pa_requests where
863: pa_request_id = p_pa_request_id )
864: and par.effective_date = p_effective_date
865: and par.pa_notification_id is not null
858: cursor get_next_auth_date is
859: select nvl(max(fnd_date.canonical_to_date(rei_information3))+1,p_effective_date)
860: authentication_date
861: from ghr_pa_requests par, ghr_pa_request_extra_info rei
862: where par.person_id in ( select person_id from ghr_pa_requests where
863: pa_request_id = p_pa_request_id )
864: and par.effective_date = p_effective_date
865: and par.pa_notification_id is not null
866: and par.pa_request_id = rei.pa_request_id
881: end;
882:
883: function get_nfc_prev_noa(
884: p_person_id in per_people_f.person_id%type,
885: p_pa_notification_id in ghr_pa_requests.pa_notification_id%type,
886: p_effective_date in ghr_pa_requests.effective_date%type)
887: RETURN VARCHAR2
888: IS
889: CURSOR c_get_prev_details
882:
883: function get_nfc_prev_noa(
884: p_person_id in per_people_f.person_id%type,
885: p_pa_notification_id in ghr_pa_requests.pa_notification_id%type,
886: p_effective_date in ghr_pa_requests.effective_date%type)
887: RETURN VARCHAR2
888: IS
889: CURSOR c_get_prev_details
890: is
889: CURSOR c_get_prev_details
890: is
891: select effective_date,first_noa_code,
892: second_noa_code,pa_notification_id,pa_request_id
893: from ghr_pa_requests
894: where pa_notification_id is not null
895: and person_id = p_person_id
896: and pa_notification_id < p_pa_notification_id
897: and effective_date <= p_effective_date
896: and pa_notification_id < p_pa_notification_id
897: and effective_date <= p_effective_date
898: and first_noa_code not in ('001') -- Exclude all cancellations
899: and pa_request_id not in ( select altered_pa_request_id
900: from ghr_pa_requests where
901: pa_notification_id = p_pa_notification_id) -- Excludes original action
902: order by pa_notification_id desc;
903: BEGIN
904: FOR c_prev_rec in c_get_prev_details LOOP
912: END;
913:
914: procedure get_nfc_auth_codes(
915: p_person_id in per_people_f.person_id%type,
916: p_pa_notification_id in ghr_pa_requests.pa_notification_id%type,
917: p_effective_date in ghr_pa_requests.effective_date%type,
918: p_first_auth_code out nocopy ghr_pa_requests.FIRST_ACTION_LA_CODE1%type,
919: p_second_auth_code out nocopy ghr_pa_requests.FIRST_ACTION_LA_CODE1%type)
920: IS
913:
914: procedure get_nfc_auth_codes(
915: p_person_id in per_people_f.person_id%type,
916: p_pa_notification_id in ghr_pa_requests.pa_notification_id%type,
917: p_effective_date in ghr_pa_requests.effective_date%type,
918: p_first_auth_code out nocopy ghr_pa_requests.FIRST_ACTION_LA_CODE1%type,
919: p_second_auth_code out nocopy ghr_pa_requests.FIRST_ACTION_LA_CODE1%type)
920: IS
921: cursor c_get_prev_details is
914: procedure get_nfc_auth_codes(
915: p_person_id in per_people_f.person_id%type,
916: p_pa_notification_id in ghr_pa_requests.pa_notification_id%type,
917: p_effective_date in ghr_pa_requests.effective_date%type,
918: p_first_auth_code out nocopy ghr_pa_requests.FIRST_ACTION_LA_CODE1%type,
919: p_second_auth_code out nocopy ghr_pa_requests.FIRST_ACTION_LA_CODE1%type)
920: IS
921: cursor c_get_prev_details is
922: select effective_date,first_noa_code,
915: p_person_id in per_people_f.person_id%type,
916: p_pa_notification_id in ghr_pa_requests.pa_notification_id%type,
917: p_effective_date in ghr_pa_requests.effective_date%type,
918: p_first_auth_code out nocopy ghr_pa_requests.FIRST_ACTION_LA_CODE1%type,
919: p_second_auth_code out nocopy ghr_pa_requests.FIRST_ACTION_LA_CODE1%type)
920: IS
921: cursor c_get_prev_details is
922: select effective_date,first_noa_code,
923: first_action_la_code1,first_action_la_code2,
921: cursor c_get_prev_details is
922: select effective_date,first_noa_code,
923: first_action_la_code1,first_action_la_code2,
924: second_action_la_code1,second_action_la_code2
925: from ghr_pa_requests
926: where pa_notification_id is not null
927: and person_id = p_person_id
928: and pa_notification_id < p_pa_notification_id
929: and effective_date <= p_effective_date
928: and pa_notification_id < p_pa_notification_id
929: and effective_date <= p_effective_date
930: and first_noa_code not in ('001') -- Exclude all cancellations
931: and pa_request_id not in ( select altered_pa_request_id
932: from ghr_pa_requests where
933: pa_notification_id = p_pa_notification_id) -- Excludes original action
934: order by pa_notification_id desc;
935: BEGIN
936: FOR c_prev_rec in c_get_prev_details LOOP
951: p_second_auth_code := null;
952: raise;
953: END;
954: function get_nfc_conv_action_code(
955: p_pa_request_id in ghr_pa_requests.pa_request_id%type)
956: RETURN NUMBER
957: IS
958: cursor c_ex_emp is
959: select 'X'
956: RETURN NUMBER
957: IS
958: cursor c_ex_emp is
959: select 'X'
960: from per_people_f per, per_person_types ppt, ghr_pa_requests par
961: where par.pa_request_id = p_pa_request_id
962: and per.person_id = par.person_id
963: and ppt.person_type_id = per.person_type_id
964: and ppt.system_person_type = 'EX_EMP'