forked from Jai-Chaudhary/MDaisy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDatabaseSchemaSpec.txt
More file actions
executable file
·104 lines (93 loc) · 3.68 KB
/
DatabaseSchemaSpec.txt
File metadata and controls
executable file
·104 lines (93 loc) · 3.68 KB
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
Database Schema Specification
This document lists the schema and purpose of all the
collections used/shared across all versions of Meteoric Daisy
Note that each document will have its own _id by default.
Meteor.user
added via useraccounts:core (i.e. useraccounts:ionic)
see https://github.com/meteor-useraccounts/core/blob/master/Guide.md
for full documentation
There are two types of users: patients and staff.
Both types of accounts share the following fields.
email:
a string containing the user email
user_type:
a string indicating the type of user; either "patient" or "staff"
**Note that these two are not separate fields in the document, but are contained
in the Meteor-supplied "profile" object.
name:
a space separated string of form "<first name> <last name>"
phone #:
a string of form xxx-xxx-xxxx, where each x is a digit from 0 to 9.
Patient documents additionally contain:
medical record #
exam #
birth
appointments
contains detailed information for each appointment
Document Format :
user_id : the Meteor.accounts userId of the user who has this appointment
user_dob : a cached, SEARCHABLE version of the user's DOB, i.e. (new Date()).toLocaleDateString()
user_mrn : a cached version of the user's mrn
user_name : a cached version of the user's name
proc_type :
a string representing the type of procedure.
Current range of values: ["Lobotomy", "CT"]
date :
the appointment's scheduled date
location:
a string indicating the appointment site
organization:
a string indicating the responsible organization
department:
a string indicating the relevant department of said responsible organization
ordering_physician:
the Mongo assigned _id of the staff account who ordered this appointment.
reason:
a string indicating why the appointment was ordered
last_checked:
[DEPRECATED]
[This field is no longer used. Was originally used to implement highlighting list views
for appointments whose obligation checklist changed]
Javascript Date timestamp indicating when all obligations have been last viewed
by medical staff. see entry under "preparations".
updated_by_client:
a boolean indicating whether or not: 1) the appointment was last updated by the client AND
2) this update was seen by the staff.
is initialized to true at the time of document creation.
exam_ready:
a boolean that indicates whether or not the patient is ready to be called for the exam.
medicalInfo
contains descriptions of medical procedures
Document Format:
proc_type :
contains the type of procedure
takes on one of the following values:
text :
contains textual description
NOTE: all text is escaped and rendered as is
youtube_src :
contains a youtube link for the iframe in the patient's information tab view
messages
contains a sequence of messages sent from a patient to the ordering physician responsible for
an appointment.
Document Format:
text:
a string containing the message body
to_id:
Meteor.accounts userId of the intended recipient
from_id:
meteor.accounts userId of the patient/sender
date:
message timestamp
appointment_id:
a string containing the Mongo-assigned _id of the appointment that this message
was sent under.
read_at:
[UNUSED/UNIMPLEMENTED]
a Javascript Date object indicating when this message was seen by the staff
read:
a boolean indicating whether this message has been accessed through the "messages"
tab by the staff; initialized to false on creation.
sender_status:
[UNUSED/UNIMPLEMENTED]
can be implicitly referenced via from_id.