Skip to content

nomlab/modernTimes

Repository files navigation

English | 日本語

modernTimes

modernTimes is a tool to assist nurses in creating schedules. The system has two methods for creating schedules.

  1. automatic generation by block programming
  2. manual generation by inputting and editing the schedule table In method 1, an AUK is generated by describing constraints with visual blocks using google Blockly, and the schedule is created using the AUK. AUK is a DSL (Domain Specific Language) that can describe nurse scheduling problems.

The system is based on AUK and can generate AUK not only from visual blocks but also from schedules. Therefore, the system enables interactive schedule creation by editing the AUK representing the schedule (adding constraints using blocks) and then solving the schedule again. The system uses an extension of Swallow for the schedule solver. Swallow uses SAT solvers for schedule solving.

Requirements

  • Ruby 3.1.2
  • ruby on rails 7~

Setup

modernTimes

  1. Download modernTimes
    $ git clone https://github.com/nomlab/modernTimes.git

SAT solver install

  1. Install Minisat
     $ sudo apt install minisat

Launch

Preparation

  1. Execute bundle install
    $ bundle install
  2. Execute npm install
    $ npm install
  3. Create a DB
    $ bundle exec rails db:migrate RAILS_ENV=prooduction

Linux

  1. Launch
$ ./bin/server.sh start production

After launching, open http://localhost:54321 in your browser to open the modernTimes screen

Install for developpers

  1. Download modenTimes
    $ git clone https://github.com/nomlab/modernTimes.git
  2. Install Minisat
     $ sudo apt install minisat
  3. Execute bundle install
    $ bundle install
  4. Execute npm install
    $ npm install
  5. Create a DB
    $ bundle exec rails db:migrate RAILS_ENV=development
  6. Create a dummy data
    $ bin/rails runner scripts/create_dummy_data.rb
    
  7. Launch
    $ ./bin/server.sh start development

After launching, open http://localhost:3000 in your browser to open the modernTimes screen

ER diagram

%%{init:{'theme':'base','themeVariables':{'primaryColor':'#ffffff','primaryTextColor':'#ffffff','primaryBorderColor':'#000000','secondaryColor':'#000000','lineColor':'#000000','noteTextColor':'#000000','noteBkgColor':'#000000','textColor':'#000000','fontSize':'20px','fontFamily':''},'themeCSS':"text.actor {font-size:24px !important;}"}}%%
 erDiagram
   rails_nurses }|--|| teams : "many to one"
   rails_nurses ||--|{ assignments : "one to many"
   assignments }|--|| shift_types : "many to one"
   rails_nurses {
     integer id PK
     string name "name"
     integer ladder_level "1-5: the more experienced, the bigger"
     references team_id FK
   }

   teams {
     integer id PK
     string name "team name"
   }

   assignments {
     integer id PK
     date date "date"
     references rails_nurse_id FK
     references shift_type_id FK
     integer state "number of states such as fixed, unfixed, requested, etc"
   }

   shift_types {
     integer id PK
     string name "Shift type (day, semi-night, night, rest, etc)"
     integer kind "Type of how the value is handled"
   }
Loading

About

No description, website, or topics provided.

Resources

License

Unknown, Apache-2.0 licenses found

Licenses found

Unknown
LICENSE
Apache-2.0
blockly_LICENSE.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published