DBA Data[Home] [Help]

PACKAGE: APPS.GMD_QC_TESTS_GRP

Source


1 PACKAGE GMD_QC_TESTS_GRP AUTHID CURRENT_USER as
2 /* $Header: GMDGTSTS.pls 115.8 2004/05/26 16:44:37 rboddu noship $ */
3 
4 /*===========================================================================
5   PACKAGE NAME:		GMD_QC_TESTS_GRP
6 
7   DESCRIPTION:		This package contains the group layer API's for
8 			TEST.
9 
10   OWNER:		Mahesh Chandak
11 
12   FUNCTION/PROCEDURE:
13 ===========================================================================*/
14 
15 /*===========================================================================
16   PROCEDURE  NAME:	check_test_exist
17 
18   DESCRIPTION:		This procedure checks whether the test_code/test_id
19   			already exists or not.
20 
21   PARAMETERS:		In : p_init_msg_list - Valid values are 'T' and 'F'
22 			     p_test_code/p_test_id to validate
23 
24 			Out: x_test_exist returns TRUE if test exist else FALSE.
25 
26   CHANGE HISTORY:	Created		09-JUL-02	MCHANDAK
27 ===========================================================================*/
28 FUNCTION CHECK_TEST_EXIST(
29 		    p_init_msg_list      IN   VARCHAR2 DEFAULT 'T',
30 		    p_test_code          IN   VARCHAR2 DEFAULT NULL,
31          	    p_test_id		 IN   NUMBER   DEFAULT NULL)
32          RETURN BOOLEAN ;
33 
34 
35 TYPE exp_test_id_tab_type IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
36 
37 /*===========================================================================
38   FUNCTION  NAME:	get_test_id_tab
39 
40   DESCRIPTION:		This procedure returns table of type EXP_TEST_ID_TAB_TYPE
41 
42   PARAMETERS:
43 
44   CHANGE HISTORY:	Created		09-JUL-02	MCHANDAK
45 ===========================================================================*/
46 
47 FUNCTION GET_TEST_ID_TAB RETURN exp_test_id_tab_type ;
48 
49 /*===========================================================================
50 
51   PROCEDURE NAME:	validate_expression
52   DESCRIPTION:		This procedure validates whether the expression
53   			is mathematically correct.Also it checks the test(s)
54   			used in the expression are valid (existing).
55                         It returns a table of all the distinct test used
56 			in the expression.
57 
58   PARAMETERS:		p_expression - expression to validate.
59 
60 ===========================================================================*/
61 PROCEDURE validate_expression(
62 		    p_init_msg_list   IN   VARCHAR2 DEFAULT 'T',
63          	    p_expression      IN   VARCHAR2,
64          	    x_test_tab        OUT NOCOPY exp_test_id_tab_type,
65          	    x_return_status   OUT NOCOPY VARCHAR2,
66          	    x_message_data    OUT NOCOPY VARCHAR2) ;
67 
68 /*===========================================================================
69 
70   PROCEDURE NAME:	insert_exp_test_values
71   PARAMETERS:		p_test_id - the test for which the expression is defined.
72   			p_test_id_tab - contains all the test referenced in the
73   			expression.
74 
75 ===========================================================================*/
76 PROCEDURE insert_exp_test_values(
77 		    p_init_msg_list   IN   VARCHAR2 DEFAULT 'T',
78 		    p_test_id	      IN   NUMBER,
79          	    p_test_id_tab     IN   exp_test_id_tab_type,
80          	    x_return_status   OUT  NOCOPY VARCHAR2,
81          	    x_message_data    OUT NOCOPY VARCHAR2) ;
82 
83 /*===========================================================================
84 
85   PROCEDURE NAME:	test_exist_in_spec
86   DESCRIPTION:		This procedure sets x_test_exist = 'Y' if a given
87   			test is used in specification else
88   			sets x_test_exist = 'N' if the test is not used.
89 
90   PARAMETERS:
91 
92   CHANGE HISTORY:	Created		09-JUL-02	MCHANDAK
93 
94 ===========================================================================*/
95 FUNCTION test_exist_in_spec(
96 		    p_init_msg_list   IN   VARCHAR2 DEFAULT 'T',
97 		    p_test_id	      IN   NUMBER)  RETURN BOOLEAN ;
98 
99 /*===========================================================================
100 
101   PROCEDURE NAME:	DISPLAY_REPORT_PRECISION
102   Parameters
103   p_called_from - Pass 'F' if called from Forms else can have any value.
104   p_validation_level - DISPLAY_PRECISION to validate DISPLAY_PRECISION from FORM only
105                      - REPORT_PRECISION to validate REPORT_PRECISION from FORM only
106                      - INSERT to validate display/test precision columns when calling
107                          INSERT API
108                      - UPDATE to validate display/test precision columns when calling
109                          UPDATE API
110   p_test_method_id   - Test method associated with the Test.
111   p_test_id	     - Test id
112 
113 ===========================================================================*/
114 
115 PROCEDURE DISPLAY_REPORT_PRECISION
116 		   (p_validation_level       IN   VARCHAR2,
117 		    p_init_msg_list          IN   VARCHAR2 DEFAULT 'T',
118 		    p_test_method_id         IN NUMBER,
119 		    p_test_id		     IN NUMBER,
120 		    p_new_display_precision  IN OUT NOCOPY NUMBER,
121        	    	    p_new_report_precision   IN OUT NOCOPY NUMBER,
122        	    	    x_return_status          OUT  NOCOPY VARCHAR2,
123        	    	    x_message_data           OUT  NOCOPY VARCHAR2);
124 
125 /*===========================================================================
126   PROCEDURE  NAME:	MIN_MAX_VALUE_NUM
127 
128   DESCRIPTION:		This procedure validates MIN_VALUE_NUM against MAX_VALUE_NUM.
129 
130   PARAMETERS:
131 
132   CHANGE HISTORY:	Created		09-JUL-02	MCHANDAK
133 ===========================================================================*/
134 
135 PROCEDURE MIN_MAX_VALUE_NUM(
136 		    p_init_msg_list       IN   VARCHAR2 DEFAULT 'T',
137 		    p_test_type		  IN   VARCHAR2,
138 		    p_min_value_num       IN   NUMBER,
139          	    p_max_value_num       IN   NUMBER,
140          	    x_return_status       OUT  NOCOPY VARCHAR2,
141          	    x_message_data        OUT  NOCOPY VARCHAR2);
142 
143 /*===========================================================================
144 
145   PROCEDURE NAME:	validate_experimental_error
146   DESCRIPTION:		This procedure validates the test error region along
147 			with the action code.
148 ===========================================================================*/
149 PROCEDURE validate_experimental_error(
150 		    p_validation_level      IN VARCHAR2 DEFAULT 'FULL',
151 		    p_init_msg_list         IN VARCHAR2 DEFAULT 'T',
152 	      	    p_exp_error_type        IN VARCHAR2,
153 		    p_spec_value            IN NUMBER ,
154 		    p_action_code 	    IN VARCHAR2,
155 		    p_test_min              IN NUMBER,
156 		    p_test_max              IN NUMBER,
157          	    x_return_status         OUT NOCOPY VARCHAR2,
158          	    x_message_data          OUT NOCOPY VARCHAR2);
159 
160 --+========================================================================+
161 --| API Name    : validate_all_exp_error				   |
162 --| TYPE        : Group                                                    |
163 --| Notes       : This procedure checks for experimental error region      |
164 --|               for all the four action codes and spec value.This        |
165 --|               procedure in turn calls validate_experimental_error      |
166 --| HISTORY                                                                |
167 --|                                                                        |
168 --+========================================================================+
169 
170 PROCEDURE validate_all_exp_error(
171 		    p_validation_level      IN VARCHAR2 DEFAULT 'FULL',
172 		    p_init_msg_list         IN VARCHAR2 DEFAULT 'T',
173 	      	    p_exp_error_type        IN VARCHAR2,
174 		    p_below_spec_min        IN NUMBER ,
175 		    p_below_min_action_code IN VARCHAR2 ,
176 		    p_above_spec_min        IN NUMBER ,
177 		    p_above_min_action_code IN VARCHAR2 ,
178 		    p_below_spec_max        IN NUMBER ,
179 		    p_below_max_action_code IN VARCHAR2 ,
180 		    p_above_spec_max        IN NUMBER ,
181 		    p_above_max_action_code IN VARCHAR2 ,
182 		    p_test_min              IN NUMBER,
183 		    p_test_max              IN NUMBER,
184          	    x_return_status         OUT NOCOPY VARCHAR2,
185          	    x_message_data          OUT NOCOPY VARCHAR2) ;
186 
187 /*===========================================================================
188 
189   FUNCTION NAME:	validate_test_priority
190   DESCRIPTION:		This function returns TRUE if test priority is VALID
191   			else it returns FALSE.
192 =========================================================================== **/
193 
194 FUNCTION validate_test_priority(p_test_priority	IN VARCHAR2) RETURN BOOLEAN;
195 
196 /*===========================================================================
197 
198   PROCEDURE NAME:	validate_before_insert
199   DESCRIPTION:		This procedure validates test header before insert.
200 ===========================================================================*/
201 
202 PROCEDURE VALIDATE_BEFORE_INSERT(
203 	p_gmd_qc_tests_rec IN 	GMD_QC_TESTS%ROWTYPE,
204         x_gmd_qc_tests_rec OUT 	NOCOPY GMD_QC_TESTS%ROWTYPE,
205 	x_return_status    OUT  NOCOPY VARCHAR2,
206         x_message_data     OUT 	NOCOPY VARCHAR2) ;
207 
208 /*===========================================================================
209 
210   PROCEDURE NAME:	process_after_insert
211   DESCRIPTION:		This procedure inserts records into test values for expression
212                         test data type.
213 ===========================================================================*/
214 
215 PROCEDURE PROCESS_AFTER_INSERT(
216 	p_init_msg_list    IN VARCHAR2 DEFAULT 'T',
217         p_gmd_qc_tests_rec IN GMD_QC_TESTS%ROWTYPE,
218 	x_return_status    OUT NOCOPY VARCHAR2,
219         x_message_data     OUT NOCOPY VARCHAR2) ;
220 
221 /*===========================================================================
222   FUNCTION NAME:	test_group_order_exist
223   DESCRIPTION:		This function checks if there is already an existing test group order
224           present, matching the given test group order, for a given test class.
225           Added as part of Test Groups Enh Bug: 3447472
226 ===========================================================================*/
227 FUNCTION test_group_order_exist(
228                     p_init_msg_list      IN   VARCHAR2 ,
229                     p_test_class      IN   VARCHAR2 ,
230                     p_test_group_order     IN   NUMBER   )
231 RETURN BOOLEAN;
232 
233 PROCEDURE POPULATE_TEST_GRP_GT(p_test_class IN varchar2,
234                                p_spec_id    IN NUMBER default NULL,
235                                p_sample_id  IN NUMBER default NULL,
236                                x_return_status OUT NOCOPY VARCHAR2);
237 /*===========================================================================
238   FUNCTION  NAME:       update_test_grp
239   DESCRIPTION:          This procedure updates the Include flag in the Global
240                         temporary table for a given test_id
241   PARAMETERS:           In : p_test_id, p_include
242   CHANGE HISTORY:       Created         24-MAY-04       RBODDU
243 ===========================================================================*/
244 PROCEDURE UPDATE_TEST_GRP(
245                           p_test_id IN NUMBER,
246                           p_include IN VARCHAR2,
247                           p_test_qty IN NUMBER,
248                           p_test_uom IN VARCHAR2);
249 
250 END gmd_qc_tests_grp;
251