Forum Discussion

wherdzik's avatar
wherdzik
Icon for Helper III rankHelper III
2 years ago
Solved

Help with Grouping Medical CPT Codes

I never used groups but I created a group for Procedure Codes.  The codes that are in Established Patients are codes 99211,99212,99213,99214,99215.  I am traying to creat visuals where I can count the number of patients that are Established Patients and new patients.  I first started to layer in the established patients but it is showing all the CPT codes on the x axis....why is it showing me everything..I just want it to group the grouped codes only.  If anyone has a moment and can help me I would be greatly appreciative.

 

Here is the input.

 

Here is the output:

 

 

  • wherdzik 

    All it is doing is adding a calculated column to your table with the selected ones in the group and all the others just as themselves.  Instead you coould add your own calculated column with the tagging in the code for the column like this.

    Procedure Group = SWITCH (
        TRUE(),
        YourTable[Procedure Code] IN {"99211","99212","99213","99214","99215"}, "Established Patient"
    )

    You can add additional grouping to the column as well.

     

     

6 Replies

  • wherdzik 

    All it is doing is adding a calculated column to your table with the selected ones in the group and all the others just as themselves.  Instead you coould add your own calculated column with the tagging in the code for the column like this.

    Procedure Group = SWITCH (
        TRUE(),
        YourTable[Procedure Code] IN {"99211","99212","99213","99214","99215"}, "Established Patient"
    )

    You can add additional grouping to the column as well.

     

     

    • wherdzik's avatar
      wherdzik
      Icon for Helper III rankHelper III

      Thank you, I realized that later that was my mistake.  Can I ask another question? I did get your solution to work now I want to graph it with two line graps so I can compare new patients vs established patients but I cant seem to put two separate lines on a single graph.  what am I doing wrong?

       

      I can get it to work on two separate graphs but not on one single on.

  • I used alot of Tableau in the past and I think this is how they did it in that software so it messed me up a bit. Thank you.

  • Okay I am having problems, here is what I see.  It doesnt like that formula..I cannot seem to find Procedure code..I clicked on Procedure code and selected new measure and did the following. When the intellisense initiates it doesnt seem to find Procedure code...

       

     

  • For that you would want to write 2 measure.  1 for new patients and 1 for existing patients which will be something like this.

     

    New Patients =
    CALCULATE (
        DISTINCTCOUNT ( 'YourTable'[Patient ID] ),
        'YourTable'[Procedure Group] = "New Patient"
    )
    ExistingPatients =
    CALCULATE (
        DISTINCTCOUNT ( 'YourTable'[Patient ID] ),
        'YourTable'[Procedure Group] = "Existing Patient"
    )

    Then you add the 2 measure to your line chart.