**APPENDIX D-13**

Chlorite and Chlorine Dioxide Level Exceedence Check

This page is intentionally left blank

**D-13. Chlorite and Chlorine Dioxide Level Exceedence Check**
**(Section 9.2.14)**

Check-Point Restart Issues: This process will be driven by changes to
the TSASAR table.

> The driver for this subprocess is the Sample Analytical Result table.
>
> The record key for this subprocess is the composite of CDS trigger
> timestamp and the TSASAR_IS_NUMBER columns.
>
> The sort order for this subprocess will be CDS trigger timestamp
> ascending and TSASAR_IS_NUMBER ascending.

12580. Create a log in the CDS Execution Log indicating the process
       start time.

[Assess Chlorine Dioxide Results Subprocess]{.underline}

1.  Select the current MRDL for chlorine dioxide where:

    a.  TSAANLYT.CODE = \"1008\" AND

    b.  TMNALRA.THRESHOLD_TYPE_CD = \"MRDL\" AND

    c.  TMNALRA.BEGIN_DATE \<= Current Date AND

    d.  TMMNALRA.END_DATE is null Or \>= Current Date.

2.  If there is not a current MRDL for "1008," an advisory will be
    created referencing message number 26 and will record: the water
    system number, name, tinwsys_is_number, and tinwsys_st_code; the
    water system facility state assigned ID and name; the sampling point
    ID and description; the sample=s lab sample number and collection
    date; and the result=s analtye code.

3.  If there is a current MRDL for 1008 (chlorine dioxide), then:

    v.  Identify results that meet the following criteria:

        i.  Whose CDS trigger timestamp or whose parent sample=s CDS
            trigger timestamp is greater than the last time the *CDS
            Setup* program was run; AND

        ii. That reference chlorine dioxide TSAANLYT.CODE =\"1008\" AND

        iii. Whose Data Quality Code is accepted (A) or validated (V);
             AND

        iv. Whose parent Sample=s Compliance Purpose Indicator Code is
            equal to "Y" AND

        v.  Whose parent Sample=s Rejection Reason Code is blank.

    ```{=html}
    <!-- -->
    ```
    a.  For each result identified:

        ?.  If there is a record in CDS Sample Result where
            SAR_TSASAR_IS_NUMBER = TSASAR.TINSAR_IS_NUMBER and
            SAR_TSASAR_ST_CODE = TSASAR.TSASAR_ST_CODE and the CDS
            Sample Result record references a CDS Exceedence
            (TCDSCAEX_IS_NUMBER is not null), then delete both the
            referenced CDS Exceedence and the CDS Sample Result.

        ```{=html}
        <!-- -->
        ```
        i.  If the Less Than Indicator is equal to "Y", go to next
            Sample Analytical Result (this result does not exceed the
            MRDL)

        ii. If the UOM_Code for the Sample Analytical Result is not
            equal to the UOM_Code for its MRDL, convert the
            Concentration to the same units as the MRDL and temporary
            save as "Result" (do not change the value in the Sample
            Analytical Result, only convert it for comparison purposes).
            If the Sample Analytical Result cannot be converted using
            the conversion table (see the main design specifications),
            an advisory will be created referencing message number 27
            and will record: the water system number, name,
            tinwsys_is_number, and tinwsys_st_code; the water system
            facility state assigned ID and name; the sampling point ID
            and description; the sample=s lab sample number and
            collection date; and the result=s analyte code.

        iii. Else temporarily save the Concentration as "Result"

        iv. If Result is greater than the MRDL for chlorine dioxide:

            1.  If this is the first CDS Exceedence determined in this
                run of CDS Setup, create a record in CDS Report Log
                entity and reference it with all CDS Exceedences
                determined in this run AND

            2.  Pass a CDS Exceedence to the Create CDS Exceedence
                action block AND

            3.  Create an advisory referencing message number 28 and
                will record: the water system number, name,
                tinwsys_is_number, and tinwsys_st_code; the water system
                facility state assigned ID and name; the sampling point
                ID and description; the sample=s lab sample number and
                collection date; and the result=s analtye code AND

            4.  Move on to the next Sample Analytical Result.

        v.  If Result is not greater than the MRDL for chlorine dioxide,
            move to the next Sample Analytical Result

        vi. Once all Sample Analytical Results for chlorine dioxide have
            been assessed, go on to the Assess Chlorite Results
            subprocess.

[End of the Assess Chlorine Dioxide Results subprocess]{.underline}

[Assess Chlorite Results]{.underline}

4.  Select the current MCL for chlorite where:

    a.  TSAANLYT.CODE = \"1009\" AND

    b.  TMNALRA.THRESHOLD_TYPE_CD = \"MCL\" AND

    c.  TMNALRA.BEGIN_DATE \<= Current Date AND

    d.  TMMNALRA.END_DATE is null Or \>= Current Date

5.  If there is not a current MCL for "1009," an advisory will be
    created referencing message number 29 and will record: the water
    system number, name, tinwsys_is_number, and tinwsys_st_code; the
    water system facility state assigned ID and name; the sampling point
    ID and description; the sample=s lab sample number and collection
    date; and the result=s analtye code.

6.  If there is a current MCL for 1009 (chlorite), then:

    j.  Identify results that meet the following criteria:

        i.  Whose CDS trigger timestamp or whose parent sample=s CDS
            trigger timestamp is greater than the last time the *CDS
            Setup* program was run; AND

        ii. That reference chlorite TSAANLYT.CODE =\"1009\" AND

        iii. Whose Data Quality Code is accepted (A) or validated (V);
             AND

        iv. Whose parent Sample=s Compliance Purpose Indicator Code is
            equal to "Y" AND

        v.  Whose parent Sample=s Rejection Reason Code is blank.

    ```{=html}
    <!-- -->
    ```
    a.  For each result identified:

        ?.  If there is a record in CDS Sample Result where
            SAR_TSASAR_IS_NUMBER = TSASAR.TINSAR_IS_NUMBER and
            SAR_TSASAR_ST_CODE = TSASAR.TSASAR_ST_CODE and the CDS
            Sample Result record references a CDS Exceedence
            (TCDSCAEX_IS_NUMBER is not null), then delete both the
            referenced CDS Exceedence and the CDS Sample Result.

        ```{=html}
        <!-- -->
        ```
        i.  If the Less Than Indicator is equal to "Y", go to next
            Sample Analytical Result (this result does not exceed the
            MCL)

        ii. Else, if the UOM_Code for the Sample Analytical Result is
            not equal to the UOM_Code for its MCL, convert the
            Concentration to the same units as the MCL and temporary
            save as "Result" (do not change the value in the Sample
            Analytical Result, only convert it for comparison purposes).
            If the Sample Analytical Result cannot be converted using
            the conversion table (see the main design specifications),
            an advisory will be created referencing message number 30
            and will record: the water system number, name,
            tinwsys_is_number, and tinwsys_st_code; the water system
            facility state assigned ID and name; the sampling point ID
            and description; the sample=s lab sample number and
            collection date; and the result=s analtye code.

        iii. Else temporarily save the Concentration as "Result."

        iv. If Result is greater than the MCL for chlorite:

            1.  If this is the first CDS Exceedence determined in this
                run of *CDS Setup*, create a record in CDS Report Log
                entity and reference it with all CDS Exceedences
                determined in this run AND

            2.  Pass a CDS Exceedence to the Create CDS Exceedence
                action block AND

            3.  Create an advisory referencing message number 31 and
                record: the water system number, name,
                tinwsys_is_number, and tinwsys_st_code; the water system
                facility state assigned ID and name; the sampling point
                ID and description; the sample=s lab sample number and
                collection date; and the result=s analtye code. AND

            4.  Move on to the next Sample Analytical Result.

        v.  If Result is not greater than the MCL for chlorite, move to
            the next Sample Analytical Result.