sambha Posted May 1, 2010 Posted May 1, 2010 I have a database where the numerical results of a subject's blood test is created. The test is the same, just offered at different times (which are random times). So there is a field bloodtest1 and Daysafterappt1. (so the blood test1 is the result of the test, and the daysafterappt1 is the days after an office visit). The same are paired for bloodtest2, daysafterappt2, etc and so on up to 6 blood test results and 6 "days after appt". OK, here is what I want to do. I want to categorize the results in each record as a range of the following. 0-5 days after appt, 6-15 days after appt, 16-45 days after appt, 46-100 days after appt, 101 to 200 days after appt, 201-400 days after appt, 401-800 days after appt, 801-1200 days after appt. is this possible, any ideas?
comment Posted May 1, 2010 Posted May 1, 2010 This is not a good structure to have. Instead of multiple fields, you should have a separate record for each test, related to a parent subject. Then you'll only need to do one calculation instead of six (among other advantages). As for the calculation, it could be something like: Case ( DaysAfterApp ≤ 5 ; "A" ; DaysAfterApp ≤ 15 ; "B" ; DaysAfterApp ≤ 45 ; "C" ; DaysAfterApp ≤ 100 ; "D" ; DaysAfterApp ≤ 200 ; "E" ; DaysAfterApp ≤ 400 ; "F" ; DaysAfterApp ≤ 800 ; "G" ; "H" )
Recommended Posts
This topic is 5379 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now