|
@@ -1614,8 +1614,11 @@ SELECT client.name_first, client.name_last,
|
|
|
care_month.most_recent_cellular_bp_measurement_at,
|
|
|
care_month.most_recent_cellular_weight_value,
|
|
|
care_month.most_recent_cellular_weight_measurement_at,
|
|
|
+
|
|
|
+ mcp.name_last || ', ' || mcp.name_last AS mcp_name,
|
|
|
+
|
|
|
{$genericBillIdColumns}
|
|
|
-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
|
|
|
+FROM care_month join client on care_month.client_id = client.id left join pro AS mcp on care_month.mcp_pro_id = mcp.id join note mrnote on client.most_recent_completed_mcp_note_id = mrnote.id
|
|
|
{$genericBillJoinClause}
|
|
|
left join note mrmnote on mrmnote.id = (
|
|
|
select max(n.id) from note n
|