Skip to content

Commit

Permalink
only check totals dataElements
Browse files Browse the repository at this point in the history
  • Loading branch information
eperedo committed Jun 4, 2024
1 parent 301500a commit 6f23ddf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
10 changes: 1 addition & 9 deletions src/domain/usecases/ValidateMidwiferyAndPersonnelUseCase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,15 +296,7 @@ export class ValidateMidwiferyAndPersonnelUseCase {
} else if (sectionDisaggregation.type === "key_occupations") {
return [["2. Nursing Personnel", "3. Midwifery Personnel"]];
} else {
return [
["2 - Nursing Personnel", "3 - Midwifery personnel"],
["2.1 - Nursing Professionals", "3.1 - Midwifery Professionals"],
[
"2.2 - Nursing Associate Professionals",
"3.2 - Midwifery Associate Professionals",
],
["2.3 - Nurses not further defined", "3.3 - Midwives not further defined"],
];
return [["2 - Nursing Personnel", "3 - Midwifery personnel"]];
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { QualityAnalysis } from "$/domain/entities/QualityAnalysis";
import { QualityAnalysisSection } from "$/domain/entities/QualityAnalysisSection";
import { UpdateAnalysisState } from "$/webapp/pages/analysis/AnalysisPage";
import { Maybe } from "$/utils/ts-utils";
import _ from "$/domain/entities/generic/Collection";

export function useNursingMidwiferyStep(props: UseNursingMidwiferyStepProps) {
const { analysis, section, updateAnalysis } = props;
Expand All @@ -23,7 +24,12 @@ export function useNursingMidwiferyStep(props: UseNursingMidwiferyStepProps) {
text: item.name,
}));
setDisaggregations(selectedDisaggregations);
setSelectedDissagregations(selectedDisaggregations.map(item => item.value));
setSelectedDissagregations(
_(selectedDisaggregations)
.map(item => (item.text === "Total" ? item.value : undefined))
.compact()
.value()
);
},
error => {
setError(error.message);
Expand Down

0 comments on commit 6f23ddf

Please sign in to comment.