Avatar of CMCITD
CMCITD
Flag for United States of America asked on

Crystal Reports--specifying a specific detail row to select

I have a Crystal Report that is grouped by a Medical Record Number for patients--and an end user specifies a time frame to pull all visits for patients within a date range.  Within those patients, there will be multiple visits within our hospital.  

Right now, under the Group Section--it is simply pulling the 1st location in the DB.  For example, I run the report and select the last month;

Patient Zero
---was seen in Emergency Room {Location.ER}
---was seen in Medical Surgical Floor {Location.MedSurg}
---was seen in Lab {Location.Lab}

Since it's grouped under the Patient Zero medical record number, it just displays the {Location.ER}.  Desired behavior would be a prioritized list, so it displays the most applicable location.  For example;

IF Patient Zero was seen in ER, MedSurg and Lab--then only display MedSurg.  

I would then set the priority locations in the order I choose.  The end game of this--is we send out this list for a survey for our patients--and we value surveys in one area over another.  Thanks for any help.  I do have SQL experience and access to the DB if it comes to that.
Crystal ReportsMicrosoft SQL Server

Avatar of undefined
Last Comment
CMCITD

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Mike McCracken

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
CMCITD

ASKER
Simple, easy--should have spotted that way myself.  There I was about to write a formula to set priority status to each word...

Thanks!
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck