3 Replies Latest reply on Apr 10, 2014 10:16 AM by philmodjunk

    Medical Calculator

    ethan_levine

      Title

      Medical Calculator

      Post

           I'm looking for guidance regarding the best way to approach the design of a medical risk calculator for FMP.  The calculator will take a set of variables, assign a score to each and then calculate a final score. For example.....

           If you are Male, over age 50, have a cholesterol level of 300, your risk of heart attack in the next 5 years is 40%

           As you can see some of these values, gender for example, are "either/or", but values such as age for example are typically considered in groups.  In a case there may be one value for people aged 35-40 and another for 40-45etc.

           If I create a table with fields for each parameter and an associated risk for each value or value group, would this preclude me from calculating based on data into these fields from Excel or csv files? Seems to me I would be better off calculating a value each time the corresponding field changed.

           BTW, I'm using FMP13 Advanced

           Thanks in advance

           Ethan

            

      FM_example.jpg

        • 1. Re: Medical Calculator
          philmodjunk

               It's difficult to say for sure from such a general description, but usually such a system would look up a value from one or more related tables in order to either display or compute the desired result. Such a table can be set up so that a range of different values in the main table match to a single value in the look up table.

          • 2. Re: Medical Calculator
            ethan_levine

                 Phil, 

                 As is usually the case, I think you have got it figured out.  Can you give me some direction on setting up the calculations such that a range of values correlate to a single value?

                 Here is a link to a similar web based calculator if that helps to clarify the intended goal. 

                  

                 http://reference.medscape.com/calculator/framingham-coronary-risk-ldl

                  

                 Regards, 

                 Ethan

                  

            • 3. Re: Medical Calculator
              philmodjunk

                   No calculations are needed, you can specify it in the relationship to the look up table by using multiple match fields and inequality operators.

                   MainTable::Age > LookUpTable::MinAge AND
                   MainTable::Age < LookUpTable::MaxAge

                   And in some cases, you may be able to sort your relationship and then only use one pair of match fields with an inequality operator.