CodeForPhilly / prevention-point

Current Functional Product
MIT License
30 stars 15 forks source link

populated visit endpoint #250

Open MikeyManoguerra opened 4 years ago

MikeyManoguerra commented 4 years ago

/api/visits/populated/<id>

permissions:

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

MikeyManoguerra commented 4 years ago

hold off on this one there might be no need for a visit endpoint

sxgormley commented 3 years ago

@MikeyManoguerra what is the status of this?

MikeyManoguerra commented 3 years ago

Hi @sxgormley, This is still an open question. Our end goal has changed slightly, so there will be less instances where multiple programs need their data returned.

However, #251 is definitely something we need. Are these tickets you feel comfortable taking? If you can tackle #251, We can return to this one.

Cheers