Explorar o código

added rm stat tree sample

= %!s(int64=3) %!d(string=hai) anos
pai
achega
270378ae16
Modificáronse 3 ficheiros con 31 adicións e 7 borrados
  1. 16 0
      spec/rm_clauses.txt
  2. 15 0
      spec/rm_stat_tree_sample.txt
  3. 0 7
      spec/sample_rm_stat_tree.txt

+ 16 - 0
spec/rm_clauses.txt

@@ -0,0 +1,16 @@
+care_month join client on care_month.client_id = client.id	Start date?	2021-12-01	(care_month.start_date = '2021-12-01')
+care_month join client on care_month.client_id = client.id	Enrolled in RPM?	YES	(client.is_enrolled_in_rm = 'YES')
+care_month join client on care_month.client_id = client.id	Enrolled in RPM?	NO	(client.is_enrolled_in_rm = 'NO')
+care_month join client on care_month.client_id = client.id	Have cellular device?	YES	(SELECT COUNT(client_bdt_device.id) FROM client_bdt_device JOIN bdt_device bd on client_bdt_device.device_id = bd.id WHERE client_bdt_device.client_id = client.id) > 0		
+care_month join client on care_month.client_id = client.id	Have been seen w/in 90 days?	YES	(DATE_PART('day', client.most_recent_completed_mcp_note_date::timestamp - care_month.start_date::timestamp) <= 90)
+care_month join client on care_month.client_id = client.id	Have been seen w/in 90 days?	NO	(DATE_PART('day', client.most_recent_completed_mcp_note_date::timestamp - care_month.start_date::timestamp) > 90)
+care_month join client on care_month.client_id = client.id	Have been spoken to this month?	YES	(care_month.has_anyone_interacted_with_client_about_rm_outside_note = TRUE)
+care_month join client on care_month.client_id = client.id	Have been spoken to this month?	NO	(care_month.has_anyone_interacted_with_client_about_rm_outside_note IS NULL OR care_month.has_anyone_interacted_with_client_about_rm_outside_note = FALSE)
+care_month join client on care_month.client_id = client.id	Have no unstamped meas.?	YES	(care_month.rm_num_measurements_not_stamped_by_mcp = 0)
+care_month join client on care_month.client_id = client.id	Have no unstamped meas.?	NO	(care_month.rm_num_measurements_not_stamped_by_mcp > 0)
+care_month join client on care_month.client_id = client.id	Have 16 or more meas. days?	YES	(care_month.number_of_days_with_remote_measurements >= 16)
+care_month join client on care_month.client_id = client.id	Have 16 or more meas. days?	NO	(care_month.number_of_days_with_remote_measurements < 16)
+care_month join client on care_month.client_id = client.id	Have 20 or more billing mins.?	YES	(care_month.rm_total_time_in_seconds_by_mcp >= 1200)
+care_month join client on care_month.client_id = client.id	Have 20 or more billing mins.?	NO	(care_month.rm_total_time_in_seconds_by_mcp < 1200)
+care_month join client on care_month.client_id = client.id	Have subscribed to SMS?	YES	(client.send_sms_on_bdt_measurement = TRUE)
+care_month join client on care_month.client_id = client.id	Have used the device?	YES	(client.most_recent_cellular_bp_measurement_at IS NOT NULL OR most_recent_cellular_weight_measurement_at IS NOT NULL)

+ 15 - 0
spec/rm_stat_tree_sample.txt

@@ -0,0 +1,15 @@
+Start date? 2021-12-01
+	Enrolled in RPM? YES
+		Have cellular device? YES
+			Have been seen w/in 90 days? NO
+			Have been seen w/in 90 days? YES
+				Have been spoken to this month? YES
+					Have 16 or more meas. days? YES
+						Have 20 or more billing mins.? YES
+						Have 20 or more billing mins.? NO
+					Have 16 or more meas. days? NO
+				Have been spoken to this month? NO
+				Have no unstamped meas.? YES
+				Have no unstamped meas.? NO
+				Have subscribed to SMS? YES
+	Enrolled in RPM? NO

+ 0 - 7
spec/sample_rm_stat_tree.txt

@@ -34,11 +34,7 @@ care_month join client on care_month.client_id = client.id	Have used the device?
  Have used the device? YES
 
 
-<<<<<<< HEAD
-Start date. 2021-12-01
-=======
 Start date? 2021-12-01
->>>>>>> 9d1c97068d0d8befbe5b3deb4efabbbfcf325574
     Enrolled in RPM? YES
         Have cellular device? YES
             Have been seen w/in 90 days? NO
@@ -54,8 +50,6 @@ Start date? 2021-12-01
             Have subscribed to SMS? YES
     Enrolled in RPM? NO
 
-<<<<<<< HEAD
-=======
 Enrolled in RPM? YES
     Have cellular device? YES
         Have been seen w/in 90 days? NO
@@ -71,5 +65,4 @@ Enrolled in RPM? YES
         Have subscribed to SMS? YES
 Enrolled in RPM? NO
 
->>>>>>> 9d1c97068d0d8befbe5b3deb4efabbbfcf325574