1 Package per_per_bus1 as
2 /* $Header: peperrhi.pkh 120.2.12010000.1 2008/07/28 05:14:29 appldev ship $ */
3 --
4 -- ---------------------------------------------------------------------------
5 -- |----------------------< df_update_validate >---------------------------|
6 -- ---------------------------------------------------------------------------
7 --
8 -- Description:
9 -- Calls the descriptive flex validation stub (per_per_flex.df) if either
10 -- the attribute_category or attribute1..30 have changed.
11 --
12 -- Pre-conditions:
13 -- Can only be called from update_validate
14 --
15 -- In Arguments:
16 -- p_rec
17 --
18 -- Post Success:
19 -- If the attribute_category and attribute1.30 haven't changed then the
20 -- validation is not performed and the processing continues.
21 -- If the attribute_category or attribute1.30 have changed then the
22 -- per_per_flex.df validates the descriptive flex. If an exception is
23 -- not raised then processing continues.
24 --
25 -- Post Failure:
26 -- If an exception is raised within this procedure or lower
27 -- procedure calls then it is raised through the normal exception
28 -- handling mechanism.
29 --
30 -- Access Status:
31 -- Internal Table Handler Use Only.
32 -- ---------------------------------------------------------------------------
33 procedure df_update_validate
34 (p_rec in per_per_shd.g_rec_type
35 );
36 --
37 -- ---------------------------------------------------------------------------
38 -- |------------------< chk_unsupported_attributes >-----------------------|
39 -- ---------------------------------------------------------------------------
40 --
41 -- Description:
42 -- - Validates that all unsupported attributes are set to null.
43 --
44 -- Pre-conditions:
45 -- Valid p_person_id.
46 --
47 -- In Arguments:
48 -- p_person_id
49 -- p_fast_path_employee
50 -- p_order_name
51 -- p_projected_start_date
52 -- p_rehire_authorizor
53 -- p_effective_date
54 -- p_object_version_number
55 --
56 -- Post Success:
57 -- Processing continues if:
58 -- - All unsupported attributes are set to null.
59 --
60 -- Post Failure:
61 -- An application error is raised and processing is terminated if:
62 -- - Any of the unsupported attributes are set to null;
63 --
64 -- Access Status:
65 -- Internal Table Handler Use Only.
66 --
67 procedure chk_unsupported_attributes
68 (p_person_id in per_all_people_f.person_id%TYPE
69 ,p_fast_path_employee in per_all_people_f.fast_path_employee%TYPE
70 ,p_order_name in per_all_people_f.order_name%TYPE
71 ,p_projected_start_date in per_all_people_f.projected_start_date%TYPE
72 ,p_rehire_authorizor in per_all_people_f.rehire_authorizor%TYPE
73 ,p_effective_date in date
74 ,p_object_version_number in per_all_people_f.object_version_number%TYPE
75 );
76 --
77 -- ---------------------------------------------------------------------------
78 -- |-----------------< chk_correspondence_language >-----------------------|
79 -- ---------------------------------------------------------------------------
80 --
81 -- Description:
82 -- - Validates that the Correspondence language is a valid LANGUAGE_CODE
83 -- in the table FND_LANGUAGES.
84 --
85 -- Pre-conditions:
86 -- None
87 --
88 -- In Arguments:
89 -- p_person_id
90 -- p_effective_date
91 -- p_correspondence_language
92 -- p_object_version_number
93 --
94 -- Post Success:
95 -- Processing continues.
96 --
97 -- Post Failure:
98 -- An application error is raised and processing is terminated.
99 --
100 -- Access Status:
101 -- Internal Table Handler Use Only.
102 --
103 procedure chk_correspondence_language
104 (p_person_id in per_all_people_f.person_id%TYPE
105 ,p_effective_date in date
106 ,p_correspondence_language in per_all_people_f.correspondence_language%TYPE
107 ,p_object_version_number in per_all_people_f.object_version_number%TYPE
108 );
109 --
110 -- ---------------------------------------------------------------------------
111 -- |-----------------< chk_coord_ben_med_cvg_dates >-----------------------|
112 -- ---------------------------------------------------------------------------
113 --
114 -- Description:
115 -- - Validates that the coverage end date is after the coverage start date.
116 --
117 -- Pre-conditions:
118 -- None
119 --
120 -- In Arguments:
121 -- p_coord_ben_med_cvg_strt_dt
122 -- p_coord_ben_med_cvg_end_dt
123 --
124 -- Post Success:
125 -- Processing continues.
126 --
127 -- Post Failure:
128 -- An application error is raised and processing is terminated.
129 --
130 -- Access Status:
131 -- Internal Table Handler Use Only.
132 --
133 procedure chk_coord_ben_med_cvg_dates
134 (p_coord_ben_med_cvg_strt_dt in date
135 ,p_coord_ben_med_cvg_end_dt in date
136 );
137 -- ---------------------------------------------------------------------------
138 -- |-----------------< chk_coord_ben_med_details >-------------------------|
139 -- ---------------------------------------------------------------------------
140 --
141 -- Description:
142 -- - Validates that the benefit medical details if entered must include
143 -- at minimum the insurer carrier name.
144 --
145 -- Pre-conditions:
146 -- None
147 --
148 -- In Arguments:
149 -- p_coord_ben_med_cvg_strt_dt
150 -- p_coord_ben_med_cvg_strt_dt
151 -- p_coord_ben_med_ext_er
152 -- p_coord_ben_med_pl_name
153 -- p_coord_ben_med_insr_crr_name
154 -- p_coord_ben_med_insr_ident
155 --
156 -- Post Success:
157 -- Processing continues.
158 --
159 -- Post Failure:
160 -- An application error is raised and processing is terminated.
161 --
162 -- Access Status:
163 -- Internal Table Handler Use Only.
164 --
165 procedure chk_coord_ben_med_details
166 (p_coord_ben_med_cvg_strt_dt in date
167 ,p_coord_ben_med_cvg_end_dt in date
168 ,p_coord_ben_med_ext_er in varchar2
169 ,p_coord_ben_med_pl_name in varchar2
170 ,p_coord_ben_med_insr_crr_name in varchar2
171 ,p_coord_ben_med_insr_crr_ident in varchar2
172 );
173 -- ---------------------------------------------------------------------------
174 -- |-----------------< chk_other_coverages >-------------------------------|
175 -- ---------------------------------------------------------------------------
176 --
177 -- Description:
178 -- - Validates that the no coverage flag is set correctly whenever another
179 -- benefit coverage is defined.
180 --
181 -- Pre-conditions:
182 -- None
183 --
184 -- In Arguments:
185 -- p_attribute10
186 -- p_coord_ben_med_insr_crr_name
187 -- p_coord_ben_med_cvg_end_dt
188 -- p_coord_ben_no_cvg_flag
189 -- p_effective_date
190 --
191 -- Post Success:
192 -- Processing continues.
193 --
194 -- Post Failure:
195 -- An application error is raised and processing is terminated.
196 --
197 -- Access Status:
198 -- Internal Table Handler Use Only.
199 --
200 procedure chk_other_coverages
201 (p_attribute10 in varchar2
202 ,p_coord_ben_med_insr_crr_name in varchar2
203 ,p_coord_ben_med_cvg_end_dt in date
204 ,p_coord_ben_no_cvg_flag in varchar2
205 ,p_effective_date in date
206 );
207 -- ---------------------------------------------------------------------------
208 -- |-----------------< chk_fte_capacity >----------------------------------|
209 -- ---------------------------------------------------------------------------
210 --
211 -- Description:
212 -- - Validates that the fte capacity is inthe range 0.0 to 100.0
213 --
214 -- Pre-conditions:
215 -- None.
216 --
217 -- In Arguments:
218 -- p_person_id
219 -- p_fte_capacity
220 -- p_effective_date
221 -- p_object_version_number
222 --
223 -- Post Success:
224 -- Processing continues.
225 --
226 -- Post Failure:
227 -- An application error is raised and processing is terminated.
228 --
229 -- Access Status:
230 -- Internal Table Handler Use Only.
231 --
232 procedure chk_fte_capacity
233 (p_person_id in per_all_people_f.person_id%TYPE
234 ,p_effective_date in date
235 ,p_fte_capacity in per_all_people_f.fte_capacity%TYPE
236 ,p_object_version_number in per_all_people_f.object_version_number%TYPE
237 );
238 --
239 -- ---------------------------------------------------------------------------
240 -- |-----------------< chk_background_check_status >-----------------------|
241 -- ---------------------------------------------------------------------------
242 --
243 -- Description:
244 -- - Validates that the Background Check Status exists as a lookup code on
245 -- HR_LOOKUPS for the lookup type 'YES_NO' with an enabled
246 -- flag set to 'Y' and the effective start date of the Person between
247 -- start date active and end date active on HR_LOOKUPS.
248 --
249 -- Pre-conditions:
250 -- Valid p_person_id.
251 --
252 -- In Arguments:
253 -- p_person_id
254 -- p_background_check_status
255 -- p_effective_date
256 -- p_validation_start_date
257 -- p_validation_end_date
258 -- p_object_version_number
259 --
260 -- Post Success:
261 -- Processing continues if:
262 -- - Background Check Status exists as a lookup code in HR_LOOKUPS
263 -- for the lookup type 'YES_NO' where the enabled flag is 'Y' and
264 -- the effective start date of the Person is between start date
265 -- active and end date active on HR_LOOKUPS.
266 --
267 -- Post Failure:
268 -- An application error is raised and processing is terminated if:
269 -- - Background Check Status does'nt exist as a lookup code in
270 -- HR_LOOKUPS for the lookup type 'YES_NO' where the enabled flag
271 -- is 'Y' and the effective start date of the person is between
272 -- start date active and end date active on HR_LOOKUPS.
273 --
274 -- Access Status:
275 -- Internal Table Handler Use Only.
276 --
277 procedure chk_background_check_status
278 (p_person_id in per_all_people_f.person_id%TYPE
279 ,p_background_check_status in per_all_people_f.background_check_status%TYPE
280 ,p_effective_date in date
281 ,p_validation_start_date in date
282 ,p_validation_end_date in date
283 ,p_object_version_number in per_all_people_f.object_version_number%TYPE
284 );
285 --
286 -- ---------------------------------------------------------------------------
287 -- |-------------------------< chk_blood_type >----------------------------|
288 -- ---------------------------------------------------------------------------
289 --
290 -- Description:
291 -- - Validates that the Blood Type exists as a lookup code on
292 -- HR_LOOKUPS for the lookup type 'BLOOD_TYPE' with an enabled
293 -- flag set to 'Y' and the effective start date of the Person between
294 -- start date active and end date active on HR_LOOKUPS.
295 --
296 -- Pre-conditions:
297 -- Valid p_person_id.
298 --
299 -- In Arguments:
300 -- p_person_id
301 -- p_blood_type
302 -- p_effective_date
303 -- p_validation_start_date
304 -- p_validation_end_date
305 -- p_object_version_number
306 --
307 -- Post Success:
308 -- Processing continues if:
309 -- - Blood Type exists as a lookup code in HR_LOOKUPS
310 -- for the lookup type 'BLOOD_TYPE' where the enabled flag is 'Y' and
311 -- the effective start date of the Person is between start date
312 -- active and end date active on HR_LOOKUPS.
313 --
314 -- Post Failure:
315 -- An application error is raised and processing is terminated if:
316 -- - Blood Type does'nt exist as a lookup code in
317 -- HR_LOOKUPS for the lookup type 'BLOOD_TYPE' where the enabled flag
318 -- is 'Y' and the effective start date of the person is between
319 -- start date active and end date active on HR_LOOKUPS.
320 --
321 -- Access Status:
322 -- Internal Table Handler Use Only.
323 --
324 procedure chk_blood_type
325 (p_person_id in per_all_people_f.person_id%TYPE
326 ,p_blood_type in per_all_people_f.blood_type%TYPE
327 ,p_effective_date in date
328 ,p_validation_start_date in date
329 ,p_validation_end_date in date
330 ,p_object_version_number in per_all_people_f.object_version_number%TYPE
331 );
332 --
333 -- ---------------------------------------------------------------------------
334 -- |-------------------------< chk_student_status >------------------------|
335 -- ---------------------------------------------------------------------------
336 --
337 -- Description:
338 -- - Validates that the Student Status exists as a lookup code on
339 -- HR_LOOKUPS for the lookup type 'STUDENT_STATUS' with an enabled
340 -- flag set to 'Y' and the effective start date of the Person between
341 -- start date active and end date active on HR_LOOKUPS.
342 --
343 -- Pre-conditions:
344 -- Valid p_person_id.
345 --
346 -- In Arguments:
347 -- p_person_id
348 -- p_student_status
349 -- p_effective_date
350 -- p_validation_start_date
351 -- p_validation_end_date
352 -- p_object_version_number
353 --
354 -- Post Success:
355 -- Processing continues if:
356 -- - Student Status exists as a lookup code in HR_LOOKUPS
357 -- for the lookup type 'STUDENT_STATUS' where the enabled flag is 'Y' and
358 -- the effective start date of the Person is between start date
359 -- active and end date active on HR_LOOKUPS.
360 --
361 -- Post Failure:
362 -- An application error is raised and processing is terminated if:
366 -- start date active and end date active on HR_LOOKUPS.
363 -- - Student Status doesn't exist as a lookup code in
364 -- HR_LOOKUPS for the lookup type 'STUDENT_STATUS' where the enabled flag
365 -- is 'Y' and the effective start date of the person is between
367 --
368 -- Access Status:
369 -- Internal Table Handler Use Only.
370 --
371 procedure chk_student_status
372 (p_person_id in per_all_people_f.person_id%TYPE
373 ,p_student_status in per_all_people_f.student_status%TYPE
374 ,p_effective_date in date
375 ,p_validation_start_date in date
376 ,p_validation_end_date in date
377 ,p_object_version_number in per_all_people_f.object_version_number%TYPE
378 );
379 --
380 -- ---------------------------------------------------------------------------
381 -- |-------------------------< chk_work_schedule >-------------------------|
382 -- ---------------------------------------------------------------------------
383 --
384 -- Description:
385 -- - Validates that the Work Schedule exists as a lookup code on
386 -- HR_LOOKUPS for the lookup type 'WORK_SCHEDULE' with an enabled
387 -- flag set to 'Y' and the effective start date of the Person between
388 -- start date active and end date active on HR_LOOKUPS.
389 --
390 -- Pre-conditions:
391 -- Valid p_person_id.
392 --
393 -- In Arguments:
394 -- p_person_id
395 -- p_work_schedule
396 -- p_effective_date
397 -- p_validation_start_date
398 -- p_validation_end_date
399 -- p_object_version_number
400 --
401 -- Post Success:
402 -- Processing continues if:
403 -- - Work Schedule exists as a lookup code in HR_LOOKUPS
404 -- for the lookup type 'WORK_SCHEDULE' where the enabled flag is 'Y' and
405 -- the effective start date of the Person is between start date
406 -- active and end date active on HR_LOOKUPS.
407 --
408 -- Post Failure:
409 -- An application error is raised and processing is terminated if:
410 -- - Work Schedule does'nt exist as a lookup code in
411 -- HR_LOOKUPS for the lookup type 'WORK_SCHEDULE' where the enabled flag
412 -- is 'Y' and the effective start date of the person is between
413 -- start date active and end date active on HR_LOOKUPS.
414 --
415 -- Access Status:
416 -- Internal Table Handler Use Only.
417 --
418 procedure chk_work_schedule
419 (p_person_id in per_all_people_f.person_id%TYPE
420 ,p_work_schedule in per_all_people_f.work_schedule%TYPE
421 ,p_effective_date in date
422 ,p_validation_start_date in date
423 ,p_validation_end_date in date
424 ,p_object_version_number in per_all_people_f.object_version_number%TYPE
425 );
426 --
427 -- ---------------------------------------------------------------------------
428 -- |---------------------< chk_rehire_recommendation >---------------------|
429 -- ---------------------------------------------------------------------------
430 --
431 -- Description:
432 -- - Validates that the Rehire Recommendation exists as a lookup code on
433 -- HR_LOOKUPS for the lookup type 'YES_NO' with an enabled
434 -- flag set to 'Y' and the effective start date of the Person between
435 -- start date active and end date active on HR_LOOKUPS.
436 --
437 -- Pre-conditions:
438 -- Valid p_person_id.
439 --
440 -- In Arguments:
441 -- p_person_id
442 -- p_rehire_recommendation
443 -- p_effective_date
444 -- p_validation_start_date
445 -- p_validation_end_date
446 -- p_object_version_number
447 --
448 -- Post Success:
449 -- Processing continues if:
450 -- - Rehire Recommendation exists as a lookup code in HR_LOOKUPS
451 -- for the lookup type 'YES_NO' where the enabled flag is 'Y' and
452 -- the effective start date of the Person is between start date
453 -- active and end date active on HR_LOOKUPS.
454 --
455 -- Post Failure:
456 -- An application error is raised and processing is terminated if:
457 -- - Rehire Recommendation does'nt exist as a lookup code in
458 -- HR_LOOKUPS for the lookup type 'YES_NO' where the enabled flag
459 -- is 'Y' and the effective start date of the person is between
460 -- start date active and end date active on HR_LOOKUPS.
461 --
462 -- Access Status:
463 -- Internal Table Handler Use Only.
464 --
465 procedure chk_rehire_recommendation
466 (p_person_id in per_all_people_f.person_id%TYPE
467 ,p_rehire_recommendation in per_all_people_f.rehire_recommendation%TYPE
468 ,p_effective_date in date
469 ,p_validation_start_date in date
470 ,p_validation_end_date in date
471 ,p_object_version_number in per_all_people_f.object_version_number%TYPE
472 );
473 --
474 -- ---------------------------------------------------------------------------
475 -- |-------------------------< chk_benefit_group_id >------------------------|
476 -- ---------------------------------------------------------------------------
477 --
478 -- Description:
479 -- - Validates that benefit_group_id exists in BEN_BENFTS_GRP where
480 -- on the effective date.
481 --
482 -- Pre-conditions:
483 -- Valid p_person_id.
484 --
485 -- In Arguments:
486 -- p_person_id
490 --
487 -- p_benefit_group_id
488 -- p_effective_date
489 -- p_object_version_number
491 -- Post Success:
492 -- Processing continues if:
493 -- - benefit_group_id = benfts_grp_id in the BEN_BENFTS_GRP on the
494 -- effective date.
495 --
496 -- Post Failure:
497 -- An application error is raised and processing is terminated if:
498 -- - Benefit group id doesn't exist in BEN_BENFTS_GRP on the
499 -- effective date.
500 --
501 -- Access Status:
502 -- Internal Table Handler Use Only.
503 --
504 procedure chk_benefit_group_id
505 (p_person_id in per_all_people_f.person_id%TYPE
506 ,p_benefit_group_id in per_all_people_f.benefit_group_id%TYPE
507 ,p_effective_date in date
508 ,p_object_version_number in per_all_people_f.object_version_number%TYPE
509 );
510
511 -- ---------------------------------------------------------------------------
512 -- |--------------------< chk_date_death_and_rcpt_cert >-------------------|
513 -- ---------------------------------------------------------------------------
514 --
515 -- Description:
516 -- - Validates that if the date of death is null the date of recipt of death
517 -- certificate is also null. Also validates that the date the death
518 -- certificate is received is the same or later than the date of death.
519 --
520 -- Pre-conditions:
521 -- Valid p_person_id
522 --
523 -- In Arguments:
524 -- p_person_id
525 -- p_receipt_of_death_cert_date
526 -- p_effective_date
527 -- p_date_of_death
528 -- p_object_version_number
529 --
530 -- Post Success:
531 -- Processing continues if:
532 -- - date_of_death is null and the receipt_of_death_cert_date is null.
533 -- - receipt_of_death_cert_date is on or later than the date_of_death.
534 --
535 -- Post Failure:
536 -- An application error is raised and processing is terminated if:
537 -- - The receipt_of_death_cert date is not null and the date_of_death is null.
538 -- - The receipt_of_death_cert_date is earlier than the date_of_death.
539 --
540 -- Access Status:
541 -- Internal Table Handler Use Only.
542 --
543 procedure chk_date_death_and_rcpt_cert
544 (p_person_id in per_all_people_f.person_id%TYPE
545 ,p_receipt_of_death_cert_date in per_all_people_f.receipt_of_death_cert_date%TYPE
546 ,p_effective_date in date
547 ,p_object_version_number in per_all_people_f.object_version_number%TYPE
548 ,p_date_of_death in date
549 );
550
551 -- ---------------------------------------------------------------------------
552 -- |-------------------------< chk_birth_adoption_date >-------------------|
553 -- ---------------------------------------------------------------------------
554 --
555 -- Description:
556 -- - Validates that if the date of birth is null then the dependent's adoption
557 -- date is also null. Also validates that the dependent's date of adoption
558 -- is the same or later than the date of birth.
559 --
560 -- Pre-conditions:
561 -- Valid p_person_id
562 --
563 -- In Arguments:
564 -- p_person_id
565 -- p_dpdnt_adoption_date
566 -- p_effective_date
567 -- p_date_of_birth
568 -- p_object_version_number
569 --
570 -- Post Success:
571 -- Processing continues if:
572 -- - dpdnt_adoption_date is null if date_of_birth is null
573 -- - dpdnt_adoption_date is on or later than the date_of_birth.
574 --
575 -- Post Failure:
576 -- An application error is raised and processing is terminated if:
577 -- - The dpdnt_adoption_date is not null and the date_of_birth is null.
578 -- - The dpdnt_adoption_date is earlier than the date_of_birth.
579 --
580 -- Access Status:
581 -- Internal Table Handler Use Only.
582 --
583 procedure chk_birth_adoption_date
584 (p_person_id in per_all_people_f.person_id%TYPE
585 ,p_dpdnt_adoption_date in per_all_people_f.dpdnt_adoption_date%TYPE
586 ,p_date_of_birth in date
587 ,p_effective_date in date
588 ,p_object_version_number in per_all_people_f.object_version_number%TYPE
589 );
590 -- ---------------------------------------------------------------------------
591 -- |-------------------------< chk_rd_flag >-------------------|
592 -- ---------------------------------------------------------------------------
593 --
594 -- Description:
595 -- - Validates that registered disabled exists as a lookup code on
596 -- HR_LOOKUPS for the lookup type 'REGISTERED_DISABLED' with an enabled
597 -- flag set to 'Y' and the effective start date of the Person between
598 -- start date active and end date active on HR_LOOKUPS.
599 --
600 -- Pre-conditions:
601 -- Valid p_person_id.
602 --
603 -- In Arguments:
604 -- p_person_id
605 -- p_registered_disabled_flag
606 -- p_effective_date
607 -- p_validation_start_date
608 -- p_validation_end_date
609 -- p_object_version_number
610 --
611 -- Post Success:
612 -- Processing continues if:
613 -- - Registered Disabled exists as a lookup code in HR_LOOKUPS
614 -- for the lookup type 'REGISTERED_DISABLED' where the enabled flag is 'Y' and
618 -- Post Failure:
615 -- the effective start date of the Person is between start date
616 -- active and end date active on HR_LOOKUPS.
617 --
619 -- An application error is raised and processing is terminated if:
620 -- - Registered_disabled doesn't exist as a lookup code in
621 -- HR_LOOKUPS for the lookup type 'REGISTERED_DISABLED' where the enabled flag
622 -- is 'Y' and the effective start date of the person is between
623 -- start date active and end date active on HR_LOOKUPS.
624 --
625 -- Access Status:
626 -- Internal Table Handler Use Only.
627 --
628 procedure chk_rd_flag
629 (p_person_id in per_all_people_f.person_id%TYPE
630 ,p_registered_disabled_flag in per_all_people_f.registered_disabled_flag%TYPE
631 ,p_effective_date in date
632 ,p_validation_start_date in date
633 ,p_validation_end_date in date
634 ,p_object_version_number in per_all_people_f.object_version_number%TYPE
635 );
636
637 -- ---------------------------------------------------------------------------
638 -- |-------------------------< chk_date_of_death >-------------------------|
639 -- ---------------------------------------------------------------------------
640 --
641 -- Description:
642 -- - Validates that the date of death is the same or later than the
643 -- date of birth.
644 --
645 -- Pre-conditions:
646 -- Valid p_person_id.
647 --
648 -- In Arguments:
649 -- p_person_id
650 -- p_date_of_death
651 -- p_effective_date
652 -- p_date_of_birth
653 -- p_object_version_number
654 --
655 -- Post Success:
656 -- Processing continues if:
657 -- - date_of_death is on or later than the date_of_birth.
658 --
659 -- Post Failure:
660 -- An application error is raised and processing is terminated if:
661 -- - The date_of_death is earlier than the date_of_birth.
662 --
663 -- Access Status:
664 -- Internal Table Handler Use Only.
665 --
666 procedure chk_date_of_death
667 (p_person_id in per_all_people_f.person_id%TYPE
668 ,p_date_of_death in per_all_people_f.date_of_death%TYPE
669 ,p_date_of_birth in per_all_people_f.date_of_birth%TYPE
670 ,p_effective_date in date
671 ,p_object_version_number in per_all_people_f.object_version_number%TYPE
672 );
673 --
674 -- ---------------------------------------------------------------------------
675 -- |-------------------------< chk_uses_tobacco >---------------------------|
676 -- ---------------------------------------------------------------------------
677 --
678 -- Description:
679 -- - Validates that Uses Tobacco exists as a lookup code on
680 -- HR_LOOKUPS for the lookup type 'TOBACCO_USER' with an enabled
681 -- flag set to 'Y' and the effective start date of the Person between
682 -- start date active and end date active on HR_LOOKUPS.
683 --
684 -- Pre-conditions:
685 -- Valid p_person_id.
686 --
687 -- In Arguments:
688 -- p_person_id
689 -- p_uses_tobacco_flag
690 -- p_effective_date
691 -- p_validation_start_date
692 -- p_validation_end_date
693 -- p_object_version_number
694 --
695 -- Post Success:
696 -- Processing continues if:
697 -- - Uses tobacco exists as a lookup code in HR_LOOKUPS
698 -- for the lookup type 'TOBACCO_USER' where the enabled flag is 'Y' and
699 -- the effective start date of the Person is between start date
700 -- active and end date active on HR_LOOKUPS.
701 --
702 -- Post Failure:
703 -- An application error is raised and processing is terminated if:
704 -- - Uses Tobacco doesn't exist as a lookup code in
705 -- HR_LOOKUPS for the lookup type 'TOBACCO_USER' where the enabled flag
706 -- is 'Y' and the effective start date of the person is between
707 -- start date active and end date active on HR_LOOKUPS.
708 --
709 -- Access Status:
710 -- Internal Table Handler Use Only.
711 --
712 procedure chk_uses_tobacco
713 (p_person_id in per_all_people_f.person_id%TYPE
714 ,p_uses_tobacco_flag in per_all_people_f.uses_tobacco_flag%TYPE
715 ,p_effective_date in date
716 ,p_validation_start_date in date
717 ,p_validation_end_date in date
718 ,p_object_version_number in per_all_people_f.object_version_number%TYPE
719 );
720 --
721 end per_per_bus1;