chronic-care / mcc-project

MCC eCare Plan project planning and documentation
Apache License 2.0
0 stars 1 forks source link

MyCarePlanner - VA sandbox calls seem to be requesting only one resource at a time? #354

Closed mattStorer closed 8 months ago

mattStorer commented 8 months ago

Connecting to the VA Sandbox, taking a long time to load. Checked the Networking tab, and there are loads of these queries getting executed, each with a parameter _count=1 which makes me think that these queries are only requesting one resource at a time.

image

Is this what's going on? It should request 1000 at a time.

xmlmodeling commented 8 months ago

_count=1 is only used for Vital Signs and has been in the code since the beginning. It's an attempt to optimize and reduce query time. There may be 1000's of observations for a single vital sign, e.g. blood pressure. We only display the one last value at this time, so _count=1

No count limit is added to any other queries, other than vital signs, and these are also sent as individual queries for one specific LOINC code, as required by US Core IG for vitals.

On Mon, Mar 18, 2024 at 2:38 PM Matt Storer @.***> wrote:

Connecting to the VA Sandbox, taking a long time to load. Checked the Networking tab, and there are loads of these queries getting executed, each with a parameter _count=1 which makes me think that these queries are only requesting one resource at a time.

image.png (view on web) https://github.com/chronic-care/mcc-project/assets/979938/80bc7392-dc43-4df1-b3f6-dc8ba6025f8d

Is this what's going on? It should request 1000 at a time.

— Reply to this email directly, view it on GitHub https://github.com/chronic-care/mcc-project/issues/354, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPT6NY2UQOSXHZTBF4OR5TYY5GFXAVCNFSM6AAAAABE4J4TW6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGE4TGMRWGIZDMNA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

kbertodatti commented 8 months ago

@drdavec so is this not a problem, it's working as expected?

drdavec commented 8 months ago

@kbertodatti This is working as designed, per previous comment in this issue. It is not specific to VA, but applied to all vital sign Observation queries for all vendors (and only for vital signs).

drdavec commented 8 months ago

Re-opening this after analysis in OHSU tech call. Problem is that _count=1 returns only one result per "page" of results, but default behavior of JavaScript FHIR query is to fetch ALL PAGES. So the query repeats the count=1, 100 times (or more).

Look into option in the FHIR query to stop fetching of all pages, but should be only for Vital Sign queries.

drdavec commented 8 months ago

Fixed this issue, committed updates to 'develop' branch. The overall fhirOptions had "pageLimit: 0" which loaded all available pages. For vital signs, this resulted in a LOT of pages with 1 resource per page. Not a _count=1 for final result. MyCarePlanner now loads much, MUCH faster for VA, and also for Epic and others. I changed the vital signs _count to 5, even though we only display the last values, but now only get one page of results.

Also added more logging for query result count to display how many resources are actually read.