Code Monkey home page Code Monkey logo

clinr's People

Contributors

moozeq avatar

Watchers

 avatar  avatar

clinr's Issues

Database schema and CRUD for `Appointments`

Description

Create basic back-end part for Appointments which are conducted under specific Study (#7) in specific Facility (#4) by User with a "doctor" Role (#3) to register specific Patient (#5) visit in facility.

Prerequisites

Acceptance criteria

  • Create database schema for Appointment class using sequelize-typescript with fields:
    • date
    • type - visit type, allowed values: drugAdminitration (drug administered during the visit), checkup (checkup for doctor to see if there are any adverse effects between drug administrations), followup (visit 1 month after completed study by patient), survivalCheck (visit 1 year after followup to register long-term effects)
    • description
    • adverseEffects[] - registered adverse effects based on the interview with the patient (#8)
    • patient
    • doctor
    • facility
  • Add CRUD for Appointment but only accessible for authorized Users with "doctor" Role
  • Add association one-to-one for Appointment and Patient (#5)
  • Add association one-to-one for Appointment and User(doctor who conducted the visit)
  • Add association one-to-one for Appointment and Facility (#4)
  • Add association one-to-many for Appointment and AdverseEffects (#8)

View for viewing and selecting `Roles` for currently logged `User`

Description

User should be able to select his Roles. For MVC there will be no restrictions, but solution should be prepared for future permissions functionalities based on Roles.

Acceptance criteria

  • Simple IAM view for currently logged User, where he can see and select/unselect other Roles and apply the set to his account

Improve scopes for data models

Description

Instead of having one scope 'full' make a list of scopes passing to services managing data models. Additionally, add 'resource' scope for retrieving only Resource-related properties. Moreover, add 'archived' scope to include archived items.

Acceptance criteria

  • Add additional joint scopes (e.g. 'doctors' for Facilities)
  • Add 'resource' scope for each Resource-based class to return only Resource-related properties
  • Add 'includeArchived' scope with paranoid = false
  • Add 'includeTimestamps' scope for retrieving createdAt, updatedAt and deletedAt values

Estimated: 2 SP

View for creating and editing `Facilities`

Description

User with Role 'director' or 'admin' should be able to see view for creating and editing Facilities. All data specific to Facility class should be filled accordingly to optionality and data types.

Acceptance criteria

  • View for managing Facilities available only for specific Users
  • Option to see all Facilities
  • Option to add new Facility
  • Option to edit simple data for selected Facility
  • Option to assign and dismiss doctors for selected Facility (Users with 'doctor' role)

Database schema and CRUD for `AdverseEffects`

Description

Create basic back-end part for AdverseEffect which is similar to popular tags functionality. Users can select adverse effects that are already in database or add new ones which will be automatically registered.

Acceptance criteria

  • Create database schema for AdverseEffect class using sequelize-typescript with fields:
    • name
  • Add CRUD for AdverseEffect

Database schema and CRUD for `Patients`

Description

Create basic back-end part for Patients (they are not Users and they can't log in the application) and they can be added by Users with "doctor" Role.

Prerequisites

Acceptance criteria

  • Create database schema for Patient class using sequelize-typescript with fields:
    • ssn Social Security number (or any other unique country-specific ID)
    • status - patient's status, allowed values: waiting, in-progress, completed, discontinued
    • name
    • surname
    • telephone? (optional)
    • email? (optional)
    • address? (optional)
    • medicalHistory - description of medical history of the patient
    • files - medical reports, column needs to be encypted!
    • meta - metadata dictionary where other less specific information can be stored
  • Add CRUD for Patients but only accessible for authorized Users with "doctor" Role
  • Add association one-to-many for Facilities (#4) and Patients

View for viewing, creating with PDF instruction file and editing `Protocols`

Description

Users with 'director' Role should be able to see, add new (with uploading PDF instruction file) and edit currently added Protocols. Users with 'doctor' Role should only be able to see protocols and download instructions in PDF file.

Acceptance criteria

  • View for viewing all Protocols and easily download corresponding instructions
  • Option to select and download multiple Protocols instructions at once
  • Option to add new Protocol for directors
  • Option to edit currently added Protocols for directors (but without changing content of the intruction file)
  • Option to archive selected Protocols

Database schema and CRUD for `Studies`

Description

Create basic back-end part for Studies which are coducted in accordance with Protocols (#6) instructions.

Prerequisites

Acceptance criteria

  • Create database schema for Study class using sequelize-typescript with fields:
    • status - study's status, allowed values: waiting, in-progress, completed, discontinued
    • name
    • description
    • startDate
    • endDate
    • protocol - Protocol for the study with drug administration instruction
    • facilities[] - Facilities which are included in the study
  • Add CRUD for Study but only accessible for authorized Users with "director" Role
  • Add association one-to-many for Studies and Facilities (#4)
  • Add association one-to-one for Studies and Protocols (#6)

Database schema and predefined `Roles`

Description

Create basic back-end part for Roles which will be used to distinguish between several types of users.

Acceptance criteria

  • Create database schema for Role class using sequelize-typescript with fields:
    • name
  • Add predefined Roles instances: admin, director, doctor
  • Add association many-to-many for Users and Roles

Estimated: 3 SP
Completed: 5 SP

User log in and log out functionality

Description:

Implement functionality for user to log in to and log out from the application.

Acceptance criteria:

  • Auth service on the backend
  • Simple modal to log in on the frontend

Estimated: 5 SP
Completed: 8 SP

View for registering new users and welcome home screen

Description

For users who are not logged in, there should be a view to register as a new user. User should not have any role. There will be no email confirmation for now.

Acceptance criteria

  • User who is not logged in, should be able to select a view for registering and to input:
    • name
    • username
    • email
    • password
  • After login, user should see a welcome screen with a navbar where his name and roles are displayed

Estimated: 3 SP
Completed: 12 SP
Comment: Multiple issues along the way, extended scope (see PR #28).

Refactor database schema to use `Resource` base class

Description

Since several classes share the same properties (uuid, name, description) we can refator models schema to utilize common component Resource. Unfortunatelly, Sequelize doesn't support simple extends for joint table inheritance (as it is in e.g. SQLAlchemy), so we need to use some gimmicks (extending tables with base Model<T>).

Acceptance criteria

  • Create Resource base model with following fields:
    • uuid
    • name
    • description
  • Make User, Facility and Role extend Resource class

Estimated: 3 SP
Completed: 3 SP

Database schema and CRUD for files

Description

There should be a way to upload and download files with the application.

Acceptance criteria

  • Database schema for files which should extends Resource data model
  • CRUD but with update only for name and description, not content of the file

Estimated: 2 SP
Completed: 3 SP

Fix `Users` not being archived properly

Description

When archiving user from users table, it is deleted completely instead of being archived. Users table should have paranoid = true as other Resource-based tables.

Database schema, CRUD and predefined `Protocols`

Description

Create basic back-end part for Protocols which are instructions how drugs should be administered.

Acceptance criteria

  • Create database schema for Protocol class using sequelize-typescript with fields:
    • name
    • description
    • instruction - PDF file with instructions how drug administration should be conducted
    • files - additional files that may be required for Protocol (limiting scope)
    • meta - metadata dictionary where other less specific information can be stored
  • CRUD, especially for updating Protocols (can't update file - limiting scope)
  • Add predefined Protocol instance - {"name": "mRNA vaccine administration", "instruction": <sample pdf file>, "meta": {}}

Estimated: 3 SP
Completed: 5 SP

Database schema and predefined `Facilities`

Description

Create database schema for Facilities - places where patients will have appointments with doctors (Users with "doctor" Role) who are able to register users and their visits, along with predefined one.

Acceptance criteria

  • Create database schema for Facility class using sequelize-typescript with fields:
    • name
    • description
    • address
    • email? (optional)
    • telephone? (optional)
    • doctors[]
  • Add association many-to-many for Facilities and Users
  • Add predefined Facility instance - {"name": "The Johns Hopkins Hospital", "description": "Teaching hospital and biomedical research facility.", "address": "1800 Orleans Street, Baltimore, Maryland, United States", "email": "", "telephone": "410-955-5000"}

Estimated: 8 SP
Completed: 3 SP

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.