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

Rewrite this issue: Add backend and endpoints related to the status/timeline component #97

Open
tienyuan opened this issue May 7, 2019 · 1 comment
Assignees
Labels
status_NeedsIssuesMade type_TechnicalDebt May not be needed (need decision)

Comments

@tienyuan
Copy link
Member

tienyuan commented May 7, 2019

We'll need new endpoints to update the status for use with the status/timeline component (#84)

Currently we've got a status field in the participants table, it's an enumerable.
We need to add another field to this table to store which databases has been checked for this individual.

According to http://www.postgresqltutorial.com/postgresql-json/ we can use the json datatype to store json. And the json we store can be something like ...

{
  "CCHRS" : true,
  "W&W" : false,
  "DMV" : false,
  "TCIS" : false
}

We want to be able to change each database value to true/false independently.

Notes:

  1. please update init.sql for any changes/new field needed
  2. please add backend endpoints to the participant route for use with the status
  3. please add backend endpoints to the participants route for use with the database-checked
@ArataKagan
Copy link
Member

For init.sql database, I was thinking to create a new table for status and background check and define in the following way. Please let me know if you have any suggestions.

 CREATE TABLE status(
   id SERIAL PRIMARY KEY,
   status ENUM(
     'New Case',
     'Obligation Form Completed',
     'Waiting for Background Check',
     'Attorney Review',
     'Sent to Court',
     'Received From Court',
     'Sent to Participant',
     'Close')
 )

 CREATE TABLE background_check(
   id SERIAL PRIMARY KEY,
   cchrs BOOLEAN,
   w&w BOOLEAN,
   dmv BOOLEAN,
   tcis BOOLEAN,
   FOREIGN KEY (participant_id) REFERENCES participants (id)
 )

@tienyuan tienyuan added the type_TechnicalDebt May not be needed (need decision) label Jul 2, 2019
@tienyuan tienyuan self-assigned this Jul 2, 2019
@tienyuan tienyuan changed the title Add backend and endpoints related to the status/timeline component Rewrite this issue: Add backend and endpoints related to the status/timeline component Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status_NeedsIssuesMade type_TechnicalDebt May not be needed (need decision)
Projects
None yet
Development

No branches or pull requests

2 participants