DBA Data[Home] [Help]

APPS.GMD_QC_MIGRATE_TO_1151J dependencies on GMD_RESULTS

Line 5166: -- gmd_results in procedure Migrate_Results

5162: -- Migrate_Samples;
5163: --
5164: -- HISTORY
5165: -- M. Grosser 24-Sep-2002 Added cursor to set value of column seq in
5166: -- gmd_results in procedure Migrate_Results
5167: -- M. Grosser 08-Oct-2002 Moved additional_test_ind from gmd_results to
5168: -- gmd_spec_results
5169: -- B. Stone 21-Jan-2004 Moved the Fetch to c_ids to outside the IF
5170: -- following IF statement so it will execute for

Line 5167: -- M. Grosser 08-Oct-2002 Moved additional_test_ind from gmd_results to

5163: --
5164: -- HISTORY
5165: -- M. Grosser 24-Sep-2002 Added cursor to set value of column seq in
5166: -- gmd_results in procedure Migrate_Results
5167: -- M. Grosser 08-Oct-2002 Moved additional_test_ind from gmd_results to
5168: -- gmd_spec_results
5169: -- B. Stone 21-Jan-2004 Moved the Fetch to c_ids to outside the IF
5170: -- following IF statement so it will execute for
5171: -- all results; before it was only executing for

Line 5174: -- Added Index Hint to table GMD_RESULTS column

5170: -- following IF statement so it will execute for
5171: -- all results; before it was only executing for
5172: -- results with specs ( qc_spec_id not = null )
5173: -- 27-Jan-2004 B.Stone Bug 3388873 -
5174: -- Added Index Hint to table GMD_RESULTS column
5175: -- SAMPLE_ID for cursor C_GET_SEQ
5176: -- B. Stone 13-Oct-2004 Bug 3934121;
5177: -- Added ORDER BY assay_code to c_get_results
5178: -- so spec tests and result tests are displayed

Line 5192: l_qc_lab_orgn_code GMD_RESULTS.qc_lab_orgn_code%TYPE;

5188: l_in_spec_ind GMD_SPEC_RESULTS.in_spec_ind%TYPE;
5189: l_rec_count NUMBER := 0;
5190: l_seq NUMBER;
5191: l_additional_test_ind VARCHAR2(4);
5192: l_qc_lab_orgn_code GMD_RESULTS.qc_lab_orgn_code%TYPE;
5193: l_evaluation_ind GMD_SPEC_RESULTS.evaluation_ind%TYPE;
5194: l_return_status VARCHAR2(4);
5195: l_base_lang FND_LANGUAGES.LANGUAGE_CODE%TYPE;
5196: l_test_seq NUMBER;

Line 5285: gmd_results in procedure Migrate_Results

5281: s.sample_id = rslt_rec.sample_id;
5282: id_rec c_get_ids%ROWTYPE;
5283:
5284: /* M. Grosser 24-Sep-2002 Added cursor to set value of column seq in
5285: gmd_results in procedure Migrate_Results
5286: */
5287: /* Retrieve the next sequence number for use in gmd_results */
5288: /* Bug 3388873 - Added Index Hint to table GMD_RESULTS column
5289: SAMPLE_ID for cursor C_GET_SEQ */

Line 5287: /* Retrieve the next sequence number for use in gmd_results */

5283:
5284: /* M. Grosser 24-Sep-2002 Added cursor to set value of column seq in
5285: gmd_results in procedure Migrate_Results
5286: */
5287: /* Retrieve the next sequence number for use in gmd_results */
5288: /* Bug 3388873 - Added Index Hint to table GMD_RESULTS column
5289: SAMPLE_ID for cursor C_GET_SEQ */
5290: CURSOR c_get_seq IS
5291: SELECT /*+ INDEX ( gmd_results gmd.gmd_results_n1 ) */

Line 5288: /* Bug 3388873 - Added Index Hint to table GMD_RESULTS column

5284: /* M. Grosser 24-Sep-2002 Added cursor to set value of column seq in
5285: gmd_results in procedure Migrate_Results
5286: */
5287: /* Retrieve the next sequence number for use in gmd_results */
5288: /* Bug 3388873 - Added Index Hint to table GMD_RESULTS column
5289: SAMPLE_ID for cursor C_GET_SEQ */
5290: CURSOR c_get_seq IS
5291: SELECT /*+ INDEX ( gmd_results gmd.gmd_results_n1 ) */
5292: NVL(max(seq),0) + 10

Line 5291: SELECT /*+ INDEX ( gmd_results gmd.gmd_results_n1 ) */

5287: /* Retrieve the next sequence number for use in gmd_results */
5288: /* Bug 3388873 - Added Index Hint to table GMD_RESULTS column
5289: SAMPLE_ID for cursor C_GET_SEQ */
5290: CURSOR c_get_seq IS
5291: SELECT /*+ INDEX ( gmd_results gmd.gmd_results_n1 ) */
5292: NVL(max(seq),0) + 10
5293: FROM gmd_results
5294: WHERE sample_id = rslt_rec.sample_id;
5295:

Line 5293: FROM gmd_results

5289: SAMPLE_ID for cursor C_GET_SEQ */
5290: CURSOR c_get_seq IS
5291: SELECT /*+ INDEX ( gmd_results gmd.gmd_results_n1 ) */
5292: NVL(max(seq),0) + 10
5293: FROM gmd_results
5294: WHERE sample_id = rslt_rec.sample_id;
5295:
5296: /* Check that test is in the spec */
5297: CURSOR c_check_spec (pspec_id NUMBER, ptest_id NUMBER) IS

Line 5427: l_in_spec_ind := GMD_RESULTS_GRP.rslt_is_in_spec(

5423: rslt_rec.text_result IS NOT NULL ) THEN
5424: l_evaluation_ind := '2R';
5425: END IF;
5426: ELSE
5427: l_in_spec_ind := GMD_RESULTS_GRP.rslt_is_in_spec(
5428: id_rec.spec_id,
5429: rslt_rec.qcassy_typ_id,
5430: rslt_rec.num_result,
5431: rslt_rec.text_result);

Line 5466: gmd_results in procedure Migrate_Results

5462: l_in_spec_ind := NULL;
5463: END IF;
5464:
5465: /* M. Grosser 24-Sep-2002 Added cursor to set value of column seq in
5466: gmd_results in procedure Migrate_Results
5467: */
5468: /* Retrieve next sequence value */
5469: OPEN c_get_seq;
5470: FETCH c_get_seq into l_seq;

Line 5474: INSERT INTO gmd_results

5470: FETCH c_get_seq into l_seq;
5471: CLOSE c_get_seq;
5472:
5473: /* Insert record into new results table */
5474: INSERT INTO gmd_results
5475: (
5476: result_id,
5477: sample_id,
5478: test_id,

Line 5747: l_results_tab GMD_API_PUB.gmd_results_tab;

5743: l_return_status VARCHAR2(4);
5744: l_event_spec_tab GMD_EVENT_SPEC_DISP%ROWTYPE;
5745: l_sample_spec_tab GMD_SAMPLE_SPEC_DISP%ROWTYPE;
5746: l_spec_results_tab GMD_API_PUB.gmd_spec_results_tab;
5747: l_results_tab GMD_API_PUB.gmd_results_tab;
5748: l_spec_vr_id NUMBER;
5749: l_temp NUMBER;
5750: l_date DATE;
5751: -- 3934121

Line 5761: from GMD_RESULTS r

5757: l_rep_cnt number;
5758:
5759: CURSOR c_rep_cnt IS
5760: select r.sample_id, r.test_id, count(*) cnt
5761: from GMD_RESULTS r
5762: group by r.sample_id, r.test_id
5763: having count(*) > 1;
5764:
5765: CURSOR c_rep_tests IS

Line 5767: from GMD_RESULTS r

5763: having count(*) > 1;
5764:
5765: CURSOR c_rep_tests IS
5766: select r.result_id, r.result_date
5767: from GMD_RESULTS r
5768: where r.sample_id = l_sample_id
5769: and r.test_id = l_test_id
5770: order by decode ( r.result_date, NULL,
5771: to_date( '01-01-2040', 'DD-MM-YYYY' ),

Line 5783: NOT EXISTS (SELECT 's' from gmd_results r

5779: CURSOR c_get_no_results IS
5780: SELECT *
5781: FROM gmd_samples s
5782: WHERE delete_mark= 0 AND
5783: NOT EXISTS (SELECT 's' from gmd_results r
5784: where s.sample_id = r.sample_id);
5785: nores_rec GMD_SAMPLES%ROWTYPE;
5786:
5787: CURSOR c_check_validity_rule (psampling_event_id NUMBER) IS

Line 5810: FROM gmd_results r,

5806: AND SR.EVALUATION_IND IS NULL );
5807:
5808: CURSOR c_cnt_results (psample_id NUMBER) IS
5809: SELECT 1
5810: FROM gmd_results r,
5811: gmd_spec_results sr
5812: WHERE r.sample_id = psample_id
5813: AND sr.result_id = r.result_id
5814: AND sr.evaluation_ind is null ;

Line 5856: GMD_RESULTS_GRP.create_rslt_and_spec_rslt_rows (

5852: /* If there is an applicable spec */
5853: IF l_spec_vr_id IS NOT NULL THEN
5854:
5855: /* Create the results and all applicable rows */
5856: GMD_RESULTS_GRP.create_rslt_and_spec_rslt_rows (
5857: p_sample => nores_rec,
5858: p_migration => 'Y',
5859: x_event_spec_disp => l_event_spec_tab,
5860: x_sample_spec_disp => l_sample_spec_tab,

Line 5947: UPDATE gmd_results r

5943: l_rep_cnt := 0;
5944: WHILE c_rep_tests%FOUND LOOP
5945: l_rep_cnt := l_rep_cnt + 1;
5946: IF l_rep_cnt > 1 THEN
5947: UPDATE gmd_results r
5948: set test_replicate_cnt = l_rep_cnt
5949: where result_id = l_result_id;
5950: END IF;
5951: FETCH c_rep_tests INTO l_result_id, l_result_date;