Im trying to construct a query for my clinic that lists the patients who's HIV medication is failing. Once upon a time I was serviceable at programing but I have no clue how to do this... Any help would be very much appreciated
The two WHO criteria we need to apply to the query are:
1) The patients most recent CD4 count has dropped below the CD4 count at the start of therapy.
2) There has been > 50% reduction in CD4 count from their peak post therapy level
Our Lab Table captures Patient ID, Lab Type (CD4 Count), Date of Lab and Result. And the patient info table captures the day they started Anti-Retroviral Therapy. So for....
The First Criteria
What i need to do is compare the most recent CD4 lab for all of our patients against the closest lab date to the start of therapy (either before or after). To complicate it even more some patients do not have start dates so i will have to exclude them...
The Second Criteria
I must figure out what the patients highest CD4 count since starting therapy is. Then compare it with their most recent lab.
Again, Im not really sure were to begin here. Any help would be great
The two WHO criteria we need to apply to the query are:
1) The patients most recent CD4 count has dropped below the CD4 count at the start of therapy.
2) There has been > 50% reduction in CD4 count from their peak post therapy level
Our Lab Table captures Patient ID, Lab Type (CD4 Count), Date of Lab and Result. And the patient info table captures the day they started Anti-Retroviral Therapy. So for....
The First Criteria
What i need to do is compare the most recent CD4 lab for all of our patients against the closest lab date to the start of therapy (either before or after). To complicate it even more some patients do not have start dates so i will have to exclude them...
The Second Criteria
I must figure out what the patients highest CD4 count since starting therapy is. Then compare it with their most recent lab.
Again, Im not really sure were to begin here. Any help would be great