+ Reply to Thread
Results 1 to 8 of 8

Help with Power Query to extract CPT and ICD codes data

  1. #1
    Forum Contributor
    Join Date
    10-18-2016
    Location
    Chicago, USA
    MS-Off Ver
    Office 365
    Posts
    220

    Red face Help with Power Query to extract CPT and ICD codes data

    Hi All,

    Hope you are doing well!...I am trying to extract the CPT and the ICD codes data from the coded data column Data which is in JSON format..Please find attached the sheet with the input data and the output required data.. Can you please help me here...


    Thanks,
    Arun
    Attached Files Attached Files
    Last edited by chandramouliarun; 01-09-2022 at 02:09 PM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,116

    Re: Help with Power Query to extract CPT and ICD codes data

    You ask lots of questions. That's great. However, you are not very good at acknowledging the help you have received. In most of your recent threads, you have not indicated whether or not the solutions worked, or said thanks... or, indeed, said ANYTHING.

    You get the expertise of all of us for free. The least you can do is acknowledge that help.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Contributor
    Join Date
    10-18-2016
    Location
    Chicago, USA
    MS-Off Ver
    Office 365
    Posts
    220

    Re: Help with Power Query to extract CPT and ICD codes data

    Hi @Glenn Kennedy...Please accept my apologies!...I have to basically respond to the previous 4 threads..I will do it soon...Previously I have responded and marked thread as solved , thanked people for all the questions.. I got held up with some work...

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,116

    Re: Help with Power Query to extract CPT and ICD codes data

    I make it AT LEAST 6... and now it's AT LEAST 7. I suggest you take some time to attend to this, now... not "soon".

    CPT:
    =TEXTJOIN(", ",,FILTERXML("<A><B>"&SUBSTITUTE(Input!C2,"\"&CHAR(34),"</B><B>")&"</B></A>","//B[following::*[4]='CPT']"))

    ICD-10-CM
    =TEXTJOIN(", ",,FILTERXML("<A><B>"&SUBSTITUTE(Input!C2,"\"&CHAR(34),"</B><B>")&"</B></A>","//B[following::*[4]='ICD-10-CM']"))

    clinicalEncounterId:
    =LOOKUP(10^10,--MID(FILTERXML("<A><B>"&SUBSTITUTE(Input!C2,"\"&CHAR(34),"</B><B>")&"</B></A>","//B[preceding::*[1]='clinicalEncounterId']"),3,ROW($1:$15)))
    Attached Files Attached Files

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,290

    Re: Help with Power Query to extract CPT and ICD codes data

    Previously I have responded and marked thread as solved.
    I have to agree with Glenn. Most of your threads are not marked as solved.

    I got held up with some work.
    A post with two words - thank you - would take under three seconds to post. Given that we are most likely helping you with your work here, I don't think that's too much to ask, do you?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Forum Contributor
    Join Date
    10-18-2016
    Location
    Chicago, USA
    MS-Off Ver
    Office 365
    Posts
    220

    Re: Help with Power Query to extract CPT and ICD codes data

    Hi @AliGw...Again apologies !..I was validating different use cases for the answers and hence the delay...I will make sure to provide updates soon ...

  7. #7
    Forum Contributor
    Join Date
    10-18-2016
    Location
    Chicago, USA
    MS-Off Ver
    Office 365
    Posts
    220

    Re: Help with Power Query to extract CPT and ICD codes data

    @ Glenn Kennedy, This works !..Really appreciates your help!

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,116

    Re: Help with Power Query to extract CPT and ICD codes data

    Thank you... for the feedback here and in regard to the other threads, which you have now started to respond to...

+ 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] Help with Power Query to extract only matching codes from reference codes
    By chandramouliarun in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-07-2022, 05:57 AM
  2. [SOLVED] Extract data from cells above from Power query output
    By tiger99 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-22-2021, 03:50 PM
  3. Using Power Query to extract specific data
    By JasonWier in forum Excel General
    Replies: 1
    Last Post: 09-21-2021, 11:00 AM
  4. Extract data from Web using Power Query
    By jatin.c in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-23-2020, 08:38 AM
  5. [SOLVED] Extract Data with Power Query and Groupby tool
    By GerryZucca in forum Excel General
    Replies: 7
    Last Post: 06-28-2020, 11:10 AM
  6. [SOLVED] Power Query to Extract Data based on multiple criteria
    By Philipsfn in forum Excel Formulas & Functions
    Replies: 27
    Last Post: 01-16-2018, 01:45 PM
  7. [SOLVED] Power Query: Extract data from table after other rows are filtered
    By JimDandy in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-25-2017, 02:10 AM

Tags for this Thread

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