-
Notifications
You must be signed in to change notification settings - Fork 0
/
mozmedIntakeDataNotes.txt
221 lines (141 loc) · 6.17 KB
/
mozmedIntakeDataNotes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
------ sent
[409] "2015-10-06 22:33:00 PDT" "2015-10-01 18:46:00 PDT" "2015-10-07 17:34:00 PDT"
------- claimed
[409] "2015-10-07 14:53:00 PDT" "2015-10-07 18:21:00 PDT" "2015-10-07 19:33:00 PDT"
- clm - sent (hrs)
[409] 16.3333333333333321491 143.5833333333333428072 1.9833333333333333925
------- submitted
[409] "2015-10-07 16:12:00 PDT" NA NA
- sub - sent (hrs)
[409] 0.294166666666666687391 NA NA
- sub - clm (hrs)
[409] 1.3166666666666666519 NA NA
--------- appt
[409] "2015-10-26 13:30:00 PDT" "2015-11-05 09:15:00 PST" "2015-10-12 09:00:00 PDT"
- appt - sent (hrs)
[409] 470.94999999999998863 831.48333333333334849 111.43333333333333712
- appt - clm (hrs)
[409] 7.5769444444444440379 11.4649999999999998579 1.8241666666666667140
- appt - sub (hrs)
[409] 7.55499999999999971578 NA NA
------------------> *what* is going on with the appt times difs with the claim and submitted times. I'm not getting this at all.
------------ 10-8-2015
-- Notes on 10-07-2015 files
- Summary stats about our user base (that are acquired through Intake)
- age dist - bin the birthyr
- location dist
- break down by clinic
- how much info is in the profiles
- e.g. how many conditions are they filling out
How many patients who fill in conditions have some nonzero value in there, how many have zero?
And what are the conditions? How does it compare to our list of 'top 20'?
Domain name analysis.
------------ Users
CREATE TABLE `users` (
x `userid` bigint(20)
x `email` varchar(100),
x `isenabled` tinyint(4) NOT NULL DEFAULT '1', // 0 = not validated email, 1 = validated
`register_date` datetime DEFAULT NULL,
`last_login` datetime DEFAULT NULL,
`val_key` varchar(50) DEFAULT 'none',
`isautomail` tinyint(4) NOT NULL DEFAULT '1',
x `type` tinyint(4) NOT NULL DEFAULT '0', // 0 = famtree user, 1 = admin, 2 = intake user
`temail` varchar(100) DEFAULT NULL,
----------- Nodes
CREATE TABLE `nodes` (
`nodeid` bigint(20) NOT NULL AUTO_INCREMENT,
`uuid` char(36) NOT NULL,
x `userid` bigint(20) unsigned NOT NULL DEFAULT '0', // Only nonzero when a node has been claimed
`familyid` bigint(20) DEFAULT NULL,
`isvoided` tinyint(1) NOT NULL DEFAULT '0', // If node is "deleted"
`modified_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`isinvitee` tinyint(1) NOT NULL DEFAULT '0', // Flag
`gender` varchar(10) DEFAULT NULL, // "True" gender -- if they have changed it, will be here. Birth sex according to *user*.
x `birthdate` varchar(30) DEFAULT NULL, // Birthyr
`isliving` tinyint(4) DEFAULT '1',
`deathdate` varchar(30) DEFAULT NULL, // Deathyr
`email` varchar(100) DEFAULT NULL,
`website` varchar(150) DEFAULT NULL,
`hometel` varchar(20) DEFAULT NULL,
`mobile` varchar(20) DEFAULT NULL,
`birthplace` varchar(150) DEFAULT NULL,
`deathplace` varchar(150) DEFAULT NULL,
`profession` varchar(150) DEFAULT NULL,
`company` varchar(150) DEFAULT NULL,
`interests` varchar(150) DEFAULT NULL,
`bionotes` varchar(300) DEFAULT NULL,
`photo` varchar(200) DEFAULT NULL,
`leftpos` int(11) DEFAULT NULL,
`toppos` int(11) DEFAULT NULL,
`elementid` varchar(50) DEFAULT NULL,
`isauthor` tinyint(4) NOT NULL DEFAULT '0',
x `conditions` text NOT NULL, // Conditions the user has put in, in a long JSON string. No medical conditions will put a special value in this field.
`causeofdeath` varchar(1000) DEFAULT NULL,
------------ IntakeInvites
CREATE TABLE `intakeinvites` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`uuid` varchar(36) NOT NULL,
`template_name` varchar(10) NOT NULL,
`sender_orgid` varchar(20) NOT NULL,
x `sender_userid` bigint(20) NOT NULL,
`sender_name` varchar(100) NOT NULL,
`receiver_gender` varchar(7) NOT NULL,
`receiver_email` varchar(100) NOT NULL,
`appt_datetime` datetime DEFAULT NULL,
`appt_location` varchar(100) DEFAULT NULL,
`appt_provider` varchar(50) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
x `sent_at` datetime DEFAULT NULL,
x `claimed_at` datetime DEFAULT NULL,
`invalidated_at` datetime DEFAULT NULL,
`sg_event_name` varchar(20) DEFAULT NULL,
`sg_event_at` datetime DEFAULT NULL,
`notes` text,
x `bounced` tinyint(1) DEFAULT '0',
---------------- Userforms
CREATE TABLE `userforms` (
`formid` bigint(20) NOT NULL AUTO_INCREMENT,
`type` varchar(10) NOT NULL CHECK (`type` in ('risk', 'intake')),
`orgid` varchar(20) NOT NULL,
`userid` bigint(20) unsigned NOT NULL,
`formdata` text NULL,
x `created_at` datetime NOT NULL,
`modified_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
x `iscomplete` tinyint(1) NOT NULL DEFAULT '0',
x `submitted_at` datetime DEFAULT NULL,
`viewtoken` char(36) NULL,
`isarchived` tinyint(1) NOT NULL DEFAULT '0',
Of those who claimed, how long did it take till they submitted? (completed) This is generally rounded to e.g. hours.
---------------- SendgridEvents
CREATE TABLE `sendgrid_events` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`event` varchar(20) NOT NULL,
`email` varchar(100) NOT NULL,
`timestamp` bigint(20) unsigned NOT NULL,
`sender_orgid` varchar(20) DEFAULT NULL,
`template_name` varchar(20) DEFAULT NULL,
`template_type` varchar(20) DEFAULT NULL,
`invite_uuid` varchar(36) DEFAULT NULL,
`data` text,
`notified` tinyint(1) DEFAULT '0',
Prob not as useful of a table, but maybe..
Could maybe do an analysis of which domains bounce the most (e.g. hotmail vs. gmail).
-----------------------------------------------------------------------------------------
mm=read.csv("/Users/m/mozmed/intakeUsageData/mac_jt_071515_sendgrid_events_9-23-15.csv")
datestamp=as.POSIXct(as.numeric(email),origin="1970-01-01")
plot(datestamp,id)
---- responsetypeVsclinic --
where is: delivered?
who sends bounces the most?
--- Ones that matter:
proc'd
delivered
bounced
Buncke name
open
click
chart-type
colors
Did they start or finish
invites delivered
do it by week, and overlay them