DBA Data[Home] [Help]

PACKAGE: APPS.PER_MEA_SHD

Source


1 Package per_mea_shd AUTHID CURRENT_USER as
2 /* $Header: pemearhi.pkh 120.0 2005/05/31 11:22:28 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (medical_assessment_id           number(15)
10   ,person_id                       number(10)
11   ,examiner_name                   varchar2(240)
12   ,organization_id                 number(15)
13   ,consultation_date               date
14   ,consultation_type               varchar2(30)
15   ,incident_id                     number(10)
16   ,consultation_result             varchar2(30)
17   ,disability_id                   number(10)
18   ,next_consultation_date          date
19   ,description                     varchar2(2000)
20   ,attribute_category              varchar2(30)
21   ,attribute1                      varchar2(150)
22   ,attribute2                      varchar2(150)
23   ,attribute3                      varchar2(150)
24   ,attribute4                      varchar2(150)
25   ,attribute5                      varchar2(150)
26   ,attribute6                      varchar2(150)
27   ,attribute7                      varchar2(150)
28   ,attribute8                      varchar2(150)
29   ,attribute9                      varchar2(150)
30   ,attribute10                     varchar2(150)
31   ,attribute11                     varchar2(150)
32   ,attribute12                     varchar2(150)
33   ,attribute13                     varchar2(150)
34   ,attribute14                     varchar2(150)
35   ,attribute15                     varchar2(150)
36   ,attribute16                     varchar2(150)
37   ,attribute17                     varchar2(150)
38   ,attribute18                     varchar2(150)
39   ,attribute19                     varchar2(150)
40   ,attribute20                     varchar2(150)
41   ,attribute21                     varchar2(150)
42   ,attribute22                     varchar2(150)
43   ,attribute23                     varchar2(150)
44   ,attribute24                     varchar2(150)
45   ,attribute25                     varchar2(150)
46   ,attribute26                     varchar2(150)
47   ,attribute27                     varchar2(150)
48   ,attribute28                     varchar2(150)
49   ,attribute29                     varchar2(150)
50   ,attribute30                     varchar2(150)
51   ,mea_information_category        varchar2(30)
52   ,mea_information1                varchar2(150)
53   ,mea_information2                varchar2(150)
54   ,mea_information3                varchar2(150)
55   ,mea_information4                varchar2(150)
56   ,mea_information5                varchar2(150)
57   ,mea_information6                varchar2(150)
58   ,mea_information7                varchar2(150)
59   ,mea_information8                varchar2(150)
60   ,mea_information9                varchar2(150)
61   ,mea_information10               varchar2(150)
62   ,mea_information11               varchar2(150)
63   ,mea_information12               varchar2(150)
64   ,mea_information13               varchar2(150)
65   ,mea_information14               varchar2(150)
66   ,mea_information15               varchar2(150)
67   ,mea_information16               varchar2(150)
68   ,mea_information17               varchar2(150)
69   ,mea_information18               varchar2(150)
70   ,mea_information19               varchar2(150)
71   ,mea_information20               varchar2(150)
72   ,mea_information21               varchar2(150)
73   ,mea_information22               varchar2(150)
74   ,mea_information23               varchar2(150)
75   ,mea_information24               varchar2(150)
76   ,mea_information25               varchar2(150)
77   ,mea_information26               varchar2(150)
78   ,mea_information27               varchar2(150)
79   ,mea_information28               varchar2(150)
80   ,mea_information29               varchar2(150)
81   ,mea_information30               varchar2(150)
82   ,object_version_number           number(9)
83   );
84 --
85 -- ----------------------------------------------------------------------------
86 -- |           Global Definitions - Internal Development Use Only             |
87 -- ----------------------------------------------------------------------------
88 --
89 g_old_rec  g_rec_type;                            -- Global record definition
90 --
91 -- ----------------------------------------------------------------------------
92 -- |---------------------------< constraint_error >---------------------------|
93 -- ----------------------------------------------------------------------------
94 -- {Start Of Comments}
95 --
96 -- Description:
97 --   This procedure is called when a constraint has been violated (i.e.
98 --   The exception hr_api.check_integrity_violated,
99 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
100 --   hr_api.unique_integrity_violated has been raised).
101 --   The exceptions can only be raised as follows:
102 --   1) A check constraint can only be violated during an INSERT or UPDATE
103 --      dml operation.
104 --   2) A parent integrity constraint can only be violated during an
105 --      INSERT or UPDATE dml operation.
106 --   3) A child integrity constraint can only be violated during an
107 --      DELETE dml operation.
108 --   4) A unique integrity constraint can only be violated during INSERT or
109 --      UPDATE dml operation.
110 --
111 -- Prerequisites:
112 --   1) Either hr_api.check_integrity_violated,
113 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
114 --      hr_api.unique_integrity_violated has been raised with the subsequent
115 --      stripping of the constraint name from the generated error message
116 --      text.
117 --   2) Standalone validation test which corresponds with a constraint error.
118 --
119 -- In Parameter:
120 --   p_constraint_name is in upper format and is just the constraint name
121 --   (e.g. not prefixed by brackets, schema owner etc).
122 --
123 -- Post Success:
124 --   Development dependant.
125 --
126 -- Post Failure:
127 --   Developement dependant.
128 --
129 -- Developer Implementation Notes:
130 --   For each constraint being checked the hr system package failure message
131 --   has been generated as a template only. These system error messages should
132 --   be modified as required (i.e. change the system failure message to a user
133 --   friendly defined error message).
134 --
135 -- Access Status:
136 --   Internal Development Use Only.
137 --
138 -- {End Of Comments}
139 -- ----------------------------------------------------------------------------
140 Procedure constraint_error
141   (p_constraint_name in all_constraints.constraint_name%TYPE);
142 --
143 -- ----------------------------------------------------------------------------
144 -- |-----------------------------< api_updating >-----------------------------|
145 -- ----------------------------------------------------------------------------
146 --  {Start Of Comments}
147 --
148 -- Description:
149 --   This function is used to populate the g_old_rec record with the
150 --   current row from the database for the specified primary key
151 --   provided that the primary key exists and is valid and does not
152 --   already match the current g_old_rec. The function will always return
153 --   a TRUE value if the g_old_rec is populated with the current row.
154 --   A FALSE value will be returned if all of the primary key arguments
155 --   are null.
156 --
157 -- Prerequisites:
158 --   None.
159 --
160 -- In Parameters:
161 --
162 -- Post Success:
163 --   A value of TRUE will be returned indiciating that the g_old_rec
164 --   is current.
165 --   A value of FALSE will be returned if all of the primary key arguments
166 --   have a null value (this indicates that the row has not be inserted into
167 --   the Schema), and therefore could never have a corresponding row.
168 --
169 -- Post Failure:
170 --   A failure can only occur under two circumstances:
171 --   1) The primary key is invalid (i.e. a row does not exist for the
172 --      specified primary key values).
173 --   2) If an object_version_number exists but is NOT the same as the current
174 --      g_old_rec value.
175 --
176 -- Developer Implementation Notes:
177 --   None.
178 --
179 -- Access Status:
180 --   Internal Development Use Only.
181 --
182 -- {End Of Comments}
183 -- ----------------------------------------------------------------------------
184 Function api_updating
185   (p_medical_assessment_id                in     number
186   ,p_object_version_number                in     number
187   )      Return Boolean;
188 --
189 -- ----------------------------------------------------------------------------
190 -- |---------------------------------< lck >----------------------------------|
191 -- ----------------------------------------------------------------------------
192 -- {Start of comments}
193 --
194 -- Description:
195 --   The Lck process has two main functions to perform. Firstly, the row to be
196 --   updated or deleted must be locked. The locking of the row will only be
197 --   successful if the row is not currently locked by another user.
198 --   Secondly, during the locking of the row, the row is selected into
199 --   the g_old_rec data structure which enables the current row values from the
200 --   server to be available to the api.
201 --
202 -- Prerequisites:
203 --   When attempting to call the lock the object version number (if defined)
204 --   is mandatory.
205 --
206 -- In Parameters:
207 --   The arguments to the Lck process are the primary key(s) which uniquely
208 --   identify the row and the object version number of row.
209 --
210 -- Post Success:
211 --   On successful completion of the Lck process the row to be updated or
212 --   deleted will be locked and selected into the global data structure
213 --   g_old_rec.
214 --
215 -- Post Failure:
216 --   The Lck process can fail for three reasons:
217 --   1) When attempting to lock the row the row could already be locked by
218 --      another user. This will raise the HR_Api.Object_Locked exception.
219 --   2) The row which is required to be locked doesn't exist in the HR Schema.
220 --      This error is trapped and reported using the message name
221 --      'HR_7220_INVALID_PRIMARY_KEY'.
222 --   3) The row although existing in the HR Schema has a different object
223 --      version number than the object version number specified.
224 --      This error is trapped and reported using the message name
225 --      'HR_7155_OBJECT_INVALID'.
226 --
227 -- Developer Implementation Notes:
228 --   For each primary key and the object version number arguments add a
229 --   call to hr_api.mandatory_arg_error procedure to ensure that these
230 --   argument values are not null.
231 --
232 -- Access Status:
233 --   Internal Development Use Only.
234 --
235 -- {End of comments}
236 -- ----------------------------------------------------------------------------
237 Procedure lck
238   (p_medical_assessment_id                in     number
239   ,p_object_version_number                in     number
240   );
241 --
242 -- ----------------------------------------------------------------------------
243 -- |-----------------------------< convert_args >-----------------------------|
244 -- ----------------------------------------------------------------------------
245 -- {Start Of Comments}
246 --
247 -- Description:
248 --   This function is used to turn attribute parameters into the record
249 --   structure parameter g_rec_type.
250 --
251 -- Prerequisites:
252 --   This is a private function and can only be called from the ins or upd
253 --   attribute processes.
254 --
255 -- In Parameters:
256 --
257 -- Post Success:
258 --   A returning record structure will be returned.
259 --
260 -- Post Failure:
261 --   No direct error handling is required within this function.  Any possible
262 --   errors within this function will be a PL/SQL value error due to conversion
263 --   of datatypes or data lengths.
264 --
265 -- Developer Implementation Notes:
266 --   None.
267 --
268 -- Access Status:
269 --   Internal Row Handler Use Only.
270 --
271 -- {End Of Comments}
272 -- ----------------------------------------------------------------------------
273 Function convert_args
274   (p_medical_assessment_id          in number
275   ,p_person_id                      in number
276   ,p_examiner_name                  in varchar2
277   ,p_organization_id                in number
278   ,p_consultation_date              in date
279   ,p_consultation_type              in varchar2
280   ,p_incident_id                    in number
281   ,p_consultation_result            in varchar2
282   ,p_disability_id                  in number
283   ,p_next_consultation_date         in date
284   ,p_description                    in varchar2
285   ,p_attribute_category             in varchar2
286   ,p_attribute1                     in varchar2
287   ,p_attribute2                     in varchar2
288   ,p_attribute3                     in varchar2
289   ,p_attribute4                     in varchar2
290   ,p_attribute5                     in varchar2
291   ,p_attribute6                     in varchar2
292   ,p_attribute7                     in varchar2
293   ,p_attribute8                     in varchar2
294   ,p_attribute9                     in varchar2
295   ,p_attribute10                    in varchar2
296   ,p_attribute11                    in varchar2
297   ,p_attribute12                    in varchar2
298   ,p_attribute13                    in varchar2
299   ,p_attribute14                    in varchar2
300   ,p_attribute15                    in varchar2
301   ,p_attribute16                    in varchar2
302   ,p_attribute17                    in varchar2
303   ,p_attribute18                    in varchar2
304   ,p_attribute19                    in varchar2
305   ,p_attribute20                    in varchar2
306   ,p_attribute21                    in varchar2
307   ,p_attribute22                    in varchar2
308   ,p_attribute23                    in varchar2
309   ,p_attribute24                    in varchar2
310   ,p_attribute25                    in varchar2
311   ,p_attribute26                    in varchar2
312   ,p_attribute27                    in varchar2
313   ,p_attribute28                    in varchar2
314   ,p_attribute29                    in varchar2
315   ,p_attribute30                    in varchar2
316   ,p_mea_information_category       in varchar2
317   ,p_mea_information1               in varchar2
318   ,p_mea_information2               in varchar2
319   ,p_mea_information3               in varchar2
320   ,p_mea_information4               in varchar2
321   ,p_mea_information5               in varchar2
322   ,p_mea_information6               in varchar2
323   ,p_mea_information7               in varchar2
324   ,p_mea_information8               in varchar2
325   ,p_mea_information9               in varchar2
326   ,p_mea_information10              in varchar2
327   ,p_mea_information11              in varchar2
328   ,p_mea_information12              in varchar2
329   ,p_mea_information13              in varchar2
330   ,p_mea_information14              in varchar2
331   ,p_mea_information15              in varchar2
332   ,p_mea_information16              in varchar2
333   ,p_mea_information17              in varchar2
334   ,p_mea_information18              in varchar2
335   ,p_mea_information19              in varchar2
336   ,p_mea_information20              in varchar2
337   ,p_mea_information21              in varchar2
338   ,p_mea_information22              in varchar2
339   ,p_mea_information23              in varchar2
340   ,p_mea_information24              in varchar2
341   ,p_mea_information25              in varchar2
342   ,p_mea_information26              in varchar2
343   ,p_mea_information27              in varchar2
344   ,p_mea_information28              in varchar2
345   ,p_mea_information29              in varchar2
346   ,p_mea_information30              in varchar2
347   ,p_object_version_number          in number
348   )
349   Return g_rec_type;
350 --
351 end per_mea_shd;