6 Replies Latest reply on Mar 8, 2013 7:10 AM by philmodjunk

    New to FM need help!!

    StephenMoore

      Title

      New to FM need help!!

      Post

           I'm sure you get these types of posts all the time and I apologise!

           I'm making a database of patients and the dose of a substance they require.  I have made a table called bodyweight (drug volume is based on bodyweight) and used a portal to display data against a patients info.  I have then made a table called substance to dose (again displayed as a portal in the patients info table). 

           I have performed the calculation 'Dose Volume= (bodyweigt::bodyweight kg/1000)*(substance to dose::dose)/substance to dose::dose concentration.  Where, dose volume is the required field result and 'bodyweight kg', 'dose', and 'dose concentration' are all reference fields.  The calcualtion works perfectly and gives me the correct dose.  However, if I add another (different) bodyweight to the same patient (i.e the next day) it doesn't recalulate the dose and uses the previous value.

           I think it must be something to do with the relationships I have set up but can't see what I have done wrong!  Any ideas?

            

        • 1. Re: New to FM need help!!
          philmodjunk

               Is this a field of type calculation or a number field with an auto-entered calculation?

               What are the relationships that you have set up?

               Knowing exactly how you "add another bodyweight" will be very helpful in understanding your issue.

          • 2. Re: New to FM need help!!
            StephenMoore

                 HI

                 Thanks for the reply.  I enter a new weight in a seperate table linked by a portal to the patients inforamtion page.  I have set up an FK realtionship between the patient inforamtion page and the body weight collection table and the same relationship between the dose inforamtion table.

                 Hope this is the information you need?  Thank you for your time.

                 Cheers,

            • 3. Re: New to FM need help!!
              philmodjunk

                   Are these your relationships?

                   SubstanceToDose>-----Patient------<BodyWeight

                   Patient::__pkPatientID = BodyWeight::_fkPatientID
                   Patient::__pkPatientID = SubstanceToDose::_fkPatientID

                   See the first post of this thread for an explanation of my notation: Common Forum Relationship and Field Notations Explained

                   If so, the basic problem is that there is no direct link between dosage and body weight. Your calculation will always reference the "first" related record.

                   The following calculation may resolve that issue:

                   Last ( bodyweight::bodyweight kg ) /1000 * substance to dose::dose / substance to dose::dose concentration

                    

              • 4. Re: New to FM need help!!
                StephenMoore

                     Hi

                     Thamks for the reply.  Yes those are the relationships I have set up.  I will give the calculation a go and report back. 

                     Thanks so much for your time.

                     Cheers.

                • 5. Re: New to FM need help!!
                  StephenMoore

                       Thanks for the reply

                       The calculation

                       Last ( bodyweight::bodyweight kg ) /1000 * substance to dose::dose / substance to dose::dose concentration

                       works and recalulates based on latest weight.  However, the previous dose volume now turns to a '?' when the new value is enetered.  I  should say that I'm collecting this data via a portal on my patient inforamtion screen.

                       any ideas?

                       Cheers,

                       Stephen

                  • 6. Re: New to FM need help!!
                    philmodjunk

                         Please explain in detail what you need to have in the substanceToDose portal. I had assumed that you listed several medications and needed their dosage calculations to update each time you created a new record in the BodyWeight table.

                         Don't see why that produced the question mark, I would have assumed that it would simply update to use the new bodyweight figure, but then I didn't expect you to be entering new records in the substanceToDose portal either...