From 3b29ee27fcf4ddb98291235698fa4c9dee81e7cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabr=C3=ADcio=20Kury?= Date: Thu, 1 Dec 2022 22:29:59 -0500 Subject: [PATCH] renders --- docs/obese_ami.html | 58 ++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/docs/obese_ami.html b/docs/obese_ami.html index c62376c..e590837 100644 --- a/docs/obese_ami.html +++ b/docs/obese_ami.html @@ -2447,7 +2447,7 @@

Calculate the phenotype

-8079 +8060 196 1988-09-10 00:00:00 @@ -2462,7 +2462,7 @@

Calculate the phenotype

FALSE -8080 +8081 196 1989-09-16 00:00:00 @@ -2477,7 +2477,7 @@

Calculate the phenotype

FALSE -8081 +8082 196 1990-09-22 00:00:00 @@ -2492,7 +2492,7 @@

Calculate the phenotype

FALSE -8082 +8083 196 1991-09-28 00:00:00 @@ -2507,7 +2507,7 @@

Calculate the phenotype

FALSE -8064 +8084 196 1992-10-03 00:00:00 @@ -2537,7 +2537,7 @@

Calculate the phenotype

FALSE -8085 +8066 196 1994-10-15 00:00:00 @@ -2552,7 +2552,7 @@

Calculate the phenotype

FALSE -8086 +8067 196 1995-10-21 00:00:00 @@ -2658,7 +2658,7 @@

Keep only the records closest to each other

-8098 +8079 196 2007-12-22 364 days @@ -2673,7 +2673,7 @@

Keep only the records closest to each other

FALSE -8391 +8361 204 1975-04-20 14 days @@ -2688,7 +2688,7 @@

Keep only the records closest to each other

TRUE -10861 +10839 272 1990-12-30 105 days @@ -2703,7 +2703,7 @@

Keep only the records closest to each other

FALSE -11404 +11376 286 1987-11-04 189 days @@ -2718,7 +2718,7 @@

Keep only the records closest to each other

FALSE -11777 +11757 295 2018-07-08 154 days @@ -2733,7 +2733,7 @@

Keep only the records closest to each other

FALSE -12787 +12765 321 2009-01-28 112 days @@ -2748,7 +2748,7 @@

Keep only the records closest to each other

TRUE -13092 +13067 328 1989-09-28 98 days @@ -2763,7 +2763,7 @@

Keep only the records closest to each other

FALSE -15510 +15489 379 2005-09-09 42 days @@ -2778,7 +2778,7 @@

Keep only the records closest to each other

FALSE -15934 +15915 389 2012-03-03 147 days @@ -2793,7 +2793,7 @@

Keep only the records closest to each other

FALSE -18539 +18513 452 1932-09-15 160 days @@ -2820,15 +2820,15 @@

Plot the phenotype for a random patient

random_patient <- sample(ami_obese_patients, 1) message('Sampled patient: ', random_patient) -#> Sampled patient: 593 +#> Sampled patient: 13542
ami_obese |>
   select(
     -height_value_as_number,
     -ami_condition_start_datetime) |>
   phea_plot(pid = random_patient)
 #> Collecting lazy table, done. (turn this message off with `verbose = FALSE`)
-
- +
+

Obtain the SQL query that computes the phenotype

@@ -2889,19 +2889,19 @@

Obtain the SQL query that computes the phenotype

row_number() over () AS "row_id", "pid", "ts", - last_value(case when "name" = 'n369g28ybive' then "value_as_number" else null end) over (partition by "pid", "name" order by "ts" rows between unbounded preceding and 0 preceding) AS "weight_value_as_number", - last_value(case when "name" = 'n369g28ybive' then "ts" else null end) over (partition by "pid", "name" order by "ts" rows between unbounded preceding and 0 preceding) AS "weight_ts", - last_value(case when "name" = 'tq1tnz9b0pus' then "value_as_number" else null end) over (partition by "pid", "name" order by "ts" rows between unbounded preceding and 0 preceding) AS "height_value_as_number", - last_value(case when "name" = 'tq1tnz9b0pus' then "ts" else null end) over (partition by "pid", "name" order by "ts" rows between unbounded preceding and 0 preceding) AS "height_ts", - last_value(case when "name" = 'tzu6rfq23ybj' then "condition_start_datetime" else null end) over (partition by "pid", "name" order by "ts" rows between unbounded preceding and 0 preceding) AS "ami_condition_start_datetime", - last_value(case when "name" = 'tzu6rfq23ybj' then "ts" else null end) over (partition by "pid", "name" order by "ts" rows between unbounded preceding and 0 preceding) AS "ami_ts" + last_value(case when "name" = 'zdmaw29y5loz' then "value_as_number" else null end) over (partition by "pid", "name" order by "ts" rows between unbounded preceding and 0 preceding) AS "weight_value_as_number", + last_value(case when "name" = 'zdmaw29y5loz' then "ts" else null end) over (partition by "pid", "name" order by "ts" rows between unbounded preceding and 0 preceding) AS "weight_ts", + last_value(case when "name" = 'a5pacry4bien' then "value_as_number" else null end) over (partition by "pid", "name" order by "ts" rows between unbounded preceding and 0 preceding) AS "height_value_as_number", + last_value(case when "name" = 'a5pacry4bien' then "ts" else null end) over (partition by "pid", "name" order by "ts" rows between unbounded preceding and 0 preceding) AS "height_ts", + last_value(case when "name" = 'p9vkjohxu25t' then "condition_start_datetime" else null end) over (partition by "pid", "name" order by "ts" rows between unbounded preceding and 0 preceding) AS "ami_condition_start_datetime", + last_value(case when "name" = 'p9vkjohxu25t' then "ts" else null end) over (partition by "pid", "name" order by "ts" rows between unbounded preceding and 0 preceding) AS "ami_ts" FROM ( ( SELECT *, NULL AS "condition_start_datetime" FROM ( ( SELECT - 'n369g28ybive' AS "name", + 'zdmaw29y5loz' AS "name", "person_id" AS "pid", "measurement_datetime" AS "ts", "value_as_number" @@ -2911,7 +2911,7 @@

Obtain the SQL query that computes the phenotype

UNION ALL ( SELECT - 'tq1tnz9b0pus' AS "name", + 'a5pacry4bien' AS "name", "person_id" AS "pid", "measurement_datetime" AS "ts", "value_as_number" @@ -2930,7 +2930,7 @@

Obtain the SQL query that computes the phenotype

"condition_start_datetime" FROM ( SELECT - 'tzu6rfq23ybj' AS "name", + 'p9vkjohxu25t' AS "name", "person_id" AS "pid", "condition_start_datetime" AS "ts", "condition_start_datetime"