| Key | Value |
|---|---|
| Table | DS03 Cost |
| Severity | CRITICAL |
| Unique ID | 1030118 |
| Summary | Is the is_indirect column used consistently? |
| Error message | Both types of rows found: 1) where is_indirect is missing, and 2) where is_indirect is set to 'Y' or 'N'. |
The Data Integrity and Quality (DIQ) check titled "Mixed Use of is_indirect" is performed on the DS03 Cost table. This check is designed to identify if the is_indirect field is consistently populated with either 'Y' or 'No', or consistently blank/missing. The check runs on both CA/SLPP & WP/PP level data.
This test, titled "Mixed Use of is_indirect", is being performed on the 'DS03 Cost' table to ensure that indirects are collected consistently. The severity of this test is marked as 'CRITICAL', which is the highest level of severity, indicating that this issue must be resolved before the data can be reviewed further.
The importance of this check lies in the need for accurate cost tracking at the EOC level, without which proper analysis can be accomplished.
CREATE FUNCTION [dbo].[fnDIQ_DS03_Cost_IsIndirectUseMixed] (
@upload_id int = 0
)
RETURNS TABLE
AS RETURN
(
with Cost as (
SELECT is_indirect IsInd
FROM DS03_cost
WHERE upload_ID = @upload_id
)
SELECT *
FROM DummyRow_Get(@upload_ID)
WHERE (
EXISTS (SELECT 1 FROM Cost WHERE IsInd IN ('Y', 'N'))
AND EXISTS (SELECT 1 FROM Cost WHERE IsInd IS NULL)
)
)