Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

at least 3 consecutive days macro

Status
Not open for further replies.

azaz123

Programmer
Aug 30, 2005
3
US
How can i find out if patient has serviced for at least 3 consecutive days
 
Short of asking him or her, could you let the rest of us know what Cognos application you are using and a bit more about what you are doing (or have tried so far)?

soi la, soi carré
 
Hi,
Iam new to cognos, Iam wprking in hospital environment where people pull reports on pateints medical history and insurance claims. I am using Impromptu and power play transformer. IQD from catalogs were used to build the power cubes. I need a way to find the patients who were serviced atleast for 3 consecutive days. I was using count>=3, but I do not know how to get # consecutive days.

Thanks.
 
azaz123,
I don't believe there is a way of achieving what you require in Powerplay with what you currently have.

One way of producing a list would be to link the table which has the date information to itself twice, either in the catalogue using two aliases or in the database as a view, using patient id and date. By making the date joins on a consecutive day basis, an Impromptu report which references all three tables should return events which have three consecutive dates.

It should be noted that patients with records over more than three consecutive dates will return more than one row, so either grouping or a select distinct filter might be required. (If a patient has n consecutive days, where n is 3 or more, then there will be n-2 rows returned).

So if your table is called Event and the fields are patientid and eventdate, I'd make 2 aliases of Event and have equi-joins between
Event and EventAlias1 on Event.patientid=EventAlias1patientid and Event.eventdate = adddays(EventAlias1.eventdate,1)
and
EventAlias1 and EventAlias2 on EventAlias1.patientid=EventAlias2patientid and EventAlias2.eventdate = adddays(EventAlias2.eventdate,1)

Alternatively, since you're new to Cognos, perhaps you could approach your Database Administrator and ask him whether he could set up a view in the database along the above lines?

Furthermore, another suggestion may get posted.

soi la, soi carré
 
Hi drlex,
Thank you very much. I'll try this and contact you if I have any other problem.

azaz123
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top