How to define multiple variables on result object.

I hope I said that right. I’m new to BO report writing and new to this forum. I haven’t had any luck finding answers anywhere else, so surfed around and found this site. I hope y’all can help.

I’m starting with a query to pull patient name, encounter id, and clinical events. The query is filtered to a single patient, for now, and valid clinical events.

For now I’m only interested in two results, though if I an figure this out will have 15 or 20 to satisfy this report request. I’m interested in Pt Arrival DT/tm and Pt Ready for Surgery Dt/tm.

In the report I can pull Patien Name, and encounter id, and I get 1 row. When I add clinical events I get say 100 rows of all the events that related to that visit.

The request is for the data to be formated for a spreadsheet where each row of the spreadsheet is one patient with all the events for that patient in cloumns.

How can I define variables to grab individual events and display them as columns on a single patient row?

I have tried creating a variable Pt Arrival = [Clinical Event Date Result]Where[Clinical Event Key]=“Patient Arrival Time”

The result is two rows one with the field I want, the other blank. Can’t get rid of the blank.

If I add another variable Pt Ready = [Clinical Event Date Result]Where[Clinical Event Key]=“Patient Ready for Surg”

I get only one result for each, but now on multiple rows.

Am I going about this wrong? Is it even possible in BO to do what I’m trying to do?

Thanks


Tracey248 (BOB member since 2010-08-04)

Can I confirm that you are getting

Patient Name | Encounter Id | Event 1
Patient Name | Encounter Id | Event 2
Patient Name | Encounter Id | Event 3
Patient Name | Encounter Id | Event 4
Patient Name | Encounter Id | Event 5

and you want it to come out as

Patient Name | Encounter Id | Event 1 | Event 2 | Event 3 | Event 4 | Event 5

or you want

Patient Name | Encounter Id | Event 1
| | Event 2
| | Event 3
| | Event 4
| | Event 5


Nniixx :australia: (BOB member since 2009-09-02)

Welcome to B :mrgreen: B !!!

It’s best if you can handle it at universe/database level. Go through this to see more tricks. :+1:


Prashant Purohit :india: (BOB member since 2009-02-18)

Close. I’m getting

Patient Name | Encounter Id | Event 1
Patient Name | Encounter Id | Event 2
Patient Name | Encounter Id | Event 3
.
.
.

Patient Name | Encounter Id | Event 100

and I want it to come out as

Patient Name | Encounter Id | Event 15 | Event 22 | Event 75 | Event 76 | Event 52, | etc…


Tracey248 (BOB member since 2010-08-04)

Hi Tracey
This is best done at universe level with a de-normalised table but we don’t always have that luxury so my work around is this, I create an identical query for each event and then join the common query dimensions in the report. Then I can have a column for each of the common dimensions and a column for each of the event timestamps.

For example
Called Query = Patient_Id, Episode_No, Called_From_Ward_TmStmp
Enter Theatre Query = Patient_Id, Episode_No, Enter_Theatre_TmStmp
OpStart Query = Patient_Id, Episode_No, Operation_Start_TmStmp

Then in report

Join all of the Patient_Id, Episode_No, to each other

Then make a table

Patient_Id, Episode_No, Called_From_Ward_TmStmp, Enter_Theatre_TmStmp, Operation_Start_TmStmp

Hope that helps

Mick


mikca :australia: (BOB member since 2005-12-16)

Thanks Mick

That’s the direction I was going yesterday, but when I tried to combine queries I got an error. I’ll try again on Mon and if still getting error will have to log an issue. Dang!

Thanks for your help


Tracey248 (BOB member since 2010-08-04)