Skip to content
This repository was archived by the owner on Sep 29, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
258 changes: 258 additions & 0 deletions webapp/lib/ifrc_demo_code_hierarchy.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,258 @@
var ifrc_demo_code_hierarchy = {
"Rumors_beliefs_observations": {
"Beliefs_about_the_disease": [
"Belief that disease does NOT exist or is NOT real",
"Belief that disease does exist or is real",
"Belief about the symptoms of the disease",
"Belief that disease of supernatural origin",
"Belief that disease is man-made",
"Belief that a disease is caused by foreigners",
"Observations or beliefs about new variants or mutations",
"Other belief about the disease",
],
"Beliefs_about_the_disease_outbreak": [
"Belief about the nature and evolution of the disease outbreak",
"Belief about the consequences of the disease outbreak",
"Belief about who is or is not affected by the disease",
"Belief about the number of cases and geographic areas affected ",
"Belief that the disease does not exist in this region or country",
"Belief that the outbreak has ended",
"Other belief about the disease outbreak",
],
"Observations_on_general_situation_and_behaviours": [
"Observations of adherence to health measures",
"Observations of non-compliance with health measures",
"Statement not to have seen any dead or sick people",
"Statements of encouragement to follow the PHMs",
"Statement about people being tired about COVID-19",
],
"Belief_about_how_the_disease_spreads": [
"Beliefs about ways of transmission",
"Beliefs about the survival of virus under specific circumstances",
],
"Statements_indicating_mistrust_in_the_response": [
"Belief that a disease is being used for political purposes",
"Belief that people or institutions are intentionally harming people",
"Belief that people are spreading the disease",
"Belief that some people/institutions are making money because of the disease",
"Belief that wrong numbers are being communicated",
"Other statements indicating suspicion of people or institutions",
],
"Observations_or_beliefs_preparedness_or_response_activities_pertaining_to_the_disease": [
"Observation or belief about communication or information about the disease",
"Observation or belief about contact tracing ",
"Observations or beliefs about management of the dead",
"Observations or beliefs about other preparedness or response activities",
],
"Beliefs_about_the_lockdown_restriction_of_movement_and_closing_borders": [
"Observation or belief about lockdown",
"Observation or belief about points of control",
],
"Observations_or_beliefs_about_schools_and_education": [
"Observations or beliefs about return to schools",
],
"Beliefs_about_behaviors_that_protect_people_prevention": [
"Beliefs about hand washing or hand sanitizers",
"Beliefs about face masks",
"Beliefs about prayer",
"Beliefs about other behaviors that can protect people from the disease",
"Beliefs about use of alcohol for prevention",
"Beliefs about use of herbs or other natural materials for prevention",
],
"Beliefs_about_treatment_for_the_disease": [
"Belief about treatments for the disease",
"Beliefs about use of alcohol for treament",
"Beliefs about use of herbs or other natural materials for treatment",
],
"Observations_or_beliefs_about_health_care_services_for_the_disease": [
"Other beliefs and observations about vaccines",
"Observations or beliefs about testing",
"Observations or beliefs about other health care services",
"Observations or beliefs about the vaccine side effects or health risks",
"Comments in favour of the vaccine",
"Comments about the rejection of the vaccine",
"Observations or beliefs about the vaccine origin, testing or Government approval",
],
"Observations_or_beliefs_about_people_or_organizations_responding_to_the_disease": [
"Observation or belief about the Red Cross",
"Observation or belief about other people or organizations responding to the disease",
],
"Observations_or_beliefs_about_government_not_responding_or_responding_well": [
"Observations or beliefs about government not responding or responding well",
],
"Observations_or_beliefs_about_people_recovered_from_the_disease": [
"Observation or belief about people recovered from the disease",
],
"Fear_or_stigma": [
"Fear or suspicion of specific people groups or populations in ways that could be stigmatizing",
"Fear of the disease",
"Other fears",
],
"Other_rumors_observations_or_beliefs": [
"Other rumor, observation or belief",
],
},

"Questions": {
"Questions_about_the_disease": [
"Questions about the symptoms of the disease",
"Questions about the origin of the disease",
"Questions about the existence of the disease",
"Questions about new variants or mutations",
"Other questions about the disease ",
],
"Questions_about_disease_outbreak": [
"Questions about how long the disease outbreak may last",
"Question about the number of cases and geographic areas affected ",
"Questions about who is or is not affected",
"Questions about the evolution of the pandemic",
"Questions whether the outbreak has ended",
"Other questions about the disease outbreak",
],
"Questions_about_general_situation_and_behaviours": [
"Questions about why we don't see sick people",
"Questions about enforcement of PHM",
],
"Questions_about_how_the_disease_spreads": [
"Sexual transmission",
"Other ways of transmission",
"Survival of virus under specific circumstances",
],
"Questions_about_health_care_services_for_the_disease": [
"Questions about health care services for the disease",
"Questions about whether there is a vaccine for the disease",
"Questions about testing ",
"Questions about the vaccine side effects or health risks",
"Questions about the vaccine origin, testing or Government approval",
"Questions about how to access the vaccines",
"Other vaccine questions",
],
"Questions_about_people_or_organizations_responding_to_the_disease": [
"Questions about the Red Cross",
"Questions about people or organizations responding to the disease",
],
"Questions_about_the_role_of_government": [
"Questions about the role of government ",
],
"Questions_about_preparedness_or_response_activities_pertaining_to_the_disease": [
"Questions about communication and information about the pandemic",
"Questions about contract tracing",
"Questions about provision of hand washing utensils or hand sanitizers",
"Questions about the distribution of personal protective equipment",
"Questions about community health promotion about the disease",
"Questions about livelihood support",
"Questions about management of the dead",
"Questions about other preparedness or response activities",
],
"Questions_about_the_lockdown_restriction_of_movement_and_closing_borders": [
"Questions about points of control and points of entry",
"Questions about reopening of certain places",
"Questions about lockdown",
"Questions about closing country borders",
],
"Questions_about_schools_and_education": [
"Questions about return to schools",
],
"Questions_about_behaviors_that_can_protect_people_from_the_disease": [
"Questions about hand washing or hand sanitizers",
"Questions about face masks",
"Questions about physical distancing",
"Questions about other behaviors that can protect people from the disease",
],
"Questions_about_treatment_for_the_disease": [
"Questions about treatment(s) for the disease",
"Questions about how to care for people with the disease at home (outside of health care system)",
"Questions about use of herbs or other natural remedies for treatment",
],
"Questions_that_reveal_mistrust_or_suspicion_about_people_or_institutions": [
"Questions that reveal mistrust or suspicion about people or institutions",
],
"Questions_about_what_to_do_if_you_suspect_someone_has_the_disease": [
"Questions about what to do if you suspect someone has the disease",
],
"Questions_about_people_recovered_from_the_disease": [
"Questions about people who have recovered from the disease",
],
"Other_questions": [
"Other questions",
],
},

"Suggestions_requests": {
"Request_for_quality_health_care_service_(test,_medicine,_treatment)": [
"Request to improve health care",
"Request to provide medicines",
"Request to test people",
"Request to vaccinate people",
"Suggestions about immunization",
"Request for support for specific case",
],
"Request_for_flexible,_efficient_action": [
"Request for flexible, efficient action",
],
"Request_for_responsive_government_action_against_the_disease": [
"Request for responsive government action against the disease",
"Enforcement and encouragement of PHM",
],
"Suggestions_about_preparedness_or_response_activities_pertaining_to_the_disease": [
"Suggestions about contact tracing",
"Request for community health promotion about the disease",
"Suggestion to show sick or recovered people",
"Request for distribution of hand washing utensils or hand sanitizers",
"Request for distribution of personal protective equipment",
"Request for educational materials about the disease",
"Suggestions to provide livelihood support",
"Suggestions_about_other_preparedness_or_response_activities",
],
"Suggestions_linked_to_lockdown_restriction_of_movement_and_closing_borders": [
"Suggestions about points of control and points of entry",
"Suggestions about transportation",
"Suggestions to lift lockdown or open certain places",
"Suggestions to introduce lockdown or close certain places",
"Suggestions to close country borders",
],
"Suggestions_linked_to_schools_and_education": [
"Protection and guidance of children at schools",
],
"Request_to_stop_the_disease_outbreak": [
"Request to stop the disease outbreak",
],
"Request_to_train_or_involve_certain_people_or_institutions": [
"Request to train or involve certain people or institutions",
],
"Refusal_or_request_to_be_left_alone": [
"Refusal or request to be left alone",
],
"Other_suggestions": [
"Other suggestions",
],
},
"Appreciation_encouragement": {
"Statement_of_thanks_for_health_promotion": [
"Statement of thanks for health promotion",
],
"Statement_of_thanks": [
"Statement of thanks",
],
"Statement_of_encouragement_to_continue_the_work": [
"Statement of encouragement to continue the work",
],
"Statement_that_acknowledges_the_work": [
"Statement that acknowledges the work",
],
},
"Sensitive_or_violent_comment": {
"Statement_that_is_a_threat": [
"Statement that is a threat ",
],
"Statement_about_sexual_exploitation_or_abuse": [
"Statement about sexual exploitation or abuse",
],
"Statement_that_is_a_complaint_about_a_specific_responder": [
"Statement that is a complaint about a specific responder",
],
"Other_sensitive_or_violent_statement": [
"Other sensitive or violent statement"
],
},
};
10 changes: 6 additions & 4 deletions webapp/lib/main_ui.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import 'authentication.dart' as auth;
import 'firebase_tools.dart' as fbt;
import 'data_services.dart' as data_services;

import 'ifrc_demo_code_hierarchy.dart';

part 'view_model.dart';

CodaUI _codaUI;
Expand Down Expand Up @@ -84,7 +86,7 @@ class CodaUI {
CodeSelector activeCodeSelector = CodeSelector.activeCodeSelector;
TableRowElement row = getAncestors(CodeSelector.activeCodeSelector.viewElement).firstWhere((e) => e.classes.contains('message-row'));
String messageId = row.attributes['message-id'];

selectNextUncodedMessage(messageId, activeCodeSelector.scheme.id);
});

Expand Down Expand Up @@ -177,7 +179,7 @@ class CodaUI {
return;
}
String progress = (fraction * 100).toStringAsFixed(2);

querySelector("#autocode_progress")
..hidden = false
..text = "( $progress% )";
Expand Down Expand Up @@ -386,7 +388,7 @@ class CodaUI {
CodeSelector activeCodeSelector = CodeSelector.activeCodeSelector;
TableRowElement row = getAncestors(CodeSelector.activeCodeSelector.viewElement).firstWhere((e) => e.classes.contains('message-row'));
String messageId = row.attributes['message-id'];

if (event.key == 'Tab') {
selectNextCodeSelector(messageId, activeCodeSelector.scheme.id);
event.preventDefault();
Expand Down Expand Up @@ -493,7 +495,7 @@ class CodaUI {
}
return false;
}

void selectNextUncodedMessage(String messageID, String schemeID) {
MessageViewModel message = messageList.messageMap[messageID];
int codeSelectorIndex = message.codeSelectors.indexWhere((codeSelector) => codeSelector.scheme.id == schemeID);
Expand Down
Loading