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

Implement get by intake_id for all services relating to intake #209

Merged
merged 22 commits into from
Oct 10, 2023

Conversation

jacque1ine
Copy link
Contributor

Notion ticket link

Implement get by intake_id for all services relating to intake

Implementation description

  • Wrote get by intake id methods for goals, daytime_contacts, caregivers, child, and other_permitted_individuals
  • Wrote get by child id for providers
  • Edited get_all_intakes method in the GET route for intakes to return the proper object: Calling the GET intake route now return response that matches Intake Frontend<>Backend
  • Add new column to daytime_contacts table with intake_id

Steps to test

  1. All case cards should show on the dashboard
  2. Use postman to test GET requests with each of the status

What should reviewers focus on?

Checklist

  • My PR name is descriptive and in imperative tense
  • [] My commit messages are descriptive and in imperative tense. My commits are atomic and trivial commits are squashed or fixup'd into non-trivial commits
  • I have run the appropriate linter(s)
  • I have requested a review from the PL, as well as other devs who have background knowledge on this PR or who will be building on top of this PR

@jacque1ine jacque1ine requested a review from a team October 4, 2023 02:54
@jacque1ine jacque1ine added the bug Something isn't working label Oct 4, 2023
@jacque1ine jacque1ine removed the bug Something isn't working label Oct 5, 2023
Copy link
Collaborator

@Ezzhingy Ezzhingy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm im getting an err when trying to upgrade the db—it seems that multiple heads r present when u made some migrations
Screenshot 2023-10-08 at 6 41 40 PM
could u try merging the heads by running docker exec -it cas_py_backend /bin/bash -c "flask db merge heads -m "merging two heads""? lmk if this doesn't work

"longTermGoals": goal_service.get_goal_names_by_intake(
intake.id, "LONG_TERM"
),
"familialConcerns": ["concern1", "concern2"],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think its ok to leave this as an empty array

Comment on lines +129 to +131
"transportRequirements": "",
"schedulingRequirements": "",
"suggestedStartDate": "",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

substitute lines ~177-183 into this to fill these in

        "transportation_requirements": request.json["programDetails"][
            "transportRequirements"
        ],
        "scheduling_requirements": request.json["programDetails"][
            "schedulingRequirements"
        ],
        "suggested_start_date": request.json["programDetails"]["suggestedStartDate"],

"cpinFileNumber": child.cpin_number,
"serviceWorker": child.service_worker,
"specialNeeds": child.special_needs,
"concerns": [],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im gonna ask bowen abt the struct of the Child class/DTO, cuz it doesn't rly make sense to have this as an empty arr—i'll get back to u on this

@jacque1ine jacque1ine requested a review from Ezzhingy October 10, 2023 00:25
Copy link
Collaborator

@Ezzhingy Ezzhingy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!! ship it 🚢

@jacque1ine jacque1ine merged commit 30a592e into main Oct 10, 2023
5 checks passed
@jacque1ine jacque1ine deleted the jakcie/new-get-intake-id branch October 10, 2023 01:57
odis43 pushed a commit that referenced this pull request Nov 23, 2023
* get caregiver by id works

* fix intake id

* add caregiver itnerface

* add child service works, and appending to intake works

* get opi by intake id working

* fix caregiver method

* make caregiver like jenny's

* get children working

* refactored get children

* providers work

* fix caregivers

* opi works

* add column to daytime_contacts and add goals to intake

* daytime contacts working

* add interface

* run linter

* fix goals and tests

* Update seed for better testing

* made changes based on review

* revert changes to program details

---------

Co-authored-by: Eugene Zhang <zhang.eug@gmail.com>
odis43 pushed a commit that referenced this pull request Nov 23, 2023
* get caregiver by id works

* fix intake id

* add caregiver itnerface

* add child service works, and appending to intake works

* get opi by intake id working

* fix caregiver method

* make caregiver like jenny's

* get children working

* refactored get children

* providers work

* fix caregivers

* opi works

* add column to daytime_contacts and add goals to intake

* daytime contacts working

* add interface

* run linter

* fix goals and tests

* Update seed for better testing

* made changes based on review

* revert changes to program details

---------

Co-authored-by: Eugene Zhang <zhang.eug@gmail.com>
odis43 added a commit that referenced this pull request Nov 29, 2023
* visit.py for DELETE CRUD function

* delete_visit implementation

* delete_visit bug fixed

* spelling error fix (attendace to attendance)

* initial commit

* initial

* visit put endpoint implemented

* added attendance_record_service.py interface

* Update attendance sheet fields (#208)

* finalized attendance sheet field changes

* Perform linting

* Remove month field from attendance sheet DTO

* fixed linting

---------

Co-authored-by: Omer Adeel <oadeel@uwaterloo.ca>

* Implement get by intake_id for all services relating to intake (#209)

* get caregiver by id works

* fix intake id

* add caregiver itnerface

* add child service works, and appending to intake works

* get opi by intake id working

* fix caregiver method

* make caregiver like jenny's

* get children working

* refactored get children

* providers work

* fix caregivers

* opi works

* add column to daytime_contacts and add goals to intake

* daytime contacts working

* add interface

* run linter

* fix goals and tests

* Update seed for better testing

* made changes based on review

* revert changes to program details

---------

Co-authored-by: Eugene Zhang <zhang.eug@gmail.com>

* fix program detail values and review form (#205)

* fix program detail values and review form

* remove log

* fix positioning of icons in program intake form

---------

Co-authored-by: Omer Adeel <oadeel@uwaterloo.ca>

* Merge db heads (#213)

* Implement visit component skeleton (#202)

* Implement visit component skeleton

* fix linting

* Fix small comments

* fix linting issue

* Wrapped exit arrow with button

* lint

* Kevin y/implement attendance record service (#210)

* Created attendance sheet service, routes (in visit.py), and test

* Fixed test b/c attendance sheet got updated

* Fix edit caregiver to delete logic (#215)

* Fit Intake Cases (#212)

modified position, padding, and case width

* Refactor case over routing to display proper case data (#214)

* Add dynamic routing and data read on case overview

* fix linting

* change data saving for caseLead

---------

Co-authored-by: Omer Adeel <oadeel@uwaterloo.ca>

* Implement Visit REST Endpoints (GET) (#211)

* Create visit.py

* Run linter and instantiate visit.py

* Implement GET visits endpoints

* Stylistic changes

* Run linter

* Make requested changes

* Add interface descriptions & Fix Wordings (#220)

* Fix sheet funciton name

* Sheet interface chore

* Sheet & Behavior chore

* Fill in Additional Fields and Restructuring Object for GET Intake  (#217)

* got transportRequirements, schedulingRequirements, and suggestedStartDate working

* everything working except child behaviour

* make concerns work

* run linter

* implement PR changes

* implemented pr changes pt 2

* lint code'

* load cases in view all cases page (#219)

* Fix: Replace lead with referringWorker (#223)

Replace lead with worker

* visit.py for DELETE CRUD function

* delete_visit bug fixed

* spelling error fix (attendace to attendance)

* initial commit

* initial

* visit put endpoint implemented

* pr changes

* linting backend

---------

Co-authored-by: Omer Adeel <57784751+omeradeel26@users.noreply.github.com>
Co-authored-by: Omer Adeel <oadeel@uwaterloo.ca>
Co-authored-by: Jacqueline Fung <fungjsl@gmail.com>
Co-authored-by: Eugene Zhang <zhang.eug@gmail.com>
Co-authored-by: Bowen Zhu <43287170+bowenzhu1@users.noreply.github.com>
Co-authored-by: Eugene Zhang <86681988+Ezzhingy@users.noreply.github.com>
Co-authored-by: Kevin Yan <70108329+kevinasian122@users.noreply.github.com>
Co-authored-by: Cindy Li <82128464+cindyhjli@users.noreply.github.com>
Co-authored-by: JoshuaYe <joshua.ye@live.com>
Co-authored-by: Jenny Vong <jenny_vong@outlook.com>
jacque1ine added a commit that referenced this pull request Dec 11, 2023
* visit.py for DELETE CRUD function

* delete_visit implementation

* delete_visit bug fixed

* spelling error fix (attendace to attendance)

* initial commit

* initial

* visit put endpoint implemented

* added attendance_record_service.py interface

* Update attendance sheet fields (#208)

* finalized attendance sheet field changes

* Perform linting

* Remove month field from attendance sheet DTO

* fixed linting

---------

Co-authored-by: Omer Adeel <oadeel@uwaterloo.ca>

* Implement get by intake_id for all services relating to intake (#209)

* get caregiver by id works

* fix intake id

* add caregiver itnerface

* add child service works, and appending to intake works

* get opi by intake id working

* fix caregiver method

* make caregiver like jenny's

* get children working

* refactored get children

* providers work

* fix caregivers

* opi works

* add column to daytime_contacts and add goals to intake

* daytime contacts working

* add interface

* run linter

* fix goals and tests

* Update seed for better testing

* made changes based on review

* revert changes to program details

---------

Co-authored-by: Eugene Zhang <zhang.eug@gmail.com>

* fix program detail values and review form (#205)

* fix program detail values and review form

* remove log

* fix positioning of icons in program intake form

---------

Co-authored-by: Omer Adeel <oadeel@uwaterloo.ca>

* Merge db heads (#213)

* Implement visit component skeleton (#202)

* Implement visit component skeleton

* fix linting

* Fix small comments

* fix linting issue

* Wrapped exit arrow with button

* lint

* Kevin y/implement attendance record service (#210)

* Created attendance sheet service, routes (in visit.py), and test

* Fixed test b/c attendance sheet got updated

* Fix edit caregiver to delete logic (#215)

* Fit Intake Cases (#212)

modified position, padding, and case width

* Refactor case over routing to display proper case data (#214)

* Add dynamic routing and data read on case overview

* fix linting

* change data saving for caseLead

---------

Co-authored-by: Omer Adeel <oadeel@uwaterloo.ca>

* Implement Visit REST Endpoints (GET) (#211)

* Create visit.py

* Run linter and instantiate visit.py

* Implement GET visits endpoints

* Stylistic changes

* Run linter

* Make requested changes

* Add interface descriptions & Fix Wordings (#220)

* Fix sheet funciton name

* Sheet interface chore

* Sheet & Behavior chore

* Fill in Additional Fields and Restructuring Object for GET Intake  (#217)

* got transportRequirements, schedulingRequirements, and suggestedStartDate working

* everything working except child behaviour

* make concerns work

* run linter

* implement PR changes

* implemented pr changes pt 2

* lint code'

* load cases in view all cases page (#219)

* Fix: Replace lead with referringWorker (#223)

Replace lead with worker

* visit.py for DELETE CRUD function

* delete_visit bug fixed

* spelling error fix (attendace to attendance)

* initial commit

* initial

* visit put endpoint implemented

* pr changes

* linting backend

---------

Co-authored-by: Omer Adeel <57784751+omeradeel26@users.noreply.github.com>
Co-authored-by: Omer Adeel <oadeel@uwaterloo.ca>
Co-authored-by: Jacqueline Fung <fungjsl@gmail.com>
Co-authored-by: Eugene Zhang <zhang.eug@gmail.com>
Co-authored-by: Bowen Zhu <43287170+bowenzhu1@users.noreply.github.com>
Co-authored-by: Eugene Zhang <86681988+Ezzhingy@users.noreply.github.com>
Co-authored-by: Kevin Yan <70108329+kevinasian122@users.noreply.github.com>
Co-authored-by: Cindy Li <82128464+cindyhjli@users.noreply.github.com>
Co-authored-by: JoshuaYe <joshua.ye@live.com>
Co-authored-by: Jenny Vong <jenny_vong@outlook.com>
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 this pull request may close these issues.

2 participants