2 Replies Latest reply on Jun 30, 2016 10:21 AM by Stephen Brown

    Need to create two columns counting the number of visits to an Emergency Department within the past 12 months and the past 3 months

    Stephen Brown

      I need help creating two calculated fields.  For the first field, I need to look back 12 months and count the number of times a patient has been in our ED, by counting the number of datetimestamps.  In the 2nd field, I need to look back 3 months and count the same.  I tried this but it doesn't work.



      // 90 day visit count

      IF (
      DATEDIFF('day', [QUICK_REG], TODAY() ) <=90

          ) THEN 1

      ELSE 0




      I rarely write code anymore and am admittedly very rusty.  Appreciate any help you may be able to throw my way.