CodeForPhilly / CodeForPhilly/prevention-point
populated visit endpoint
- Dominant language
- JavaScript
- Stars
- 30
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
`/api/visits/populated/`
permissions:
- retrieve
- This endpoint can return all the medical data for a particular visit.
- It should probably not have a get all feature because that would be expensive.
- this endpoint also would be internal provider or admin only.
- This could be used to populate update forms, but any update requests would be sent back to the respective single medical table (` POST api/medications` for example)
follow the current admissions paradigm, these will be updated separately. permissions need to be updated across the app.
tables that have the visit_id as a foreign key will change over time (at the very least in development)
I propose that this endpoint will first query a table with a name like `medical_tables` which contain string entries corresponding to the name of each model. you then use these to go query each table that that matches the string for the visit id. gather the disparate data, combine into an object along with "VisitWithPopulationSerializer", and return.
If you have a better idea for dynamically querying a changing slate of tables, speak up
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.