From 89e916904d81db3fdf62e97440d8d92a7354af56 Mon Sep 17 00:00:00 2001 From: karla-vm Date: Tue, 1 Aug 2023 10:16:30 -0400 Subject: [PATCH 1/2] add two new validations for delivery systems and their nested options --- .../src/measures/2023/AABAD/index.test.tsx | 4 ++ .../src/measures/2023/AABAD/validation.ts | 2 + .../src/measures/2023/AABCH/index.test.tsx | 4 ++ .../src/measures/2023/AABCH/validation.ts | 2 + .../src/measures/2023/ADDCH/index.test.tsx | 4 ++ .../src/measures/2023/ADDCH/validation.ts | 2 + .../src/measures/2023/AIFHH/index.test.tsx | 4 ++ .../src/measures/2023/AIFHH/validation.ts | 2 + .../src/measures/2023/AMBCH/index.test.tsx | 4 ++ .../src/measures/2023/AMBCH/validation.ts | 2 + .../src/measures/2023/AMBHH/index.test.tsx | 4 ++ .../src/measures/2023/AMBHH/validation.ts | 3 ++ .../src/measures/2023/AMMAD/index.test.tsx | 4 ++ .../src/measures/2023/AMMAD/validation.ts | 2 + .../src/measures/2023/AMRAD/index.test.tsx | 4 ++ .../src/measures/2023/AMRAD/validation.ts | 2 + .../src/measures/2023/AMRCH/index.test.tsx | 4 ++ .../src/measures/2023/AMRCH/validation.ts | 2 + .../src/measures/2023/APMCH/index.test.tsx | 4 ++ .../src/measures/2023/APMCH/validation.ts | 2 + .../src/measures/2023/APPCH/index.test.tsx | 4 ++ .../src/measures/2023/APPCH/validation.ts | 2 + .../src/measures/2023/BCSAD/index.test.tsx | 4 ++ .../src/measures/2023/BCSAD/validation.ts | 2 + .../src/measures/2023/CBPAD/index.test.tsx | 4 ++ .../src/measures/2023/CBPAD/validation.ts | 2 + .../src/measures/2023/CBPHH/index.test.tsx | 4 ++ .../src/measures/2023/CBPHH/validation.ts | 2 + .../src/measures/2023/CCPAD/index.test.tsx | 4 ++ .../src/measures/2023/CCPAD/validation.ts | 2 + .../src/measures/2023/CCPCH/index.test.tsx | 4 ++ .../src/measures/2023/CCPCH/validation.ts | 2 + .../src/measures/2023/CCSAD/index.test.tsx | 4 ++ .../src/measures/2023/CCSAD/validation.ts | 2 + .../src/measures/2023/CCWAD/index.test.tsx | 4 ++ .../src/measures/2023/CCWAD/validation.ts | 2 + .../src/measures/2023/CCWCH/index.test.tsx | 4 ++ .../src/measures/2023/CCWCH/validation.ts | 2 + .../src/measures/2023/CDFAD/index.test.tsx | 4 ++ .../src/measures/2023/CDFAD/validation.ts | 2 + .../src/measures/2023/CDFCH/index.test.tsx | 4 ++ .../src/measures/2023/CDFCH/validation.ts | 2 + .../src/measures/2023/CDFHH/index.test.tsx | 4 ++ .../src/measures/2023/CDFHH/validation.ts | 2 + .../src/measures/2023/CHLAD/index.test.tsx | 4 ++ .../src/measures/2023/CHLAD/validation.ts | 2 + .../src/measures/2023/CHLCH/index.test.tsx | 4 ++ .../src/measures/2023/CHLCH/validation.ts | 2 + .../src/measures/2023/CISCH/index.test.tsx | 4 ++ .../src/measures/2023/CISCH/validation.ts | 2 + .../src/measures/2023/COBAD/index.test.tsx | 4 ++ .../src/measures/2023/COBAD/validation.ts | 2 + .../src/measures/2023/COLAD/index.test.tsx | 4 ++ .../src/measures/2023/COLAD/validation.ts | 2 + .../src/measures/2023/COLHH/index.test.tsx | 4 ++ .../src/measures/2023/COLHH/validation.ts | 2 + .../src/measures/2023/CPUAD/index.test.tsx | 4 ++ .../src/measures/2023/CPUAD/validation.ts | 3 +- .../src/measures/2023/DEVCH/index.test.tsx | 4 ++ .../src/measures/2023/DEVCH/validation.ts | 2 + .../src/measures/2023/FUAAD/index.test.tsx | 4 ++ .../src/measures/2023/FUAAD/validation.ts | 2 + .../src/measures/2023/FUACH/index.test.tsx | 4 ++ .../src/measures/2023/FUACH/validation.ts | 2 + .../src/measures/2023/FUAHH/index.test.tsx | 4 ++ .../src/measures/2023/FUAHH/validation.ts | 2 + .../src/measures/2023/FUHAD/index.test.tsx | 4 ++ .../src/measures/2023/FUHAD/validation.ts | 2 + .../src/measures/2023/FUHCH/index.test.tsx | 4 ++ .../src/measures/2023/FUHCH/validation.ts | 2 + .../src/measures/2023/FUHHH/index.test.tsx | 4 ++ .../src/measures/2023/FUHHH/validation.ts | 2 + .../src/measures/2023/FUMAD/index.test.tsx | 4 ++ .../src/measures/2023/FUMAD/validation.ts | 2 + .../src/measures/2023/FUMCH/index.test.tsx | 4 ++ .../src/measures/2023/FUMCH/validation.ts | 2 + .../src/measures/2023/FUMHH/index.test.tsx | 4 ++ .../src/measures/2023/FUMHH/validation.ts | 2 + .../src/measures/2023/FVAAD/index.test.tsx | 4 ++ .../src/measures/2023/FVAAD/validation.ts | 2 + .../src/measures/2023/HBDAD/index.test.tsx | 4 ++ .../src/measures/2023/HBDAD/validation.ts | 2 + .../src/measures/2023/HPCMIAD/index.test.tsx | 4 ++ .../src/measures/2023/HPCMIAD/validation.ts | 2 + .../src/measures/2023/HVLAD/index.test.tsx | 4 ++ .../src/measures/2023/HVLAD/validation.ts | 2 + .../src/measures/2023/IETAD/index.test.tsx | 4 ++ .../src/measures/2023/IETAD/validation.ts | 2 + .../src/measures/2023/IETHH/index.test.tsx | 4 ++ .../src/measures/2023/IETHH/validation.ts | 2 + .../src/measures/2023/IMACH/index.test.tsx | 4 ++ .../src/measures/2023/IMACH/validation.ts | 2 + .../src/measures/2023/IUHH/index.test.tsx | 4 ++ .../src/measures/2023/IUHH/validation.ts | 2 + .../src/measures/2023/LSCCH/index.test.tsx | 4 ++ .../src/measures/2023/LSCCH/validation.ts | 2 + .../src/measures/2023/MSCAD/index.test.tsx | 4 ++ .../src/measures/2023/MSCAD/validation.ts | 2 + .../src/measures/2023/OEVCH/index.test.tsx | 4 ++ .../src/measures/2023/OEVCH/validation.ts | 2 + .../src/measures/2023/OHDAD/index.test.tsx | 4 ++ .../src/measures/2023/OHDAD/validation.ts | 2 + .../src/measures/2023/OUDAD/index.test.tsx | 4 ++ .../src/measures/2023/OUDAD/validation.ts | 2 + .../src/measures/2023/OUDHH/index.test.tsx | 4 ++ .../src/measures/2023/OUDHH/validation.ts | 2 + .../src/measures/2023/PCRAD/index.test.tsx | 4 ++ .../src/measures/2023/PCRAD/validation.ts | 2 + .../src/measures/2023/PCRHH/index.test.tsx | 4 ++ .../src/measures/2023/PCRHH/validation.ts | 3 ++ .../src/measures/2023/PPCAD/index.test.tsx | 4 ++ .../src/measures/2023/PPCAD/validation.ts | 2 + .../src/measures/2023/PPCCH/index.test.tsx | 4 ++ .../src/measures/2023/PPCCH/validation.ts | 2 + .../src/measures/2023/PQI01AD/index.test.tsx | 4 ++ .../src/measures/2023/PQI01AD/validation.ts | 2 + .../src/measures/2023/PQI05AD/index.test.tsx | 4 ++ .../src/measures/2023/PQI05AD/validation.ts | 2 + .../src/measures/2023/PQI08AD/index.test.tsx | 4 ++ .../src/measures/2023/PQI08AD/validation.ts | 2 + .../src/measures/2023/PQI15AD/index.test.tsx | 4 ++ .../src/measures/2023/PQI15AD/validation.ts | 2 + .../src/measures/2023/PQI92HH/index.test.tsx | 4 ++ .../src/measures/2023/PQI92HH/validation.ts | 3 ++ .../src/measures/2023/SAAAD/index.test.tsx | 4 ++ .../src/measures/2023/SAAAD/validation.ts | 2 + .../src/measures/2023/SFMCH/index.test.tsx | 4 ++ .../src/measures/2023/SFMCH/validation.ts | 2 + .../src/measures/2023/SSDAD/index.test.tsx | 4 ++ .../src/measures/2023/SSDAD/validation.ts | 2 + .../src/measures/2023/TFLCH/index.test.tsx | 4 ++ .../src/measures/2023/TFLCH/validation.ts | 2 + .../src/measures/2023/W30CH/index.test.tsx | 4 ++ .../src/measures/2023/W30CH/validation.ts | 2 + .../src/measures/2023/WCCCH/index.test.tsx | 4 ++ .../src/measures/2023/WCCCH/validation.ts | 2 + .../src/measures/2023/WCVCH/index.test.tsx | 4 ++ .../src/measures/2023/WCVCH/validation.ts | 2 + .../2023/shared/globalValidations/index.ts | 2 + .../index.test.ts | 47 ++++++++++++++++++ .../validateAtLeastOneDeliverySystem/index.ts | 20 ++++++++ .../index.test.ts | 49 +++++++++++++++++++ .../validateFfsRadioButtonCompletion/index.ts | 37 ++++++++++++++ .../2023/shared/util/validationsMock.tsx | 10 ++++ 144 files changed, 582 insertions(+), 1 deletion(-) create mode 100644 services/ui-src/src/measures/2023/shared/globalValidations/validateAtLeastOneDeliverySystem/index.test.ts create mode 100644 services/ui-src/src/measures/2023/shared/globalValidations/validateAtLeastOneDeliverySystem/index.ts create mode 100644 services/ui-src/src/measures/2023/shared/globalValidations/validateFfsRadioButtonCompletion/index.test.ts create mode 100644 services/ui-src/src/measures/2023/shared/globalValidations/validateFfsRadioButtonCompletion/index.ts diff --git a/services/ui-src/src/measures/2023/AABAD/index.test.tsx b/services/ui-src/src/measures/2023/AABAD/index.test.tsx index f4d9cdd1bf..7124d4f7d5 100644 --- a/services/ui-src/src/measures/2023/AABAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/AABAD/index.test.tsx @@ -180,6 +180,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).not.toHaveBeenCalled(); expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -195,6 +197,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateAtLeastOneDataSourceType).toHaveBeenCalled(); expect(V.validateAtLeastOneDeviationFieldFilled).toHaveBeenCalled(); expect(V.validateNumeratorLessThanDenominatorOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/AABAD/validation.ts b/services/ui-src/src/measures/2023/AABAD/validation.ts index 390c0071f2..2098da76fb 100644 --- a/services/ui-src/src/measures/2023/AABAD/validation.ts +++ b/services/ui-src/src/measures/2023/AABAD/validation.ts @@ -48,6 +48,8 @@ const AABADValidation = (data: FormData) => { ...GV.validateHedisYear(data), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateAtLeastOneDeviationFieldFilled( didCalculationsDeviate, deviationReason diff --git a/services/ui-src/src/measures/2023/AABCH/index.test.tsx b/services/ui-src/src/measures/2023/AABCH/index.test.tsx index b1091baa8b..2898e7d2bb 100644 --- a/services/ui-src/src/measures/2023/AABCH/index.test.tsx +++ b/services/ui-src/src/measures/2023/AABCH/index.test.tsx @@ -181,6 +181,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect( V.validateRequiredRadioButtonForCombinedRates ).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -200,6 +202,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateTotalNDR).toHaveBeenCalled(); expect(V.validateOMSTotalNDR).toHaveBeenCalled(); expect(V.validateRequiredRadioButtonForCombinedRates).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/AABCH/validation.ts b/services/ui-src/src/measures/2023/AABCH/validation.ts index 39be15fb5f..136855d573 100644 --- a/services/ui-src/src/measures/2023/AABCH/validation.ts +++ b/services/ui-src/src/measures/2023/AABCH/validation.ts @@ -47,6 +47,8 @@ const AABCHValidation = (data: FormData) => { PMD.qualifiers ), ...GV.validateRequiredRadioButtonForCombinedRates(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), // OMS Validations ...GV.omsValidations({ diff --git a/services/ui-src/src/measures/2023/ADDCH/index.test.tsx b/services/ui-src/src/measures/2023/ADDCH/index.test.tsx index 59dbb4d653..a3a7bca0ac 100644 --- a/services/ui-src/src/measures/2023/ADDCH/index.test.tsx +++ b/services/ui-src/src/measures/2023/ADDCH/index.test.tsx @@ -185,6 +185,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { ).not.toHaveBeenCalled(); expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -205,6 +207,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateOneQualDenomHigherThanOtherDenomOMS).toHaveBeenCalled(); expect(V.validateRateZeroOMS).toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/ADDCH/validation.ts b/services/ui-src/src/measures/2023/ADDCH/validation.ts index 590ece311c..4d2319c11f 100644 --- a/services/ui-src/src/measures/2023/ADDCH/validation.ts +++ b/services/ui-src/src/measures/2023/ADDCH/validation.ts @@ -49,6 +49,8 @@ const ADDCHValidation = (data: FormData) => { didCalculationsDeviate, deviationReason ), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), // OMS Validations ...GV.omsValidations({ diff --git a/services/ui-src/src/measures/2023/AIFHH/index.test.tsx b/services/ui-src/src/measures/2023/AIFHH/index.test.tsx index 59affbc346..b9f80273c2 100644 --- a/services/ui-src/src/measures/2023/AIFHH/index.test.tsx +++ b/services/ui-src/src/measures/2023/AIFHH/index.test.tsx @@ -182,6 +182,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.ComplexValidateNDRTotals).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it.skip("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -194,6 +196,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateAtLeastOneDataSource).toHaveBeenCalled(); expect(V.validateAtLeastOneDataSourceType).toHaveBeenCalled(); expect(V.ComplexValidateNDRTotals).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/AIFHH/validation.ts b/services/ui-src/src/measures/2023/AIFHH/validation.ts index 8648e01143..2f3c80a215 100644 --- a/services/ui-src/src/measures/2023/AIFHH/validation.ts +++ b/services/ui-src/src/measures/2023/AIFHH/validation.ts @@ -55,6 +55,8 @@ const AIFHHValidation = (data: FormData) => { ...GV.validateBothDatesCompleted(dateRange), ...GV.validateYearFormat(dateRange), ...GV.validateOPMRates(OPM), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.ComplexValidateDualPopInformation( performanceMeasureArray, diff --git a/services/ui-src/src/measures/2023/AMBCH/index.test.tsx b/services/ui-src/src/measures/2023/AMBCH/index.test.tsx index 2af7b2e0bd..bde049aef5 100644 --- a/services/ui-src/src/measures/2023/AMBCH/index.test.tsx +++ b/services/ui-src/src/measures/2023/AMBCH/index.test.tsx @@ -184,6 +184,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsOMS).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -206,6 +208,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateTotalNDR).toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsOMS).toHaveBeenCalled(); expect(V.validateOMSTotalNDR).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/AMBCH/validation.ts b/services/ui-src/src/measures/2023/AMBCH/validation.ts index 196f47b55a..d4f260ca91 100644 --- a/services/ui-src/src/measures/2023/AMBCH/validation.ts +++ b/services/ui-src/src/measures/2023/AMBCH/validation.ts @@ -32,6 +32,8 @@ const AMBCHValidation = (data: FormData) => { ...GV.validateHedisYear(data), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateAtLeastOneDeviationFieldFilled( didCalculationsDeviate, deviationReason diff --git a/services/ui-src/src/measures/2023/AMBHH/index.test.tsx b/services/ui-src/src/measures/2023/AMBHH/index.test.tsx index 24d6b938b7..11ba981d90 100644 --- a/services/ui-src/src/measures/2023/AMBHH/index.test.tsx +++ b/services/ui-src/src/measures/2023/AMBHH/index.test.tsx @@ -182,6 +182,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -202,6 +204,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).toHaveBeenCalled(); expect(V.validateOMSTotalNDR).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/AMBHH/validation.ts b/services/ui-src/src/measures/2023/AMBHH/validation.ts index 3c9d233b14..1c87d00d42 100644 --- a/services/ui-src/src/measures/2023/AMBHH/validation.ts +++ b/services/ui-src/src/measures/2023/AMBHH/validation.ts @@ -37,6 +37,9 @@ const AMBHHValidation = (data: FormData) => { ...GV.validateYearFormat(dateRange), ...GV.validateOPMRates(OPM), ...GV.validateHedisYear(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), + // Performance Measure Validations ...GV.validateAtLeastOneRateComplete( performanceMeasureArray, diff --git a/services/ui-src/src/measures/2023/AMMAD/index.test.tsx b/services/ui-src/src/measures/2023/AMMAD/index.test.tsx index 5365b3fc0b..c6358e1276 100644 --- a/services/ui-src/src/measures/2023/AMMAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/AMMAD/index.test.tsx @@ -183,6 +183,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).not.toHaveBeenCalled(); expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -204,6 +206,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).toHaveBeenCalled(); expect(V.validateRateZeroOMS).toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); it("should not allow non state users to edit forms by disabling buttons", async () => { diff --git a/services/ui-src/src/measures/2023/AMMAD/validation.ts b/services/ui-src/src/measures/2023/AMMAD/validation.ts index 35b70dd25a..f9feffa2cf 100644 --- a/services/ui-src/src/measures/2023/AMMAD/validation.ts +++ b/services/ui-src/src/measures/2023/AMMAD/validation.ts @@ -72,6 +72,8 @@ const AMMADValidation = (data: FormData) => { ...GV.validateHedisYear(data), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateAtLeastOneDeviationFieldFilled( didCalculationsDeviate, deviationReason diff --git a/services/ui-src/src/measures/2023/AMRAD/index.test.tsx b/services/ui-src/src/measures/2023/AMRAD/index.test.tsx index 3b02064ec6..7873c8d5a0 100644 --- a/services/ui-src/src/measures/2023/AMRAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/AMRAD/index.test.tsx @@ -182,6 +182,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -202,6 +204,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).toHaveBeenCalled(); expect(V.validateOMSTotalNDR).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/AMRAD/validation.ts b/services/ui-src/src/measures/2023/AMRAD/validation.ts index 5e7e17c21a..fd2de7eb19 100644 --- a/services/ui-src/src/measures/2023/AMRAD/validation.ts +++ b/services/ui-src/src/measures/2023/AMRAD/validation.ts @@ -39,6 +39,8 @@ const AMRADValidation = (data: FormData) => { ...GV.validateRateZeroPM(performanceMeasureArray, OPM, ageGroups, data), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateNumeratorsLessThanDenominatorsPM( performanceMeasureArray, OPM, diff --git a/services/ui-src/src/measures/2023/AMRCH/index.test.tsx b/services/ui-src/src/measures/2023/AMRCH/index.test.tsx index c7920c4a11..f2bd59aeb1 100644 --- a/services/ui-src/src/measures/2023/AMRCH/index.test.tsx +++ b/services/ui-src/src/measures/2023/AMRCH/index.test.tsx @@ -183,6 +183,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -204,6 +206,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).toHaveBeenCalled(); expect(V.validateOMSTotalNDR).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/AMRCH/validation.ts b/services/ui-src/src/measures/2023/AMRCH/validation.ts index 6c273e64ea..ce189a101a 100644 --- a/services/ui-src/src/measures/2023/AMRCH/validation.ts +++ b/services/ui-src/src/measures/2023/AMRCH/validation.ts @@ -39,6 +39,8 @@ const AMRCHValidation = (data: FormData) => { ...GV.validateRateZeroPM(performanceMeasureArray, OPM, ageGroups, data), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateNumeratorsLessThanDenominatorsPM( performanceMeasureArray, OPM, diff --git a/services/ui-src/src/measures/2023/APMCH/index.test.tsx b/services/ui-src/src/measures/2023/APMCH/index.test.tsx index ec4c5baed6..e948f568aa 100644 --- a/services/ui-src/src/measures/2023/APMCH/index.test.tsx +++ b/services/ui-src/src/measures/2023/APMCH/index.test.tsx @@ -184,6 +184,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -206,6 +208,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateTotalNDR).toHaveBeenCalled(); expect(V.validateOMSTotalNDR).toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(33000); diff --git a/services/ui-src/src/measures/2023/APMCH/validation.ts b/services/ui-src/src/measures/2023/APMCH/validation.ts index 539a01cfd0..253062e681 100644 --- a/services/ui-src/src/measures/2023/APMCH/validation.ts +++ b/services/ui-src/src/measures/2023/APMCH/validation.ts @@ -44,6 +44,8 @@ const APMCHValidation = (data: FormData) => { ), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateNumeratorsLessThanDenominatorsPM( performanceMeasureArray, OPM, diff --git a/services/ui-src/src/measures/2023/APPCH/index.test.tsx b/services/ui-src/src/measures/2023/APPCH/index.test.tsx index b565df711a..f73bb8f04d 100644 --- a/services/ui-src/src/measures/2023/APPCH/index.test.tsx +++ b/services/ui-src/src/measures/2023/APPCH/index.test.tsx @@ -183,6 +183,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -204,6 +206,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).toHaveBeenCalled(); expect(V.validateOMSTotalNDR).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/APPCH/validation.ts b/services/ui-src/src/measures/2023/APPCH/validation.ts index 2a6fe7f2f7..46552bb12d 100644 --- a/services/ui-src/src/measures/2023/APPCH/validation.ts +++ b/services/ui-src/src/measures/2023/APPCH/validation.ts @@ -45,6 +45,8 @@ const APPCHValidation = (data: FormData) => { ...GV.validateYearFormat(dateRange), ...GV.validateHedisYear(data), ...GV.validateOPMRates(OPM), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateAtLeastOneDeviationFieldFilled( didCalculationsDeviate, deviationReason diff --git a/services/ui-src/src/measures/2023/BCSAD/index.test.tsx b/services/ui-src/src/measures/2023/BCSAD/index.test.tsx index 82b3d5ae1e..3fe7612861 100644 --- a/services/ui-src/src/measures/2023/BCSAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/BCSAD/index.test.tsx @@ -180,6 +180,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).not.toHaveBeenCalled(); expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -199,6 +201,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).toHaveBeenCalled(); expect(V.validateRateZeroOMS).toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/BCSAD/validation.ts b/services/ui-src/src/measures/2023/BCSAD/validation.ts index 55462e35ed..ced67e6595 100644 --- a/services/ui-src/src/measures/2023/BCSAD/validation.ts +++ b/services/ui-src/src/measures/2023/BCSAD/validation.ts @@ -41,6 +41,8 @@ const BCSValidation = (data: FormData) => { ), ...GV.validateRateNotZeroPM(performanceMeasureArray, OPM, ageGroups), ...GV.validateRateZeroPM(performanceMeasureArray, OPM, ageGroups, data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), // OMS Validations ...GV.omsValidations({ diff --git a/services/ui-src/src/measures/2023/CBPAD/index.test.tsx b/services/ui-src/src/measures/2023/CBPAD/index.test.tsx index e653f1ca72..f7e1076d8e 100644 --- a/services/ui-src/src/measures/2023/CBPAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/CBPAD/index.test.tsx @@ -180,6 +180,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).not.toHaveBeenCalled(); expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -199,6 +201,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).toHaveBeenCalled(); expect(V.validateRateZeroOMS).toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/CBPAD/validation.ts b/services/ui-src/src/measures/2023/CBPAD/validation.ts index 0e959cab32..434b889d4e 100644 --- a/services/ui-src/src/measures/2023/CBPAD/validation.ts +++ b/services/ui-src/src/measures/2023/CBPAD/validation.ts @@ -49,6 +49,8 @@ const CBPValidation = (data: FormData) => { ...GV.validateBothDatesCompleted(dateRange), ...GV.validateYearFormat(dateRange), ...GV.validateHedisYear(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateOPMRates(OPM), ...GV.omsValidations({ data, diff --git a/services/ui-src/src/measures/2023/CBPHH/index.test.tsx b/services/ui-src/src/measures/2023/CBPHH/index.test.tsx index 2f13887f1a..e85a5bf4e3 100644 --- a/services/ui-src/src/measures/2023/CBPHH/index.test.tsx +++ b/services/ui-src/src/measures/2023/CBPHH/index.test.tsx @@ -182,6 +182,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -202,6 +204,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).toHaveBeenCalled(); expect(V.validateOMSTotalNDR).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/CBPHH/validation.ts b/services/ui-src/src/measures/2023/CBPHH/validation.ts index 136f5a3539..e77c80a2a4 100644 --- a/services/ui-src/src/measures/2023/CBPHH/validation.ts +++ b/services/ui-src/src/measures/2023/CBPHH/validation.ts @@ -50,6 +50,8 @@ const CBPValidation = (data: FormData) => { ...GV.validateYearFormat(dateRange), ...GV.validateHedisYear(data), ...GV.validateOPMRates(OPM), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateTotalNDR(performanceMeasureArray), ...GV.omsValidations({ data, diff --git a/services/ui-src/src/measures/2023/CCPAD/index.test.tsx b/services/ui-src/src/measures/2023/CCPAD/index.test.tsx index 8a00eb385a..aabe58c687 100644 --- a/services/ui-src/src/measures/2023/CCPAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/CCPAD/index.test.tsx @@ -183,6 +183,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).not.toHaveBeenCalled(); expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -205,6 +207,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).toHaveBeenCalled(); expect(V.validateRateZeroOMS).toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/CCPAD/validation.ts b/services/ui-src/src/measures/2023/CCPAD/validation.ts index cab676d461..bee846d507 100644 --- a/services/ui-src/src/measures/2023/CCPAD/validation.ts +++ b/services/ui-src/src/measures/2023/CCPAD/validation.ts @@ -48,6 +48,8 @@ const CCPADValidation = (data: FormData) => { ), ...GV.validateOneCatRateHigherThanOtherCatPM(data, PMD.data), ...GV.validateRequiredRadioButtonForCombinedRates(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), // OMS Specific Validations ...GV.omsValidations({ diff --git a/services/ui-src/src/measures/2023/CCPCH/index.test.tsx b/services/ui-src/src/measures/2023/CCPCH/index.test.tsx index e206803dcb..9359857bdf 100644 --- a/services/ui-src/src/measures/2023/CCPCH/index.test.tsx +++ b/services/ui-src/src/measures/2023/CCPCH/index.test.tsx @@ -183,6 +183,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -206,6 +208,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/CCPCH/validation.ts b/services/ui-src/src/measures/2023/CCPCH/validation.ts index 330ad271f4..299caeeb2a 100644 --- a/services/ui-src/src/measures/2023/CCPCH/validation.ts +++ b/services/ui-src/src/measures/2023/CCPCH/validation.ts @@ -34,6 +34,8 @@ const CCPCHValidation = (data: FormData) => { ...GV.validateEqualCategoryDenominatorsPM(data, PMD.categories), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateAtLeastOneDeviationFieldFilled( didCalculationsDeviate, deviationReason diff --git a/services/ui-src/src/measures/2023/CCSAD/index.test.tsx b/services/ui-src/src/measures/2023/CCSAD/index.test.tsx index 9d11a7ce22..beb1be21a4 100644 --- a/services/ui-src/src/measures/2023/CCSAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/CCSAD/index.test.tsx @@ -179,6 +179,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).not.toHaveBeenCalled(); expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -196,6 +198,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).toHaveBeenCalled(); expect(V.validateRateZeroOMS).toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/CCSAD/validation.ts b/services/ui-src/src/measures/2023/CCSAD/validation.ts index 4cdca55d9a..c67628454d 100644 --- a/services/ui-src/src/measures/2023/CCSAD/validation.ts +++ b/services/ui-src/src/measures/2023/CCSAD/validation.ts @@ -63,6 +63,8 @@ const CCSADValidation = (data: FormData) => { ...GV.validateYearFormat(dateRange), ...GV.validateHedisYear(data), ...GV.validateOPMRates(OPM), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ]; return errorArray; diff --git a/services/ui-src/src/measures/2023/CCWAD/index.test.tsx b/services/ui-src/src/measures/2023/CCWAD/index.test.tsx index 52597c3412..1975a10e8e 100644 --- a/services/ui-src/src/measures/2023/CCWAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/CCWAD/index.test.tsx @@ -183,6 +183,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).not.toHaveBeenCalled(); expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -204,6 +206,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).toHaveBeenCalled(); expect(V.validateRateZeroOMS).toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/CCWAD/validation.ts b/services/ui-src/src/measures/2023/CCWAD/validation.ts index 00b7b1b0e0..3ed4da24ab 100644 --- a/services/ui-src/src/measures/2023/CCWAD/validation.ts +++ b/services/ui-src/src/measures/2023/CCWAD/validation.ts @@ -38,6 +38,8 @@ const CCWADValidation = (data: FormData) => { ...GV.validateEqualCategoryDenominatorsPM(data, PMD.categories, ageGroups), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateDateRangeRadioButtonCompletion(data), ...GV.validateBothDatesCompleted(dateRange), ...GV.validateYearFormat(dateRange), diff --git a/services/ui-src/src/measures/2023/CCWCH/index.test.tsx b/services/ui-src/src/measures/2023/CCWCH/index.test.tsx index f05e96cdb5..2eeb23f2ee 100644 --- a/services/ui-src/src/measures/2023/CCWCH/index.test.tsx +++ b/services/ui-src/src/measures/2023/CCWCH/index.test.tsx @@ -183,6 +183,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateOneQualRateHigherThanOtherQualPM).not.toHaveBeenCalled(); expect(V.validateOneQualRateHigherThanOtherQualOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -205,6 +207,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateOneQualRateHigherThanOtherQualPM).toHaveBeenCalled(); expect(V.validateOneQualRateHigherThanOtherQualOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/CCWCH/validation.ts b/services/ui-src/src/measures/2023/CCWCH/validation.ts index 65b1ebbf4c..3b41c236b3 100644 --- a/services/ui-src/src/measures/2023/CCWCH/validation.ts +++ b/services/ui-src/src/measures/2023/CCWCH/validation.ts @@ -36,6 +36,8 @@ const CCWCHValidation = (data: FormData) => { ...GV.validateRateNotZeroPM(performanceMeasureArray, OPM, ageGroups), ...GV.validateRateZeroPM(performanceMeasureArray, OPM, ageGroups, data), ...GV.validateOPMRates(OPM), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateOneQualRateHigherThanOtherQualPM(data, PMD), ...GV.omsValidations({ data, diff --git a/services/ui-src/src/measures/2023/CDFAD/index.test.tsx b/services/ui-src/src/measures/2023/CDFAD/index.test.tsx index 92d0dc2bc0..9d037ad7a8 100644 --- a/services/ui-src/src/measures/2023/CDFAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/CDFAD/index.test.tsx @@ -180,6 +180,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).not.toHaveBeenCalled(); expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -199,6 +201,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).toHaveBeenCalled(); expect(V.validateRateZeroOMS).toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/CDFAD/validation.ts b/services/ui-src/src/measures/2023/CDFAD/validation.ts index 85968088c9..b9490dfddc 100644 --- a/services/ui-src/src/measures/2023/CDFAD/validation.ts +++ b/services/ui-src/src/measures/2023/CDFAD/validation.ts @@ -49,6 +49,8 @@ const CDFADValidation = (data: FormData) => { ...GV.validateBothDatesCompleted(dateRange), ...GV.validateYearFormat(dateRange), ...GV.validateOPMRates(OPM), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.omsValidations({ data, qualifiers: PMD.qualifiers, diff --git a/services/ui-src/src/measures/2023/CDFCH/index.test.tsx b/services/ui-src/src/measures/2023/CDFCH/index.test.tsx index e306da4c8d..1cd23c4209 100644 --- a/services/ui-src/src/measures/2023/CDFCH/index.test.tsx +++ b/services/ui-src/src/measures/2023/CDFCH/index.test.tsx @@ -183,6 +183,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateOneQualRateHigherThanOtherQualPM).not.toHaveBeenCalled(); expect(V.validateOneQualRateHigherThanOtherQualOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -205,6 +207,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateOneQualRateHigherThanOtherQualPM).not.toHaveBeenCalled(); expect(V.validateOneQualRateHigherThanOtherQualOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/CDFCH/validation.ts b/services/ui-src/src/measures/2023/CDFCH/validation.ts index deb7ba1abb..4c073641ea 100644 --- a/services/ui-src/src/measures/2023/CDFCH/validation.ts +++ b/services/ui-src/src/measures/2023/CDFCH/validation.ts @@ -49,6 +49,8 @@ const CDFCHValidation = (data: FormData) => { ...GV.validateBothDatesCompleted(dateRange), ...GV.validateYearFormat(dateRange), ...GV.validateOPMRates(OPM), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.omsValidations({ data, qualifiers: PMD.qualifiers, diff --git a/services/ui-src/src/measures/2023/CDFHH/index.test.tsx b/services/ui-src/src/measures/2023/CDFHH/index.test.tsx index 36959e6978..520875835d 100644 --- a/services/ui-src/src/measures/2023/CDFHH/index.test.tsx +++ b/services/ui-src/src/measures/2023/CDFHH/index.test.tsx @@ -182,6 +182,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -202,6 +204,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).toHaveBeenCalled(); expect(V.validateOMSTotalNDR).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/CDFHH/validation.ts b/services/ui-src/src/measures/2023/CDFHH/validation.ts index e4afdde06c..ae7729ab8a 100644 --- a/services/ui-src/src/measures/2023/CDFHH/validation.ts +++ b/services/ui-src/src/measures/2023/CDFHH/validation.ts @@ -35,6 +35,8 @@ const CDFHHValidation = (data: FormData) => { ...GV.validateBothDatesCompleted(dateRange), ...GV.validateYearFormat(dateRange), ...GV.validateOPMRates(OPM), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), // Performance Measure Validations ...GV.validateAtLeastOneRateComplete( diff --git a/services/ui-src/src/measures/2023/CHLAD/index.test.tsx b/services/ui-src/src/measures/2023/CHLAD/index.test.tsx index 08bbd00245..c4753fa975 100644 --- a/services/ui-src/src/measures/2023/CHLAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/CHLAD/index.test.tsx @@ -179,6 +179,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).not.toHaveBeenCalled(); expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -197,6 +199,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).toHaveBeenCalled(); expect(V.validateRateZeroOMS).toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/CHLAD/validation.ts b/services/ui-src/src/measures/2023/CHLAD/validation.ts index 64eaed47e5..ba2a14976f 100644 --- a/services/ui-src/src/measures/2023/CHLAD/validation.ts +++ b/services/ui-src/src/measures/2023/CHLAD/validation.ts @@ -41,6 +41,8 @@ const CHLValidation = (data: FormData) => { ...GV.validateBothDatesCompleted(dateRange), ...GV.validateYearFormat(dateRange), ...GV.validateHedisYear(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateOPMRates(OPM), ...GV.omsValidations({ data, diff --git a/services/ui-src/src/measures/2023/CHLCH/index.test.tsx b/services/ui-src/src/measures/2023/CHLCH/index.test.tsx index 7b527549c2..a97e3f730b 100644 --- a/services/ui-src/src/measures/2023/CHLCH/index.test.tsx +++ b/services/ui-src/src/measures/2023/CHLCH/index.test.tsx @@ -183,6 +183,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateOneQualRateHigherThanOtherQualPM).not.toHaveBeenCalled(); expect(V.validateOneQualRateHigherThanOtherQualOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -205,6 +207,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateOneQualRateHigherThanOtherQualPM).not.toHaveBeenCalled(); expect(V.validateOneQualRateHigherThanOtherQualOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(33000); diff --git a/services/ui-src/src/measures/2023/CHLCH/validation.ts b/services/ui-src/src/measures/2023/CHLCH/validation.ts index 64eaed47e5..ba2a14976f 100644 --- a/services/ui-src/src/measures/2023/CHLCH/validation.ts +++ b/services/ui-src/src/measures/2023/CHLCH/validation.ts @@ -41,6 +41,8 @@ const CHLValidation = (data: FormData) => { ...GV.validateBothDatesCompleted(dateRange), ...GV.validateYearFormat(dateRange), ...GV.validateHedisYear(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateOPMRates(OPM), ...GV.omsValidations({ data, diff --git a/services/ui-src/src/measures/2023/CISCH/index.test.tsx b/services/ui-src/src/measures/2023/CISCH/index.test.tsx index 22b737e07d..c214df9a4e 100644 --- a/services/ui-src/src/measures/2023/CISCH/index.test.tsx +++ b/services/ui-src/src/measures/2023/CISCH/index.test.tsx @@ -185,6 +185,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateOneQualRateHigherThanOtherQualOMS).not.toHaveBeenCalled(); expect(V.validateEqualCategoryDenominatorsPM).not.toHaveBeenCalled(); expect(V.validateEqualCategoryDenominatorsOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -208,6 +210,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateOneQualRateHigherThanOtherQualOMS).not.toHaveBeenCalled(); expect(V.validateEqualCategoryDenominatorsPM).toHaveBeenCalled(); expect(V.validateEqualCategoryDenominatorsOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(44000); diff --git a/services/ui-src/src/measures/2023/CISCH/validation.ts b/services/ui-src/src/measures/2023/CISCH/validation.ts index 8cc98f2865..05ca134777 100644 --- a/services/ui-src/src/measures/2023/CISCH/validation.ts +++ b/services/ui-src/src/measures/2023/CISCH/validation.ts @@ -50,6 +50,8 @@ const CISCHValidation = (data: FormData) => { ), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateNumeratorsLessThanDenominatorsPM( performanceMeasureArray, OPM, diff --git a/services/ui-src/src/measures/2023/COBAD/index.test.tsx b/services/ui-src/src/measures/2023/COBAD/index.test.tsx index 81ef6a7ebb..43dfe6191f 100644 --- a/services/ui-src/src/measures/2023/COBAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/COBAD/index.test.tsx @@ -181,6 +181,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -201,6 +203,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateZeroOMS).toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsOMS).toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/COBAD/validation.ts b/services/ui-src/src/measures/2023/COBAD/validation.ts index a8cd47e3a5..ca0fe5b7ce 100644 --- a/services/ui-src/src/measures/2023/COBAD/validation.ts +++ b/services/ui-src/src/measures/2023/COBAD/validation.ts @@ -47,6 +47,8 @@ const COBADValidation = (data: FormData) => { ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), ...GV.validateDateRangeRadioButtonCompletion(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateBothDatesCompleted(dateRange), ...GV.validateYearFormat(dateRange), ...GV.validateOPMRates(OPM), diff --git a/services/ui-src/src/measures/2023/COLAD/index.test.tsx b/services/ui-src/src/measures/2023/COLAD/index.test.tsx index 01a5a8ac91..e0aeca1ccc 100644 --- a/services/ui-src/src/measures/2023/COLAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/COLAD/index.test.tsx @@ -180,6 +180,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -199,6 +201,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateZeroOMS).toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsOMS).toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/COLAD/validation.ts b/services/ui-src/src/measures/2023/COLAD/validation.ts index eb12ff14b4..5c4441f170 100644 --- a/services/ui-src/src/measures/2023/COLAD/validation.ts +++ b/services/ui-src/src/measures/2023/COLAD/validation.ts @@ -48,6 +48,8 @@ const COLADValidation = (data: FormData) => { ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), ...GV.validateDateRangeRadioButtonCompletion(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateBothDatesCompleted(dateRange), ...GV.validateYearFormat(dateRange), ...GV.validateHedisYear(data), diff --git a/services/ui-src/src/measures/2023/COLHH/index.test.tsx b/services/ui-src/src/measures/2023/COLHH/index.test.tsx index dca951fe63..5e388d6d4c 100644 --- a/services/ui-src/src/measures/2023/COLHH/index.test.tsx +++ b/services/ui-src/src/measures/2023/COLHH/index.test.tsx @@ -182,6 +182,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -202,6 +204,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/COLHH/validation.ts b/services/ui-src/src/measures/2023/COLHH/validation.ts index 6801a8a52d..cca148a82e 100644 --- a/services/ui-src/src/measures/2023/COLHH/validation.ts +++ b/services/ui-src/src/measures/2023/COLHH/validation.ts @@ -51,6 +51,8 @@ const COLHHValidation = (data: FormData) => { ...GV.validateBothDatesCompleted(dateRange), ...GV.validateYearFormat(dateRange), ...GV.validateHedisYear(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateOPMRates(OPM), ...GV.omsValidations({ data, diff --git a/services/ui-src/src/measures/2023/CPUAD/index.test.tsx b/services/ui-src/src/measures/2023/CPUAD/index.test.tsx index ba00b48eed..8aae72ad18 100644 --- a/services/ui-src/src/measures/2023/CPUAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/CPUAD/index.test.tsx @@ -180,6 +180,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateAtLeastOneDeviationFieldFilled).not.toHaveBeenCalled(); expect(V.validateOneCatRateHigherThanOtherCatPM).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -197,6 +199,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateAtLeastOneDeviationFieldFilled).toHaveBeenCalled(); expect(V.validateOneCatRateHigherThanOtherCatPM).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); it("should not allow non state users to edit forms by disabling buttons", async () => { diff --git a/services/ui-src/src/measures/2023/CPUAD/validation.ts b/services/ui-src/src/measures/2023/CPUAD/validation.ts index 217c9d0b6a..97f2ddcec0 100644 --- a/services/ui-src/src/measures/2023/CPUAD/validation.ts +++ b/services/ui-src/src/measures/2023/CPUAD/validation.ts @@ -36,7 +36,8 @@ const CPUADValidation = (data: FormData) => { ...GV.validateRateZeroPM(performanceMeasureArray, OPM, carePlans, data), ...GV.validateEqualCategoryDenominatorsPM(data, PMD.categories, carePlans), ...GV.validateOneQualRateHigherThanOtherQualPM(data, PMD), - + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateRequiredRadioButtonForCombinedRates(data), ...GV.validateDateRangeRadioButtonCompletion(data), ...GV.validateBothDatesCompleted(dateRange), diff --git a/services/ui-src/src/measures/2023/DEVCH/index.test.tsx b/services/ui-src/src/measures/2023/DEVCH/index.test.tsx index da26ba5a0e..2ef26f8545 100644 --- a/services/ui-src/src/measures/2023/DEVCH/index.test.tsx +++ b/services/ui-src/src/measures/2023/DEVCH/index.test.tsx @@ -187,6 +187,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateEqualCategoryDenominatorsOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -212,6 +214,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateEqualCategoryDenominatorsOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).toHaveBeenCalled(); expect(V.validateOMSTotalNDR).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(33000); diff --git a/services/ui-src/src/measures/2023/DEVCH/validation.ts b/services/ui-src/src/measures/2023/DEVCH/validation.ts index f5406dae47..3ea86d2436 100644 --- a/services/ui-src/src/measures/2023/DEVCH/validation.ts +++ b/services/ui-src/src/measures/2023/DEVCH/validation.ts @@ -51,6 +51,8 @@ const DEVCHValidation = (data: FormData) => { ...GV.validateOPMRates(OPM), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateAtLeastOneDeviationFieldFilled( didCalculationsDeviate, deviationReason diff --git a/services/ui-src/src/measures/2023/FUAAD/index.test.tsx b/services/ui-src/src/measures/2023/FUAAD/index.test.tsx index 13416cb0a9..87836f3fa0 100644 --- a/services/ui-src/src/measures/2023/FUAAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/FUAAD/index.test.tsx @@ -183,6 +183,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -205,6 +207,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateZeroOMS).toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsOMS).toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/FUAAD/validation.ts b/services/ui-src/src/measures/2023/FUAAD/validation.ts index 051e2efe57..561b55ccc2 100644 --- a/services/ui-src/src/measures/2023/FUAAD/validation.ts +++ b/services/ui-src/src/measures/2023/FUAAD/validation.ts @@ -51,6 +51,8 @@ const FUAADValidation = (data: FormData) => { ...GV.validateOneCatRateHigherThanOtherCatPM(data, PMD.data), ...GV.validateRequiredRadioButtonForCombinedRates(data), ...GV.validateDateRangeRadioButtonCompletion(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateBothDatesCompleted(dateRange), ...GV.validateYearFormat(dateRange), ...GV.validateHedisYear(data), diff --git a/services/ui-src/src/measures/2023/FUACH/index.test.tsx b/services/ui-src/src/measures/2023/FUACH/index.test.tsx index 4356563e6f..ab47ead163 100644 --- a/services/ui-src/src/measures/2023/FUACH/index.test.tsx +++ b/services/ui-src/src/measures/2023/FUACH/index.test.tsx @@ -187,6 +187,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateEqualCategoryDenominatorsOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -212,6 +214,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateEqualCategoryDenominatorsOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(33000); diff --git a/services/ui-src/src/measures/2023/FUACH/validation.ts b/services/ui-src/src/measures/2023/FUACH/validation.ts index acf57544da..b0d668b83d 100644 --- a/services/ui-src/src/measures/2023/FUACH/validation.ts +++ b/services/ui-src/src/measures/2023/FUACH/validation.ts @@ -44,6 +44,8 @@ const FUACHValidation = (data: FormData) => { ...GV.validateOPMRates(OPM), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateAtLeastOneDeviationFieldFilled( didCalculationsDeviate, deviationReason diff --git a/services/ui-src/src/measures/2023/FUAHH/index.test.tsx b/services/ui-src/src/measures/2023/FUAHH/index.test.tsx index 5101bbc702..b2b1a3e254 100644 --- a/services/ui-src/src/measures/2023/FUAHH/index.test.tsx +++ b/services/ui-src/src/measures/2023/FUAHH/index.test.tsx @@ -182,6 +182,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -202,6 +204,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).toHaveBeenCalled(); expect(V.validateOMSTotalNDR).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/FUAHH/validation.ts b/services/ui-src/src/measures/2023/FUAHH/validation.ts index b28c7b8a31..7cd9484e54 100644 --- a/services/ui-src/src/measures/2023/FUAHH/validation.ts +++ b/services/ui-src/src/measures/2023/FUAHH/validation.ts @@ -34,6 +34,8 @@ const FUAHHValidation = (data: FormData) => { ...GV.validateBothDatesCompleted(dateRange), ...GV.validateYearFormat(dateRange), ...GV.validateHedisYear(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateOPMRates(OPM), ...GV.validateAtLeastOneRateComplete( performanceMeasureArray, diff --git a/services/ui-src/src/measures/2023/FUHAD/index.test.tsx b/services/ui-src/src/measures/2023/FUHAD/index.test.tsx index a053805214..55f60ede66 100644 --- a/services/ui-src/src/measures/2023/FUHAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/FUHAD/index.test.tsx @@ -183,6 +183,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -205,6 +207,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateZeroOMS).toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/FUHAD/validation.ts b/services/ui-src/src/measures/2023/FUHAD/validation.ts index f99f1ef95b..ccf8ee7304 100644 --- a/services/ui-src/src/measures/2023/FUHAD/validation.ts +++ b/services/ui-src/src/measures/2023/FUHAD/validation.ts @@ -63,6 +63,8 @@ const FUHValidation = (data: FormData) => { ...GV.validateRateZeroPM(performanceMeasureArray, OPM, ageGroups, data), ...GV.validateRequiredRadioButtonForCombinedRates(data), ...GV.validateDateRangeRadioButtonCompletion(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateBothDatesCompleted(dateRange), ...GV.validateYearFormat(dateRange), ...GV.validateHedisYear(data), diff --git a/services/ui-src/src/measures/2023/FUHCH/index.test.tsx b/services/ui-src/src/measures/2023/FUHCH/index.test.tsx index ccb0177372..7303240404 100644 --- a/services/ui-src/src/measures/2023/FUHCH/index.test.tsx +++ b/services/ui-src/src/measures/2023/FUHCH/index.test.tsx @@ -187,6 +187,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateEqualCategoryDenominatorsOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -212,6 +214,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateEqualCategoryDenominatorsOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(33000); diff --git a/services/ui-src/src/measures/2023/FUHCH/validation.ts b/services/ui-src/src/measures/2023/FUHCH/validation.ts index e41483ce7c..8faedd4d05 100644 --- a/services/ui-src/src/measures/2023/FUHCH/validation.ts +++ b/services/ui-src/src/measures/2023/FUHCH/validation.ts @@ -63,6 +63,8 @@ const FUHValidation = (data: FormData) => { ...GV.validateOneCatRateHigherThanOtherCatPM(data, PMD), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateAtLeastOneDeviationFieldFilled( didCalculationsDeviate, deviationReason diff --git a/services/ui-src/src/measures/2023/FUHHH/index.test.tsx b/services/ui-src/src/measures/2023/FUHHH/index.test.tsx index 6e2afa9701..36d6caa748 100644 --- a/services/ui-src/src/measures/2023/FUHHH/index.test.tsx +++ b/services/ui-src/src/measures/2023/FUHHH/index.test.tsx @@ -182,6 +182,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -202,6 +204,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).toHaveBeenCalled(); expect(V.validateOMSTotalNDR).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/FUHHH/validation.ts b/services/ui-src/src/measures/2023/FUHHH/validation.ts index 0d68af4169..7295c90a8a 100644 --- a/services/ui-src/src/measures/2023/FUHHH/validation.ts +++ b/services/ui-src/src/measures/2023/FUHHH/validation.ts @@ -42,6 +42,8 @@ const FUHHHValidation = (data: FormData) => { ), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), // Performance Measure Validations ...GV.validateDualPopInformationPM( performanceMeasureArray, diff --git a/services/ui-src/src/measures/2023/FUMAD/index.test.tsx b/services/ui-src/src/measures/2023/FUMAD/index.test.tsx index 60a0c80a14..3bc531dc09 100644 --- a/services/ui-src/src/measures/2023/FUMAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/FUMAD/index.test.tsx @@ -183,6 +183,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -205,6 +207,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateZeroOMS).toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/FUMAD/validation.ts b/services/ui-src/src/measures/2023/FUMAD/validation.ts index 2b5bd51876..c18e99100e 100644 --- a/services/ui-src/src/measures/2023/FUMAD/validation.ts +++ b/services/ui-src/src/measures/2023/FUMAD/validation.ts @@ -54,6 +54,8 @@ const FUMADValidation = (data: FormData) => { ...GV.validateRateZeroPM(performanceMeasureArray, OPM, ageGroups, data), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateDateRangeRadioButtonCompletion(data), ...GV.validateBothDatesCompleted(dateRange), ...GV.validateYearFormat(dateRange), diff --git a/services/ui-src/src/measures/2023/FUMCH/index.test.tsx b/services/ui-src/src/measures/2023/FUMCH/index.test.tsx index baecbe6035..847dd29ecd 100644 --- a/services/ui-src/src/measures/2023/FUMCH/index.test.tsx +++ b/services/ui-src/src/measures/2023/FUMCH/index.test.tsx @@ -187,6 +187,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateEqualCategoryDenominatorsOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -212,6 +214,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateEqualCategoryDenominatorsOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(33000); diff --git a/services/ui-src/src/measures/2023/FUMCH/validation.ts b/services/ui-src/src/measures/2023/FUMCH/validation.ts index 05aa9acd17..f48e054092 100644 --- a/services/ui-src/src/measures/2023/FUMCH/validation.ts +++ b/services/ui-src/src/measures/2023/FUMCH/validation.ts @@ -62,6 +62,8 @@ const FUMCHValidation = (data: FormData) => { ...GV.validateOneCatRateHigherThanOtherCatPM(data, PMD), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateAtLeastOneDeviationFieldFilled( didCalculationsDeviate, deviationReason diff --git a/services/ui-src/src/measures/2023/FUMHH/index.test.tsx b/services/ui-src/src/measures/2023/FUMHH/index.test.tsx index 59cccdfd11..474b63b3c0 100644 --- a/services/ui-src/src/measures/2023/FUMHH/index.test.tsx +++ b/services/ui-src/src/measures/2023/FUMHH/index.test.tsx @@ -182,6 +182,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -202,6 +204,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).toHaveBeenCalled(); expect(V.validateOMSTotalNDR).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/FUMHH/validation.ts b/services/ui-src/src/measures/2023/FUMHH/validation.ts index d5a78ac289..5c039d2d5d 100644 --- a/services/ui-src/src/measures/2023/FUMHH/validation.ts +++ b/services/ui-src/src/measures/2023/FUMHH/validation.ts @@ -38,6 +38,8 @@ const FUMHHValidation = (data: FormData) => { ...GV.validateYearFormat(dateRange), ...GV.validateHedisYear(data), ...GV.validateOPMRates(OPM), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), // Performance Measure Validations ...GV.validateAtLeastOneDeviationFieldFilled( diff --git a/services/ui-src/src/measures/2023/FVAAD/index.test.tsx b/services/ui-src/src/measures/2023/FVAAD/index.test.tsx index 1fc4413eaf..0a164ea541 100644 --- a/services/ui-src/src/measures/2023/FVAAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/FVAAD/index.test.tsx @@ -182,6 +182,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).not.toHaveBeenCalled(); expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -203,6 +205,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).toHaveBeenCalled(); expect(V.validateRateZeroOMS).toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/FVAAD/validation.ts b/services/ui-src/src/measures/2023/FVAAD/validation.ts index 1efcffe8c9..343433b1cf 100644 --- a/services/ui-src/src/measures/2023/FVAAD/validation.ts +++ b/services/ui-src/src/measures/2023/FVAAD/validation.ts @@ -40,6 +40,8 @@ const FVAADValidation = (data: FormData) => { ...GV.validateYearFormat(dateRange), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateYearFormat(dateRange), ...GV.validateHedisYear(data), ...GV.validateOPMRates(OPM), diff --git a/services/ui-src/src/measures/2023/HBDAD/index.test.tsx b/services/ui-src/src/measures/2023/HBDAD/index.test.tsx index 9fc38814c1..a938aa5a02 100644 --- a/services/ui-src/src/measures/2023/HBDAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/HBDAD/index.test.tsx @@ -179,6 +179,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).not.toHaveBeenCalled(); expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -197,6 +199,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).toHaveBeenCalled(); expect(V.validateRateZeroOMS).toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/HBDAD/validation.ts b/services/ui-src/src/measures/2023/HBDAD/validation.ts index 816a7b87e4..805b1b6bdf 100644 --- a/services/ui-src/src/measures/2023/HBDAD/validation.ts +++ b/services/ui-src/src/measures/2023/HBDAD/validation.ts @@ -59,6 +59,8 @@ const HBDADValidation = (data: FormData) => { ), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateNumeratorsLessThanDenominatorsPM( performanceMeasureArray, OPM, diff --git a/services/ui-src/src/measures/2023/HPCMIAD/index.test.tsx b/services/ui-src/src/measures/2023/HPCMIAD/index.test.tsx index a9a402561b..02f1423621 100644 --- a/services/ui-src/src/measures/2023/HPCMIAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/HPCMIAD/index.test.tsx @@ -180,6 +180,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateDualPopInformationPM).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -199,6 +201,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateZeroOMS).toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateDualPopInformationPM).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/HPCMIAD/validation.ts b/services/ui-src/src/measures/2023/HPCMIAD/validation.ts index 75a92c29d7..9bd01ff25e 100644 --- a/services/ui-src/src/measures/2023/HPCMIAD/validation.ts +++ b/services/ui-src/src/measures/2023/HPCMIAD/validation.ts @@ -50,6 +50,8 @@ const HPCMIADValidation = (data: FormData) => { ...GV.validateOPMRates(OPM), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateAtLeastOneDeviationFieldFilled( didCalculationsDeviate, deviationReason diff --git a/services/ui-src/src/measures/2023/HVLAD/index.test.tsx b/services/ui-src/src/measures/2023/HVLAD/index.test.tsx index 013c1b2872..77ba43974a 100644 --- a/services/ui-src/src/measures/2023/HVLAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/HVLAD/index.test.tsx @@ -183,6 +183,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -205,6 +207,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateZeroOMS).toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/HVLAD/validation.ts b/services/ui-src/src/measures/2023/HVLAD/validation.ts index d75552a6f2..c834768c87 100644 --- a/services/ui-src/src/measures/2023/HVLAD/validation.ts +++ b/services/ui-src/src/measures/2023/HVLAD/validation.ts @@ -65,6 +65,8 @@ const HVLADValidation = (data: FormData) => { ...GV.validateOPMRates(OPM), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateAtLeastOneDeviationFieldFilled( didCalculationsDeviate, deviationReason diff --git a/services/ui-src/src/measures/2023/IETAD/index.test.tsx b/services/ui-src/src/measures/2023/IETAD/index.test.tsx index cb10ac8a6c..12c0e5eaef 100644 --- a/services/ui-src/src/measures/2023/IETAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/IETAD/index.test.tsx @@ -183,6 +183,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsPM).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -205,6 +207,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateZeroOMS).toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsPM).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/IETAD/validation.ts b/services/ui-src/src/measures/2023/IETAD/validation.ts index 98ce377daa..057d148c2b 100644 --- a/services/ui-src/src/measures/2023/IETAD/validation.ts +++ b/services/ui-src/src/measures/2023/IETAD/validation.ts @@ -100,6 +100,8 @@ const IETValidation = (data: FormData) => { ...GV.validateOPMRates(OPM), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateAtLeastOneDeviationFieldFilled( didCalculationsDeviate, deviationReason diff --git a/services/ui-src/src/measures/2023/IETHH/index.test.tsx b/services/ui-src/src/measures/2023/IETHH/index.test.tsx index 2ee60a82f7..a2e5c5ecdd 100644 --- a/services/ui-src/src/measures/2023/IETHH/index.test.tsx +++ b/services/ui-src/src/measures/2023/IETHH/index.test.tsx @@ -182,6 +182,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -202,6 +204,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).toHaveBeenCalled(); expect(V.validateOMSTotalNDR).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/IETHH/validation.ts b/services/ui-src/src/measures/2023/IETHH/validation.ts index ce2e48a607..607af786b6 100644 --- a/services/ui-src/src/measures/2023/IETHH/validation.ts +++ b/services/ui-src/src/measures/2023/IETHH/validation.ts @@ -101,6 +101,8 @@ const IETValidation = (data: FormData) => { ...GV.validateOPMRates(OPM), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateAtLeastOneDeviationFieldFilled( didCalculationsDeviate, deviationReason diff --git a/services/ui-src/src/measures/2023/IMACH/index.test.tsx b/services/ui-src/src/measures/2023/IMACH/index.test.tsx index a4256fa350..01057411cd 100644 --- a/services/ui-src/src/measures/2023/IMACH/index.test.tsx +++ b/services/ui-src/src/measures/2023/IMACH/index.test.tsx @@ -187,6 +187,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateEqualCategoryDenominatorsOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -212,6 +214,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateEqualCategoryDenominatorsOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(33000); diff --git a/services/ui-src/src/measures/2023/IMACH/validation.ts b/services/ui-src/src/measures/2023/IMACH/validation.ts index 2217456c82..617903842a 100644 --- a/services/ui-src/src/measures/2023/IMACH/validation.ts +++ b/services/ui-src/src/measures/2023/IMACH/validation.ts @@ -52,6 +52,8 @@ const DEVCHValidation = (data: FormData) => { ...GV.validateOPMRates(OPM), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateAtLeastOneDeviationFieldFilled( didCalculationsDeviate, deviationReason diff --git a/services/ui-src/src/measures/2023/IUHH/index.test.tsx b/services/ui-src/src/measures/2023/IUHH/index.test.tsx index 47b0936783..057dabb58b 100644 --- a/services/ui-src/src/measures/2023/IUHH/index.test.tsx +++ b/services/ui-src/src/measures/2023/IUHH/index.test.tsx @@ -180,6 +180,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.ComplexValidateNDRTotals).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -192,6 +194,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateAtLeastOneDataSource).toHaveBeenCalled(); expect(V.validateAtLeastOneDataSourceType).toHaveBeenCalled(); expect(V.ComplexValidateNDRTotals).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/IUHH/validation.ts b/services/ui-src/src/measures/2023/IUHH/validation.ts index 80d11354d1..d616129a5b 100644 --- a/services/ui-src/src/measures/2023/IUHH/validation.ts +++ b/services/ui-src/src/measures/2023/IUHH/validation.ts @@ -48,6 +48,8 @@ const IUHHValidation = (data: FormData) => { ...GV.validateRequiredRadioButtonForCombinedRates(data), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateDateRangeRadioButtonCompletion(data), ...GV.validateBothDatesCompleted(dateRange), ...GV.validateYearFormat(dateRange), diff --git a/services/ui-src/src/measures/2023/LSCCH/index.test.tsx b/services/ui-src/src/measures/2023/LSCCH/index.test.tsx index b68ca1b936..b1058283d6 100644 --- a/services/ui-src/src/measures/2023/LSCCH/index.test.tsx +++ b/services/ui-src/src/measures/2023/LSCCH/index.test.tsx @@ -190,6 +190,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateEqualCategoryDenominatorsOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -215,6 +217,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateEqualCategoryDenominatorsOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).toHaveBeenCalled(); expect(V.validateOMSTotalNDR).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(33000); diff --git a/services/ui-src/src/measures/2023/LSCCH/validation.ts b/services/ui-src/src/measures/2023/LSCCH/validation.ts index 365294a86c..c4ec2d64f4 100644 --- a/services/ui-src/src/measures/2023/LSCCH/validation.ts +++ b/services/ui-src/src/measures/2023/LSCCH/validation.ts @@ -26,6 +26,8 @@ const LSCCHValidation = (data: FormData) => { ...GV.validateHedisYear(data), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateAtLeastOneDeviationFieldFilled( didCalculationsDeviate, deviationReason diff --git a/services/ui-src/src/measures/2023/MSCAD/index.test.tsx b/services/ui-src/src/measures/2023/MSCAD/index.test.tsx index a770411243..8d78d6ff9e 100644 --- a/services/ui-src/src/measures/2023/MSCAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/MSCAD/index.test.tsx @@ -180,6 +180,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).not.toHaveBeenCalled(); expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -199,6 +201,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).toHaveBeenCalled(); expect(V.validateRateZeroOMS).toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/MSCAD/validation.ts b/services/ui-src/src/measures/2023/MSCAD/validation.ts index 1539a2ae42..4ea28874c9 100644 --- a/services/ui-src/src/measures/2023/MSCAD/validation.ts +++ b/services/ui-src/src/measures/2023/MSCAD/validation.ts @@ -49,6 +49,8 @@ const MSCADValidation = (data: Types.DefaultFormData) => { ...GV.validateRateZeroPM(performanceMeasureArray, OPM, ageGroups, data), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateAtLeastOneDeviationFieldFilled( didCalculationsDeviate, deviationReason diff --git a/services/ui-src/src/measures/2023/OEVCH/index.test.tsx b/services/ui-src/src/measures/2023/OEVCH/index.test.tsx index 760ae501f9..4fbcfec33a 100644 --- a/services/ui-src/src/measures/2023/OEVCH/index.test.tsx +++ b/services/ui-src/src/measures/2023/OEVCH/index.test.tsx @@ -187,6 +187,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateEqualCategoryDenominatorsOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -212,6 +214,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateEqualCategoryDenominatorsOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).toHaveBeenCalled(); expect(V.validateOMSTotalNDR).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(33000); diff --git a/services/ui-src/src/measures/2023/OEVCH/validation.ts b/services/ui-src/src/measures/2023/OEVCH/validation.ts index 8192b1f3fc..45c7a8c3e8 100644 --- a/services/ui-src/src/measures/2023/OEVCH/validation.ts +++ b/services/ui-src/src/measures/2023/OEVCH/validation.ts @@ -31,6 +31,8 @@ const OEVCHValidation = (data: FormData) => { deviationReason ), ...GV.validateRequiredRadioButtonForCombinedRates(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), // Performance Measure Validations ...GV.validateAtLeastOneRateComplete( diff --git a/services/ui-src/src/measures/2023/OHDAD/index.test.tsx b/services/ui-src/src/measures/2023/OHDAD/index.test.tsx index ebec25e22e..a174ddafc2 100644 --- a/services/ui-src/src/measures/2023/OHDAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/OHDAD/index.test.tsx @@ -182,6 +182,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -202,6 +204,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/OHDAD/validation.ts b/services/ui-src/src/measures/2023/OHDAD/validation.ts index 3b9cd67e91..a76cd9aaa0 100644 --- a/services/ui-src/src/measures/2023/OHDAD/validation.ts +++ b/services/ui-src/src/measures/2023/OHDAD/validation.ts @@ -48,6 +48,8 @@ const OHDValidation = (data: FormData) => { ...GV.validateOPMRates(OPM), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.omsValidations({ data, qualifiers: PMD.qualifiers, diff --git a/services/ui-src/src/measures/2023/OUDAD/index.test.tsx b/services/ui-src/src/measures/2023/OUDAD/index.test.tsx index e7d72a51e5..09baa5162f 100644 --- a/services/ui-src/src/measures/2023/OUDAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/OUDAD/index.test.tsx @@ -185,6 +185,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateEqualCategoryDenominatorsPM).not.toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsOMS).not.toHaveBeenCalled(); expect(V.validateEqualCategoryDenominatorsOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -208,6 +210,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateEqualCategoryDenominatorsPM).toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsOMS).toHaveBeenCalled(); expect(V.validateEqualCategoryDenominatorsOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/OUDAD/validation.ts b/services/ui-src/src/measures/2023/OUDAD/validation.ts index 16534f4466..584db68b94 100644 --- a/services/ui-src/src/measures/2023/OUDAD/validation.ts +++ b/services/ui-src/src/measures/2023/OUDAD/validation.ts @@ -44,6 +44,8 @@ const OUDValidation = (data: FormData) => { ...GV.validateRequiredRadioButtonForCombinedRates(data), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateEqualCategoryDenominatorsPM(data, PMD.categories, ageGroups), ...GV.omsValidations({ data, diff --git a/services/ui-src/src/measures/2023/OUDHH/index.test.tsx b/services/ui-src/src/measures/2023/OUDHH/index.test.tsx index c87f415bfd..17bd78a498 100644 --- a/services/ui-src/src/measures/2023/OUDHH/index.test.tsx +++ b/services/ui-src/src/measures/2023/OUDHH/index.test.tsx @@ -182,6 +182,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -202,6 +204,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/OUDHH/validation.ts b/services/ui-src/src/measures/2023/OUDHH/validation.ts index 1357089f5e..bc63299b85 100644 --- a/services/ui-src/src/measures/2023/OUDHH/validation.ts +++ b/services/ui-src/src/measures/2023/OUDHH/validation.ts @@ -43,6 +43,8 @@ const OUDValidation = (data: FormData) => { ...GV.validateRequiredRadioButtonForCombinedRates(data), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateEqualCategoryDenominatorsPM(data, PMD.categories, ageGroups), ...GV.validateRateZeroPM(performanceMeasureArray, OPM, ageGroups, data), ...GV.validateRateNotZeroPM(performanceMeasureArray, OPM, ageGroups), diff --git a/services/ui-src/src/measures/2023/PCRAD/index.test.tsx b/services/ui-src/src/measures/2023/PCRAD/index.test.tsx index 15209924e5..397e01beb0 100644 --- a/services/ui-src/src/measures/2023/PCRAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/PCRAD/index.test.tsx @@ -181,6 +181,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.PCRnoNonZeroNumOrDenom).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -200,6 +202,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.PCRnoNonZeroNumOrDenom).toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/PCRAD/validation.ts b/services/ui-src/src/measures/2023/PCRAD/validation.ts index f597c4f47f..b960c34aba 100644 --- a/services/ui-src/src/measures/2023/PCRAD/validation.ts +++ b/services/ui-src/src/measures/2023/PCRAD/validation.ts @@ -53,6 +53,8 @@ const PCRADValidation = (data: FormData) => { ...GV.validateRequiredRadioButtonForCombinedRates(data), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), // Performance Measure Validations ...GV.PCRatLeastOneRateComplete(performanceMeasureArray, OPM, ageGroups), diff --git a/services/ui-src/src/measures/2023/PCRHH/index.test.tsx b/services/ui-src/src/measures/2023/PCRHH/index.test.tsx index f9adbc8d5b..60af42f98d 100644 --- a/services/ui-src/src/measures/2023/PCRHH/index.test.tsx +++ b/services/ui-src/src/measures/2023/PCRHH/index.test.tsx @@ -180,6 +180,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.ComplexValidateNDRTotals).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -192,6 +194,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateAtLeastOneDataSource).toHaveBeenCalled(); expect(V.validateAtLeastOneDataSourceType).toHaveBeenCalled(); expect(V.ComplexValidateNDRTotals).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/PCRHH/validation.ts b/services/ui-src/src/measures/2023/PCRHH/validation.ts index f1ffd3dcec..3250c7a3d6 100644 --- a/services/ui-src/src/measures/2023/PCRHH/validation.ts +++ b/services/ui-src/src/measures/2023/PCRHH/validation.ts @@ -53,6 +53,9 @@ const PCRHHValidation = (data: FormData) => { ...GV.validateYearFormat(dateRange), ...GV.validateHedisYear(data), ...GV.validateOPMRates(OPM), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), + // Performance Measure Validations ...GV.PCRatLeastOneRateComplete(performanceMeasureArray, OPM, ageGroups), ...GV.PCRnoNonZeroNumOrDenom(performanceMeasureArray, OPM, ndrForumlas), diff --git a/services/ui-src/src/measures/2023/PPCAD/index.test.tsx b/services/ui-src/src/measures/2023/PPCAD/index.test.tsx index 7e450ce468..5bd95d2f93 100644 --- a/services/ui-src/src/measures/2023/PPCAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/PPCAD/index.test.tsx @@ -182,6 +182,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -202,6 +204,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/PPCAD/validation.ts b/services/ui-src/src/measures/2023/PPCAD/validation.ts index b9b2ce15ea..94b41c430f 100644 --- a/services/ui-src/src/measures/2023/PPCAD/validation.ts +++ b/services/ui-src/src/measures/2023/PPCAD/validation.ts @@ -50,6 +50,8 @@ const PPCADValidation = (data: FormData) => { ), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateNumeratorsLessThanDenominatorsPM( performanceMeasureArray, OPM, diff --git a/services/ui-src/src/measures/2023/PPCCH/index.test.tsx b/services/ui-src/src/measures/2023/PPCCH/index.test.tsx index 6ecfccac02..cea56f79b4 100644 --- a/services/ui-src/src/measures/2023/PPCCH/index.test.tsx +++ b/services/ui-src/src/measures/2023/PPCCH/index.test.tsx @@ -183,6 +183,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -206,6 +208,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/PPCCH/validation.ts b/services/ui-src/src/measures/2023/PPCCH/validation.ts index edc3f35857..c1a4c06be1 100644 --- a/services/ui-src/src/measures/2023/PPCCH/validation.ts +++ b/services/ui-src/src/measures/2023/PPCCH/validation.ts @@ -63,6 +63,8 @@ const PPCCHValidation = (data: FormData) => { ...GV.validateYearFormat(dateRange), ...GV.validateHedisYear(data), ...GV.validateOPMRates(OPM), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ]; return errorArray; diff --git a/services/ui-src/src/measures/2023/PQI01AD/index.test.tsx b/services/ui-src/src/measures/2023/PQI01AD/index.test.tsx index de35eb6cee..f3b7f438d2 100644 --- a/services/ui-src/src/measures/2023/PQI01AD/index.test.tsx +++ b/services/ui-src/src/measures/2023/PQI01AD/index.test.tsx @@ -182,6 +182,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -202,6 +204,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/PQI01AD/validation.ts b/services/ui-src/src/measures/2023/PQI01AD/validation.ts index 1c79f8e91c..4d06e7378a 100644 --- a/services/ui-src/src/measures/2023/PQI01AD/validation.ts +++ b/services/ui-src/src/measures/2023/PQI01AD/validation.ts @@ -59,6 +59,8 @@ const PQI01Validation = (data: FormData) => { ...GV.validateRequiredRadioButtonForCombinedRates(data), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.omsValidations({ data, qualifiers: PMD.qualifiers, diff --git a/services/ui-src/src/measures/2023/PQI05AD/index.test.tsx b/services/ui-src/src/measures/2023/PQI05AD/index.test.tsx index d70e86a0d0..1dedcfde80 100644 --- a/services/ui-src/src/measures/2023/PQI05AD/index.test.tsx +++ b/services/ui-src/src/measures/2023/PQI05AD/index.test.tsx @@ -182,6 +182,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -202,6 +204,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/PQI05AD/validation.ts b/services/ui-src/src/measures/2023/PQI05AD/validation.ts index d177faa271..0a2d786a26 100644 --- a/services/ui-src/src/measures/2023/PQI05AD/validation.ts +++ b/services/ui-src/src/measures/2023/PQI05AD/validation.ts @@ -64,6 +64,8 @@ const PQI05Validation = (data: FormData) => { ...GV.validateRequiredRadioButtonForCombinedRates(data), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.omsValidations({ data, qualifiers: PMD.qualifiers, diff --git a/services/ui-src/src/measures/2023/PQI08AD/index.test.tsx b/services/ui-src/src/measures/2023/PQI08AD/index.test.tsx index 1d9dda6ed9..c7c35811d4 100644 --- a/services/ui-src/src/measures/2023/PQI08AD/index.test.tsx +++ b/services/ui-src/src/measures/2023/PQI08AD/index.test.tsx @@ -182,6 +182,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -202,6 +204,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/PQI08AD/validation.ts b/services/ui-src/src/measures/2023/PQI08AD/validation.ts index ddd0b5e712..5f82eb243a 100644 --- a/services/ui-src/src/measures/2023/PQI08AD/validation.ts +++ b/services/ui-src/src/measures/2023/PQI08AD/validation.ts @@ -37,6 +37,8 @@ const PQI08Validation = (data: FormData) => { ...GV.validateOPMRates(OPM), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateDualPopInformationPM( validateDualPopInformationArray, OPM, diff --git a/services/ui-src/src/measures/2023/PQI15AD/index.test.tsx b/services/ui-src/src/measures/2023/PQI15AD/index.test.tsx index 57731769e7..6736dda814 100644 --- a/services/ui-src/src/measures/2023/PQI15AD/index.test.tsx +++ b/services/ui-src/src/measures/2023/PQI15AD/index.test.tsx @@ -182,6 +182,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -202,6 +204,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/PQI15AD/validation.ts b/services/ui-src/src/measures/2023/PQI15AD/validation.ts index 670cd1b973..4d9dc3a080 100644 --- a/services/ui-src/src/measures/2023/PQI15AD/validation.ts +++ b/services/ui-src/src/measures/2023/PQI15AD/validation.ts @@ -35,6 +35,8 @@ const PQI15Validation = (data: FormData) => { ...GV.validateRateZeroPM(performanceMeasureArray, OPM, ageGroups, data), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateAtLeastOneDeviationFieldFilled( didCalculationsDeviate, deviationReason diff --git a/services/ui-src/src/measures/2023/PQI92HH/index.test.tsx b/services/ui-src/src/measures/2023/PQI92HH/index.test.tsx index 0c9eedc19d..d3ceb6aecc 100644 --- a/services/ui-src/src/measures/2023/PQI92HH/index.test.tsx +++ b/services/ui-src/src/measures/2023/PQI92HH/index.test.tsx @@ -182,6 +182,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -202,6 +204,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).toHaveBeenCalled(); expect(V.validateOMSTotalNDR).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/PQI92HH/validation.ts b/services/ui-src/src/measures/2023/PQI92HH/validation.ts index 4b1264a8a6..80d629ced9 100644 --- a/services/ui-src/src/measures/2023/PQI92HH/validation.ts +++ b/services/ui-src/src/measures/2023/PQI92HH/validation.ts @@ -35,6 +35,9 @@ const PQI92Validation = (data: FormData) => { ...GV.validateBothDatesCompleted(dateRange), ...GV.validateYearFormat(dateRange), ...GV.validateOPMRates(OPM), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), + // Performance Measure Validations ...GV.validateAtLeastOneRateComplete( performanceMeasureArray, diff --git a/services/ui-src/src/measures/2023/SAAAD/index.test.tsx b/services/ui-src/src/measures/2023/SAAAD/index.test.tsx index 7c5b22f949..f24e27f8e0 100644 --- a/services/ui-src/src/measures/2023/SAAAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/SAAAD/index.test.tsx @@ -182,6 +182,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -202,6 +204,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/SAAAD/validation.ts b/services/ui-src/src/measures/2023/SAAAD/validation.ts index f7aecdb2cf..010c0349c4 100644 --- a/services/ui-src/src/measures/2023/SAAAD/validation.ts +++ b/services/ui-src/src/measures/2023/SAAAD/validation.ts @@ -35,6 +35,8 @@ const SAAADValidation = (data: FormData) => { ), ...GV.validateRateNotZeroPM(performanceMeasureArray, OPM, ageGroups), ...GV.validateRateZeroPM(performanceMeasureArray, OPM, ageGroups, data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), // OMS Validations ...GV.omsValidations({ diff --git a/services/ui-src/src/measures/2023/SFMCH/index.test.tsx b/services/ui-src/src/measures/2023/SFMCH/index.test.tsx index a5d322474f..77a6930e8a 100644 --- a/services/ui-src/src/measures/2023/SFMCH/index.test.tsx +++ b/services/ui-src/src/measures/2023/SFMCH/index.test.tsx @@ -187,6 +187,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateEqualCategoryDenominatorsPM).not.toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsOMS).not.toHaveBeenCalled(); expect(V.validateEqualCategoryDenominatorsOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -212,6 +214,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateEqualCategoryDenominatorsPM).toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsOMS).not.toHaveBeenCalled(); expect(V.validateEqualCategoryDenominatorsOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); it("should not allow non state users to edit forms by disabling buttons", async () => { diff --git a/services/ui-src/src/measures/2023/SFMCH/validation.ts b/services/ui-src/src/measures/2023/SFMCH/validation.ts index ee38628e5b..b019a4b001 100644 --- a/services/ui-src/src/measures/2023/SFMCH/validation.ts +++ b/services/ui-src/src/measures/2023/SFMCH/validation.ts @@ -52,6 +52,8 @@ const SFMCHValidation = (data: FormData) => { ...GV.validateRateZeroPM(performanceMeasureArray, OPM, ageGroups, data), ...GV.validateRequiredRadioButtonForCombinedRates(data), ...GV.validateDateRangeRadioButtonCompletion(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateBothDatesCompleted(dateRange), ...GV.validateYearFormat(dateRange), ...GV.validateOPMRates(OPM), diff --git a/services/ui-src/src/measures/2023/SSDAD/index.test.tsx b/services/ui-src/src/measures/2023/SSDAD/index.test.tsx index 73fff22fce..97aede051b 100644 --- a/services/ui-src/src/measures/2023/SSDAD/index.test.tsx +++ b/services/ui-src/src/measures/2023/SSDAD/index.test.tsx @@ -180,6 +180,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).not.toHaveBeenCalled(); expect(V.validateRateZeroOMS).not.toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -199,6 +201,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateNumeratorLessThanDenominatorOMS).toHaveBeenCalled(); expect(V.validateRateZeroOMS).toHaveBeenCalled(); expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); jest.setTimeout(15000); diff --git a/services/ui-src/src/measures/2023/SSDAD/validation.ts b/services/ui-src/src/measures/2023/SSDAD/validation.ts index 6695609d4e..4eb7bb14c4 100644 --- a/services/ui-src/src/measures/2023/SSDAD/validation.ts +++ b/services/ui-src/src/measures/2023/SSDAD/validation.ts @@ -34,6 +34,8 @@ const SSDValidation = (data: FormData) => { ), ...GV.validateRateNotZeroPM(performanceMeasureArray, OPM, ageGroups), ...GV.validateRateZeroPM(performanceMeasureArray, OPM, ageGroups, data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), // OMS Validations ...GV.omsValidations({ diff --git a/services/ui-src/src/measures/2023/TFLCH/index.test.tsx b/services/ui-src/src/measures/2023/TFLCH/index.test.tsx index d6004c88be..ed052beeca 100644 --- a/services/ui-src/src/measures/2023/TFLCH/index.test.tsx +++ b/services/ui-src/src/measures/2023/TFLCH/index.test.tsx @@ -185,6 +185,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsPM).not.toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -208,6 +210,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateOMSTotalNDR).toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsPM).toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); it("should not allow non state users to edit forms by disabling buttons", async () => { diff --git a/services/ui-src/src/measures/2023/TFLCH/validation.ts b/services/ui-src/src/measures/2023/TFLCH/validation.ts index 41fb5bd181..26deb7e607 100644 --- a/services/ui-src/src/measures/2023/TFLCH/validation.ts +++ b/services/ui-src/src/measures/2023/TFLCH/validation.ts @@ -49,6 +49,8 @@ const TFLCHValidation = (data: FormData) => { ...GV.validateOPMRates(OPM), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateTotalNDR(performanceMeasureArray), ...sameDenominatorError, ...GV.validateAtLeastOneDeviationFieldFilled( diff --git a/services/ui-src/src/measures/2023/W30CH/index.test.tsx b/services/ui-src/src/measures/2023/W30CH/index.test.tsx index f45f1e963d..89a167ddbf 100644 --- a/services/ui-src/src/measures/2023/W30CH/index.test.tsx +++ b/services/ui-src/src/measures/2023/W30CH/index.test.tsx @@ -183,6 +183,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -204,6 +206,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); it("should not allow non state users to edit forms by disabling buttons", async () => { diff --git a/services/ui-src/src/measures/2023/W30CH/validation.ts b/services/ui-src/src/measures/2023/W30CH/validation.ts index 1e12345f36..f8011ebf7f 100644 --- a/services/ui-src/src/measures/2023/W30CH/validation.ts +++ b/services/ui-src/src/measures/2023/W30CH/validation.ts @@ -57,6 +57,8 @@ const W30CHValidation = (data: FormData) => { ...GV.validateOPMRates(OPM), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateAtLeastOneDeviationFieldFilled( didCalculationsDeviate, deviationReason diff --git a/services/ui-src/src/measures/2023/WCCCH/index.test.tsx b/services/ui-src/src/measures/2023/WCCCH/index.test.tsx index e4b348d508..7476f096be 100644 --- a/services/ui-src/src/measures/2023/WCCCH/index.test.tsx +++ b/services/ui-src/src/measures/2023/WCCCH/index.test.tsx @@ -185,6 +185,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsPM).not.toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsOMS).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -208,6 +210,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateOMSTotalNDR).toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsPM).toHaveBeenCalled(); expect(V.validateEqualQualifierDenominatorsOMS).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); it("should not allow non state users to edit forms by disabling buttons", async () => { diff --git a/services/ui-src/src/measures/2023/WCCCH/validation.ts b/services/ui-src/src/measures/2023/WCCCH/validation.ts index bbb19589f5..f9ed960eca 100644 --- a/services/ui-src/src/measures/2023/WCCCH/validation.ts +++ b/services/ui-src/src/measures/2023/WCCCH/validation.ts @@ -37,6 +37,8 @@ const WCCHValidation = (data: FormData) => { errorArray = [ ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateRequiredRadioButtonForCombinedRates(data), ...GV.validateDateRangeRadioButtonCompletion(data), ...GV.validateBothDatesCompleted(dateRange), diff --git a/services/ui-src/src/measures/2023/WCVCH/index.test.tsx b/services/ui-src/src/measures/2023/WCVCH/index.test.tsx index a7bfb24a10..5d59397d26 100644 --- a/services/ui-src/src/measures/2023/WCVCH/index.test.tsx +++ b/services/ui-src/src/measures/2023/WCVCH/index.test.tsx @@ -183,6 +183,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).not.toHaveBeenCalled(); expect(V.validateTotalNDR).not.toHaveBeenCalled(); expect(V.validateOMSTotalNDR).not.toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).not.toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).not.toHaveBeenCalled(); }); it("(Completed) validationFunctions should call all expected validation functions", async () => { @@ -204,6 +206,8 @@ describe(`Test FFY ${year} ${measureAbbr}`, () => { expect(V.validateRateNotZeroOMS).toHaveBeenCalled(); expect(V.validateTotalNDR).toHaveBeenCalled(); expect(V.validateOMSTotalNDR).toHaveBeenCalled(); + expect(V.validateAtLeastOneDeliverySystem).toHaveBeenCalled(); + expect(V.validateFfsRadioButtonCompletion).toHaveBeenCalled(); }); it("should not allow non state users to edit forms by disabling buttons", async () => { diff --git a/services/ui-src/src/measures/2023/WCVCH/validation.ts b/services/ui-src/src/measures/2023/WCVCH/validation.ts index 867d39f804..907d5e3acb 100644 --- a/services/ui-src/src/measures/2023/WCVCH/validation.ts +++ b/services/ui-src/src/measures/2023/WCVCH/validation.ts @@ -50,6 +50,8 @@ const WCVCHValidation = (data: FormData) => { ), ...GV.validateAtLeastOneDataSource(data), ...GV.validateAtLeastOneDataSourceType(data), + ...GV.validateAtLeastOneDeliverySystem(data), + ...GV.validateFfsRadioButtonCompletion(data), ...GV.validateNumeratorsLessThanDenominatorsPM( performanceMeasureArray, OPM, diff --git a/services/ui-src/src/measures/2023/shared/globalValidations/index.ts b/services/ui-src/src/measures/2023/shared/globalValidations/index.ts index dab8b28caf..d4f424b411 100644 --- a/services/ui-src/src/measures/2023/shared/globalValidations/index.ts +++ b/services/ui-src/src/measures/2023/shared/globalValidations/index.ts @@ -4,6 +4,7 @@ export * as Types from "./types"; export * from "./validateAtLeastOneDataSource"; export * from "./validateAtLeastOneDataSourceType"; +export * from "./validateAtLeastOneDeliverySystem"; export * from "./validateAtLeastOneDeviationFieldFilled"; export * from "./validateAtLeastOneRateComplete"; export * from "./validateBothDatesInRange"; @@ -11,6 +12,7 @@ export * from "./validateDateRangeRadioButtonCompletion"; export * from "./validateDualPopInformation"; export * from "./validateEqualCategoryDenominators"; export * from "./validateEqualQualifierDenominators"; +export * from "./validateFfsRadioButtonCompletion"; export * from "./validateRateNotZero"; export * from "./validateRateZero"; export * from "./validateNumeratorsLessThanDenominators"; diff --git a/services/ui-src/src/measures/2023/shared/globalValidations/validateAtLeastOneDeliverySystem/index.test.ts b/services/ui-src/src/measures/2023/shared/globalValidations/validateAtLeastOneDeliverySystem/index.test.ts new file mode 100644 index 0000000000..52f188ae26 --- /dev/null +++ b/services/ui-src/src/measures/2023/shared/globalValidations/validateAtLeastOneDeliverySystem/index.test.ts @@ -0,0 +1,47 @@ +import { testFormData } from "../testHelpers/_testFormData"; +import * as DC from "dataConstants"; +import { validateAtLeastOneDeliverySystem } from "."; + +describe("validateAtLeastOneDeliverySystem", () => { + let formData: any; + let errorArray: FormError[]; + + const _check_errors = (data: any, numErrors: number) => { + errorArray = [...validateAtLeastOneDeliverySystem(data)]; + expect(errorArray.length).toBe(numErrors); + }; + + beforeEach(() => { + formData = JSON.parse(JSON.stringify(testFormData)); // reset data + errorArray = []; + }); + + it("When no Delivery System is Selected a validation warning shows", () => { + formData[DC.DELIVERY_SYS_REPRESENTATION_DENOMINATOR] = []; + _check_errors(formData, 1); + }); + + it("When a Delivery System is Selected no validation warning shows", () => { + formData[DC.DELIVERY_SYS_REPRESENTATION_DENOMINATOR] = [ + DC.DELIVERY_SYS_FFS, + ]; + _check_errors(formData, 0); + }); + + it("Error message text should match default errorMessage", () => { + formData[DC.DELIVERY_SYS_REPRESENTATION_DENOMINATOR] = []; + errorArray = [...validateAtLeastOneDeliverySystem(formData)]; + expect(errorArray.length).toBe(1); + expect(errorArray[0].errorMessage).toBe( + "You must select at least one delivery system option" + ); + }); + + it("Error message text should match provided errorMessage", () => { + formData[DC.DELIVERY_SYS_REPRESENTATION_DENOMINATOR] = []; + const errorMessage = "Another one bites the dust."; + errorArray = [...validateAtLeastOneDeliverySystem(formData, errorMessage)]; + expect(errorArray.length).toBe(1); + expect(errorArray[0].errorMessage).toBe(errorMessage); + }); +}); diff --git a/services/ui-src/src/measures/2023/shared/globalValidations/validateAtLeastOneDeliverySystem/index.ts b/services/ui-src/src/measures/2023/shared/globalValidations/validateAtLeastOneDeliverySystem/index.ts new file mode 100644 index 0000000000..8f5f309190 --- /dev/null +++ b/services/ui-src/src/measures/2023/shared/globalValidations/validateAtLeastOneDeliverySystem/index.ts @@ -0,0 +1,20 @@ +import * as Types from "measures/2023/shared/CommonQuestions/types"; + +export const validateAtLeastOneDeliverySystem = ( + data: Types.DefinitionOfPopulation, + errorMessage?: string +) => { + const errorArray: FormError[] = []; + if ( + !data.DeliverySysRepresentationDenominator || + data.DeliverySysRepresentationDenominator.length === 0 + ) { + errorArray.push({ + errorLocation: "Delivery Systems", + errorMessage: + errorMessage ?? "You must select at least one delivery system option", + }); + } + + return errorArray; +}; diff --git a/services/ui-src/src/measures/2023/shared/globalValidations/validateFfsRadioButtonCompletion/index.test.ts b/services/ui-src/src/measures/2023/shared/globalValidations/validateFfsRadioButtonCompletion/index.test.ts new file mode 100644 index 0000000000..bbad461994 --- /dev/null +++ b/services/ui-src/src/measures/2023/shared/globalValidations/validateFfsRadioButtonCompletion/index.test.ts @@ -0,0 +1,49 @@ +import { testFormData } from "../testHelpers/_testFormData"; +import * as DC from "dataConstants"; +import { validateFfsRadioButtonCompletion } from "."; + +describe("validateFfsRadioButtonCompletion", () => { + let formData: any; + let errorArray: FormError[]; + + const _check_errors = (data: any, numErrors: number) => { + errorArray = [...validateFfsRadioButtonCompletion(data)]; + expect(errorArray.length).toBe(numErrors); + }; + + beforeEach(() => { + formData = JSON.parse(JSON.stringify(testFormData)); // reset data + errorArray = []; + }); + + it("When no Delivery System nested question is checked a validation warning shows", () => { + formData[DC.DELIVERY_SYS_REPRESENTATION_DENOMINATOR] = [DC.FFS]; + formData[DC.DELIVERY_SYS_FFS] = undefined; + _check_errors(formData, 1); + }); + + it("When a Delivery System nested question is checked no validation warning shows", () => { + formData[DC.DELIVERY_SYS_REPRESENTATION_DENOMINATOR] = [DC.FFS]; + formData[DC.DELIVERY_SYS_FFS] = "yes"; + _check_errors(formData, 0); + }); + + it("Error message text should match default errorMessage", () => { + formData[DC.DELIVERY_SYS_REPRESENTATION_DENOMINATOR] = [DC.FFS]; + formData[DC.DELIVERY_SYS_FFS] = undefined; + errorArray = [...validateFfsRadioButtonCompletion(formData)]; + expect(errorArray.length).toBe(1); + expect(errorArray[0].errorMessage).toBe( + "You must indicate if the measure-eligible population is included" + ); + }); + + it("Error message text should match provided errorMessage", () => { + formData[DC.DELIVERY_SYS_REPRESENTATION_DENOMINATOR] = [DC.FFS]; + formData[DC.DELIVERY_SYS_FFS] = undefined; + const errorMessage = "Another one bites the dust."; + errorArray = [...validateFfsRadioButtonCompletion(formData, errorMessage)]; + expect(errorArray.length).toBe(1); + expect(errorArray[0].errorMessage).toBe(errorMessage); + }); +}); diff --git a/services/ui-src/src/measures/2023/shared/globalValidations/validateFfsRadioButtonCompletion/index.ts b/services/ui-src/src/measures/2023/shared/globalValidations/validateFfsRadioButtonCompletion/index.ts new file mode 100644 index 0000000000..697171f32c --- /dev/null +++ b/services/ui-src/src/measures/2023/shared/globalValidations/validateFfsRadioButtonCompletion/index.ts @@ -0,0 +1,37 @@ +import * as Types from "measures/2023/shared/CommonQuestions/types"; +import * as DC from "dataConstants"; + +export const validateFfsRadioButtonCompletion = ( + data: Types.DefinitionOfPopulation, + errorMessage?: string +) => { + const errorArray: FormError[] = []; + + // map the delivery systems to their respective nested selections + const deliverySystemsMap = { + [DC.FFS]: DC.DELIVERY_SYS_FFS, + [DC.ICM]: DC.DELIVERY_SYS_ICM, + [DC.PCCM]: DC.DELIVERY_SYS_PCCM, + [DC.MCO_PIHP]: DC.DELIVERY_SYS_MCO_PIHP, + [DC.OTHER]: DC.DELIVERY_SYS_OTHER, + }; + + const selectedDeliverySystems = data.DeliverySysRepresentationDenominator; + if (selectedDeliverySystems) { + selectedDeliverySystems.forEach((system) => { + Object.entries(data).forEach((selection) => { + // check if user has actually checked the nested radio button selection + if (selection[0] === deliverySystemsMap[system] && !selection[1]) { + errorArray.push({ + errorLocation: "Delivery System", + errorMessage: + errorMessage ?? + "You must indicate if the measure-eligible population is included", + }); + } + }); + }); + } + + return errorArray; +}; diff --git a/services/ui-src/src/measures/2023/shared/util/validationsMock.tsx b/services/ui-src/src/measures/2023/shared/util/validationsMock.tsx index 480537ffe8..1323ceac9f 100644 --- a/services/ui-src/src/measures/2023/shared/util/validationsMock.tsx +++ b/services/ui-src/src/measures/2023/shared/util/validationsMock.tsx @@ -1,11 +1,13 @@ import * as validateAtLeastOneDataSource from "measures/2023/shared/globalValidations/validateAtLeastOneDataSource"; import * as validateAtLeastOneDataSourceType from "measures/2023/shared/globalValidations/validateAtLeastOneDataSourceType"; +import * as validateAtLeastOneDeliverySystem from "measures/2023/shared/globalValidations/validateAtLeastOneDeliverySystem"; import * as validateAtLeastOneDeviationFieldFilled from "measures/2023/shared/globalValidations/validateAtLeastOneDeviationFieldFilled"; import * as validateAtLeastOneRateComplete from "measures/2023/shared/globalValidations/validateAtLeastOneRateComplete"; import * as validateBothDatesInRange from "measures/2023/shared/globalValidations/validateBothDatesInRange"; import * as validateDualPopInformation from "measures/2023/shared/globalValidations/validateDualPopInformation"; import * as validateEqualCategoryDenominators from "measures/2023/shared/globalValidations/validateEqualCategoryDenominators"; import * as validateEqualQualifierDenominators from "measures/2023/shared/globalValidations/validateEqualQualifierDenominators"; +import * as validateFfsRadioButtonCompletion from "measures/2023/shared/globalValidations/validateFfsRadioButtonCompletion"; import * as validateRateNotZero from "measures/2023/shared/globalValidations/validateRateNotZero"; import * as validateRateZero from "measures/2023/shared/globalValidations/validateRateZero"; import * as validateNumeratorsLessThanDenominators from "measures/2023/shared/globalValidations/validateNumeratorsLessThanDenominators"; @@ -52,6 +54,10 @@ export const validationsMockObj: any = { validateAtLeastOneDataSourceType, "validateAtLeastOneDataSourceType" ), + validateAtLeastOneDeliverySystem: jest.spyOn( + validateAtLeastOneDeliverySystem, + "validateAtLeastOneDeliverySystem" + ), validateAtLeastOneDeviationFieldFilled: jest.spyOn( validateAtLeastOneDeviationFieldFilled, "validateAtLeastOneDeviationFieldFilled" @@ -84,6 +90,10 @@ export const validationsMockObj: any = { validateEqualQualifierDenominators, "validateEqualQualifierDenominatorsOMS" ), + validateFfsRadioButtonCompletion: jest.spyOn( + validateFfsRadioButtonCompletion, + "validateFfsRadioButtonCompletion" + ), validateRateNotZeroPM: jest.spyOn( validateRateNotZero, "validateRateNotZeroPM" From f5cb9a78df833807e12370d03f149c3c7d246337 Mon Sep 17 00:00:00 2001 From: karla-vm Date: Tue, 1 Aug 2023 10:39:47 -0400 Subject: [PATCH 2/2] fix typo --- .../globalValidations/validateFfsRadioButtonCompletion/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/ui-src/src/measures/2023/shared/globalValidations/validateFfsRadioButtonCompletion/index.ts b/services/ui-src/src/measures/2023/shared/globalValidations/validateFfsRadioButtonCompletion/index.ts index 697171f32c..c2aea2ae3a 100644 --- a/services/ui-src/src/measures/2023/shared/globalValidations/validateFfsRadioButtonCompletion/index.ts +++ b/services/ui-src/src/measures/2023/shared/globalValidations/validateFfsRadioButtonCompletion/index.ts @@ -23,7 +23,7 @@ export const validateFfsRadioButtonCompletion = ( // check if user has actually checked the nested radio button selection if (selection[0] === deliverySystemsMap[system] && !selection[1]) { errorArray.push({ - errorLocation: "Delivery System", + errorLocation: "Delivery Systems", errorMessage: errorMessage ?? "You must indicate if the measure-eligible population is included",