Thanks for the context! I was able to confirm that my initial statement was wrong and there is, in fact, a hard limit on the number of reports accessible to the contact summary calculation (and displayed on the contact’s page).
Even on the latest version of cht-core, the limit is 50 docs. I expect this was deliberately done, probably for performance purposes, but I do plan to update the contact-summary documentation to be more explicit about this limitation!
Regarding your current use-case, it probably makes sense to evaluate your purging rules to see if any of the other docs could be removed from the client device so that the stock_receipt docs are not drowned out.
Hi
this is really a bad surprise for us, we’ve developed a workflow for stock management that performs calculation on contact sumary but if no stock management data_records are produced and other data_records arrives to 50…
We should
I’m figuring out that once this module GitHub - medic/cht-stock-monitoring-workflow installed, we would need to call the exported getStockMonitoringSummaryCards from the ontact-summary.templated.js file of our config, so, if i’m right the same 50 report restriction will be in place even if we installed medic’s GitHub - medic/cht-stock-monitoring-workflow module,
am I right ?
in the updated docs “an array of reports for the contact or for any of the contact’s children.” but I think that the correct is “an array of reports for the contact or for any of the contact’s PERSON children.”
thanks
in the updated docs “an array of reports for the contact or for any of the contact’s children.” but I think that the correct is “an array of reports for the contact or for any of the contact’s PERSON children.”
thanks
Just for the record, the answer to this question is, yes, the 50 report limit is at the framework level and to the best of my knowledge the cht-stock-monitoring-workflow does not provide any way to bypass this limit.
The Unintentional behavior was fixed and merged.
After the fix:
Now the calculation of the contact-summary currently uses all fetched 500 reports.
However, only 50 reports are displayed in the contact detail page (For performance reasons, we don’t want to app freezing as it fetches the max number of reports (500) all at once). I will open an issue to add pagination to lazy load reports in the contact summary.
Hi there, I do not understand this very well, if now we have 500 reports used but only 50 reports shown, and the docs is updated why we have this on docs:
Hi Ben_Kiarie
Thank you for your answer and this is great new for us, thank you for this implementation.
Could we now in which CHT4.x versions will be this available ?