Search Results gmd_qc_yes_no




Overview

APPS.GMD_QC_E_SAMPLES_USED_V is a read-only database view in the Oracle E-Business Suite Process Manufacturing (OPM) Quality module. It exposes the samples that have been consumed or associated with composite quality results, joining quality result records to their parent sample and test definitions. The view is designed to answer the operational question of which samples were used against a given result, and it decodes the internal exclusion flag into a user-facing Yes/No meaning.

Its principal integration role is to support inquiry, reporting, and downstream interfaces that require a denormalized, human-readable presentation of OPM quality result data. Because the view flattens the associations between GMD_COMPOSITE_RESULT_ASSOC, GMD_RESULTS, GMD_SAMPLES, and GMD_QC_TESTS, it spares report authors from reproducing the multi-table join manually. It is a query-only construct; no DML should be issued against it, and any extension should be modeled as a separate custom view or a wrapper query.

Underlying Base Objects

The view is defined over four synonyms resolving to OPM base tables in the APPS schema, plus one lookup view, as documented for ETRM 12.2.2:

  • GMD_COMPOSITE_RESULT_ASSOC (synonym) — supplies the composite_result_id and links composite results to individual results through result_id.
  • GMD_RESULTS (synonym) — provides the individual result rows, the sample reference, the test reference, and the raw result values (character and numeric).
  • GMD_SAMPLES (synonym) — supplies sample identity and descriptive attributes (sample_id, sample_no, sample_desc).
  • GMD_QC_TESTS (synonym) — provides the test definition, including test_type (which governs which result column is meaningful) and test_unit.
  • FND_LOOKUP_VALUES_VL (view) — referenced twice, once for the 'Y' lookup code (alias fly) and once for the 'N' lookup code (alias fln), under lookup type GMD_QC_YES_NO. These rows translate the stored exclusion indicator into a display meaning.

The join is enforced on gcra.result_id = rslt.result_id, rslt.sample_id = smpls.sample_id, and rslt.test_id = gqts.test_id. The FND_LOOKUP_VALUES_VL rows are not equijoined in the conventional sense; the predicates fix lookup_type and lookup_code so that a single cross-joined row per alias supplies the decoded meaning.

Key Columns

  • composite_result_id — identifier of the composite result that the association row belongs to.
  • result_id — identifier of the individual quality result row.
  • sample_no, sample_id, sample_desc — the sample number, surrogate key, and description for the sample tied to the result.
  • test_result — a DECODE over test_type (T, E, N, L, and others) that returns result_value_char for character tests and result_value_num for numeric tests, producing a single unified result column.
  • exclude_ind — a DECODE over the stored exclusion flag that returns the meaning from the GMD_QC_YES_NO lookup: the 'Y' meaning when the flag is 'Y', otherwise the 'N' meaning. This yields the familiar Yes/No presentation expected by users and interfaces.
  • test_unit — the unit of measure associated with the test definition.

Common Use Cases and Queries

The view is typically queried for sample consumption inquiries, quality result listings, and extract programs feeding LIMS or data warehouse targets. A representative query retrieving all samples used for a specific composite result is:

SELECT composite_result_id, result_id, sample_no, sample_desc, test_result, exclude_ind, test_unit FROM apps.gmd_qc_e_samples_used_v WHERE composite_result_id = :p_composite_result_id;

To list only samples reported as excluded, filter on the decoded value:

SELECT sample_no, sample_desc, test_result, test_unit FROM apps.gmd_qc_e_samples_used_v WHERE exclude_ind = 'Yes';

For sample-level reporting, join back to GMD_SAMPLES or GMD_QC_TESTS using result_id or test identifiers when additional context such as spec limits is required. Because the lookup join fixes a single 'Y' and a single 'N' row, callers should not add further predicates against FND_LOOKUP_VALUES_VL through this view; instead query the lookup independently when the full lookup set is needed.