Coder Social home page Coder Social logo

ifrcgo / cbs Goto Github PK

View Code? Open in Web Editor NEW
102.0 37.0 110.0 81.28 MB

Red Cross: Community-Based Surveillance

Home Page: https://cbsrc.org/

License: Other

C# 67.76% TypeScript 7.87% HTML 3.49% PowerShell 0.61% Shell 0.41% CSS 2.82% JavaScript 15.18% Dockerfile 1.83% Smalltalk 0.03%
non-profit community-project health-informatics redcross epidemiology surveillance

cbs's People

Contributors

agnetedjupvik avatar alexanderhoset avatar anderaus avatar babajon avatar beatfactor avatar cathinkaw avatar davlind avatar einari avatar erikly avatar esp0 avatar g-samson avatar gardnk avatar jakhog avatar kaithelin avatar karolikl avatar krok avatar kxdan avatar markuskr avatar martintorgersen avatar ojoha avatar rebeccabushby avatar roarfred avatar ronnydahl avatar saraemilybergman avatar sheeeng avatar stevenah avatar thor-kristian-valderhaug avatar velcrow81 avatar woksin avatar zappod avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cbs's Issues

A system for mapping phone number to location

Purpose:
Persons with responsibility for validating Volunteer reports within a geographic area are assigned during the creation of a CBS project #37 (database #13 ). We now need to link these validators to the Volunteers who are reporting within their geographic area (#13 Variable "Escalation POC") .

Conversation:

  • Points into polygons?

Confirmation:
Fake Volunteer sends an SMS that triggers a notification for "Escalation POC" to react.

Login authentication - Humanitarian ID

Purpose:
The CBS platform is not public by design, rather access is given based on geographic area of responsibility (RCRC staff) or desire to stay up to date (partners). A humanitarian authentication service, Humanitarian ID, should be used for login.

Design:
Design similar to social media "login with", although limited to DMIS and HID.
image

Authentication documentation:

Confirmation:
User select "login" from CBS landing page #56 , is directed to login authentication page #31, redirected through appropriate authentication site, and finally lands on the CBS homepage #58 .

Could we have claims on every user saying which national society (Tenant) they have access to.
This is not the Azure AD tenant ID - but something that enables us to check for authorisation if a particular user in a bounded context has access to the national society it claims to have.

Would it be an idea to have Identity Server infront of all this and augment the tokens with more information and let UserManagement interact with this and provide the mapping between users and what national societies they have access to.

See also #327, #328, #510

Assign access to project for persons not in escalation path

Purpose:
Data and system access is based on assigned geographic responsibility ( #37 - e.g. "Roxanne" is responsible for covering "Northern" district in "Sierra Leone." Therefore, "Roxanne" CBS website user interface allows access to all data in "Northern".) How do we assign non-directly responsible users access to this information at various levels (e.g. "Anine" from Norwegian Red Cross in helping at country level, or MOH want to view data at "Northern" level)?

Conversation:

Confirmation:

Generate level 1 alert form

In the event that an alert is issued in #43, a prefilled form is to be sent to [Escalation UID] as defined by the hierarchy in #13

A form is linked to alert UID in #43.

The form should collect data that confirms or dismisses the issued alert while also collecting a narrative open text response by [Escalation UID]. The form is also the method for escalating the alert to the next level in the hierarchy, triggering #53 via #50.

Example form:
mockup - p06 - alert form

Variables Values/data displayed Related
Alert UID Alert UID
Escalated to [Name[Escalation UID]]
Escalated date [Timestamp[Alert UID]]
Location [Admin level 4]; [Admin level 3]; [Admin level 2];[Admin level 1];[Admin level 0]
Events reported Report 1 - [FullName[phone number]] [phone number] (complete for all events attributed to alert) #77
Report 1 Single select: (FALSE) (CONFIRMED) (CANNOT CONFIRM) (complete fro all attributed to alert)
Confirmed by health authorities Single select: (DISMISSED) (CONFIRMED) (CANNOT CONFIRM)
IF Confirmed by health authorities Drop down /Type ahead of ICD-10?
Response Open text field
Response conclusion (DISMISS) (ESCALATE) (UNDER INVESTIGATION)
INFORM Volunteer (YES) (NO)

The alert form should contain:

  • Per report, the name of the volunteer and mobile phone number is displayed
  • Per report, an option to tag the report with FALSE, CONFIRMED or CANNOT CONFIRM

Constraints:

  • If additional cases are associated with the alert ID as defined in #43, the form is updated with the new cases. (QUESTION: Push alert form update, or new alert form created? Does Escalation POC need to redo investigation?)

Define regions (country aggregation)

Use case:
As a regional CBS coordinator, I am interested in a quick overview of all countries that have active CBS projects within my region. For example, as a CBS coordinator for Africa, s/he may be interested in quick filtering to all projects within her region (e.g. Madagascar, Somalia, Sierra Leone, Cameroon, DRC, Guinea, Mali, Uganda, and Kenya are currently supporting CBS projects)

Define new CBS project - form (page 2)

Purpose:
As a project owner, I want to define how (SMS reporting structure), what (health risk), where (admin boundaries), and who (point of contact) for a new CBS project (part 2 of "Create a New CBS" - #35) that way the scope of the Project is clearly stipulated.

Conversation:
How (what SMS reporting structure):
The Project owner needs to identify how a Data Collection volunteer will be reporting per project (select one). There are two options: "Single event reporting" (Number#Number#Number) #44 or "Daily aggregated reporting" (Number#Number#Number#Number#Number) #46

  • "Single event reporting" hint: "Volunteer sends report after each event."
  • "Daily aggregate event reporting" hint: "Volunteer sends report at end of each day."

What (Health Risk):
The project owner needs to select up to 5 Health Risk that will be affiliated with a CBS project (ie Health Risk that a Data Collector will be collecting information on). This list is supplied here - Admin Bounded Context (#33).

Where (Location):
The project owner needs select where the CBS project will be running (e.g. part of a country or whole of a country). The baseline map information will be stored here (#42 )

Who (Data Verifier)
The project owner needs to assigns a Data Verifier (role) to cover a geographical region where a Data Collection Volunteer (role) will be working. Contact Information for Data Verifiers (role) will come from the User Management bounded context.

Examples of how Location and Assignment of Data Verifier can overlap.

Map format:
img_2276

Table format:

Admin Level Location Point of contact phone number
0 National Sierra Leone Fatmata Sannoh +253 557832903
2 District Bo Abdullah Marah +253 7263432903
3 Chiefdom Bobo Sarah Makenni +253 557832875
2 District Kenema Felix Kenny +253 6589832903
3 Chiefdom Kenny Benny King +253 552832903

Send alert form

The alert forms in #49 and #53 is sent to the person responsible to investigate the alert, as defined in the hierarchy in Admin.

The link to the alert form is sent by SMS and email.

Converting single case reporting to default aggregate case reporting format

Purpose:
All text messages will be stored in #48 as "Original message". Accurate volunteer reports will follow either of the two reporting structures:

  • [Number] # [Number] # [Number] (two hash - single event #44 )
  • [Number] # [Number] # [Number] # [Number] # [Number] (four hash - aggregate event #46)

We want to map how two hash reports fit into the the four hash database.

Conversation:

Event Sex age
3 1 1
4 1 2
5 2 1
6 2 2

Event is defined by Event UID in Event database #33
Sex is defined as Male =1, Female =2
Age is defined as <5 =1, >5=2

Database structure: Converting previous two hash text messages into four hash database.

Event Male<5 Male>5 Female<5 Female>5
3 1 0 0 0
4 0 1 0 0
5 0 0 1 0
6 0 0 0 1

Related background tickets:

  • SMS to database #25
  • How events are stores: #33
  • Background on single case reporting: #44
  • Background on aggregated case reporting: #46
  • Report database #48
  • Get SMS format flag from CBS form definition #37
  • Mapping of phone to location #26

Constraints:
Original report is always kept as its own variable.

Confirmation:
All example two hash text messages sent and recorded in 4 hash system database.

Parse an SMS containing a single case report

In a non-outbreak context, as a volunteer I need to report if I have detected health risk in my area.

Reporting format:

Event # sex of case # Age group of case

Event Sex of case Age group of case
1 2 1

Events are coded by numbers according #33
Sex of cases is coded as Male=1, Female=2
Age group of case is code as <5 = 1, >5=2
Report example 1#2#1 = Cholera in female <5 years

Related to #46 #45

Data Model for Staff and Partner user information

Purpose:
Storage location for staff users (system user) information.

Conversation:
Required fields:

  • User UID: Interger (GUID, System generated)

  • FirstName: Free text

  • LastName: Free text

  • FullName: Combination of FirstName and LastName for type aheads

  • Age: Integer (Birth year)

  • Sex (Options: Male, Female, Others)

  • National Society (Options: pull from FDRS)

  • Preferred language (Options: English, French, but flexible for the addition of more languages)

  • Country / Location / place / village: (Drop down admin boundary see #37) Required down to admin boundary 3. If not auto fetch then manually fill location names. OR assign lowest level administrative boundary based on GPS location.

  • Mobile phone number: Validation rules for Mobile phone number should be applied - and localized.

  • Email address: Normal email validation.

  • Role: Dropdown list based on logged in user info (Options:System Admin, Data Coordinator (can create project, read, write, and remove submitted data, delete project, remove registered user, change user role), Data Manager (can't create a project, can assign role to a user except Data Coordinator, Data Verifier (can register data collector, read and update data in its admin boundary), Data Collector (Can read read and update its own data), Data Consumer (read only user), System Admin (can't create project, can't assign a role, can read, write, change, remove data, can't remove users)

  • Escalation UID: references the User UID

  • Assigned project: Updated from CBS project list

  • Date of activation (#65): System recorded

  • Status (active, deactivated)

  • Registered By: (logged in user from system

  • Last updated: System recorded. Revision history for tracking changes in User data, especially GPS.

Constraints:
Users are automatically stored with role "Volunteer" with no authorisation/access to other information than their own.

When users are added as in definition of CBS project #37 their status is updated to reflect their location responsibilities. Assign administrative access based on geographic responsibility #58 (#62).

Example user data

Speadsheet: https://docs.google.com/spreadsheets/d/1voDFeLxiKjbNpKXtUE4se0-lNqMTZVdA6bv0lSDIwXg/edit#gid=335422100

Confirmation:
Pull User information for new CBS project - point of contact #37

Create a build template for .NET projects

Consider the following:

  • FAKE
  • CAKE

Suggest running builds on AppVeyor and possibly also a Travis version - to make sure it compiles correct on Linux as well.

Some of the .NET Tools we would like to use don't necessarily run on Linux on .NET Core or even Mono. Meaning that we should use AppVeyor as the primary build for .NET.
For instance, if we would get sponsorship and chose to use something like NDepend for monitoring code quality, this only runs on Windows for now.

Depending on the versioning regime, we want to deploy Container images to the Red Cross registry.

Context based build. Everything in Source folder should then have a SLN file associated and also a Docker file associated.

+-- Source
|   +-- <Bounded Context>
|   |    <Bounded Context>.sln
|   |    Dockerfile

Suggest we have a build per bounded context and use the filtering in AppVeyor to accomplish this.

It is fully possible to generate Docker images and publish in AppVeyor as well. Read more here

We might not need something like Travis at all, since Docker could also then be our build for Linux. The best possible way to use Docker for this purpose is to use its support for multiple FROM statements - one where you do the build and one where you package what should be part of the image. Read more about it here.

An example of a Dockerfile that does this:

# Build the .NET part
FROM microsoft/dotnet:2.0.0-sdk AS dotnet-build
WORKDIR /src
COPY ./NuGet.Config ./
COPY ./Source/Common/. ./Common/
WORKDIR /src/YourProject/Web
RUN dotnet restore
RUN dotnet publish -c Release -o out

# Build the static content part
FROM node:latest AS node-build
WORKDIR /src
ADD package.json ./
COPY ./Source/. ./Source/
COPY ./Modules/JavaScript.Build/. ./Modules/JavaScript.Build/
RUN ["npm","install","-g", "gulp"]
RUN ["npm","install"]
WORKDIR /src/Source/YourProject/Web
RUN ["gulp", "html", "javascript", "less", "content"]

# Build runtime image
FROM microsoft/dotnet:2.0.0-runtime
WORKDIR /app
COPY --from=dotnet-build /src/YourProject/Web/out ./
COPY --from=node-build /src/Source/YourProject/Web/wwwroot ./wwwroot
EXPOSE 5000
ENTRYPOINT ["dotnet", "Web.dll"]

Location storage (Administrative boundaries + population)

Purpose:
As admin, we need to ensure that we have "data verifiers" covering all designated areas of responsibility. If order to ensure all geographical areas are covered we require a base map. (#37)

Conversation:
Information required for Geo:

  • IFRC Region (Mandatory) - Text (may become separate ticket)
  • Admin 0 (Country) (Mandatory) - polygon
  • Admin 1 (Mandatory) - polygon
  • Admin 2 (Mandatory) - polygon
  • Admin 3 - polygon
  • Admin 4 - polygon
  • Admin 5 - polygon
  • Admin 6 - polygon
  • Red Cross and Red Crescent Branch and Chapter (sub-branch) locations - Points (may become separate ticket)
  • Population

Where to find:
Administrative Boundaries
The Humanitarian Data Exchange (HDX) host humanitarian/government approved geographic boundaries compiled by UN-OCHA. Often times admin boundaries are reported from Admin 0 (country level) to Admin 2 (district), although some countries go even lower (e.g. Countries of interest: https://docs.google.com/spreadsheets/d/1voDFeLxiKjbNpKXtUE4se0-lNqMTZVdA6bv0lSDIwXg/edit#gid=697028005).

IFRC Regions
The IFRC contains higher level regional aggregation (e.g. "Cameroon" is located in "Africa" region). This data is available here:

Red Cross and Red Crescent Branch locations
This data is available here:

Population
Original source WorldPop, available via HDX.

Constraints:

  • We are interested in using the latest available information (sync with HDX? sync with original source?)

Confirmation:
Related issues: #37 is dependent.

Add Build Shields to ReadMe

Have a Table on the ReadMe.MD file on the root that holds all the build shields per project.
There will be a build per bounded context and we need to reflect the status here.

Also, all build details should be available on the Documentation Site - meaning the index.md should hold this as well in the Documentation folder

Create an alert under certain conditions

If under conditions as described below are met, an alert is to be issued. The alert should have a unique ID that links to the volunteer SMS reports (#25) that triggered the alert as well as any other reports received while the alert is active.

The system should issue an alert if the number of cases reported within a certain timeframe within a specific geographical area exceeds the threshold value defined per event in [Admin] #54 (https://github.com/IFRCGo/cbs/projects/1).

When What Related issues Message
Number of [health risk] exceed [threshold] within [location] within [time = 7 days] Create alert ID: attribute all related reports to alert ID #33 #42
Create alert ID: attribute all related reports to alert ID Send Alert SMS with [Alert investigation form NEEDS TICKET] to [Validator] # ALERT BASE #69 [Health Risk] has triggered an alert. Please follow up with: [FullName] [Phone] (repeating). (Requires form attachment).

Question: do we need a database for time series?

If there's already an active alert for the specific disease and geographical area, a new alert should not be issued but the cases should be linked to the active alert ID.

If an alert has previously been triggered, but later manually closed by a health coordinator, and new cases are reported that puts the system in a countionous alert state (continuously above threshold value), the previously closed alert ID should be reopened and the new cases linked to this alert ID.

Create new CBS project - form (page 1)

#168 Purpose:
As a coordinator (Country or Global), I want to create a new CBS project.
Alternative for global coordinator to create and hand over role/responsibility to the project owner.

Form design:
fullsizerender

Form fields for user data selection/entry:

System registers: date (DD/MM/YYYY HH:MM:SS GMT)

Button at bottom of form, titled "Create" that redirects to form #37 (or combine all tickets into one CBS project details page)

Parse an SMS containing several case reports for a health event

In an outbreak setting, volunteers need to be be able to send an aggregated report with number of cases of health events detected that day.
This is the default reporting format and priority.

Format:

Event Number of male cases <5 Number of male cases >5 Number of female cases <5 Number of female cases >5
1 3 8 2 12

Events are coded using numbers according to the health risk within the Admin bounded context #33

Validation Rules:

Field Rule Text
Volunteer Valid volunteer You need to supply a valid volunteer
Event Valid event You need to supply a valid event

Related to #26

Report database

Purpose:
We need a repository for cleaning, disaggregating, and analyzing reports.

Conversation:
The following variables should be captured from volunteer reports:

UID Phone number Time stamp DD:MM:YYYY HH:MM:SS Original report Event Male <5 Male >5 Female <5 Female >5 Alert UID
1 4741547913 27.09.2017 17:13:04 1#3#8#2#12 1 3 8 2 12
2 4741547913 28.09.2017 15:27:54 3#2#2 3 0 0 0 1 1
3 4741547913 29.09.2017 5:12:33 Hello world

How to replicate UID 2 - #45
Alert UID is attributed to Alert UID variable in all related reports
Constraints:

  • Use standard date time format, time based on GMT.
  • All text messages are retained in "Original Report" variable, regardless of whether they are accurately reports or trigger alerts/error messages.

Related ticket: #46 #44 #37
Example dataset:

JSON: https://drive.google.com/open?id=0B3JnixYdZxDEaXgwY0o3UUVvNVk

Spreadsheet: https://docs.google.com/spreadsheets/d/1voDFeLxiKjbNpKXtUE4se0-lNqMTZVdA6bv0lSDIwXg/edit#gid=335422100

Confirmation:
Text three examples to SMS shortcode and observe in database.

Confirm events/thresholds for new CBS project - form (page 3)

Purpose:
When a CBS project has been created (#35) and defined (#37), the project owner should be able to confirm that the suggested health risk case/event definitions and alert thresholds are applicable to their community.

Example table shown to user:

Health risk Community case/event definition Alert threshold
Cholera Any person >5y with lots of watery diarrhoea 1

Fields are pulled from (#33 - event database) based on health risk selection in (#37 - CBS form). Fields are "greyed out" and not editable by default. Each row has an edit button at the end. When clicked "alert threshold" variable becomes numeric text editable. The new thresholds need to be saved with timestamp (do not overwrite original) #60 #55
Future feature: Community case definition can be edited #59.

A tick box is shown at the end of form stating
"the events and case definitions have been agreed with National MoH" (should not be required to tick - as this process of MoH approval might be lenghty and NS may need to demonstrate system in order to obtain approval).

Next box redirects to create new CBS project page 4 #62

Inbound API (SMS to Report database)

Purpose:
We want to connect SMS reports with our system for cleaning and issuing alerts.

Conversation:
The inbound API must contain:

<Phone number> <timestamp> <original message> 

Confirmation:
Reported SMS is visible in the report database #48

Evaluate alert form feedback

When an health coordinator has sent a form, the system must escalate the alert to the next level in the hierarchy or close the alert. If the form beeing evaluated is level 1 (#49) and the alert is to be escalated, the system shall generate and send level 2 form ( #53), etc.

The system must also trigger a volunteer feedback in #47 providing details on the outcome of the investigation

Send SMS alert message to volunteers

If an SMS report sent by a volunteer triggers a new alert in #43, the volunteer should receive an SMS message. If multiple volunteers have contributed to the triggered alert, all volunteers received an SMS.

The message should contain:

  • A short message that says that the reported case(s) issued an alert. Message defined in Admin.
  • Name and mobile number of the health coordinator that will follow up the alert
  • A "key message" describing what actions to take as defined in Admin

When the form response has been evaluated in #50, depending on the outcome a feedback is to be sent by SMS to the volunteers providing details on the outcome.

Health Risk storage

Purpose:
We need a location to store Health Risk, community case definitions, and suggested thresholds (for SMS escalation) in the administrative interface in order to reference in a new CBS project.

Conversation:
Each event has a designated code (numeric - continuous list) which is used for volunteer reporting (#46 - Defaulting reporting - Aggregate and #44 - Default reporting - single case) and does not change between countries and projects.

Data to populate new Health Risk storage (Health Risk TAB): https://docs.google.com/spreadsheets/d/1bfbfaTr6jx3ia7tOEZxDMDk-qrWAfS9vCoH2N-TG9zM/edit#gid=0

Constraints:

  • Must be able to add/remove Health Risk, including values (e.g. Update the Community Case definition).

Confirmation:
New CBS form "Health Risk" drop-down #37 is pre-populated with "Health Risk Name".

Be able to reactivate/deactivate a volunteer

One must be able to reactivate a deactivated volunteer

Volunteer should be able to deactivate themselves by sending SMS "Stop CBS"
Coordinator / project owner should be able to deactivate a volunteer in the system

SMS "Start CBS" should reactivate the volunteer if sent from a deactivated phone number stored in user database #13

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.