Skip to content

Commit

Permalink
Merge pull request #607 from praekeltfoundation/TBH-710-bug-missing-s…
Browse files Browse the repository at this point in the history
…creen-after-language-selection

sorting screen order for new users
  • Loading branch information
Buhle79 authored Oct 12, 2023
2 parents 46f8c92 + a309350 commit 7023694
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 7 deletions.
20 changes: 17 additions & 3 deletions go-app-ussd_tb_check.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ go.app = function () {
question: question,
error: error,
accept_labels: true,
choices: [new Choice("state_send_privacy_policy_sms", $("START"))],
choices: [new Choice("state_age", $("START"))],
});
});

Expand Down Expand Up @@ -1232,7 +1232,7 @@ go.app = function () {
"or night sweats visit your nearest clinic."
);

if (risk == "high" || risk == "moderate") {
if (risk == "high") {
text = $(
[
"Your replies to the questions show you need a TB test this week.",
Expand All @@ -1244,7 +1244,21 @@ go.app = function () {
consent: consent,
tbcheck_id: tbcheck_id
});
} else if (answers.state_exposure == "not_sure") {
}
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 " +
"your HIV status, visit the clinic for a free HIV test. Then do the TB check again."
Expand Down
20 changes: 17 additions & 3 deletions src/ussd_tb_check.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ go.app = function () {
question: question,
error: error,
accept_labels: true,
choices: [new Choice("state_send_privacy_policy_sms", $("START"))],
choices: [new Choice("state_age", $("START"))],
});
});

Expand Down Expand Up @@ -1115,7 +1115,7 @@ go.app = function () {
"or night sweats visit your nearest clinic."
);

if (risk == "high" || risk == "moderate") {
if (risk == "high") {
text = $(
[
"Your replies to the questions show you need a TB test this week.",
Expand All @@ -1127,7 +1127,21 @@ go.app = function () {
consent: consent,
tbcheck_id: tbcheck_id
});
} else if (answers.state_exposure == "not_sure") {
}
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 " +
"your HIV status, visit the clinic for a free HIV test. Then do the TB check again."
Expand Down
2 changes: 1 addition & 1 deletion test/ussd_tb_check.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ describe("ussd_tb_check app", function () {
);
})
.input("1")
.check.user.state("state_privacy_policy_accepted")
.check.user.state("state_age")
.run();
});
});
Expand Down

0 comments on commit 7023694

Please sign in to comment.