Skip to content

Commit

Permalink
Fixed nupi charts
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrianbet committed Apr 16, 2024
1 parent dc92767 commit f030ca7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
12 changes: 6 additions & 6 deletions src/selectors/CT/ArtVerification/pendingSurveys.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const listUnfilteredVerified = (state) =>
state.currentOnArtVerifiedByCounty.listUnfiltered;
const listFilteredVerified = (state) =>
state.currentOnArtVerifiedByCounty.listFiltered;

const listUnfilteredVerifiedPartner = (state) =>
state.currentOnArtVerifiedByPartner.listUnfiltered;
const listFilteredVerifiedPartner = (state) =>
Expand Down Expand Up @@ -129,7 +129,7 @@ export const getArtPendingUnverifiedByPartner = createSelector(

return {
partners: newList.map((e) => e.partners),
pending: newList.map((e) => e.Pending),
pending: newList.map((e) => e.Pending < 0 ? 0 : e.Pending),
};
}
);
Expand All @@ -152,7 +152,7 @@ export const getArtVerificationSubmissionByPartner = createSelector(

partners = list.map((p) => p.SDIP);
pending = list.map((p) => p.Pendingsurveys);
unverified = list.map((p) => p.Unverified);
unverified = list.map((p) => (p.TxCurr - p.NupiVerified));
received = list.map((p) => p.SurveysReceived);

let submitted = _.sum(received);
Expand Down Expand Up @@ -246,7 +246,7 @@ export const getArtPendingUnverifiedByCounty = createSelector(

return {
counties: newList.map((e) => e.county),
pending: newList.map((e) => e.Pending),
pending: newList.map((e) => e.Pending < 0 ? 0 : e.Pending),
};
}
);
Expand All @@ -272,9 +272,9 @@ export const getArtVerificationSubmissionByCounty = createSelector(
unverified = list.map((p) => {
return {
percent: Number(
(p.Unverified * 100) / p.SurveysReceived + p.Unverified
((p.TxCurr - p.NupiVerified) * 100) / p.SurveysReceived + p.Unverified
),
y: p.Unverified,
y: (p.TxCurr - p.NupiVerified),
};
});
received = list.map((p) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ const ArtVerificationSurveySubmission = () => {
data: [
{
name: 'SUBMITTED SURVEY',
y: status.submitted,
y: notVerified - (status.submitted - notVerified),
color: '#01058A',
},
{
name: 'NOT SUBMITTED SURVEY',
y: notVerified - status.submitted,
y: status.submitted - notVerified,
sliced: true,
selected: true,
color: '#8E2C16',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const ArtVerificationSurveySubmissionByCounty = () => {
<div className="col-12">
<Card className="trends-card">
<CardHeader className="trends-header">
SURVEYS SUMBITTED FOR UNVERIFIED PATIENTS BY COUNTY
SURVEYS SUBMITTED FOR UNVERIFIED PATIENTS BY COUNTY
</CardHeader>
<CardBody className="trends-body">
{countyData.loadingC ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const ArtVerificationSurveySubmissionByPartner = () => {
<div className="col-12">
<Card className="trends-card">
<CardHeader className="trends-header">
SURVEYS SUMBITTED FOR UNVERIFIED PATIENTS BY PARTNER
SURVEYS SUBMITTED FOR UNVERIFIED PATIENTS BY PARTNER
</CardHeader>
<CardBody className="trends-body">
{partnerData.loadingP ? (
Expand Down
5 changes: 2 additions & 3 deletions src/views/CT/ViralLoad/ViralLoadOverallNonSuppressedVlTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,20 +95,19 @@ const ViralLoadOverallNonSuppressedVlTest = () => {
name: 'NUMBER OF PLHIV ON ART WITH VL > 1000 COPIES/ML WHO RECEIVED FOLLOW UP VL TESTS',
y: viralLoadUptakeGt1000CopiesRecFollowTestAll,
color: '#fad53f',
text: viralLoadUptakeGt1000CopiesRecFollowTestAll.toLocaleString('en')
text: viralLoadUptakeGt1000CopiesRecFollowTestAll.toLocaleString('en')
},
{
name: 'NUMBER VIRALLY SUPPRESSED ON FOLLOW UP VL TEST',
y: viralLoadUptakeGt1000CopiesRecFollowTest[0]?.Num ?? 0,
color: '#1c943e',
text: ' NUMBER VIRALLY SUPPRESSED <br/> ON FOLLOW UP VL TEST ' + viralLoadUptakeGt1000CopiesRecFollowTest[0]?.Num.toLocaleString('en') + ' (' + parseFloat(((viralLoadUptakeGt1000CopiesRecFollowTest[0]?.Num / totalFollowTest) * 100).toString()).toFixed(0) + '%)'
},
// TODO:: Last bar of the chart
{
name: 'NUMBER WITH FOLLOW UP VL TEST AT VL > 1000 COPIES/ML SWITCHED TO SECOND LINE REGIMENT',
y: viralLoadOverallNumberGt1000CopiesSecondlineRegimentData ?? 0,
color: '#142459',
text: viralLoadOverallNumberGt1000CopiesSecondlineRegimentData?.toLocaleString('en')
text: viralLoadOverallNumberGt1000CopiesSecondlineRegimentData?.toLocaleString('en')
}
]
},
Expand Down

0 comments on commit f030ca7

Please sign in to comment.