cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Njoo Frequent Visitor
Frequent Visitor

Find number of patients who readmitted within 30 days

Hi everyone,

 

I am trying to find the number of patients who were readmitted to the hospital within 30 days after they were discharged previously. I have The admissions table with the columns (Patient No, admission date, discharge date, bed, ward... etc) Do you guys have any idea about how to do that?

 

Tank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Stachu Super Contributor
Super Contributor

Re: Find number of patients who readmitted within 30 days

try this code for calculated column - it returns true whenever the admission date for a patient is less than 30 vs their last discharge date

Column =
VAR CurrentPatientNo = 'Table'[Patient No]
VAR CurrentAdmissionDate = 'Table'[Admission date]
VAR PreviousDischargeDate =
    CALCULATE (
        MAX ( 'Table'[Discharge date] ),
        FILTER (
            'Table',
            'Table'[Admission date] < CurrentAdmissionDate
                && 'Table'[Patient No] = CurrentPatientNo
        )
    )
RETURN
    IF (
        PreviousDischargeDate = 0,
        FALSE (),
        IF ( CurrentAdmissionDate - PreviousDischargeDate <= 30, TRUE, FALSE () )
    )
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

View solution in original post

6 REPLIES 6
Stachu Super Contributor
Super Contributor

Re: Find number of patients who readmitted within 30 days

try this code for calculated column - it returns true whenever the admission date for a patient is less than 30 vs their last discharge date

Column =
VAR CurrentPatientNo = 'Table'[Patient No]
VAR CurrentAdmissionDate = 'Table'[Admission date]
VAR PreviousDischargeDate =
    CALCULATE (
        MAX ( 'Table'[Discharge date] ),
        FILTER (
            'Table',
            'Table'[Admission date] < CurrentAdmissionDate
                && 'Table'[Patient No] = CurrentPatientNo
        )
    )
RETURN
    IF (
        PreviousDischargeDate = 0,
        FALSE (),
        IF ( CurrentAdmissionDate - PreviousDischargeDate <= 30, TRUE, FALSE () )
    )
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

View solution in original post

Njoo Frequent Visitor
Frequent Visitor

Re: Find number of patients who readmitted within 30 days

It's working thanks a lot! 

Evgenia Frequent Visitor
Frequent Visitor

Re: Find number of patients who readmitted within 30 days

This is great! Thank you for solving. 

OhoodK Frequent Visitor
Frequent Visitor

Re: Find number of patients who readmitted within 30 days

thank you, it works!

What about if I wanted to add a condition to calcuate this only for patients re-admitted through Emergeny? where Admission Method= Emergengy Patient (to calculate Unplanned Readmissons)

P.S. No restriction on discharge date.

 

Thanks in advance!

Highlighted
Stachu Super Contributor
Super Contributor

Re: Find number of patients who readmitted within 30 days

@OhoodK that would be something like this:

 

Column =
VAR __CurrentPatientNo = 'Table'[Patient No]
VAR __CurrentAdmissionDate = 'Table'[Admission date]
VAR __PreviousAdmissionDate =
    CALCULATE (
        MAX ( 'Table'[Admission date] ),
        FILTER (
            'Table',
            'Table'[Admission date] < __CurrentAdmissionDate
                && 'Table'[Patient No] = __CurrentPatientNo
        )
    )
RETURN
    IF (
        'Table'[Admission Method] <> "Emergency Patient",
        FALSE (),
        IF ( __PreviousAdmissionDate <> 0, TRUE (), FALSE () )
    )

 

 

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

OhoodK Frequent Visitor
Frequent Visitor

Re: Find number of patients who readmitted within 30 days

Many thanks!

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 157 members 1,749 guests
Please welcome our newest community members: