1: <?php
2: 3: 4: 5:
6: namespace DocPlanner\SDK\Core;
7:
8: use DocPlanner\SDK\Base\CoreBase;
9: use DocPlanner\SDK\Base\Result;
10:
11: 12: 13: 14: 15:
16: class Doctor extends CoreBase
17: {
18: 19: 20: 21: 22:
23: public function categories($phrase = null)
24: {
25: $this->parameter->add(['phrase' => $phrase]);
26: $result = $this->baseSDK->execute('doctor.categories', $this->parameter);
27: return $result;
28: }
29:
30: 31: 32: 33: 34:
35: public function calendars($doctor_id)
36: {
37: $this->parameter->add(['doctor_id' => $doctor_id]);
38: $result = $this->baseSDK->execute('doctor.calendars', $this->parameter);
39: return $result;
40: }
41:
42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52:
53: public function search($phrase = null, $location = null, $category_id = null, $mode = null, $lat = null, $lon = null, $page = null)
54: {
55: $this->parameter->add([
56: 'phrase' => $phrase,
57: 'location' => $location,
58: 'category_id' => $category_id,
59: 'mode' => $mode,
60: 'lat' => $lat,
61: 'lon' => $lon,
62: 'page' => $page
63: ]);
64: $result = $this->baseSDK->execute('doctor.search', $this->parameter);
65: return $result;
66: }
67:
68: 69: 70: 71: 72: 73: 74:
75: public function profile($doctor_id, $lat = null, $lon = null)
76: {
77: $this->parameter->add(['doctor_id' => $doctor_id, 'lat' => $lat, 'lon' => $lon]);
78: $result = $this->baseSDK->execute('doctor.profile', $this->parameter);
79: return $result;
80: }
81:
82: 83: 84: 85: 86: 87:
88: public function opinion($doctor_id, $page = null)
89: {
90: $this->parameter->add(['doctor_id' => $doctor_id, 'page' => $page]);
91: $result = $this->baseSDK->execute('doctor.opinion', $this->parameter);
92: return $result;
93: }
94:
95: 96: 97: 98: 99:
100: public function canAddOpinion($doctor_id)
101: {
102: $this->parameter->add(['doctor_id' => $doctor_id]);
103: $result = $this->baseSDK->execute('doctor.canAddOpinion', $this->parameter);
104: return $result;
105: }
106:
107: 108: 109: 110: 111: 112: 113: 114: 115:
116: public function addOpinion($doctor_id, $comment, $rate, $duration, $device)
117: {
118: $this->parameter->add([
119: 'doctor_id' => $doctor_id,
120: 'comment' => $comment,
121: 'rate' => $rate,
122: 'duration' => $duration,
123: 'device' => $device
124: ]);
125: $result = $this->baseSDK->execute('doctor.addOpinion', $this->parameter);
126: return $result;
127: }
128: }