Uploaded image for project: 'Reporting Module'
  1. Reporting Module
  2. REPORT-162

Support "procedures" within SQL cohort and dataset definitions

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: TBD
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Cohort Definitions
    • Labels:
      None
    • Complexity:
      Undetermined

      Description

      Ada was trying to run the following query - would be interesting to see if we can support it:

      Please check if the reporting framework supports this kind of sql. Thanks!

      
      SET @runtot:=0;
      
      SELECT
      /*q1.encounter_year,
      q1.encounter_month,*/
      STR_TO_DATE(CONCAT_WS('-',encounter_year, encounter_month, 1), '%Y-%m-%d') AS Month_Year,
      q1.encounter_count,
      (@runtot :=@runtot + q1.encounter_count) AS AccumulativeCount
      FROM
      (
      SELECT
      Year(encounter.encounter_datetime) AS encounter_year,
      Month(encounter.encounter_datetime) AS encounter_month,
      Count(encounter.encounter_id) as encounter_count
      FROM
      encounter
      Inner Join person ON encounter.patient_id = person.person_id
      WHERE
      person.voided =  '0' AND
      encounter.voided =  '0' AND
      encounter.encounter_datetime >='2001-11-01' AND
      encounter.encounter_datetime<='2010-12-31'
      group by
      Year(encounter.encounter_datetime),
      Month(encounter.encounter_datetime)
      ) AS q1
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              ayeung Ada Yeung
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: