2 Replies Latest reply: May 15, 2014 10:05 AM by Joan _ RSS

    If function help needed

    Joan _

      Hmmm...how to best explain. I have a report with patients where their 1st date of service and when they are created in the system sometimes differ. I am trending a 5yr study on dollars at the entry point by patient by dept showing the year of entry and dollars spent thereafter.


      I first created a calculated field of the days between the dos and the create date. Next I created a cal field so that I knew if the dos=create date it was the initial visit and then so many days either way could be a "possible 1st visit" and anything beyond my set days were "add'l visits". Those If statements are all working great. This is my dilemma.


      Some patients are initially seen and then return within my "possible" set days. With that patient tracking number, if they have an intial entry visit AND a possible 1st visit, I want the possible 1st visit to become an add'l visit as I know the true initial entry point. If there is only a possible 1st visit and add'l visits the possible 1st visit should become the initial visit.They should never have both an initial visit and a possible 1st visit. The cross tab summary by year is working great. I just need to change the possible visits to either initial visits or add'l visits where applicable.


      I hope that makes sense. And ideas?

        • If function help needed
          Olly Bond

          Hello Joan,


          It sounds to me that you might need two stages (models) on this data if you are trying to compare data across two lines of the table.


          But if you post a sample of the report we'll get a better idea, if you can anonymise it and use the tags.


          Best wishes,



            • If function help needed
              Joan _

              Hi Olly:

              Sorry I didn't get back to you right away, I was away from the office and haven't had a chance to look it over again.  I couldn't really send an example as most of it was patient identifable information. 


              I will try and get online this weekend and experiment with a second model.


              Thanks for your help!