-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdoctor.js
112 lines (108 loc) · 2.67 KB
/
doctor.js
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
var MongoClient = require("mongodb").MongoClient;
var url = "mongodb://127.0.0.1:27017/";
const handle = (data) => {
var new_data = {
name: data.name,
specilisation: data.specilisation,
experience: data.experience,
};
MongoClient.connect(url, function (err, db) {
if (err) throw err;
var dbo = db.db("SignupDetails");
dbo.collection("Doctors").insertOne(new_data, (err, collection) => {
if (err) throw err;
console.log("Record Inserted Successfully");
db.close();
});
});
};
doctors = [
{
name: "Dr Subhash Chandra",
specilisation:"Cardiology",
experience:"33 Years"
},
{
name: "Dr Amit Agarwal",
specilisation:"Oncology Cancer",
experience:"26 Years"
},
{
name: "Dr S Hukku",
specilisation:"Radiation Oncology Cancer",
experience:"37 Years"
},
{
name: "Dr Vinod Raina",
specilisation:"Oncology Cancer",
experience:"37 Years"
},
{
name: "Dr Sapna Nangia",
specilisation:"Radiation Oncology Cancer Oncology",
experience:"22 Years"
},
{
name: "Dr Kapil Kumar",
specilisation:"Surgical Oncology Cancer",
experience:"23 Years"
},
{
name: "Dr Harit Chaturvedi",
specilisation:"Surgical Oncology Cancer",
experience:"38 Years"
},
{
name: "Dr Harsh Dua",
specilisation:"Oncology Cancer",
experience:"35 Years"
},
{
name: "Dr Sudarshan De",
specilisation:"Radiation Oncology Cancer",
experience:"28 Years"
},
{
name: "Dr Sabyasachi Bal",
specilisation:"Surgical Oncology Cancer",
experience:"31 Years"
},
{
name: "Dr Z S Meharwal",
specilisation:"Cardiac Surgeons",
experience:"27 years"
},
{
name: "Dr Y K Mishra ",
specilisation:"Cardiac Surgeon",
experience:"32 years"
},
{
name: "Dr. H. S. Chhabra",
specilisation:"Spine Surgeon",
experience:"30 years"
},
{
name: "Dr. Ajay Kaul",
specilisation:"Cardiac Surgeon",
experience:"36 years"
},
{
name: "Dr. Ramesh Sarin",
specilisation:"Colo-Rectal Surgeon,",
experience:"40 years"
},
{
name: "Dr. Anil Vardani",
specilisation:"General Physician with specialization in Internal Medicine",
experience:"25 years"
},
{
name: "Dr Rachna Kucheria",
specilisation:"MD (Family Medicine) USC California",
experience:"26 years"
},
];
for (let i = 0; i < doctors.length; i++) {
handle(doctors[i]);
}