+ Reply to Thread
Results 1 to 17 of 17

need to identify individuals using different medications in the same class

  1. #1
    Registered User
    Join Date
    12-27-2017
    Location
    Phoenix, AZ
    MS-Off Ver
    2010
    Posts
    5

    need to identify individuals using different medications in the same class

    hi everyone,
    I've been tasked to try and find a way to identify patients that are using multiple drugs from the same drug class for greater than 60 days.
    My report has about 1500 lines
    i was able to identify them using a pivot table.....but there was a lot of manipulation involved and really it was quite ugly and time consuming. im wondering if theres an easier way someone might be able to identify.....or if someone can point me at least in a direction. im still pretty noobish with excel.
    Screenshot_20180214-163131.jpg
    thanks for any help you can provide

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: need to identify individuals using different medications in the same class

    Please post a sample workbook.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    12-27-2017
    Location
    Phoenix, AZ
    MS-Off Ver
    2010
    Posts
    5

    Re: need to identify individuals using different medications in the same class

    Hopefully this works. Thanks for any help you can provide.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    03-10-2017
    Location
    USA
    MS-Off Ver
    office 2016
    Posts
    393

    Re: need to identify individuals using different medications in the same class

    I look forward to seeing how this is solved but I have a question. Do you need to see if a patient has "ever" had the same med group for 90 days or just "for" 90 days? If they had the same med group for 100 days 2 years ago do you want to see that?

  5. #5
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: need to identify individuals using different medications in the same class

    Maybe something like this without separated dates but with days
    Done with PowerQuery (add-in for Ex2010 Pro Plus)

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,726

    Re: need to identify individuals using different medications in the same class

    This takes a different approach. I got the same drugs/same class as sandy's, but I took that you wanted a count of classes with duplicates but different meds. So the following interprets that sandy's as one.

    Find a helper column E that determines if the dates are > 60 days ago. With TODAY() in F2 this in E2 and filled down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Then with each unique student in G1:M1 this formula ... array entered ... in G2 and filled across. If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.




    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    L
    M
    1
    Patient Name
    Drug Name
    Drug Class - GPI4
    Fill Date
    > 60 days
    Today is:
    A
    B
    C
    D
    E
    F
    G
    2
    A
    Amitriptyline
    5820
    12/22/17
    0
    2/14/2018
    1
    0
    0
    0
    0
    0
    0
    3
    B
    Fluoxetine
    5816
    12/12/17
    1
    4
    C
    Escitalopram
    5816
    11/20/17
    1
    5
    A
    Amitriptyline
    5820
    1/22/18
    0
    6
    C
    Buproprion
    5830
    12/18/17
    0
    7
    D
    Fluoxetine
    5816
    1/15/18
    0
    8
    A
    Doxepin
    5820
    1/22/18
    0
    9
    B
    Trazodone
    5812
    12/13/17
    1
    10
    E
    Sertraline
    5816
    11/14/17
    1
    11
    F
    Amitriptyline
    5820
    2/1/18
    0
    12
    A
    Doxepin
    5820
    11/21/17
    1
    13
    C
    Escitalopram
    5816
    12/17/17
    0
    14
    G
    Fluoxetine
    5816
    1/5/18
    0
    15
    A
    Doxepin
    5820
    12/22/17
    0
    16
    A
    Amitriptyline
    5820
    11/21/17
    1
    Dave

  7. #7
    Registered User
    Join Date
    12-27-2017
    Location
    Phoenix, AZ
    MS-Off Ver
    2010
    Posts
    5

    Re: need to identify individuals using different medications in the same class

    Hi Kevin,
    The intent for this ask is to identify patients that need intervention. Therefore, someone who filled for a 100 day supply of the same med group 2 years ago isnt really relevant unless they continued to fill those meds Hope that answers your question.

  8. #8
    Forum Contributor
    Join Date
    03-10-2017
    Location
    USA
    MS-Off Ver
    office 2016
    Posts
    393

    Re: need to identify individuals using different medications in the same class

    Bubbles, if thats the case I'm going to assume that the data only includes patients that are currently using meds. So any old med usage will not be on the list. Is that correct? If so then we only need to look at the current date and the first date for each drug - class.

    Looks like Flame has a solution - does that work for you?
    Last edited by kevinu; 02-15-2018 at 12:56 PM.

  9. #9
    Registered User
    Join Date
    12-27-2017
    Location
    Phoenix, AZ
    MS-Off Ver
    2010
    Posts
    5

    Re: need to identify individuals using different medications in the same class

    Flame, this is awesome!!! You're seriously brilliant, it's almost exactly what I'm looking for. My only issue is I currently have about 2000 unique patients. Would I be able to do the array vertically instead of horizontally across the spreadsheet to allow for easy filtering? The array changes the correct value when I drag it horizontally but not vertically. Thank you!!

  10. #10
    Registered User
    Join Date
    12-27-2017
    Location
    Phoenix, AZ
    MS-Off Ver
    2010
    Posts
    5

    Re: need to identify individuals using different medications in the same class

    Google is my friend I got it. Thank you again Flame for all your help, it's greatly appreciated!

  11. #11
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,726

    Re: need to identify individuals using different medications in the same class

    If I understand correctly you want output arranged like this:


    A
    B
    C
    D
    E
    F
    G
    H
    1
    Patient Name
    Drug Name
    Drug Class - GPI4
    Fill Date
    > 60 days
    Today is:
    2
    A
    Amitriptyline
    5820
    12/22/17
    0
    2/15/2018
    A
    1
    3
    B
    Fluoxetine
    5816
    12/12/17
    1
    B
    0
    4
    C
    Escitalopram
    5816
    11/20/17
    1
    C
    0
    5
    A
    Amitriptyline
    5820
    1/22/18
    0
    D
    0
    6
    C
    Buproprion
    5830
    12/18/17
    0
    E
    0
    7
    D
    Fluoxetine
    5816
    1/15/18
    0
    F
    0
    8
    A
    Doxepin
    5820
    1/22/18
    0
    G
    0
    9
    B
    Trazodone
    5812
    12/13/17
    1
    10
    E
    Sertraline
    5816
    11/14/17
    1
    11
    F
    Amitriptyline
    5820
    2/1/18
    0
    12
    A
    Doxepin
    5820
    11/21/17
    1
    13
    C
    Escitalopram
    5816
    12/17/17
    0
    14
    G
    Fluoxetine
    5816
    1/5/18
    0
    15
    A
    Doxepin
    5820
    12/22/17
    0
    16
    A
    Amitriptyline
    5820
    11/21/17
    1


    If that is correct then copy/paste transposed the previous column headers as row headers and use this formula (array entered) and fill down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Is this what you meant?

  12. #12
    Forum Contributor
    Join Date
    03-10-2017
    Location
    USA
    MS-Off Ver
    office 2016
    Posts
    393

    Re: need to identify individuals using different medications in the same class

    flame... can you help me understand what the formula does? Its awesome.
    Last edited by kevinu; 02-15-2018 at 02:11 PM.

  13. #13
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,726

    Re: need to identify individuals using different medications in the same class

    I will do my best hopefully without posting a "wall" of text. It will take me some time to organize my thoughts.

    While I am working on this I encourage you to research the FREQUENCY function. It is the heart of this formula and can be confusing. Unfortunately a thorough detailed explanation of the concept "bins" in the context of FREQUENCY is hard to come by. I once found only one by extensive "googling" a few years ago. I lost the link so I may have to construct one myself.

    I also encourage familiarity with the Evaluate Formula feature of Excel as well as usage of the F9 function key if you aren't already. Any explanations I offer will make heavy use of F9.

  14. #14
    Forum Contributor
    Join Date
    03-10-2017
    Location
    USA
    MS-Off Ver
    office 2016
    Posts
    393

    Re: need to identify individuals using different medications in the same class

    I never knew about f9, Thanks I'll check it out

  15. #15
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,726

    Re: need to identify individuals using different medications in the same class

    OK. Here's a start.

    With the formula in question in the formula bar select just a component of that formula and hit the F9 function key. It this case you will see arrays of output "visible" to Excel but not to us. Those are passed on en masse to the next step which can be examined the same way. These will give you clues as to how the formula works. It doesn't just apply to array formulas either.

    Evaluate formula does the same thing in step by step order.

    These are excellent tools for self instruction. I recommend both of them whenever I can. In fact some contributors will post an Fx as their avatar. (Perhaps they are trying to tell us something. )

  16. #16
    Forum Contributor
    Join Date
    03-10-2017
    Location
    USA
    MS-Off Ver
    office 2016
    Posts
    393

    Re: need to identify individuals using different medications in the same class

    Flame thanks that did help me a lot..
    Last edited by kevinu; 02-15-2018 at 07:26 PM.

  17. #17
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,726

    Re: need to identify individuals using different medications in the same class

    Update:

    That formula worked for 2/14/2018.

    Upon closing up for the weekend (2/16/2018 the criteria changed) I noticed patient C had a duplicate of code 5816 (rows 4 and 13). However this is a duplicate of the same drug (Escitalopram). The 'Fill dates' are different but both greater than 60 days ago.

    My formula counts that as a duplicate.

    Should it?

    If it does not please let me know. That needs a different formula.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] How to distribute equally among individuals
    By winner656 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-25-2022, 03:30 PM
  2. Class Module to design a class based on an autoshape (arrow)
    By BluesEnd in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-18-2017, 07:23 AM
  3. how to rank individuals with their corresponding figures
    By rcahayag1925 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-10-2017, 05:20 AM
  4. Formula for ranking individuals
    By JoeHan in forum Excel General
    Replies: 4
    Last Post: 10-25-2016, 12:08 PM
  5. “= 1st class’ lower class limit + class width"
    By CheeseFace in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2016, 08:21 PM
  6. Replies: 0
    Last Post: 01-17-2013, 04:08 AM
  7. Pair individuals
    By waaanial00 in forum Excel General
    Replies: 4
    Last Post: 11-12-2009, 09:16 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1