Skip to content

Commit

Permalink
Fix moderate risk results
Browse files Browse the repository at this point in the history
  • Loading branch information
Buhle79 committed Nov 7, 2023
1 parent 3e5613e commit 63fc48e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 30 deletions.
15 changes: 1 addition & 14 deletions go-app-ussd_tb_check.js
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,7 @@ go.app = function () {
"or night sweats visit your nearest clinic."
);

if (risk == "high") {
if (risk == "high" || risk == "moderate") {
text = $(
[
"Your replies to the questions show you need a TB test this week.",
Expand All @@ -1261,19 +1261,6 @@ go.app = function () {
tbcheck_id: tbcheck_id
});
}
else if (risk == "moderate") {
text = $(
[
"You don't need a TB test at present.",
"",
"If you develop cough, fever, weight loss or night sweats visit your nearest clinic."
].join("\n")
).context({
arm: arm,
consent: consent,
tbcheck_id: tbcheck_id
});
}
else if (answers.state_exposure == "not_sure") {
text = $(
"Check if those you live with are on TB treatment. If you don't know " +
Expand Down
15 changes: 1 addition & 14 deletions src/ussd_tb_check.js
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ go.app = function () {
"or night sweats visit your nearest clinic."
);

if (risk == "high") {
if (risk == "high" || risk == "moderate") {
text = $(
[
"Your replies to the questions show you need a TB test this week.",
Expand All @@ -1144,19 +1144,6 @@ go.app = function () {
tbcheck_id: tbcheck_id
});
}
else if (risk == "moderate") {
text = $(
[
"You don't need a TB test at present.",
"",
"If you develop cough, fever, weight loss or night sweats visit your nearest clinic."
].join("\n")
).context({
arm: arm,
consent: consent,
tbcheck_id: tbcheck_id
});
}
else if (answers.state_exposure == "not_sure") {
text = $(
"Check if those you live with are on TB treatment. If you don't know " +
Expand Down
4 changes: 2 additions & 2 deletions test/ussd_tb_check.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2591,9 +2591,9 @@ describe("ussd_tb_check app", function () {
.check.interaction({
state: "state_show_results",
reply: [
"You don't need a TB test at present.",
"Your replies to the questions show you need a TB test this week.",
"",
"If you develop cough, fever, weight loss or night sweats visit your nearest clinic."
"Go to your clinic for a free TB test."
].join("\n"),
char_limit: 160,
})
Expand Down

0 comments on commit 63fc48e

Please sign in to comment.