May 1, 201015 yr 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?
May 1, 201015 yr 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" )
Create an account or sign in to comment