DBA Data[Home] [Help]

APPS.GMD_QC_MIGRATE_TO_1151J dependencies on QC_RSLT_MST

Line 103: FROM qc_rslt_mst r,

99:
100: CURSOR c_results IS
101: SELECT min(s.sample_date),
102: max(s.sample_date)
103: FROM qc_rslt_mst r,
104: qc_smpl_mst s
105: WHERE r.qc_spec_id = c_qc_spec_id
106: and s.sample_id = r.sample_id;
107:

Line 110: FROM qc_rslt_mst r,

106: and s.sample_id = r.sample_id;
107:
108: CURSOR c_rslt_date IS
109: SELECT min(s.sample_date)
110: FROM qc_rslt_mst r,
111: qc_smpl_mst s
112: WHERE r.qc_spec_id = o_qc_spec_id
113: and s.sample_id = r.sample_id;
114:

Line 158: from qc_rslt_mst r

154: where s.delete_mark = 1
155: and s.migration_status is NULL
156: and not exists (
157: select *
158: from qc_rslt_mst r
159: where s.qc_spec_id = r.qc_spec_id );
160: COMMIT;
161:
162: /* Result rows with an invalid test ( qcassy_typ_id) and

Line 166: UPDATE qc_rslt_mst r

162: /* Result rows with an invalid test ( qcassy_typ_id) and
163: -- spec combination are updated to eliminate the problem.
164: -- The qc_spec_id is updated to NULL since the correct
165: -- qc_spec_id cannot be derived. */
166: UPDATE qc_rslt_mst r
167: set old_qc_spec_id = qc_spec_id ,
168: qc_spec_id = NULL
169: where qc_spec_id = (
170: SELECT r.qc_spec_id

Line 252: UPDATE qc_rslt_mst

248: UPDATE qc_spec_mst
249: SET migration_status = 'DR'
250: WHERE qc_spec_id = o_qc_spec_id
251: or qc_spec_id = last_qc_spec_id;
252: UPDATE qc_rslt_mst
253: SET migration_status = 'DR'
254: WHERE qc_spec_id = o_qc_spec_id
255: or qc_spec_id = last_qc_spec_id;
256: UPDATE qc_smpl_mst

Line 260: from qc_rslt_mst

256: UPDATE qc_smpl_mst
257: SET migration_status = 'DR'
258: WHERE sample_id IN (
259: select sample_id
260: from qc_rslt_mst
261: where qc_spec_id = o_qc_spec_id
262: or qc_spec_id = last_qc_spec_id);
263:
264: ELSE

Line 348: UPDATE qc_rslt_mst

344: THEN
345: UPDATE qc_spec_mst
346: SET migration_status = 'UM'
347: WHERE spec_hdr_id = l_spec_hdr_id;
348: UPDATE qc_rslt_mst
349: SET migration_status = 'UM'
350: WHERE qc_spec_id = o_qc_spec_id
351: or qc_spec_id = last_qc_spec_id;
352: UPDATE qc_smpl_mst s

Line 357: qc_rslt_mst r

353: SET migration_status = 'UM'
354: WHERE s.sample_id IN (
355: select sample_id
356: from qc_spec_mst sp,
357: qc_rslt_mst r
358: where sp.spec_hdr_id = l_spec_hdr_id
359: and r.qc_spec_id = sp.qc_spec_id);
360: commit;
361:

Line 3914: FROM gmd_spec_mapping map, qc_rslt_mst rslt

3910: /* Get the spec validity rule from the mapping table */
3911: /* Bug 3376111; Removed qc_rec_type from where clause */
3912: CURSOR c_get_mapping IS
3913: SELECT spec_vr_id, spec_id
3914: FROM gmd_spec_mapping map, qc_rslt_mst rslt
3915: WHERE smpl_rec.sample_date >= map.start_date
3916: and smpl_rec.sample_date <= map.end_date
3917: -- and map.qc_spec_id = NVL(rslt.qc_spec_id,0) --Bug 3486120
3918: and map.qc_spec_id = rslt.qc_spec_id

Line 3921: /* Bug 3376111; Get the count of tests in qc_rslt_mst for the sample */

3917: -- and map.qc_spec_id = NVL(rslt.qc_spec_id,0) --Bug 3486120
3918: and map.qc_spec_id = rslt.qc_spec_id
3919: and rslt.sample_id = smpl_rec.sample_id;
3920:
3921: /* Bug 3376111; Get the count of tests in qc_rslt_mst for the sample */
3922: CURSOR c_get_r_tests_cnt IS
3923: SELECT 1
3924: FROM qc_rslt_mst r
3925: WHERE r.sample_id = smpl_rec.sample_id

Line 3924: FROM qc_rslt_mst r

3920:
3921: /* Bug 3376111; Get the count of tests in qc_rslt_mst for the sample */
3922: CURSOR c_get_r_tests_cnt IS
3923: SELECT 1
3924: FROM qc_rslt_mst r
3925: WHERE r.sample_id = smpl_rec.sample_id
3926: AND r.qc_spec_id is not null ;
3927:
3928: CURSOR c_chk_smpl_has_rslt IS

Line 3930: FROM qc_rslt_mst r

3926: AND r.qc_spec_id is not null ;
3927:
3928: CURSOR c_chk_smpl_has_rslt IS
3929: SELECT 1
3930: FROM qc_rslt_mst r
3931: WHERE r.sample_id = smpl_rec.sample_id;
3932:
3933: /* Bug 3376111; Derive the spec from gmd_spec_mapping with the most
3934: tests found in qc_rslt_mst for the sample */

Line 3934: tests found in qc_rslt_mst for the sample */

3930: FROM qc_rslt_mst r
3931: WHERE r.sample_id = smpl_rec.sample_id;
3932:
3933: /* Bug 3376111; Derive the spec from gmd_spec_mapping with the most
3934: tests found in qc_rslt_mst for the sample */
3935: CURSOR c_get_sm_specs IS
3936: SELECT spec_id, spec_vr_id, count(*) cnt
3937: FROM gmd_spec_mapping sm,
3938: qc_rslt_mst r

Line 3938: qc_rslt_mst r

3934: tests found in qc_rslt_mst for the sample */
3935: CURSOR c_get_sm_specs IS
3936: SELECT spec_id, spec_vr_id, count(*) cnt
3937: FROM gmd_spec_mapping sm,
3938: qc_rslt_mst r
3939: WHERE r.sample_id = smpl_rec.sample_id
3940: and sm.qc_spec_id = r.qc_spec_id
3941: -- B3486120 Removed condition below
3942: -- and l_r_tests_cnt = ( select count(*)

Line 3943: -- from qc_rslt_mst r

3939: WHERE r.sample_id = smpl_rec.sample_id
3940: and sm.qc_spec_id = r.qc_spec_id
3941: -- B3486120 Removed condition below
3942: -- and l_r_tests_cnt = ( select count(*)
3943: -- from qc_rslt_mst r
3944: -- where r.sample_id = smpl_rec.sample_id
3945: -- and r.qc_spec_id is not null )
3946: group by spec_id, spec_vr_id
3947: order by cnt desc;

Line 5268: FROM qc_rslt_mst

5264: attribute28,
5265: attribute29,
5266: attribute30,
5267: attribute_category
5268: FROM qc_rslt_mst
5269: WHERE migration_status is NULL
5270: ORDER BY assay_code;
5271: -- Bug 3934121; Added ORDER BY assay_code so spec tests and result tests
5272: -- are displayed in the same order.

Line 5319: p_table_name => 'QC_RSLT_MST',

5315: BEGIN
5316:
5317: GMA_MIGRATION.gma_insert_message (
5318: p_run_id => p_migration_id,
5319: p_table_name => 'QC_RSLT_MST',
5320: p_DB_ERROR => '',
5321: p_param1 => '',
5322: p_param2 => '',
5323: p_param3 => '',

Line 5402: p_table_name => 'QC_RSLT_MST',

5398: -- msg is written to migration log.
5399: IF c_check_spec%NOTFOUND THEN
5400: GMA_MIGRATION.gma_insert_message (
5401: p_run_id => p_migration_id,
5402: p_table_name => 'QC_RSLT_MST',
5403: p_DB_ERROR => '',
5404: p_param1 => ' Spec_Id = '||id_rec.spec_id,
5405: p_param2 => ' Test_ID = '||rslt_rec.qcassy_typ_id,
5406: p_param3 => ' Result_Id = '||rslt_rec.qc_result_id ,

Line 5622: p_table_name => 'QC_RSLT_MST',

5618: rslt_rec.last_update_login
5619: );
5620: /* GMA_MIGRATION.gma_insert_message (
5621: p_run_id => p_migration_id,
5622: p_table_name => 'QC_RSLT_MST',
5623: p_DB_ERROR => '',
5624: p_param1 => '',
5625: p_param2 => '',
5626: p_param3 => '',

Line 5637: UPDATE qc_rslt_mst

5633: p_base_message => '');
5634: COMMIT; */
5635:
5636: /* Set record status to migrated */
5637: UPDATE qc_rslt_mst
5638: SET migration_status = 'MO'
5639: WHERE qc_result_id = rslt_rec.qc_result_id;
5640:
5641: -- COMMIT; -- Bug 4150468 - removed this commit after every record processed.

Line 5668: p_table_name => 'QC_RSLT_MST',

5664:
5665:
5666: GMA_MIGRATION.gma_insert_message (
5667: p_run_id => p_migration_id,
5668: p_table_name => 'QC_RSLT_MST',
5669: p_DB_ERROR => '',
5670: p_param1 => '',
5671: p_param2 => l_rec_count,
5672: p_param3 => '',

Line 5687: p_table_name => 'QC_RSLT_MST',

5683: x_return_status := 'U';
5684: /* ROLLBACK TO SAVEPOINT Result_Rec; */
5685: GMA_MIGRATION.gma_insert_message (
5686: p_run_id => p_migration_id,
5687: p_table_name => 'QC_RSLT_MST',
5688: p_DB_ERROR => sqlerrm,
5689: p_param1 => '',
5690: p_param2 => '',
5691: p_param3 => '',

Line 5702: p_table_name => 'QC_RSLT_MST',

5698: p_base_message => 'Failed to migrate results due to '||sqlerrm);
5699:
5700: GMA_MIGRATION.gma_insert_message (
5701: p_run_id => p_migration_id,
5702: p_table_name => 'QC_RSLT_MST',
5703: p_DB_ERROR => '',
5704: p_param1 => '',
5705: p_param2 => '',
5706: p_param3 => '',