-
Notifications
You must be signed in to change notification settings - Fork 0
/
data_updated.txt
156 lines (120 loc) · 10.8 KB
/
data_updated.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
db.dropDatabase();
//use meteor;
function getNext(name) {
var ret = db.counters.findAndModify(
{
query: { _id:name },
update: { $inc: { seq: 1 } },
new: true
}
);
return ret.seq;
}
db.counters.insert(
[ {
_id: "notification_id",
seq: 0
},
{
_id: "user_id",
seq: 0
},
{
_id: "doctor_id",
seq: 0
},
{
_id: "bloodreq_id",
seq: 0
},
{
_id: "event_id",
seq: 0
},
{
_id: "case_id",
seq: 0
},
{
_id: "appointment_id",
seq: 0
},
{
_id: "workplace_id",
seq: 0
},
{
_id: "docnotes_id",
seq: 0
}]
);
db.notifications.insert({_id : getNext("notification_id"),"owner" : {$ref : "user", $id : "1", $db : "meteor"}, "contents" : [{message : "This is notification","created_at" : new Date()},{message : "This is notification2","created_at" : new Date()}]});
db.notifications.insert({_id : getNext("notification_id"),"owner" : {$ref : "user", $id : "1", $db : "meteor"}, "contents" : [{message : "This is notification","created_at" : new Date()},{message : "This is notification2","created_at" : new Date()}]});
db.notifications.insert({_id : getNext("notification_id"),"owner" : {$ref : "user", $id : "1", $db : "meteor"}, "contents" : [{message : "This is notification","created_at" : new Date()},{message : "This is notification2","created_at" : new Date()}]});
db.notifications.insert({_id : getNext("notification_id"),"owner" : {$ref : "user", $id : "1", $db : "meteor"}, "contents" : [{message : "This is notification","created_at" : new Date()},{message : "This is notification2","created_at" : new Date()}]});
db.notifications.insert({_id : getNext("notification_id"),"owner" : {$ref : "user", $id : "1", $db : "meteor"}, "contents" : [{message : "This is notification","created_at" : new Date()},{message : "This is notification2","created_at" : new Date()}]});
db.notifications.insert({_id : getNext("notification_id"),"owner" : {$ref : "user", $id : "1", $db : "meteor"}, "contents" : [{message : "This is notification","created_at" : new Date()},{message : "This is notification2","created_at" : new Date()}]});
db.notifications.insert({_id : getNext("notification_id"),"owner" : {$ref : "user", $id : "1", $db : "meteor"}, "contents" : [{message : "This is notification","created_at" : new Date()},{message : "This is notification2","created_at" : new Date()}]});
db.notifications.insert({_id : getNext("notification_id"),"owner" : {$ref : "user", $id : "1", $db : "meteor"}, "contents" : [{message : "This is notification","created_at" : new Date()},{message : "This is notification2","created_at" : new Date()}]});
db.notifications.insert({_id : getNext("notification_id"),"owner" : {$ref : "user", $id : "1", $db : "meteor"}, "contents" : [{message : "This is notification","created_at" : new Date()},{message : "This is notification2","created_at" : new Date()}]});
db.notifications.insert({_id : getNext("notification_id"),"owner" : {$ref : "user", $id : "1", $db : "meteor"}, "contents" : [{message : "This is notification","created_at" : new Date()},{message : "This is notification2","created_at" : new Date()}]});
db.notifications.ensureIndex({"owner.$id":1},{background:true,unique:true});
db.images.insert({"owner" : {$ref : "user", $id : 1, $db : "meteor"},img_file:"server/images/a1.jpg"});
db.images.insert({"owner" : {$ref : "user", $id : 2, $db : "meteor"},img_file:"server/images/a2.jpg"});
db.images.insert({"owner" : {$ref : "user", $id : 3, $db : "meteor"},img_file:"server/images/a3.jpg"});
db.images.insert({"owner" : {$ref : "user", $id : 4, $db : "meteor"},img_file:"server/images/a4.jpg"});
db.images.insert({"owner" : {$ref : "user", $id : 5, $db : "meteor"},img_file:"server/images/a5.jpg"});
db.blood_requests.insert({"_id": getNext("bloodreq_id"), "blood_group": "O+", "owner" : {$ref : "user", $id : 1, $db : "meteor"}, "contact_nos": ["9448201098","8909890908"], "description": "I Need Blood urgently" , "date" : new Date() , "fake_level": 0 });
db.blood_requests.ensureIndex({"owner.$id":1},{background:true});
db.blood_requests.ensureIndex({"blood_group":1},{background:true});
db.blood_requests.ensureIndex({"date":1},{background:true});
db.health_profile.insert({"owner" : {$ref : "user", $id : 1, $db : "meteor"},height:5.6,weight:55,blood_sugar:"nil",ailments:["body pain","knee pain"],hobbies:["smoking","jogging"]});
db.health_profile.ensureIndex({"owner.$id":1},{background:true,unique:true});
db.health_profile.ensureIndex({ailments:1},{background:true,sparse:true});
db.health_profile.ensureIndex({hobbies:1},{background:true,sparse:true});
db.fake_user.insert({"user_fake" : {$ref : "user", $id : 2, $db : "meteor"}, "reported_by" : {$ref : "user", $id : 5, $db : "meteor"}, comment :"Is a fake user " });
db.fake_user.ensureIndex({"user_fake.$id":1},{background:true});
db.fake_user.ensureIndex({"reported_by.$id":1},{background:true});
db.events.insert({_id:getNext("event_id"), name:"MyEvent",city:"Bangalore",address:"m.h., south-west ",description:"Do attend",date:new Date(), "owner" : {$ref : "user", $id : 1, $db : "meteor"}, attendees_maybe:[1,3,5], attendees_going:[6,7,1]});
db.events.ensureIndex({"owner.$id":1},{background:true});
db.events.ensureIndex({city:1},{background:true});
db.reminders.insert({"owner" : {$ref : "user", $id : 1, $db : "meteor"}, reminders:{message:"have appointment on 12-4-2014 at 13:40",expireat:new Date('May 15 2014,15:15:00') }});
db.remainders.insert({"owner" : {$ref : "user", $id : 1, $db : "meteor"}, reminders:{message:"event at bangalore",expireat:new Date('May 16 2014,13:40:00')}});
db.reminders.ensureIndex({"owner.$id":1},{background:true});
db.reminders.ensureIndex({"remainders.expireat":1},{"expireAfterSeconds":0});
db.cases.insert({_id:getNext("case_id"),"owner" : {$ref : "user", $id : 1, $db : "meteor"},status:"open",date_begin:new Date(), appointment_ids:[4,78],case_notes:[{created_by:5,created_at:new Date(),message:"this is a case note"}] });
db.cases.ensureIndex({"owner.$id":1,status:1},{background:true});
db.cases.ensureIndex({"appointment_ids":1},{background:true});
db.appointments.insert({_id:getNext("appointment_id"),"case_id" : {$ref : "cases", $id : 1, $db : "meteor"},"user" : {$ref : "user", $id : 1, $db : "meteor"},"doctor" : {$ref : "user", $id : 1, $db : "meteor"},status:"closed",date:new Date(), description:"this is optional field"});
db.appointments.ensureIndex({"user.$id":1,status:1});
db.appointments.ensureIndex({"doctor.$id":1,status:1});
db.appointments.ensureIndex({"date":1});
db.users.insert({_id:getNext("user_id"),email_id:"all@all.com",password:"me123",name:"JOhn",contact_nos:["944568986","780984540"], role:"doctor",dob:new Date('July 6 1983'), gender:"Male", date_joined:new Date(), blood_group:"O+", city:"Bangalore",address:{street:"abcd nagar",pin:"560037"}, doctor_fields:{speciality:"cardiac surgeon", short_description:"I am bad doctor", doctor_qualification:"SSLC"}});
db.users.insert({_id:getNext("user_id"),email_id:"all@all.com",password:"me123",name:"JOhn",contact_nos:["944568986","780984540"], role:"patient",dob:new Date('July 6 1983'), gender:"Male", date_joined:new Date(), blood_group:"O+", city:"Bangalore",address:{street:"abcd nagar",pin:"560037"}, patient_fields:{is_critical_patient:"true"}});
db.users.insert({_id:getNext("user_id"),email_id:"all@all.com",password:"me123",name:"JOhn",contact_nos:["944568986","780984540"], role:"dependent",dob:new Date('July 6 1983'), gender:"Male", date_joined:new Date(), blood_group:"O+", city:"Bangalore",address:{street:"abcd nagar",pin:"560037"}, is_dependent:"true"});
db.users.ensureIndex({email_id:1},{background:true});
db.users.ensureIndex({contact_nos:1},{background:true});
db.users.ensureIndex({role:1},{background:true});
db.users.ensureIndex({gender:1},{background:true});
db.users.ensureIndex({date_joined:1},{background:true});
db.users.ensureIndex({blood_group:1},{background:true,sparse:true});
db.users.ensureIndex({city:1},{background:true});
db.users.ensureIndex({is_depedent:1},{background:true,sparse:true});
db.doctor.insert({_id:getNext("doctor_id"),email_id:"all@all.com",password:"me123",name:"JOhn",contact_nos:["944568986","780984540"], dob:new Date('July 6 1983'), gender:"Male", date_joined:new Date(), blood_group:"O+", city:"Bangalore",address:{street:"abcd nagar",pin:"560037"}, doctor_fields:{speciality:"cardiac surgeon", short_description:"I am bad doctor", doctor_qualification:"SSLC"},education_details:[{course_name:"M.B.B.S",college_name: "abcd", city:"bangalore", country:"India",year_of_passing:new Date('1998')}], notes:[{created_at:new Date(), content:" is a note"}],pinned_case_ids:[3,6,8],image:"img/a1.jpg"});
db.doctor.insert({_id:getNext("doctor_id"),email_id:"all@all.com",password:"me123",name:"Ohn",contact_nos:["944568986","780984540"], dob:new Date('July 6 1983'), gender:"Male", date_joined:new Date(), blood_group:"O+", city:"Bangalore",address:{street:"abcd nagar",pin:"560037"}, doctor_fields:{speciality:"Dentist", short_description:"I am bad doctor", doctor_qualification:"SSLC"},education_details:[{course_name:"M.B.B.S",college_name: "abcd", city:"bangalore", country:"India",year_of_passing:new Date('1998')}], notes:[{created_at:new Date(), content:" is a note"}],pinned_case_ids:[3,6,8],image:"img/a2.jpg"});
db.doctor.ensureIndex({"doctor_fields.speciality":1},{background:true,sparse:true});
db.doctor.ensureIndex({email_id:1},{background:true});
db.doctor.ensureIndex({contact_nos:1},{background:true});
db.doctor.ensureIndex({gender:1},{background:true});
db.doctor.ensureIndex({date_joined:1},{background:true});
db.doctor.ensureIndex({city:1},{background:true});
db.doctor.ensureIndex({"education_details.course_name":1},{background:true});
db.workplace.insert({_id:getNext("workplace_id"),"doctor" : {$ref : "doctor", $id : 1, $db : "meteor"},name:"my clinic",city:"bangalore",address:{street:"M,H",pin:"79889"},contact_nos:["8989898908"],type:"clinic"});
db.workplace.ensureIndex({"doctor.$id":1});
db.wk_desc.insert({ "doctor" : {$ref : "doctor", $id : 1, $db : "meteor"},"workplaceid" : {$ref : "workplace", $id : 1, $db : "meteor"}, slot_duration:15,slots_desc:[{day:["monday","tuesday","thursday"],start_time:"10:30",end_time:"01:00"},{day:"friday",start_time:"11:30",end_time:"02:00"}],slots_booked:[{start_time:new Date('june 6 2014,10:30:00'),appointment_id:67},{start_time:new Date('june 6 2014,11:30:00'),appointment_id:87}]});
db.wk_desc.ensureIndex({"doctor.$id":1});
db.wk_desc.ensureIndex({"workplaceid.$id":1});
db.wk_desc.ensureIndex({"slots_desc.day":1});
db.wk_desc.ensureIndex({"slots_desc.start_time":1});
db.wk_desc.ensureIndex({"slots_desc.end_time":1});
db.wk_desc.ensureIndex({"slots_booked.start_time":1});