1 Reply Latest reply on Sep 27, 2016 1:43 PM by Jason Scarlett

    Tableau Help

    Jonathan Wright

      Hello everyone,

       

      I have a question with trying to set up a formula for our Cath lab. We have a set number of patients daily and some patients have 2 procedures and others have 1. Has anyone dealt with coming up with a formula if a patient has 2 procedures I want to mark them as staying overnight in the hospital. Below is my example.  When a patient only has a Cardiac MRI w/ Anesthesia they go home 90% of the time I want to predict it like that. However if a patient received a Cardiac MRI w/ Anesthesia AND a Cath procedure under Anesthesia they stay 96% of the time.  I have highlighted the patients below I am looking into as well as my current formula.

       

      Day of Procedure Date

      MRN

      Procedure Date

      Procedure Description

      Staying

      Calendar Date

      27-Sep-16

      97248

      9/27/2016

      CARDIAC MRI

      Discharge

      9/27/2016

      27-Sep-16

      1001756

      9/27/2016

      ANES CATH

      To Floor

      9/27/2016

      27-Sep-16

      4063773

      9/27/2016

      HEMODYNAMICS (NO ANES)

      Discharge

      9/27/2016

      27-Sep-16

      4368582

      9/27/2016

      CARDIAC MRI W/ ANES

      To Floor

      9/27/2016

      27-Sep-16

      4377308

      9/27/2016

      Unscheduled 6S Procedure

      To CICU

      9/27/2016

      27-Sep-16

      4793056

      9/27/2016

      ANES HEMODYNAMICS

      To Floor

      9/27/2016

      27-Sep-16

      4793056

      9/27/2016

      CARDIAC MRI W/ ANES

      To Floor

      9/27/2016

      27-Sep-16

      4793287

      9/27/2016

      HEMODYNAMICS (NO ANES)

      Discharge

      9/27/2016

      27-Sep-16

      4960746

      9/27/2016

      ANES HEMODYNAMICS

      8S Backup

      9/27/2016

      27-Sep-16

      4995968

      9/27/2016

      ANES CATH

      Discharge

      9/27/2016

      27-Sep-16

      4999667

      9/27/2016

      ANES CATH

      Discharge

      9/27/2016

      27-Sep-16

      5013461

      9/27/2016

      Unscheduled 6S Procedure

      To CICU

      9/27/2016

       

      IF CONTAINS([Procedure Comments], "8S") THEN "8S Backup"

      ELSEIF  CONTAINS([Procedure Comments],"Then To OR") THEN "OR"

      ELSEIF  CONTAINS([Unit],"8S") THEN "To CICU"

      ELSEIF  CONTAINS([Unit],"8E")

      OR  CONTAINS([Procedure Comments], "SVT") THEN "Discharge"

      ELSEIF CONTAINS([Procedure Description], "Anes Hemodynamics")

      OR CONTAINS([Procedure Description], "CARDIAC MRI W/ ANES")

      OR CONTAINS([Procedure Description], "Anes Cath") THEN "To Floor"

      ELSEIF   CONTAINS([Procedure Description],"hemodynamics (no anes)")

      OR  CONTAINS([Procedure Description], "Cardiac MRI")

      OR  CONTAINS([Procedure Description], "Catheterization (No Anes)")

      OR  CONTAINS([Procedure Description], "Flouro")

      OR  CONTAINS([Procedure Room], "EP")

      OR  CONTAINS([Unit],"null")

      THEN "Discharge"

      END

        • 1. Re: Tableau Help
          Jason Scarlett

          To clarify, are you looking to flag a patient that:

          1. has more than one procedure AND
          2. one of those procedures is "CARDIAC MRI W/ ANES" AND
          3. one of those procedures CONTAINS([Procedure Description], "Anes Hemodynamics") OR CONTAINS([Procedure Description], "CARDIAC MRI W/ ANES") OR CONTAINS([Procedure Description], "Anes Cath")

           

          If so, this sounds like a Level of Detail Expression (LODE) may work. This is a bit hard for me to do without actual data to work with (I still do a lot of trial and error with LODEs ).

          {

          // First slice by patient and date (you may need to do a datetrunc on the date to get just he day portion without any time portion)

          FIXED [MRN],[Procedure Date]

          :

          // now count how many times condition #2 and #3 above are true

          sum(if CONTAINS([Procedure Description], "CARDIAC MRI W/ ANES") OR CONTAINS([Procedure Description], "Anes Hemodynamics") OR CONTAINS([Procedure Description], "CARDIAC MRI W/ ANES") OR CONTAINS([Procedure Description], "Anes Cath") THEN 1 ELSE 0 END)

          }

          // now flag a true or false if the count above is 2 or more

          >= 2

           

          you may need to massage the IF statement to get just the right combination of procedures.