6 Replies Latest reply: Sep 13, 2017 12:14 PM by Andrew Walker RSS

    Chart to show status correctly

    Cody Jett

      Hi I was wondering if anyone has a solution to my chart issue. In my straight chart I want to show patient information for visits as they relate to immunization. Once the immunization is the status Given, I want the chart to stop populating the remaining encounters.

       

      For Example

      name                                     contact date                     status

      Joe                                         9/1/2016                         no inventory

      Joe                                         9/29/2016                       miss opportunity

      Joe                                         11/29/2016                    refused

      Joe                                         12/9/2016                       given

      Joe                                         12/29/2016                       miss opportunity

      Joe                                         1/29/2017                    given

       

      What I need is once we see the status given once, I don't want the other remaining 2 encounters showing. Suggestions?

        • Re: Chart to show status correctly
          Anil Babu

          You mean to say this?

          Only({<Status -= {'given'}>} Status)

            • Re: Chart to show status correctly
              Cody Jett

              Well I still want those other encounters to populate. The ones before the given status.

                • Re: Chart to show status correctly
                  Anil Babu

                  Not sure, I followed you? Can you explain the output you need?

                    • Re: Chart to show status correctly
                      Cody Jett

                      So for the straight chart I only want it to show this

                      name                                     contact date                     status

                      Joe                                         9/1/2016                         no inventory

                      Joe                                         9/29/2016                       miss opportunity

                      Joe                                         11/29/2016                    refused

                      Joe                                         12/9/2016                       given

                       

                      but what is showing is this:

                      name                                     contact date                     status

                      Joe                                         9/1/2016                         no inventory

                      Joe                                         9/29/2016                       miss opportunity

                      Joe                                         11/29/2016                    refused

                      Joe                                         12/9/2016                       given

                      Joe                                         12/29/2016                       miss opportunity

                      Joe                                         1/29/2017                    given

                       

                       

                      See how it is showing 2 given statues. I don't want the graph to show anything after the 1st given on 12/9/2016

                • Re: Chart to show status correctly
                  Andrew Walker

                  Hi Cody,

                  you can get this table:

                   

                  name contact date status
                  Joe9/1/2016no inventory
                  Joe9/29/2016miss opportunity
                  Joe11/29/2016refused
                  Joe12/9/2016given

                   

                  with status = only({$<[contact date] = {"<=$(=Date(min(Aggr(if(status = 'given',[contact date]),name,[contact date] ))))"}>}status)

                   

                  Regards

                   

                  Andrew