Ticket

Legacy stored procedure

uspSSRSDerivedIndicators1

Comments about the report

This report handles claims and products. Every report that handles claims with a specific product will not produce 100% reliable data. Due to architectural choices, claims are only linked to a specific product if they have already been submitted and if they have not been automatically rejected.

For a given product, it is currently impossible to know:

  • the number of entered claims (as in “not yet submitted”)

  • the number of automatically rejected claims (as opposed to manually rejected by a claim administrator)

Any “rejected” or “total” numbers of claims - if a specific product is given - will never include these two cases.

There are a lot of differences between the documentation on readthedocs and the actual report (if you manage to generate one).
So, some decisions had to be made:

  • In the legacy version, 2 stored procedures were called uspSSRSDerivedIndicators1 and uspSSRSDerivedIndicators2. They handled data that looked similar but was different in many places. Merging the results of these two stored procedures does not make sense since the data was sorted and displayed on various fields including health facility - and this piece of data is not relevant for uspSSRSDerivedIndicators1.

  • This report is going to handle uspSSRSDerivedIndicators1 only. The other SP will be handled in another report.

  • The Location parameter was dropped as the Location picker was mainly used to filter products. On top of that, as each Family can only have a Product available in their current Location, this Location is already known thanks to the Product. There is no need to search through the Family to get the district or region.

  • There are no longer overall ratios for the selected period as it is not clear how they were calculated (are 0 values for a given month included in the overall average? Sometimes it makes sense, sometimes it doesn't). The code handling the overall ratios will be commented out once the community decides on what to do here.

How it works

For each requested month, 3 queries will fetch data (premium, claim, policy) with the requested criteria:

Then, ratios are calculated with these various figures: