Модель Timesheet — график врачей
* @property integer $id // ИД записи * @property integer $doctor_id // ИД врача/пользователя * @property integer $shedule_id // не используется * @property string $begin_datetime // Дата начала в формате yyyy-mm-dd hh:ii:ss * @property string $end_datetime // Дата окончания в формате yyyy-mm-dd hh:ii:ss * @property integer $type // Тип * @property string $shift // не используется * @property string $title // Название * @property integer $all_day // Весь день (0/1) * @property integer $night // Ночь (0/1) * @property integer $action_id // ИД действия не используется * @property integer $clinic_id // id клиники
Пример запроса получения расписания для доктора
curl --location -g --request GET 'https://{DOMAIN NAME}/rest/api/Timesheet?offset=0&sort=[{"property":"begin_datetime","direction":"ASC"}]&filter=[{"property":"doctor_id","value":1,"operator" => "="},{"property":"clinic_id","value":1,"operator":"="},{"property":"end_datetime","value":"2021-09-20 00:00:01","operator":">="},{"property":"begin_datetime","value":"2021-09-25 23:59:59","operator":"<="}]' \
--header 'Content-Type: application/json' \
--header 'X-REST-API-KEY: {REST API KEY}'Ответ сервера
{
"success": true,
"message": "Records Retrieved Successfully",
"data": {
"totalCount": "6",
"timesheet": [
{
"id": "8",
"doctor_id": "1",
"shedule_id": "0",
"begin_datetime": "2021-09-20 09:00:00",
"end_datetime": "2021-09-20 18:00:00",
"type": "0",
"shift": "0000-00-00 00:00:00",
"title": "",
"all_day": "0",
"night": "0",
"action_id": "0",
"clinic_id": "1"
},
{
"id": "9",
"doctor_id": "1",
"shedule_id": "0",
"begin_datetime": "2021-09-21 09:00:00",
"end_datetime": "2021-09-21 18:00:00",
"type": "0",
"shift": "0000-00-00 00:00:00",
"title": "",
"all_day": "0",
"night": "0",
"action_id": "0",
"clinic_id": "1"
},
{
"id": "10",
"doctor_id": "1",
"shedule_id": "0",
"begin_datetime": "2021-09-22 09:00:00",
"end_datetime": "2021-09-22 18:00:00",
"type": "0",
"shift": "0000-00-00 00:00:00",
"title": "",
"all_day": "0",
"night": "0",
"action_id": "0",
"clinic_id": "1"
},
{
"id": "11",
"doctor_id": "1",
"shedule_id": "0",
"begin_datetime": "2021-09-23 09:00:00",
"end_datetime": "2021-09-23 18:00:00",
"type": "0",
"shift": "0000-00-00 00:00:00",
"title": "",
"all_day": "0",
"night": "0",
"action_id": "0",
"clinic_id": "1"
},
{
"id": "12",
"doctor_id": "1",
"shedule_id": "0",
"begin_datetime": "2021-09-24 09:00:00",
"end_datetime": "2021-09-24 18:00:00",
"type": "0",
"shift": "0000-00-00 00:00:00",
"title": "",
"all_day": "0",
"night": "0",
"action_id": "0",
"clinic_id": "1"
},
{
"id": "23",
"doctor_id": "1",
"shedule_id": "0",
"begin_datetime": "2021-09-25 09:00:00",
"end_datetime": "2021-09-25 18:00:00",
"type": "2",
"shift": "0000-00-00 00:00:00",
"title": "",
"all_day": "0",
"night": "0",
"action_id": "0",
"clinic_id": "1"
}
],
"is_empty_shedules": 1
}
}* @property integer $id //ИД записи * @property string $name // Название * @property string $title // не используется * @property integer $is_working_hours // Рабоче время 1/0 Настройки отображения записи в графике. Шрифт и цвет * @property integer $b * @property integer $i * @property integer $u * @property string $color
curl --location --request GET 'https://{DOMAIN NAME}/rest/api/TimesheetTypes' \
--header 'Content-Type: application/json' \
--header 'X-REST-API-KEY: {REST API KEY}'Ответ сервера
{
"success": true,
"message": "Records Retrieved Successfully",
"data": {
"totalCount": "6",
"timesheetTypes": [
{
"id": "2",
"name": "Рабочее время",
"title": "",
"b": "0",
"i": "0",
"u": "0",
"is_working_hours": "1",
"color": "#FFFFFF",
"is_show_in_timesheet": "1",
"is_active": "1"
},
{
"id": "3",
"name": "Выходной",
"title": "",
"b": "0",
"i": "0",
"u": "0",
"is_working_hours": "0",
"color": "#FFFFFF",
"is_show_in_timesheet": "1",
"is_active": "1"
},
{
"id": "5",
"name": "Нерабочее время",
"title": "",
"b": "0",
"i": "0",
"u": "0",
"is_working_hours": "0",
"color": "#FFFFFF",
"is_show_in_timesheet": "1",
"is_active": "1"
},
{
"id": "6",
"name": "Дежурство",
"title": "",
"b": "0",
"i": "0",
"u": "0",
"is_working_hours": "1",
"color": "#FFFFFF",
"is_show_in_timesheet": "1",
"is_active": "1"
},
{
"id": "7",
"name": "Отпуск",
"title": "",
"b": "0",
"i": "0",
"u": "0",
"is_working_hours": "0",
"color": "#FFFFFF",
"is_show_in_timesheet": "1",
"is_active": "1"
},
{
"id": "8",
"name": "Больничный",
"title": "",
"b": "0",
"i": "0",
"u": "0",
"is_working_hours": "0",
"color": "#FFFFFF",
"is_show_in_timesheet": "1",
"is_active": "1"
}
]
}
}