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

all visits related to particpant endpoint #251

Closed
MikeyManoguerra opened this issue Mar 20, 2020 · 2 comments · Fixed by #430
Closed

all visits related to particpant endpoint #251

MikeyManoguerra opened this issue Mar 20, 2020 · 2 comments · Fixed by #430

Comments

@MikeyManoguerra
Copy link
Collaborator

MikeyManoguerra commented Mar 20, 2020

/api/participants/<id>/visits

this endpoint is retrieve only. do not allow post.

This endpoint will take the participant_id and return all visits associated with them.

make sure each visit is not redundantly populated with all the visit information

@alex-cots
Copy link
Collaborator

Should the foreign keys to Program and Service be embedded, left as foreign keys, or something else?

@MikeyManoguerra
Copy link
Collaborator Author

let's populate with ServiceforProgramSerializer
and ProgramSerializer (but leave out a nested services array)

we do not want the populated participant object, just the FK.

Just use viewsets.Viewset and define retrieve as this is a read only endpoint

finally, you can add new classes in the /visits/ directory files, no need to create a completely new folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants