This should be easy enough to do but escapes me.Using Crystal 8.0 with an ODBC / MSQL Database in a hospital setting. Doc wants a listing of those patients (group by patient ID) that had test A and test B done on the previous day. I can get ALL instances of A OR B, but only want to see those that have BOTH A and B.
Formula says:
{Query.EventType} = "OP" and
{Query.BatTstCode} in ["UA", "UC"]
And a Group Formula says:
COUNT ({Query.AccNumber}) >1
When I run the report I get the following:
Pt Number 123456
Accession # W1256 Test Code UA
Pt Number 123457
Accession # W1257 Test Code UA
Accession # W1258 Test Code UC
I only want to get the data in the second case where both the UA and UC were ordered on the same patient. Instead I'm getting all instances ...where UA and UC are ordered separately or together. The report should only get about 30 hits, yet I'm getting over 1000 because it's giving me ALL the UA's and UC's as described.
What can I write to only capture those instances as seen in
Patient # 123457 ?
Thanks,
MJM19
Formula says:
{Query.EventType} = "OP" and
{Query.BatTstCode} in ["UA", "UC"]
And a Group Formula says:
COUNT ({Query.AccNumber}) >1
When I run the report I get the following:
Pt Number 123456
Accession # W1256 Test Code UA
Pt Number 123457
Accession # W1257 Test Code UA
Accession # W1258 Test Code UC
I only want to get the data in the second case where both the UA and UC were ordered on the same patient. Instead I'm getting all instances ...where UA and UC are ordered separately or together. The report should only get about 30 hits, yet I'm getting over 1000 because it's giving me ALL the UA's and UC's as described.
What can I write to only capture those instances as seen in
Patient # 123457 ?
Thanks,
MJM19