Results 1 to 15 of 15
  1. #1
    Join Date
    Aug 2001
    Posts
    3

    Unanswered: database desing range of values

    Hi,

    I am making a health chart. When a user enters a number for blood pressure , it should check from the database if that range is high low or normal. What would be the best way to make a table to store such a data and retrieve it.


    brij

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Well you COULD create a BloodPressure table with each blood pressure reading (or for that range) with a corresponding high/low/normal rating ... Then have a form with a combo to select the desired BP and display the associated rating ...
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    i'm not a medical person, but isn't BP normally expressed as the systolic/diastolic pair ...which greatly complicates the retrieval of hi/norm/lo

    izy
    currently using SS 2008R2

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    It doesn't mess it up THAT bad. In your rating table, add a field to indicate if this metric is for systolic or diastolic. No biggie. It does mean that you'd have to perform two validation passes instead of one...
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  5. #5
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    It does complicate matters if you have a good one but not the other (which I've seen) ...If you keyed on either the diastolic or the systolic and had extra cols for high, low, and normal range for the other (Ex: 120 systolic and a high of 60 or greater, low of 40 or lower, and normal of 50) P.S. This is an example only. It is probably completely wrong ...

    You could test on that ...
    Back to Access ... ADO is not the way to go for speed ...

  6. #6
    Join Date
    Aug 2001
    Posts
    3

    thankss.. but

    Well yehh i you guys are right i just gave a blood pressure example i do hve to make systolic table dystolic tabel , heartbeat table. All have their low range high range normal range. Heres the scenario to better understand

    User enters a BP values in vb screen. It would check the value for the range it falls in then give approriate message and then display a chart with normal value and observed value


    The confusion i am in is check the ranges in vb program runtime.. e.g
    if entered value > 60 and less than 90 then normal

    or make a database in such a way that doest need hardcoding of value
    e.g if entered value is 80
    Bptable
    Gender lowrange highrange status
    m 0 60 low
    M 60 90 normal
    m 91 140 high

    i dont know if this is right table design but i need help for the same.... also i will have to make a chart ... which usually display values from 0 at the base.

  7. #7
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    it all depends on if you think the medics are going to change there advice on blood pressure values. if yiu think that these are abolustes (ie never ever going to change, then (maybe) you could code it within a VB function. if you have any (even the slightest doubt about that then its a table.

    If you medics are anything like the quack treaeting me then he / she / it will have a whole series fo different rules and values based on things like age, gender, general medical condition.

    Personally I'm always reluctant to hard code any such rules using code, given the slightest doubt, then its always a table for me. Sometimes I have a nasty kludge / config table with a separate line for each item of config data - I might consider stuffing this sort of stuff into this holding tank rahter than create a special table all on its lonesome


    HTH
    I'd rather be riding on the Tiger 800 or the Norton

  8. #8
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    are systolic and diastolic independent?

    what i'm blathering about is:

    does normal (love that word!) diastolic always (another lovely word!) range B --- D independent of the systolic value?

    ...or do we have
    if systolic = X, normal diastolic ranges A --- C
    if systolic = Y, normal diastolic ranges B --- D
    this is the complication i was concerned about a few posts back: if the "normality" of diastolic is dependent on systolic (and? or? vice-versa) things become messier.

    eitherhow and anywhich, a table sems to be the way to go.
    if you decide that implementation should be all code rather than SQL+code, it is still nice to have the "constants" in a table - you can always load them into vars at startup if you go pure-code.

    tbl design & handling depends on the "independence" of the two BP figures.

    izy
    currently using SS 2008R2

  9. #9
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    yes the 2 pressures vary independantly, although an above average pressure in one generally will also come thorugh in the other.

    however it is possible to have one reading in the norm, and the other out of norm. it can be too low, or too high.

    if I remember correctly they are expected normal range for both readings, however abnormal reading in one are potentailly far more serious than the other.

    the other oddity is that blood pressure readings vary with time (all thing being equal the same patient can give a different reading depending on time of day, activity). its part of the reason why blood pressure tests if there are abnormal are often repeated and averaged.
    I'd rather be riding on the Tiger 800 or the Norton

  10. #10
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    if heartbeat and both blood pressure metrics are measured the same way (with a single number), then I would put all of those definitions in the same table:

    tblMetrics:
    ---------
    metric_id
    metric_category_id
    high_range
    low_range

    tblMetricCategory
    -----------
    metric_category_id
    metric_description
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  11. #11
    Join Date
    Aug 2001
    Posts
    3
    thanks guys for your inputs..
    izyrider-- thankfully i dont have to worry too much about sys and dyst i have been a range of values for both systolic and dystolic , user enter systolic or dystolic and i just check that value and return the high low text status and then a chart.


    healdem- i have decided to go for tables... coz i dont know they might need to change the values.

    And after giving a 2 hour thought on my way home.. i am left with 2 options
    one by
    mowen - store all ranges from 0,1,2 to maximum with its status. and retrieve the value which seems a lot of work and redundancy in db.
    and
    TEDDYs suggestion i had made a table like teddy described

    gender lowrange highrange status
    m 0 60 low
    m 61 90 normal
    m 91 120 high
    m 120 1000 very high

    but i am stuck with checking and retrieving that one row..if entered value is 80 .. i tried this statements
    select * from bp where lowrange> 80 and highrange <80

    havent found the correct sql.. or use subqueries ?

    brij

  12. #12
    Join Date
    Feb 2006
    Location
    Floating around NW;UK
    Posts
    11

    You were almost there!

    Code:
    SELECT bp.*
    FROM bp
    WHERE (((bp.lowrange)<=80) AND ((bp.highrange)>=80));
    This seems to work ok if "very high" has lowrange of 121

  13. #13
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by IRGo
    Code:
    SELECT bp.*
    FROM bp
    WHERE (((bp.lowrange)<=80) AND ((bp.highrange)>=80));
    This seems to work ok if "very high" has lowrange of 121

    Or better yet:

    SQLString="SELECT bp.*
    FROM bp
    WHERE (" & MyControl.Value & " BETWEEN bp.lowrange AND bp.highrange);"
    Back to Access ... ADO is not the way to go for speed ...

  14. #14
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    WTF? Are you all doctors in your spare time? Izy's first comment about there being two measurements rang a dim bell in the distance but jeez - how do you people know all this stuff?

    Of course if it had been me that posted all that it would have been attributable to my typical modus operandi - a quick google 5 minutes before posting and then behave as though I was born knowing it ("pfff - you didn't know that! I pity the fool..." etc)
    Testimonial:
    pootle flump
    ur codings are working excelent.

  15. #15
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by pootle flump
    WTF? Are you all doctors in your spare time? Izy's first comment about there being two measurements rang a dim bell in the distance but jeez - how do you people know all this stuff?

    Of course if it had been me that posted all that it would have been attributable to my typical modus operandi - a quick google 5 minutes before posting and then behave as though I was born knowing it ("pfff - you didn't know that! I pity the fool..." etc)
    Poots,

    Well at least for me, after have a few family members having heart attacks, you pick up the jargon ... ESPECIALLY after going to the doc yourself to be tested after a potential heart scare ...
    Back to Access ... ADO is not the way to go for speed ...

Posting Permissions

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