Skip to content

Commit

Permalink
ComplexNoNonZeroNumOrDenom
Browse files Browse the repository at this point in the history
  • Loading branch information
ailZhou committed Sep 12, 2024
1 parent 2f91730 commit 09647c7
Show file tree
Hide file tree
Showing 19 changed files with 64 additions and 436 deletions.
13 changes: 4 additions & 9 deletions services/ui-src/src/measures/2021/AIFHH/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,13 @@ const OMSValidations: GV.Types.OmsValidationCallback = ({
locationDictionary,
label,
}) => {
const rates = Object.keys(rateData?.rates ?? {}).map((x) => {
return { rate: [rateData?.rates?.[x]?.OPM?.[0]] };
});
return OPM === undefined
? [
...GV.ComplexNoNonZeroNumOrDenomOMS(
rateData?.["aifhh-rate"]?.rates ?? {},
rates ?? [],
[],
ndrFormulas,
`Optional Measure Stratification: ${locationDictionary(label)}`,
OPM.map((item: any) => item.description)
`Optional Measure Stratification: ${locationDictionary(label)}`
),
...GV.ComplexValidateNDRTotalsOMS(
rateData?.["aifhh-rate"]?.rates ?? {},
Expand All @@ -122,10 +118,9 @@ const OMSValidations: GV.Types.OmsValidationCallback = ({
: [
...GV.ComplexNoNonZeroNumOrDenomOMS(
rateData?.rates,
rates ?? [],
OPM,
ndrFormulas,
`Optional Measure Stratification: ${locationDictionary(label)}`,
OPM.map((item: any) => item.description)
`Optional Measure Stratification: ${locationDictionary(label)}`
),
];
};
Expand Down
13 changes: 4 additions & 9 deletions services/ui-src/src/measures/2021/IUHH/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,13 @@ const OMSValidations: GV.Types.OmsValidationCallback = ({
locationDictionary,
label,
}) => {
const rates = Object.keys(rateData?.rates ?? {}).map((x) => {
return { rate: [rateData?.rates?.[x]?.OPM?.[0]] };
});
return OPM === undefined
? [
...GV.ComplexNoNonZeroNumOrDenomOMS(
rateData?.["iuhh-rate"]?.rates ?? {},
rates ?? [],
[],
ndrForumlas,
`Optional Measure Stratification: ${locationDictionary(label)}`,
OPM.map((item: any) => item.description)
`Optional Measure Stratification: ${locationDictionary(label)}`
),
...GV.ComplexValidateNDRTotalsOMS(
rateData?.["iuhh-rate"]?.rates ?? {},
Expand All @@ -128,10 +124,9 @@ const OMSValidations: GV.Types.OmsValidationCallback = ({
: [
...GV.ComplexNoNonZeroNumOrDenomOMS(
rateData?.rates,
rates ?? [],
OPM,
ndrForumlas,
`Optional Measure Stratification: ${locationDictionary(label)}`,
OPM.map((item: any) => item.description)
`Optional Measure Stratification: ${locationDictionary(label)}`
),
];
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export { ComplexAtLeastOneRateComplete } from "shared/globalValidations/ComplexV
export {
ComplexNoNonZeroNumOrDenom,
ComplexNoNonZeroNumOrDenomOMS,
} from "./ComplexValidations/ComplexNoNonZeroNumOrDenom";
} from "shared/globalValidations/ComplexValidations/ComplexNoNonZeroNumOrDenom";
export { ComplexValidateAtLeastOneNDRInDeviationOfMeasureSpec } from "./ComplexValidations/ComplexValidateAtLeastOneNDRInDeviationOfMeasureSpec";
export {
ComplexValidateNDRTotals,
Expand Down
13 changes: 4 additions & 9 deletions services/ui-src/src/measures/2022/AIFHH/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,13 @@ const OMSValidations: GV.Types.OmsValidationCallback = ({
locationDictionary,
label,
}) => {
const rates = Object.keys(rateData?.rates ?? {}).map((x) => {
return { rate: [rateData?.rates?.[x]?.OPM?.[0]] };
});
return OPM === undefined
? [
...GV.ComplexNoNonZeroNumOrDenomOMS(
rateData?.["aifhh-rate"]?.rates ?? {},
rates ?? [],
[],
ndrFormulas,
`Optional Measure Stratification: ${locationDictionary(label)}`,
OPM.map((item: any) => item.description)
`Optional Measure Stratification: ${locationDictionary(label)}`
),
...GV.ComplexValidateNDRTotalsOMS(
rateData?.["aifhh-rate"]?.rates ?? {},
Expand All @@ -122,10 +118,9 @@ const OMSValidations: GV.Types.OmsValidationCallback = ({
: [
...GV.ComplexNoNonZeroNumOrDenomOMS(
rateData?.rates,
rates ?? [],
OPM,
ndrFormulas,
`Optional Measure Stratification: ${locationDictionary(label)}`,
OPM.map((item: any) => item.description)
`Optional Measure Stratification: ${locationDictionary(label)}`
),
];
};
Expand Down
13 changes: 4 additions & 9 deletions services/ui-src/src/measures/2022/IUHH/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,13 @@ const OMSValidations: GV.Types.OmsValidationCallback = ({
locationDictionary,
label,
}) => {
const rates = Object.keys(rateData?.rates ?? {}).map((x) => {
return { rate: [rateData?.rates?.[x]?.OPM?.[0]] };
});
return OPM === undefined
? [
...GV.ComplexNoNonZeroNumOrDenomOMS(
rateData?.["iuhh-rate"]?.rates ?? {},
rates ?? [],
[],
ndrForumlas,
`Optional Measure Stratification: ${locationDictionary(label)}`,
OPM.map((item: any) => item.description)
`Optional Measure Stratification: ${locationDictionary(label)}`
),
...GV.ComplexValidateNDRTotalsOMS(
rateData?.["iuhh-rate"]?.rates ?? {},
Expand All @@ -128,10 +124,9 @@ const OMSValidations: GV.Types.OmsValidationCallback = ({
: [
...GV.ComplexNoNonZeroNumOrDenomOMS(
rateData?.rates,
rates ?? [],
OPM,
ndrForumlas,
`Optional Measure Stratification: ${locationDictionary(label)}`,
OPM.map((item: any) => item.description)
`Optional Measure Stratification: ${locationDictionary(label)}`
),
];
};
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export { ComplexAtLeastOneRateComplete } from "shared/globalValidations/ComplexV
export {
ComplexNoNonZeroNumOrDenom,
ComplexNoNonZeroNumOrDenomOMS,
} from "./ComplexValidations/ComplexNoNonZeroNumOrDenom";
} from "shared/globalValidations/ComplexValidations/ComplexNoNonZeroNumOrDenom";
export { ComplexValidateAtLeastOneNDRInDeviationOfMeasureSpec } from "./ComplexValidations/ComplexValidateAtLeastOneNDRInDeviationOfMeasureSpec";
export {
ComplexValidateNDRTotals,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import * as PCRatLeastOneRateComplete from "shared/globalValidations/PCRValidati
import * as PCRnoNonZeroNumOrDenom from "shared/globalValidations/PCRValidations/PCRnoNonZeroNumOrDenom";
import * as PCRvalidateAtLeastOneNDRInDeviationOfMeasureSpec from "shared/globalValidations/PCRValidations/PCRvalidateAtLeastOneNDRInDeviationOfMeasureSpec"; //pragma: allowlist secret
import * as ComplexAtLeastOneRateComplete from "shared/globalValidations/ComplexValidations/ComplexAtLeastOneRateComplete";
import * as ComplexNoNonZeroNumOrDenom from "measures/2022/shared/globalValidations/ComplexValidations/ComplexNoNonZeroNumOrDenom";
import * as ComplexNoNonZeroNumOrDenom from "shared/globalValidations/ComplexValidations/ComplexNoNonZeroNumOrDenom";
import * as ComplexValidateAtLeastOneNDRInDeviationOfMeasureSpec from "measures/2022/shared/globalValidations/ComplexValidations/ComplexValidateAtLeastOneNDRInDeviationOfMeasureSpec"; //pragma: allowlist secret
import * as ComplexValidateNDRTotals from "measures/2022/shared/globalValidations/ComplexValidations/ComplexValidateNDRTotals";
import * as ComplexValidateDualPopInformation from "measures/2022/shared/globalValidations/ComplexValidations/ComplexValidateDualPopInformation";
Expand Down
8 changes: 4 additions & 4 deletions services/ui-src/src/measures/2023/AIFHH/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,17 @@ const OMSValidations: GV.Types.OmsValidationCallback = ({
? [
...GV.ComplexNoNonZeroNumOrDenomOMS(
rateData?.["aifhh-rate"]?.rates ?? {},
[],
ndrFormulas,
`Optional Measure Stratification: ${locationDictionary(label)}`,
OPM.map((item: any) => item.description)
`Optional Measure Stratification: ${locationDictionary(label)}`
),
]
: [
...GV.ComplexNoNonZeroNumOrDenomOMS(
rateData?.rates,
OPM,
ndrFormulas,
`Optional Measure Stratification: ${locationDictionary(label)}`,
OPM.map((item: any) => item.description)
`Optional Measure Stratification: ${locationDictionary(label)}`
),
];
};
Expand Down
8 changes: 4 additions & 4 deletions services/ui-src/src/measures/2023/IUHH/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ const OMSValidations: GV.Types.OmsValidationCallback = ({
? [
...GV.ComplexNoNonZeroNumOrDenomOMS(
rateData?.["iuhh-rate"]?.rates ?? {},
[],
ndrForumlas,
`Optional Measure Stratification: ${locationDictionary(label)}`,
OPM.map((item: any) => item.description)
`Optional Measure Stratification: ${locationDictionary(label)}`
),
...GV.ComplexValueSameCrossCategoryOMS(
rateData?.["iuhh-rate"]?.rates ?? {},
Expand All @@ -118,9 +118,9 @@ const OMSValidations: GV.Types.OmsValidationCallback = ({
: [
...GV.ComplexNoNonZeroNumOrDenomOMS(
rateData?.rates,
OPM,
ndrForumlas,
`Optional Measure Stratification: ${locationDictionary(label)}`,
OPM.map((item: any) => item.description)
`Optional Measure Stratification: ${locationDictionary(label)}`
),
];
};
Expand Down
Loading

0 comments on commit 09647c7

Please sign in to comment.