data-to-insight / csc-validator-be-cin

1 stars 1 forks source link

Bug: Rule 4001 - Flags concurrent CIN and CPP plan but FE does not show CIN plan dates module #311

Closed WillLP-code closed 1 year ago

WillLP-code commented 1 year ago

Describe the bug Flags concurrent CIN and CPP plan but FE does not show CIN plan dates module so you can't check if it should be doing this. Given the ESCC data is meant to be perfect, it porbbaly shouldn't be highlighting it at all

WillLP-code commented 1 year ago
If a <CINDetails> module has a <ChildProtectionPlan> module present with no <CPPendDate> (N00115)
- then a <CINPlanDates> module with no <CINPlanEndDate> (N00690) must not be present

The current implimentation of this rule is flagging children as failing who do not have a CINplanDates module, so they should not be failing., eg:

<CINdetails>
                <CINreferralDate>XXXX</CINreferralDate>
                <ReferralSource>XX</ReferralSource>
                <PrimaryNeedCode>XX</PrimaryNeedCode>
                <ReferralNFA>X</ReferralNFA>
                <ChildProtectionPlans>
                    <CPPstartDate>XXXX</CPPstartDate>
                    <InitialCategoryOfAbuse>XXX</InitialCategoryOfAbuse>
                    <LatestCategoryOfAbuse>XXX</LatestCategoryOfAbuse>
                    <NumberOfPreviousCPP>X</NumberOfPreviousCPP>
                    <Reviews>
                        <CPPreviewDate>XXX</CPPreviewDate>
                        <CPPreviewDate>XXX</CPPreviewDate>
                        <CPPreviewDate>XXX</CPPreviewDate>
                    </Reviews>
                </ChildProtectionPlans>
            </CINdetails>

Where this child should not fail as they have no CINplanDates module