pmeng / therapy-scheme-generator

1 stars 2 forks source link

Remake of therapy Scheme + add a new option "category" to therapy stubs #66

Closed pmeng closed 6 months ago

pmeng commented 7 months ago

I need categories in the software. Each therapy stub shall be assigned to exactly one category using a drop-down field in add/edit therapy stub.

Additionally a new configuration screen for categories shall be added. In this configuration screen new categories can be added, and categories can be deleted. If a category is assigned to therapy stubs upon deletion, then a message shall be shown to the user prompting to either manually move the therapy stubs to other categories (listing all therapy stubs affected - similar to the list when deleting a label) or to allow the user to let the software move all therapy stubs assigned to the category-to-be-deleted to a different category (selectable via dropdown-menu in the prompt). Categories consist out of a short-name (for the Dropdown menu) and a report name (for Printing on the therapy scheme) Additionally all categories have a sort-order for the printing in the report. Therefore in the list view of the categories the user can move the categories up/down by drag'n'drop functionality.

We need the categories for the therapy schemes and the print order. In the therapy scheme screen, the therapy stubs shall be organized according to their assigned categories (and the categories shall be ordered according to their respective order defined in the category configuration)

When adding therapy stubs based on a label to the therapy scheme, the sort order of the therapy stubs in the label shall be assigned to these stubs. When adding several labels, then the stubs of the first selected label shall be the first ones in the list, the ones of the next selected labels below that and so on. The label name shall be shown in the add/edit therapy scheme screen in a new field of the table on the very right of the table.

If a therapy stub is added to the screen based on more than one label, then all label names shall be put out on that screen. The label's "report name" shall be used.

So in the "therapy scheme" screen the output shall be like following ####################### Category 1

Title | Name | Description | Background | Comment | Label Name (from stub 1) Title | Name | Description | Background | Comment | Label Name (from stub 2) Title | Name | Description | Background | Comment | Label Name (from stub 3) Title | Name | Description | Background | Comment | Label Name (from stub 4)

Category 2 Title | Name | Description | Background | Comment | Label Name (from stub 5) Title | Name | Description | Background | Comment | Label Name (from stub 6) Title | Name | Description | Background | Comment | Label Name (from stub 7)

Category 3 Title | Name | Description | Background | Comment | Label Name (from stub 8) Title | Name | Description | Background | Comment | Label Name (from stub 9) Title | Name | Description | Background | Comment | Label Name (from stub 10)

#######################

In the report (HTML/PDF) The formatting shall be as following: (note: the label name will not be printed anymore)

#######################

Category Name 1 (HTML: h3) Therapy Stub 1 Description Therapy Stub 1 Comment

Therapy Stub 2 Description Therapy Stub 2 Comment

Therapy Stub 3 Description Therapy Stub 3 Comment

Therapy Stub 4 Description Therapy Stub 4 Comment

Category Name 2 (HTML: h3) Therapy Stub 5 Description Therapy Stub 5 Comment

Therapy Stub 6 Description Therapy Stub 6 Comment

Therapy Stub 7 Description Therapy Stub 7 Comment

Category Name 3 (HTML: h3) Therapy Stub 8 Description Therapy Stub 8 Comment

Therapy Stub 9 Description Therapy Stub 9 Comment

Therapy Stub 10 Description Therapy Stub 10 Comment

#########################

The option "use excerpt instead of description" shall be removed. Instead please implement the following buttons on the bottom of the screen:

Button 1: "Generate Patient Report (HTML)" Button 2: "Generate Patient Report (PDF)" Button 3: "Generate Short Report (HTML)" Button 4: "Generate Combined Report (HTML)"

Buttons 1 and 2 do generate the report as described above, using the "Description" of the therapy stubs (HTML or PDF, respectively) Button 3 generated the report as described above, using the "Excerpt" of the therapy stubs Button 4 generates the report using the "Description" first, and on the bottom of this report the report like generated by Button 3 is added to this report - so it basically is the same as if I would first excecute Button 1 und then Button 3 - in the same report.

Due to these changes the option "Use excerpt instead of description" can be removed.


Another change to be implemented is that the buttons on the screen shall be "floating" on the bottom - so even when on the top of the table these buttons shall be visible.

Due to these changes the table size shall be expanded to make use of the whole width of the browser window.

For migration issues a category named "default" shall be added and all therapy stubs that are already existing shall be assigned to that category.