Results 1 to 3 of 3

Thread: Calculation

  1. #1
    Star Lounger
    Join Date
    Mar 2004
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am working on a database that monitors Cardiac Rehab patients.

    I have a tabbed data entry form. One the tab is for patient ‘Pre Program’ statistics, one tab is for ‘Post Program’ statistics. The fields I am concerned with come from one [Demographic] table since there is 1-1 relationship.

    The fields I’m trying to work with are:
    Age (calculated on the form)
    PreMental Score (number)
    PrePhysical Score (number)
    PostMental Score (number)
    PostPhysical Score (number)

    There is a national calculation to use that flags the nurse and doctor if a patient is considered a LOW or VERY LOW status with the Mental and Physical scores
    –I need to incorporate this into the database and store the data.

    The US General Population Mean scores are:
    Age Physical Mental
    45-54 50 50
    55-64 47 51
    65-74 44 52
    >75 39 50

    I need to show – for example:
    For the first row – (Physical 50 and Mental 50) - within a nine point range 40-49 = LOW
    30-39=VERY LOW. Capturing scores nineteen points under the standard 50. (30-49)

    The same nine point range for the next row -it would be 38-46=LOW, 29-37 VERY LOW etc…

    Example, when entering data into the form –a patient age 50 scores a 42 on the Physical test – We need to have a text box be visible with colored text that alerts the nurse and states LOW – but the text box should only be visible if the patient qualifies for a LOW or VERY LOW.

    I don’t know if this should be calculated on the form or in a query – but I need to store the data. The age is a calculation on the form from the DOB and is currently not stored in a query.

    Could you help me understand the best way to approach this?
    I’m not very good at VB – so hopefully this is not as hard as it seems to me.
    Thank you,
    Vicky

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    You don't need to store the warnings in a table, and you don't need VBA - you can calculate the warning texts in a series of queries.

    See the attached demo database (Access 2000 format, zipped). The query qryWarnings is the final step, qryMeanScores and qryPatientScores are intermediate steps.

    [attachment=87002:Calc.zip]
    Attached Files Attached Files

  3. #3
    Star Lounger
    Join Date
    Mar 2004
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is perfect. It will help me with so many other things I've tried.
    Vicky

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •