Uploaded image for project: 'EMR API'
  1. EMR API
  2. EA-160

Error when entering recent visits in Reference Application

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Should
    • Resolution: Fixed
    • None
    • 1.30.0
    • None

    Description

      On entering the recent visits section on PostgreSQL , you get an error in the logs: https://pastebin.com/D9ZYPiXA . The problem is related to PostgreSQL and the sql being generated from this hql 

       

      On debugging the sql being executed you get:

      {{DEBUG - SqlStatementLogger.logStatement(128) |2020-07-31T19:40:39,661| }}
      {{ select}}
      {{ obs1_.obs_id as obs_id1_93_,}}
      {{ obs1_.uuid as uuid2_93_,}}
      {{ obs1_.person_id as person_i3_93_,}}
      {{ obs1_.obs_datetime as obs_date4_93_,}}
      {{ obs1_.value_group_id as value_gr5_93_,}}
      {{ obs1_.value_datetime as value_da6_93_,}}
      {{ obs1_.value_numeric as value_nu7_93_,}}
      {{ obs1_.value_modifier as value_mo8_93_,}}
      {{ obs1_.value_text as value_te9_93_,}}
      {{ obs1_.value_complex as value_c10_93_,}}
      {{ obs1_.comments as comment11_93_,}}
      {{ obs1_.accession_number as accessi12_93_,}}
      {{ obs1_.date_created as date_cr13_93_,}}
      {{ obs1_.voided as voided14_93_,}}
      {{ obs1_.date_voided as date_vo15_93_,}}
      {{ obs1_.void_reason as void_re16_93_,}}
      {{ obs1_.form_namespace_and_path as form_na17_93_,}}
      {{ obs1_.status as status18_93_,}}
      {{ obs1_.interpretation as interpr19_93_,}}
      {{ obs1_.concept_id as concept20_93_,}}
      {{ obs1_.value_coded as value_c21_93_,}}
      {{ obs1_.value_coded_name_id as value_c22_93_,}}
      {{ obs1_.value_drug as value_d23_93_,}}
      {{ obs1_.order_id as order_i24_93_,}}
      {{ obs1_.location_id as locatio25_93_,}}
      {{ obs1_.encounter_id as encount26_93_,}}
      {{ obs1_.creator as creator30_93_,}}
      {{ obs1_.voided_by as voided_27_93_,}}
      {{ obs1_.obs_group_id as obs_gro28_93_,}}
      {{ obs1_.previous_version as previou29_93_ }}
      {{ from}}
      {{ obs obs0_ }}
      {{ inner join}}
      {{ obs obs1_ }}
      {{ on obs0_.obs_group_id=obs1_.obs_id cross }}
      {{ join}}
      {{ encounter encounter2_ }}
      {{ where}}
      {{ obs0_.encounter_id=encounter2_.encounter_id }}
      {{ and obs0_.voided='false' }}
      {{ and encounter2_.visit_id=? }}
      {{ and obs0_.concept_id=? }}
      {{ and obs0_.value_coded=? }}
      {{ group by}}
      {{ obs0_.encounter_id ,}}
      {{ obs0_.obs_group_id }}
      {{ order by}}
      {{ encounter2_.encounter_datetime desc,}}
      {{ obs1_.obs_datetime desc}}
      ERROR - SqlExceptionHelper.logExceptions(142) |2020-07-31T19:40:39,713| ERROR: column "obs1_.obs_id" must appear in the GROUP BY clause or be used in an aggregate function

       

      Resolve this issue.

      Gliffy Diagrams

        Attachments

          Issue Links

            Activity

              People

                aman Aman Mishra
                aman Aman Mishra
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: