Giter VIP home page Giter VIP logo

jethuestad / early-pregnancy-risk Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 2.0 2.8 MB

During pregnancy, women are at risk of various complications affecting their individual health (gestational diabetes, pre-eclampsia) as well as the fetal health (pre-term birth, miscarriage, fetal heart defects). The goal of this project is to build a web tool for pregnant women to feed in their individual data and obtain the risk socres for various pregnancy complications.

JavaScript 49.58% Python 50.42%
health webtool django react-native python javascript

early-pregnancy-risk's Introduction

Early Pregnancy Risk Project

Pregnant or planning for a baby? This tool will make you assess your health status for a healthy pregnancy and a complication free birth. By filling in your personal health measurements, this tool will estimate risk for developing common pregnancy complications below.

  • Miscarriage
  • Gestational Diabetes Mellitus
  • Preeclampsia
  • Pre-term birth
  • Still birth
  • Caesarean section
  • Postpartum depression

It is important to note that the tool will provide you with the risk of an ‘average‘ woman with your health measures and NOT your personal risk score. It is also important to note that the model does not take into many other psychosocial factors affecting maternal outcome.

Go to the Wiki for information about the project.

Server and Client

The server and client folder contain seperate projects. When committing changes, please do not change code in both projects at the same time. The server and client does not communicate though code, it communicates though a REST API and will be deployed in different environments.

Workflow

When commiting large changes to the project please set up a pull request, this is so that it can be peer-reviewed before it's merged into the codebase.

When creating a branch for a feature / bug-fix it should be named like this: type/issue-number/note, eg:

  • bug/32/post_request
  • enhancement/4/header
  • refactoring/51/request_module

NOTE: If an issue doesn't already exist, create it before making the branch.

early-pregnancy-risk's People

Contributors

admiral3n avatar alexanderdebattista avatar jethuestad avatar sindrkristensen avatar thomasstorli avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

admiral3n zaynaab

early-pregnancy-risk's Issues

Implement a system to deliver translations.

We need a system that can deliver translations of individual components in the website, such as question text, front page text, button text, etc.

Using a model with 4 fields might be a good starting point:

translation_model_object:
  id: GUID
  component_name: string
  language_code: string
  content: string

In the case of a missing object, a fallback system should be available, such as sending back a default language.


The translation might be obtained by a simple GET request, with a body such as this:

{
  "component_name": "question_1",
  "language_code": "en"
}

With a response such as:

{
  ...
  "content": "What is your age?"
}

Get factors from the server

Get the factors from the server instead of the hard-coded version.

Server side changes are currently part of issue #2

Divide factors into logical sections.

Create a way for factors to be grouped together such that one factor can have "sub" factors. An example would be the parity factor, which when > 0 has some accompanying questions.

{
  "factor": "parity",
  "question": "...",
  "answertype": "int",
  "maxdigits": 1,
  "requirement": ">;0",
  "subfactors": [
    {...},
    {...}
  ]
}

This way we can create a nested system of factors which only show up when we want to.

For the "requirement" the point is to give a way for the system to know if the subfactors should be displayed.

Requirements should have a syntax like: comparator;value such as >;0, =;T, <=;5, etc.

Comparator Value
= int or T/F
>, <, >=, <= int

Fetch flags (language select) from the server

Part 1: Implement a system which can send a png (or link to a png on the server), and the language code to the client.
Part 2: Implement a dynamic language select, which populates the flag list based on the information given by the server.

Warning when opening references on Android and iOS

Error message:

Warning: Failed child context type: Invalid child context virtualizedCell.cellKey of type number supplied to CellRenderer, expected string.

Steps to reproduce:

  1. Run Metro in standard mode (Not production mode)
  2. Open on Android/iOS Device (either in emulator or by QR code)
  3. Press “Start Risk Assessment” and then “Click to see why we need this information”

image

Preserve state when changing language

When changing language, you automatically jump back to the landing page.
Instead, we should try to preserve the current state of the site so that the questionnaire answers are not lost when changing the language.

Add unit descriptors to the integer factors, such as cm and kg.

While testing I realized that people who will use the site from countries like the UK will use the Imperial system for weight and height. To keep confusion to a minimum we should include a unit descriptor next to the text input such as:

______ kg

______ cm

Accessibility problem with screen magnification.

Lighthouse accessibility problem with screen magnification.

[user-scalable="no"] is used in the <meta name="viewport"> element or the [maximum-scale] attribute is less than 5.

"Disabling zooming is problematic for users with low vision who rely on screen magnification to 
properly see the contents of a web page."

The diet-non-varied factor needs to be reversed in the back-end.

A common problem is that the question "Is your diet non-varied" is very hard to understand, because of this we should just hardcode that diet-non-varied is a specific case where if the answer is True then it should be treated as False.

The front-end question will then be something like "Do you have a varied diet".

The diet-non-varied keyword should be changed to diet-varied

Removed code in json_utils.py so that it would work with the changes. This should be reverted.

@AlexanderDeBattista

Instead of going through the validation process, I am just returning the original dictionary. This is because the validation dict was not updated. Maybe there's a better way to do this? If that list is not updated, the whole page is useless.

Maybe we should just remove the keys that are not valid? (That does seem like it will create problems in the future, problems that may be very hard to track down).

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.