1 package per_kw_work_incident_api as
2 /* $Header: peinckwi.pkh 120.1 2005/10/02 02:42:07 aroussel $ */
3 /*#
4 * This package contains APIs for work incidents for Kuwait.
5 * @rep:scope public
6 * @rep:product PER
7 * @rep:displayname Work Incidents for Kuwait
8 */
9 --
10 -- ----------------------------------------------------------------------------
11 -- |-------------------------< create_kw_work_incident >----------------------|
12 -- ----------------------------------------------------------------------------
13 --
14 -- {Start Of Comments}
15 /*#
16 * This API creates a work incident record for a Kuwaiti person.
17 *
18 *
19 * <p><b>Licensing</b><br>
20 * This API is licensed for use with Human Resources.
21 *
22 * <p><b>Prerequisites</b><br>
23 * Person must exist.
24 *
25 * <p><b>Post Success</b><br>
26 * The work incident record is successfully inserted in the database.
27 *
28 * <p><b>Post Failure</b><br>
29 * The API does not create the work incident and raises an error.
30 *
31 * @param p_validate If true, then validation alone will be performed and the
32 * database will remain unchanged. If false and all validation checks pass,
33 * then the database will be modified.
34 * @param p_effective_date Determines when the DateTrack operation comes into
35 * force.
36 * @param p_person_id Identifies the person for whom you create the work
37 * incident record.
38 * @param p_incident_reference Reference code for the incident record.
39 * @param p_incident_type The type of work incident that is being recorded.
40 * @param p_at_work_flag Indicates whether work incident occurred at work or en
41 * route.
42 * @param p_incident_date The date that the work incident occurred.
43 * @param p_incident_time The time that the incident occurred. (HH24:MI).
44 * @param p_org_notified_date The date that the organization was notified of
45 * the work incident.
46 * @param p_assignment_id Identifies the assignment for which you create the
47 * work incident record.
48 * @param p_location Location of incident (not an HRMS location).
49 * @param p_report_date The date the incident was reported.
50 * @param p_report_time The time the incident was reported. (HH24:MI).
51 * @param p_report_method The method by which the incident was reported.
52 * @param p_person_reported_by The id if the person who reported the work
53 * incident to the authorities.
54 * @param p_person_reported_to The name and contact details of the person (not
55 * held on HRMS) representing the authority that the incident has been reported
56 * to.
57 * @param p_witness_details The name and contact details of any witnesses to
58 * the work incident.
59 * @param p_description Description of the work incident.
60 * @param p_injury_type Type of injury suffered by the person in the work
61 * incident.
62 * @param p_disease_type Type of disease diagnosed as resulting from the work
63 * incident.
64 * @param p_hazard_type Object or substance involved in the work incident.
65 * @param p_body_part Details of the injured or diseased area of the person's
66 * anatomy.
67 * @param p_treatment_received_flag Indicates if medical treatment has been
68 * administered to the person.
69 * @param p_hospital_details Name and contact details of the hospital where
70 * treatment has been administered.
71 * @param p_emergency_code Indicates whether admitted to an emergency room.
72 * @param p_hospitalized_flag Indicates whether hospitalized.
73 * @param p_hospital_address Address of the hospital.
74 * @param p_activity_at_time_of_work Activity of the person at the time of the
75 * incident.
76 * @param p_objects_involved Objects or substances involved in the incident.
77 * @param p_privacy_issue Indicates whether the incident is should be kept
78 * private.
79 * @param p_work_start_time Time the person started work (HH24:MI).
80 * @param p_date_of_death Date of persons death.
81 * @param p_report_completed_by Name of the person completing this incident
82 * report.
83 * @param p_reporting_person_title Title of the person completing this incident
84 * report.
85 * @param p_reporting_person_phone Phone number of the person completing this
86 * incident report.
87 * @param p_days_restricted_work Number of days the person is on restricted
88 * work.
89 * @param p_days_away_from_work Number of days the person is away from work or
90 * on transfer.
91 * @param p_doctor_name Name of the medical practitioner coordinating the
92 * treatment of the person.
93 * @param p_compensation_date Date compensation was awarded.
94 * @param p_compensation_currency Currency (code) in which compensation was
95 * awarded.
96 * @param p_compensation_amount Amount of compensation awarded.
97 * @param p_remedial_hs_action Description of any corrective action that has
98 * been recommended by the health and safety representative.
99 * @param p_notified_hsrep_id The person id of the health and safety
100 * representative notified of the work incident.
101 * @param p_notified_hsrep_date The date the health and safety representative
102 * was notified.
103 * @param p_notified_rep_id The id of the person who has been notified of the
104 * work incident and who represents (by role) the representative body.
105 * @param p_notified_rep_date The date the representative body representative
106 * was notified.
107 * @param p_notified_rep_org_id The id (organization) of the notified
108 * representative body.
109 * @param p_related_incident_id The id of the work incident that is related to
110 * the current work incident.
111 * @param p_over_time_flag Indicates if the incident occurred over a period of
112 * time.
113 * @param p_absence_exists_flag Indicates if person has been absent (not an
114 * HRMS absence) due to the incident. over time.
115 * @param p_attribute_category This context value determines which flexfield
116 * structure to use with the descriptive flexfield segments.
117 * @param p_attribute1 Descriptive flexfield segment.
118 * @param p_attribute2 Descriptive flexfield segment.
119 * @param p_attribute3 Descriptive flexfield segment.
120 * @param p_attribute4 Descriptive flexfield segment.
121 * @param p_attribute5 Descriptive flexfield segment.
122 * @param p_attribute6 Descriptive flexfield segment.
123 * @param p_attribute7 Descriptive flexfield segment.
124 * @param p_attribute8 Descriptive flexfield segment.
125 * @param p_attribute9 Descriptive flexfield segment.
126 * @param p_attribute10 Descriptive flexfield segment.
127 * @param p_attribute11 Descriptive flexfield segment.
128 * @param p_attribute12 Descriptive flexfield segment.
129 * @param p_attribute13 Descriptive flexfield segment.
130 * @param p_attribute14 Descriptive flexfield segment.
131 * @param p_attribute15 Descriptive flexfield segment.
132 * @param p_attribute16 Descriptive flexfield segment.
133 * @param p_attribute17 Descriptive flexfield segment.
134 * @param p_attribute18 Descriptive flexfield segment.
135 * @param p_attribute19 Descriptive flexfield segment.
136 * @param p_attribute20 Descriptive flexfield segment.
137 * @param p_attribute21 Descriptive flexfield segment.
138 * @param p_attribute22 Descriptive flexfield segment.
139 * @param p_attribute23 Descriptive flexfield segment.
140 * @param p_attribute24 Descriptive flexfield segment.
141 * @param p_attribute25 Descriptive flexfield segment.
142 * @param p_attribute26 Descriptive flexfield segment.
143 * @param p_attribute27 Descriptive flexfield segment.
144 * @param p_attribute28 Descriptive flexfield segment.
145 * @param p_attribute29 Descriptive flexfield segment.
146 * @param p_attribute30 Descriptive flexfield segment.
147 * @param p_length_of_treatment Duration of any treatment as a result of the
148 * work incident.
149 * @param p_units Units of treatment duration.
150 * @param p_incident_id If p_validate is false, uniquely identifies the work
151 * incident created. If p_validate is true, set to null.
152 * @param p_object_version_number If p_validate is false, set to the version
153 * number of this work incident. If p_validate is true, set to null.
154 * @rep:displayname Create Work Incident for Kuwait
155 * @rep:category BUSINESS_ENTITY PER_WORK_INCIDENT
156 * @rep:lifecycle active
157 * @rep:scope public
158 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
159 */
160 --
161 -- {End Of Comments}
162 --
163 procedure create_kw_work_incident
164 (p_validate in boolean default false
165 ,p_effective_date in date
166 ,p_person_id in number
167 ,p_incident_reference in varchar2
168 ,p_incident_type in varchar2
169 ,p_at_work_flag in varchar2
170 ,p_incident_date in date
171 ,p_incident_time in varchar2 default null
172 ,p_org_notified_date in date default null
173 ,p_assignment_id in number default null
174 ,p_location in varchar2 default null
175 ,p_report_date in date default null
176 ,p_report_time in varchar2 default null
177 ,p_report_method in varchar2 default null
178 ,p_person_reported_by in number default null
179 ,p_person_reported_to in varchar2 default null
180 ,p_witness_details in varchar2 default null
181 ,p_description in varchar2 default null
182 ,p_injury_type in varchar2 default null
183 ,p_disease_type in varchar2 default null
184 ,p_hazard_type in varchar2 default null
185 ,p_body_part in varchar2 default null
186 ,p_treatment_received_flag in varchar2 default null
187 ,p_hospital_details in varchar2 default null
188 ,p_emergency_code in varchar2 default null
192 ,p_objects_involved in varchar2 default null
189 ,p_hospitalized_flag in varchar2 default null
190 ,p_hospital_address in varchar2 default null
191 ,p_activity_at_time_of_work in varchar2 default null
193 ,p_privacy_issue in varchar2 default null
194 ,p_work_start_time in varchar2 default null
195 ,p_date_of_death in date default null
196 ,p_report_completed_by in varchar2 default null
197 ,p_reporting_person_title in varchar2 default null
198 ,p_reporting_person_phone in varchar2 default null
199 ,p_days_restricted_work in number default null
200 ,p_days_away_from_work in number default null
201 ,p_doctor_name in varchar2 default null
202 ,p_compensation_date in date default null
203 ,p_compensation_currency in varchar2 default null
204 ,p_compensation_amount in number default null
205 ,p_remedial_hs_action in varchar2 default null
206 ,p_notified_hsrep_id in number default null
207 ,p_notified_hsrep_date in date default null
208 ,p_notified_rep_id in number default null
209 ,p_notified_rep_date in date default null
210 ,p_notified_rep_org_id in number default null
211 ,p_related_incident_id in number default null
212 ,p_over_time_flag in varchar2 default null
213 ,p_absence_exists_flag in varchar2 default null
214 ,p_attribute_category in varchar2 default null
215 ,p_attribute1 in varchar2 default null
216 ,p_attribute2 in varchar2 default null
217 ,p_attribute3 in varchar2 default null
218 ,p_attribute4 in varchar2 default null
219 ,p_attribute5 in varchar2 default null
220 ,p_attribute6 in varchar2 default null
221 ,p_attribute7 in varchar2 default null
222 ,p_attribute8 in varchar2 default null
223 ,p_attribute9 in varchar2 default null
224 ,p_attribute10 in varchar2 default null
225 ,p_attribute11 in varchar2 default null
226 ,p_attribute12 in varchar2 default null
227 ,p_attribute13 in varchar2 default null
228 ,p_attribute14 in varchar2 default null
229 ,p_attribute15 in varchar2 default null
230 ,p_attribute16 in varchar2 default null
231 ,p_attribute17 in varchar2 default null
232 ,p_attribute18 in varchar2 default null
233 ,p_attribute19 in varchar2 default null
234 ,p_attribute20 in varchar2 default null
235 ,p_attribute21 in varchar2 default null
236 ,p_attribute22 in varchar2 default null
237 ,p_attribute23 in varchar2 default null
238 ,p_attribute24 in varchar2 default null
239 ,p_attribute25 in varchar2 default null
240 ,p_attribute26 in varchar2 default null
241 ,p_attribute27 in varchar2 default null
242 ,p_attribute28 in varchar2 default null
243 ,p_attribute29 in varchar2 default null
244 ,p_attribute30 in varchar2 default null
245 ,p_length_of_treatment in varchar2 default null
246 ,p_units in varchar2 default null
247 ,p_incident_id out nocopy number
248 ,p_object_version_number out nocopy number
249 );
250 --
251 -- ----------------------------------------------------------------------------
252 -- |-------------------------< update_kw_work_incident >----------------------|
253 -- ----------------------------------------------------------------------------
254 --
255 -- {Start Of Comments}
256 /*#
257 * This API updates a work incident record for a person as identified by
258 * p_incident_id.
259 *
260 * This API is an alternative to the API update_work_incident.
261 *
262 * <p><b>Licensing</b><br>
263 * This API is licensed for use with Human Resources.
264 *
265 * <p><b>Prerequisites</b><br>
266 * The work incident record identified by p_incident_id and
267 * object_version_number must exist.
268 *
269 * <p><b>Post Success</b><br>
270 * The work incident record is successfully updated in the database. The work
271 * incident record is created and the API sets the following out
272 *
273 * <p><b>Post Failure</b><br>
274 * The API does not update the work incident record and raises an error.
275 *
276 * @param p_validate If true, then validation alone will be performed and the
277 * database will remain unchanged. If false and all validation checks pass,
278 * then the database will be modified.
279 * @param p_effective_date Determines when the DateTrack operation comes into
280 * force.
281 * @param p_incident_id Surrogate id of the incident record.
282 * @param p_object_version_number If p_validate is false, set to the new
283 * version number of this work incident. If p_validate is true, set to null
284 * same value passed in.
285 * @param p_incident_reference Reference code for the incident record.
286 * @param p_incident_type The type of work incident that is being updated.
287 * @param p_at_work_flag Indicates whether work incident occurred at work or en
288 * route.
289 * @param p_incident_date The date that the incident occurred.
290 * @param p_incident_time The time that the incident occurred. (HH24:MI).
291 * @param p_org_notified_date The date that the organization was notified of
292 * the work incident.
293 * @param p_assignment_id Identifies the assignment for which you create the
294 * work incident record.
295 * @param p_location Location of incident (not an HRMS location).
296 * @param p_report_date The date the incident was reported.
297 * @param p_report_time The time the incident was reported. (HH24:MI).
298 * @param p_report_method The method by which the incident was reported.
299 * @param p_person_reported_by The id if the person who reported the work
300 * incident to the authorities.
301 * @param p_person_reported_to The name and contact details of the person (not
302 * held on HRMS) representing the authority that the incident has been reported
303 * to.
304 * @param p_witness_details The name and contact details of any witnesses to
305 * the work incident.
306 * @param p_description Description of the work incident.
307 * @param p_injury_type Type of injury suffered by the person in the work
308 * incident.
312 * @param p_body_part Details of the injured or diseased area of the person's
309 * @param p_disease_type Type of disease diagnosed as resulting from the work
310 * incident.
311 * @param p_hazard_type Object or substance involved in the work incident.
313 * anatomy.
314 * @param p_treatment_received_flag Indicates if medical treatment has been
315 * administered to the person.
316 * @param p_hospital_details Name and contact details of the hospital where
317 * treatment has been administered.
318 * @param p_emergency_code Indicates whether admitted to an emergency room.
319 * @param p_hospitalized_flag Indicates whether hospitalized.
320 * @param p_hospital_address Address of the hospital.
321 * @param p_activity_at_time_of_work Activity of the person at the time of the
322 * incident.
323 * @param p_objects_involved Objects or substances involved in the incident.
324 * @param p_privacy_issue Indicates whether the incident is should be kept
325 * private.
326 * @param p_work_start_time Time the person started work (HH24:MI).
327 * @param p_date_of_death Date of persons death.
331 * report.
328 * @param p_report_completed_by Name of the person completing this incident
329 * report.
330 * @param p_reporting_person_title Title of the person completing this incident
332 * @param p_reporting_person_phone Phone number of the person completing this
333 * incident report.
334 * @param p_days_restricted_work Number of days the person is on restricted
335 * work.
336 * @param p_days_away_from_work Number of days the person is away from work or
337 * on transfer.
338 * @param p_doctor_name Name of the medical practitioner coordinating the
339 * treatment of the person.
340 * @param p_compensation_date Date compensation was awarded.
341 * @param p_compensation_currency Currency (code) in which compensation was
342 * awarded.
343 * @param p_compensation_amount Amount of compensation awarded.
344 * @param p_remedial_hs_action Description of any corrective action that has
345 * been recommended by the health and safety representative.
346 * @param p_notified_hsrep_id The person id of the health and safety
347 * representative notified of the work incident.
348 * @param p_notified_hsrep_date The date the health and safety representative
349 * was notified.
350 * @param p_notified_rep_id The id of the person who has been notified of the
351 * work incident and who represents (by role) the representative body.
352 * @param p_notified_rep_date The date the representative body representative
353 * was notified.
354 * @param p_notified_rep_org_id The id (organization) of the notified
355 * representative body.
356 * @param p_related_incident_id The id of the work incident that is related to
357 * the current work incident.
358 * @param p_over_time_flag Indicates if the medical condition (injury or
359 * disease) occurred over a period of time.
360 * @param p_absence_exists_flag Indicates if person has been absent (not an
361 * HRMS absence) due to the incident.
362 * @param p_attribute_category This context value determines which flexfield
363 * structure to use with the descriptive flexfield segments.
364 * @param p_attribute1 Descriptive flexfield segment.
365 * @param p_attribute2 Descriptive flexfield segment.
366 * @param p_attribute3 Descriptive flexfield segment.
367 * @param p_attribute4 Descriptive flexfield segment.
368 * @param p_attribute5 Descriptive flexfield segment.
369 * @param p_attribute6 Descriptive flexfield segment.
370 * @param p_attribute7 Descriptive flexfield segment.
371 * @param p_attribute8 Descriptive flexfield segment.
372 * @param p_attribute9 Descriptive flexfield segment.
373 * @param p_attribute10 Descriptive flexfield segment.
374 * @param p_attribute11 Descriptive flexfield segment.
375 * @param p_attribute12 Descriptive flexfield segment.
376 * @param p_attribute13 Descriptive flexfield segment.
377 * @param p_attribute14 Descriptive flexfield segment.
378 * @param p_attribute15 Descriptive flexfield segment.
379 * @param p_attribute16 Descriptive flexfield segment.
380 * @param p_attribute17 Descriptive flexfield segment.
381 * @param p_attribute18 Descriptive flexfield segment.
382 * @param p_attribute19 Descriptive flexfield segment.
383 * @param p_attribute20 Descriptive flexfield segment.
384 * @param p_attribute21 Descriptive flexfield segment.
385 * @param p_attribute22 Descriptive flexfield segment.
386 * @param p_attribute23 Descriptive flexfield segment.
387 * @param p_attribute24 Descriptive flexfield segment.
388 * @param p_attribute25 Descriptive flexfield segment.
389 * @param p_attribute26 Descriptive flexfield segment.
390 * @param p_attribute27 Descriptive flexfield segment.
391 * @param p_attribute28 Descriptive flexfield segment.
392 * @param p_attribute29 Descriptive flexfield segment.
393 * @param p_attribute30 Descriptive flexfield segment.
394 * @param p_length_of_treatment Duration of any treatment as a result of the
395 * work incident.
396 * @param p_units Units of treatment duration.
397 * @rep:displayname Update Work Incident for Kuwait
398 * @rep:category BUSINESS_ENTITY PER_WORK_INCIDENT
399 * @rep:lifecycle active
400 * @rep:scope public
401 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
402 */
403 --
404 -- {End Of Comments}
405 --
406 procedure update_kw_work_incident
407 (p_validate in boolean default false
408 ,p_effective_date in date
409 ,p_incident_id in number
410 ,p_object_version_number in out nocopy number
411 ,p_incident_reference in varchar2 default hr_api.g_varchar2
412 ,p_incident_type in varchar2 default hr_api.g_varchar2
413 ,p_at_work_flag in varchar2 default hr_api.g_varchar2
417 ,p_assignment_id in number default hr_api.g_number
414 ,p_incident_date in date default hr_api.g_date
415 ,p_incident_time in varchar2 default hr_api.g_varchar2
416 ,p_org_notified_date in date default hr_api.g_date
418 ,p_location in varchar2 default hr_api.g_varchar2
419 ,p_report_date in date default hr_api.g_date
420 ,p_report_time in varchar2 default hr_api.g_varchar2
421 ,p_report_method in varchar2 default hr_api.g_varchar2
422 ,p_person_reported_by in number default hr_api.g_number
423 ,p_person_reported_to in varchar2 default hr_api.g_varchar2
424 ,p_witness_details in varchar2 default hr_api.g_varchar2
425 ,p_description in varchar2 default hr_api.g_varchar2
426 ,p_injury_type in varchar2 default hr_api.g_varchar2
427 ,p_disease_type in varchar2 default hr_api.g_varchar2
428 ,p_hazard_type in varchar2 default hr_api.g_varchar2
429 ,p_body_part in varchar2 default hr_api.g_varchar2
430 ,p_treatment_received_flag in varchar2 default hr_api.g_varchar2
431 ,p_hospital_details in varchar2 default hr_api.g_varchar2
432 ,p_emergency_code in varchar2 default hr_api.g_varchar2
433 ,p_hospitalized_flag in varchar2 default hr_api.g_varchar2
434 ,p_hospital_address in varchar2 default hr_api.g_varchar2
435 ,p_activity_at_time_of_work in varchar2 default hr_api.g_varchar2
436 ,p_objects_involved in varchar2 default hr_api.g_varchar2
437 ,p_privacy_issue in varchar2 default hr_api.g_varchar2
438 ,p_work_start_time in varchar2 default hr_api.g_varchar2
439 ,p_date_of_death in date default hr_api.g_date
440 ,p_report_completed_by in varchar2 default hr_api.g_varchar2
441 ,p_reporting_person_title in varchar2 default hr_api.g_varchar2
445 ,p_doctor_name in varchar2 default hr_api.g_varchar2
442 ,p_reporting_person_phone in varchar2 default hr_api.g_varchar2
443 ,p_days_restricted_work in number default hr_api.g_number
444 ,p_days_away_from_work in number default hr_api.g_number
446 ,p_compensation_date in date default hr_api.g_date
447 ,p_compensation_currency in varchar2 default hr_api.g_varchar2
448 ,p_compensation_amount in number default hr_api.g_number
449 ,p_remedial_hs_action in varchar2 default hr_api.g_varchar2
450 ,p_notified_hsrep_id in number default hr_api.g_number
451 ,p_notified_hsrep_date in date default hr_api.g_date
452 ,p_notified_rep_id in number default hr_api.g_number
453 ,p_notified_rep_date in date default hr_api.g_date
454 ,p_notified_rep_org_id in number default hr_api.g_number
455 ,p_related_incident_id in number default hr_api.g_number
456 ,p_over_time_flag in varchar2 default hr_api.g_varchar2
457 ,p_absence_exists_flag in varchar2 default hr_api.g_varchar2
458 ,p_attribute_category in varchar2 default hr_api.g_varchar2
459 ,p_attribute1 in varchar2 default hr_api.g_varchar2
460 ,p_attribute2 in varchar2 default hr_api.g_varchar2
461 ,p_attribute3 in varchar2 default hr_api.g_varchar2
462 ,p_attribute4 in varchar2 default hr_api.g_varchar2
463 ,p_attribute5 in varchar2 default hr_api.g_varchar2
464 ,p_attribute6 in varchar2 default hr_api.g_varchar2
465 ,p_attribute7 in varchar2 default hr_api.g_varchar2
466 ,p_attribute8 in varchar2 default hr_api.g_varchar2
467 ,p_attribute9 in varchar2 default hr_api.g_varchar2
468 ,p_attribute10 in varchar2 default hr_api.g_varchar2
469 ,p_attribute11 in varchar2 default hr_api.g_varchar2
470 ,p_attribute12 in varchar2 default hr_api.g_varchar2
471 ,p_attribute13 in varchar2 default hr_api.g_varchar2
472 ,p_attribute14 in varchar2 default hr_api.g_varchar2
473 ,p_attribute15 in varchar2 default hr_api.g_varchar2
474 ,p_attribute16 in varchar2 default hr_api.g_varchar2
475 ,p_attribute17 in varchar2 default hr_api.g_varchar2
476 ,p_attribute18 in varchar2 default hr_api.g_varchar2
477 ,p_attribute19 in varchar2 default hr_api.g_varchar2
478 ,p_attribute20 in varchar2 default hr_api.g_varchar2
479 ,p_attribute21 in varchar2 default hr_api.g_varchar2
480 ,p_attribute22 in varchar2 default hr_api.g_varchar2
481 ,p_attribute23 in varchar2 default hr_api.g_varchar2
482 ,p_attribute24 in varchar2 default hr_api.g_varchar2
483 ,p_attribute25 in varchar2 default hr_api.g_varchar2
484 ,p_attribute26 in varchar2 default hr_api.g_varchar2
485 ,p_attribute27 in varchar2 default hr_api.g_varchar2
486 ,p_attribute28 in varchar2 default hr_api.g_varchar2
487 ,p_attribute29 in varchar2 default hr_api.g_varchar2
488 ,p_attribute30 in varchar2 default hr_api.g_varchar2
489 ,p_length_of_treatment in varchar2 default hr_api.g_varchar2
490 ,p_units in varchar2 default hr_api.g_varchar2
491 );
492
493 end per_kw_work_incident_api;