Advertisement
temaon_lieto

SQL chronic_diseases/patients

Feb 12th, 2024 (edited)
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. MainApplication::Dbo::LegalEntity Load (1.8ms)  SELECT "dbo"."LegalEntities".* FROM "dbo"."LegalEntities" WHERE "dbo"."LegalEntities"."Id" = $1 LIMIT $2  [["Id", 3228], ["LIMIT", 1]]
  2.  
  3. View::MvStatistic::Level0::Declaration Load (1.0ms)
  4. SELECT DISTINCT "mv_stat_lvl_0_declarations".* FROM "mv_stat_lvl_0_declarations" INNER JOIN "mv_stat_lvl_1_patients" ON "mv_stat_lvl_1_patients"."id" = "mv_stat_lvl_0_declarations"."patient_id" WHERE "mv_stat_lvl_0_declarations"."legal_entity_id" = $1 AND "mv_stat_lvl_0_declarations"."legal_entity_id" = $2  [["legal_entity_id", 3228], ["legal_entity_id", 3228]]
  5.  
  6. View::MvStatistic::Level1::Patient Load (0.4ms)  
  7. SELECT "mv_stat_lvl_1_patients".* FROM "mv_stat_lvl_1_patients" WHERE "mv_stat_lvl_1_patients"."id" IN ($1, $2, $3, $4, $5)  [["id", 11395822], ["id", 11395824], ["id", 11464974], ["id", 11464976], ["id", 11464994]]
  8.  
  9. View::MvStatistic::Level0::Employee Load (1.1ms)  
  10. SELECT "mv_stat_lvl_0_employees".* FROM "mv_stat_lvl_0_employees" WHERE "mv_stat_lvl_0_employees"."id" IN ($1, $2)  [["id", 180499], ["id", 181286]]
  11.  
  12. View::MvStatistic::Level0::Reception Load (2.3ms)
  13. SELECT mv_stat_lvl_0_receptions.patient_id as patient_id, COUNT(DISTINCT mv_stat_lvl_0_receptions.patient_id) as counter FROM "mv_stat_lvl_0_receptions" WHERE "mv_stat_lvl_0_receptions"."asserted_date" BETWEEN $1 AND $2 AND "mv_stat_lvl_0_receptions"."patient_id" IN ($3, $4, $5, $6, $7) GROUP BY date(mv_stat_lvl_0_receptions.asserted_date), mv_stat_lvl_0_receptions.patient_id  [["asserted_date", "2024-01-01 00:00:00"], ["asserted_date", "2024-02-12 23:59:59.999999"], ["patient_id", 11395822], ["patient_id", 11395824], ["patient_id", 11464974], ["patient_id", 11464976], ["patient_id", 11464994]]
  14.  
  15. View::MvStatistic::Level2::ImtIndex Load (1.0ms)  
  16. SELECT "mv_stat_lvl_2_imt_indices".* FROM "mv_stat_lvl_2_imt_indices" WHERE "mv_stat_lvl_2_imt_indices"."asserted_date" BETWEEN $1 AND $2 AND "mv_stat_lvl_2_imt_indices"."patient_id" IN ($3, $4, $5, $6, $7)  [["asserted_date", "2024-01-01 00:00:00"], ["asserted_date", "2024-02-12 23:59:59.999999"], ["patient_id", 11395822], ["patient_id", 11395824], ["patient_id", 11464974], ["patient_id", 11464976], ["patient_id", 11464994]]
  17.  
  18. View::MvStatistic::Level1::EhrCondition Load (0.9ms)
  19. SELECT "mv_stat_lvl_1_ehr_conditions".* FROM "mv_stat_lvl_1_ehr_conditions" WHERE "mv_stat_lvl_1_ehr_conditions"."asserted_date" BETWEEN $1 AND $2 AND "mv_stat_lvl_1_ehr_conditions"."patient_id" IN ($3, $4, $5, $6, $7)  [["asserted_date", "2024-01-01 00:00:00"], ["asserted_date", "2024-02-12 23:59:59.999999"], ["patient_id", 11395822], ["patient_id", 11395824], ["patient_id", 11464974], ["patient_id", 11464976], ["patient_id", 11464994]]
  20.  
  21. Completed 200 OK in 46ms (Views: 0.3ms | ActiveRecord: 14.9ms | Allocations: 11765)
  22.  
Tags: 3 page
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement