Skip to content

ninercav/MMM-Webapp

Repository files navigation

FWE Malteser App

coverage

The FWE Malteser App was developed as a means to keep track of patients that visits the Malteser Migranten Medizin in Frankfurt (a nonprofit organisation that is active in medicine and care). The app provides the following features:

  1. authentication for users via user accounts
    • doctors and helping staff receive separate accounts
    • the application uses JSON Web Tokens (JWT) for authentication
  2. a way to create and edit patient records. these records have the following features:
  3. a way to create and edit consultation records
  4. a way to create and keep track of the medications inventory
    • the application also sends out an email to a specified email address once a medications stock runs low.
  5. support for different digital devices:
    • tablets
    • laptops/desktop computers
  6. the application can generate statistics for the current year with a simple button press
  7. the application also has an autocomplete feature for inputting diagnoses and automatically finding the corresponding ICD-10 code for it. A separate npm package was developed for the search of ICD-10 diagnoses.

The backend and frontend of the application have automatic tests that are run in the pipeline whenever a commit occurs. They can also be run manually.

Deployment with docker

This app can be started locally in a dev environment (see the backend and frontend local installation guides), or it can be started from the docker compose file. Just execute docker-compose -f deploy-compose.yml up -d in the project source directory, and the images for the backend and frontend will be pulled from the docker hub.

Initial registration

For security reasons (following from discussion with other members of the Malteser team) there is no option to register users in the frontend. Instead, it is directly done in the backend (see documentation). In order to register new doctors (and helpers), the following POST request to the /auth/register endpoint has to be made:

{
    "role": "doctor",
    "email": "mike.ross@gmail.com",
    "lastName": "Ross",
    "password": "best_password",
    "firstName": "Mike",
    "telephoneNumber": "123456789"
}

Alternatively, run this curl command in the terminal of your choice:

curl --request POST \
--url localhost:3000/auth/register \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"role": "doctor",
"email": "mike.ross@gmail.com",
"lastName": "Ross",
"password": "best_password",
"firstName": "Mike",
"telephoneNumber": "123456789"
}'

Backend local installation

The .env file was not included in the repository, as it contains personal information (the email account credentials used for one of the features). The necessary credentials have been provided to our betreuer. Include a .env file with the following variables in the /backend directory:

PORT=3000
DB_HOST="localhost"
DB_PORT=5432
DB_NAME="malteserDB"
DB_USER="admin"
DB_PASSWORD="admin"
JWT_SECRET='JWT_SECRET'
BCRYPT_SALT=10
EMAIL='EMAIL_CREDENTIALS' # will be provided to Betreuer
EMAIL_PASSWORD='PASSWORD_CREDENTIALS' # will be provided to Betreuer
MEDICATION_THRESHOLD=10
EMAIL_RECIPIENT='' # target email where notifications will be sent

After adding the .env file, run the following commands in the backend directory:

  1. npm install
  2. docker-compose up -d
  3. npm run schema:fresh
  4. npm start

The server will now be running locally on port 3000. See initial registration to get started after the server is running.

Local testing

In the backend directory, run npm test to start the tests (do this after starting docker compose!).

Frontend local installation

The frontend uses yarn as its package manager, so please make sure to install it before performing the following steps in the frontend directory:

  1. yarn install
  2. yarn dev

The website will now be available on localhost:5173.

Local testing

In the frontend directory, run yarn vitest to start the tests.

Backend documentation

The backend documentation can be found on Stoplight. In case it is not accessible for whatever reason, the OpenAPI specification can also be found locally.

Some operations that are typical for CRUD systems are not available in this application due to EU/German legal restrictions of handling medical records. That is why, for instance, patient and consultation records cannot be deleted (patient records are instead archived). Registration of personnel will also be done manually by the administrator, and as such also wasn't included in the UI part of the application.

Website Overview

Landing page (patients)

Alt text

  1. Click whichever page you want to go to next.
  2. Create a new patient.
  3. View the patient in more detail. The d2 signifies that this is a digital ID. The ID will start with a p (ex. p2) should the patient already possess a physical ID.
  4. Edit the patient.
  5. Create a consultation for this patient.

Creating a Patient

Alt text

  • The Bearbeiten switch will enable and disable editing of the patient information.
  • The Archivieren switch will archive the user.
  • Should you select Physisch for Karteityp a text field will open up for you to type in the physical ID.
  • All attributes marked with * are mandatory.

Editing a Patient

Alt text

  • To add a consultation you need to click SPRECHSTUNDE HINZUFÜGEN. This will open a page for you to create it. To edit an indiviudal consultation just scroll the bar beneath the consultations and the necessary icons will appear.
  • In the Labor Daten section the user can upload laboratory findings as pdfs. These include bloodwork or other medical analyses. Each pdf has a designated date which can be specified by the user in the Laborbefund Datum field. It is strongly recommended for it to be set to the date the analysis took place (to keep in line with the organisational practices at the Malteser).

Example: Alt text

Edit Consultation

Alt text

  • Upon selection of a diagnosis the corresponding ICD-code will entered into the ICD Code field.
  • To add a medication to the consultation select ja for Medikament then HINFÜGEN. This will add a field for you to select the desired medication and it's quantity. To remove it click the - icon next to the amount (Menge).

Medications

Alt text

  • To edit the medication click the edit icon.
  • To delete the medication click the trash icon.

Consultations

Alt text

  • To edit the consultations click the edit icon.
  • To delete the consultations click the trash icon.

Logout/Generate Statistics

Alt text

  • By clicking the profile picture you can generate a statistics file or logout.

Contribute

Authors

  • Amirhossein Rahimnazari @stamrahim
  • Leah Iliyav @stleiliya
  • Omeliia Adoevtceva @stomadoev
  • Samuel Hasert @stsahase

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages