I want to create a datawindow that has the following criteria:
Column – ‘Age Range’ – the values will be ’20 – 29 years’, ’30 – 39 years’, etc. all the way up to ’90 – 99 years’
Column – ‘Number’ – this column will have a value of the number of patients that fall within each group. For example, we have 2 patients that are within the age range of ’20 – 29 years’; we have 5 patients that are within the age range of ’30 –39 years’
Column – ‘Percent’ – this column will have the percent total for each age range group. For example, if we have a total of 7 patients and there are 2 patients in the ’20 – 29 years’ group, then the percent for that group would be 2 divided by 7 which equals .2857.
Our database does not have a field called ‘age’. This means I have to compute the age for each patient based on the ‘birthdate’ database field. I have no problem calculating the age. There are no intentions of storing the age in the database.
My problem is trying to create a datawindow with the above criteria, with the computed fields and then create a group that would produce the following format:
Age Range Number Percent
------------- ------- ---------
20 – 29 years 2 .2857
30 – 39 years 5 .7143
--------------
7 1.0000
Does anyone know of a way to create the grouping that would produce the above report format? I've tried looking at the 'Create Group' in the datawindow painter, but I could not figure out how to set up the group.
My datawindow SQL would only have the 'patient id' and 'birth date' fields selected. The fields I want to display on the report would have to be computed fields. Correct?
Keith
Column – ‘Age Range’ – the values will be ’20 – 29 years’, ’30 – 39 years’, etc. all the way up to ’90 – 99 years’
Column – ‘Number’ – this column will have a value of the number of patients that fall within each group. For example, we have 2 patients that are within the age range of ’20 – 29 years’; we have 5 patients that are within the age range of ’30 –39 years’
Column – ‘Percent’ – this column will have the percent total for each age range group. For example, if we have a total of 7 patients and there are 2 patients in the ’20 – 29 years’ group, then the percent for that group would be 2 divided by 7 which equals .2857.
Our database does not have a field called ‘age’. This means I have to compute the age for each patient based on the ‘birthdate’ database field. I have no problem calculating the age. There are no intentions of storing the age in the database.
My problem is trying to create a datawindow with the above criteria, with the computed fields and then create a group that would produce the following format:
Age Range Number Percent
------------- ------- ---------
20 – 29 years 2 .2857
30 – 39 years 5 .7143
--------------
7 1.0000
Does anyone know of a way to create the grouping that would produce the above report format? I've tried looking at the 'Create Group' in the datawindow painter, but I could not figure out how to set up the group.
My datawindow SQL would only have the 'patient id' and 'birth date' fields selected. The fields I want to display on the report would have to be computed fields. Correct?
Keith