Hi @hsgkp you are right. At the moment, the creation of Analysis Specs based on patient’s age and gender is really tedious. And not workable at all when you have a lot of analyses (e.g. Albumin, Creatinine, Glucose, etc.), but with different result ranges for different ages each (this is something that happens very often with newborns and children). Also, note when I say age I mean days and/or months and/or years.
This being said, we are currently testing a new functionality that solves this caveat. In a nutshell, we’ve added the possibility to assign a calculation to any given service/test selected in an Analysis Specification. This “specs” calculation differs from the rest, so it returns a dictionary with the expected values (min, max, warn_min, warn_max, etc.) instead of a discrete value. This calculation is performed automatically when either the user introduces or submit a result, and the (specs) values returned get priority over the rest of the fields (min, max, warn_min, warn_max, etc.). To make this work, this calculation relies on an xls file that contains all the specs for all sample types and services, by age and sex.
This functionality is a prototype still and not yet publicly available, but is working properly atm. Anyhow, we feel we need to make it a bit more reusable (specially because the functionality relies on a “hard-coded” xlsx file, instead of having a kind-of datagrid widget to introduce the values dynamically). Worth to say that right now, the functionality is not binded to “health” add-on, rather the calculation itself is responsible of knowing which are the fields that need to be evaluated to return the proper result range (in this pilot test, the calculation uses two AR “custom” fields: “sex” and “dob”). So as you see, there are still some bits that need to be addressed before going live.
The good news are that we will make this functionality public, as a new add-on, as soon as possible. Please take this statement with a grain of salt, but I’d say in less than 3 months time.