care icon indicating copy to clipboard operation
care copied to clipboard

N+1 API queries in prescription administration table

Open rithviknishad opened this issue 1 year ago • 6 comments

Currently, the code flow in fetching data for the prescription administration table is:

  1. List prescriptions for a consultation.
  2. Computing the overall start and end administration date range to initialize pagination
  3. Compute the latest range required to be shown in view (eg. last X hours)
  4. Listing administrations for each of the prescriptions within that range.

TODO: A solution to be discussed

rithviknishad avatar Oct 09 '23 06:10 rithviknishad