Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have posibility in RM to complete set of records #18

Closed
blcham opened this issue Nov 29, 2023 · 14 comments
Closed

Have posibility in RM to complete set of records #18

blcham opened this issue Nov 29, 2023 · 14 comments
Assignees

Comments

@blcham
Copy link

blcham commented Nov 29, 2023

Image

Roles:

  • OU - operator regular user
  • OAU - operator admin user
  • SAU - supplier admin user

Scenario is:

  1. OU edits + save records -- he can see in list of records that this record is not complete
  2. OU complete-s records -- he hits a button next to Save button called "Complete/Close record"
  3. OAU can see which records are completed/not completed and there is a button "Publish" to publish all the completed records
  4. SAU - opens records sent by OAU (BTW, all of the records are again not completed)
  5. SAU edits + save records -- he can see in list of records that this record is not complete
  6. complete-s/reject records -- he hits a button next to Save button called "Complete/Close record" or "Reject record"
  7. OAU can see which records are completed/not completed/rejected -- i would call completed --> accepted

The idea:

Image

OU/OAU will see:

Image

SAO will see:

Image

@blcham
Copy link
Author

blcham commented Nov 29, 2023

  • My first idea is to reuse model. Most likely we have in json something like "record.completed" and we could add "record.rejected" and reuse this model for everything.

  • it is important that we can configure labels, like "Approve" is same label as "Close" but in a different deployment using environment variables (i would imagine something like read first variable from environment if it does not exist use label from json file)

  • do all in 3 iterations:

    • Implement "complete" functionality first
    • Extend with reject
    • Possibility to configure

@LaChope
Copy link
Collaborator

LaChope commented Nov 30, 2023

Operator Admin (check extension = operator && user = admin):

  • Publish Completed Records in Records dashboard

@blcham
Copy link
Author

blcham commented Dec 7, 2023

@LaChope Implementation on server-side is completed, you should be able to test based on PR -- kbss-cvut/record-manager#31.

Use docker image *:pr-31 instead of *:latest.

@LaChope
Copy link
Collaborator

LaChope commented Dec 8, 2023

@blcham @kostobog I cannot create nor open form when I use this image (see screenshot below), I tried both in admin and regular user.

image

@blcham
Copy link
Author

blcham commented Dec 8, 2023

@kostobog

@kostobog
Copy link

kostobog commented Dec 8, 2023

I changed the model to work with enum. Now records in json format can be deserialized when the value of the state property is one of - "open", "valid", "completed" and "published".
Unfortunately, I could not test it locally.
The new version is in kbss-cvut/record-manager#31.

@LaChope
Copy link
Collaborator

LaChope commented Dec 11, 2023

@kostobog I did docker compose pull but still had the same issue.

@blcham Is the new image of pr-31 deployed?

@kostobog
Copy link

@LaChope @blcham
Updated kbss-cvut/record-manager#31 resolves the PatientRecord.state deserialization issue on the server side. Tested with record manager docker image version pr-31.

@kostobog
Copy link

@LaChope @blcham
Updated kbss-cvut/record-manager#31. Record state is refactored to record phase.

I tested the record-manager-server image version pr-31 in record-manager-ui/deploy/internal-auth/docker-compose.yml. The record phase is persisted in db-server.

@LaChope
Copy link
Collaborator

LaChope commented Dec 12, 2023

@kostobog It is now working for Record when I GET /rest/records/xxx but I also need to get the phase when I retreieve by institution GET /rest/records?institution=xxx or when I get the full list of records

@blcham

@kostobog
Copy link

@LaChope I updated kbss-cvut/record-manager#31 to return the phase for /rest/records?institution=xxx.

@LaChope
Copy link
Collaborator

LaChope commented Dec 13, 2023

I changed the model to work with enum. Now records in json format can be deserialized when the value of the state property is one of - "open", "valid", "completed" and "published". Unfortunately, I could not test it locally. The new version is in kbss-cvut/record-manager#31.

@kostobog @blcham I think there is one enum missing "rejected"

@kostobog
Copy link

@LaChope added rejected in kbss-cvut/record-manager#36.

@blcham
Copy link
Author

blcham commented Dec 13, 2023

@LaChope
Feedback:

General:

  • Completion status --> Status

OU:

  • OU should see completion status
  • OU should be able to complete the record
  • OU cannot do anything with after completed record
    • no save or complete button
    • disabled record (LOW PRIORITY -- can be put to new ticket)

OUA:

  • Publish -- Publish Completed Record
  • Can save record unless it is already published

LaChope added a commit that referenced this issue Dec 13, 2023
@blcham blcham closed this as completed in 2488108 Dec 13, 2023
LaChope added a commit that referenced this issue Dec 14, 2023
blcham pushed a commit that referenced this issue Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants