浏览代码

Use last wt/db value and date from caremonth

Vijayakrishnan 3 年之前
父节点
当前提交
70be338380
共有 1 个文件被更改,包括 10 次插入10 次删除
  1. 10 10
      app/Http/Controllers/PracticeManagementController.php

+ 10 - 10
app/Http/Controllers/PracticeManagementController.php

@@ -1166,11 +1166,11 @@ SELECT client.name_first, client.name_last,
        client.rmm_pro_id,
        client.rme_pro_id,
        client.cell_number,
-       client.most_recent_cellular_bp_dbp_mm_hg,
-       client.most_recent_cellular_bp_sbp_mm_hg,
-       client.most_recent_cellular_bp_measurement_at,      
-       client.most_recent_cellular_weight_value,
-       client.most_recent_cellular_weight_measurement_at
+       care_month.most_recent_cellular_bp_dbp_mm_hg,
+       care_month.most_recent_cellular_bp_sbp_mm_hg,
+       care_month.most_recent_cellular_bp_measurement_at,      
+       care_month.most_recent_cellular_weight_value,
+       care_month.most_recent_cellular_weight_measurement_at
 FROM care_month join client on care_month.client_id = client.id join note mrnote on client.most_recent_completed_mcp_note_id = mrnote.id
      left join note mrmnote on mrmnote.id = (
         select max(n.id) from note n 
@@ -1234,11 +1234,11 @@ SELECT client.name_first, client.name_last,
        client.rmm_pro_id,
        client.rme_pro_id,
        client.cell_number,
-       client.most_recent_cellular_bp_dbp_mm_hg,
-       client.most_recent_cellular_bp_sbp_mm_hg,
-       client.most_recent_cellular_bp_measurement_at,      
-       client.most_recent_cellular_weight_value,
-       client.most_recent_cellular_weight_measurement_at
+       care_month.most_recent_cellular_bp_dbp_mm_hg,
+       care_month.most_recent_cellular_bp_sbp_mm_hg,
+       care_month.most_recent_cellular_bp_measurement_at,      
+       care_month.most_recent_cellular_weight_value,
+       care_month.most_recent_cellular_weight_measurement_at
 FROM care_month join client on care_month.client_id = client.id join note mrnote on client.most_recent_completed_mcp_note_id = mrnote.id
      left join note mrmnote on mrmnote.id = (
         select max(n.id) from note n