# 診所後台-診所管理API
==診所主頁==
## 取得診所Logo(ok)
::: success
::: spoiler GET /api/v1/clinic/logo
### Description:
取得診所的Logo
### Request:
+ Header
```json=
{
"Authorization": "Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
//可能還缺什麼資訊??
}
```
+ Path
### Response:
```json
{
"data": [
{
"photos": [
{
"photoUrl": "www.imageUrl.jpg",
"description": "圖片描述"
},
{
"photoUrl": "www.imageUrl.jpg",
"description": "第二描述"
}
]
}
],
"message": "成功。"
}
```
:::success
:::
## 取得診所基本資料(ok)
::: success
::: spoiler GET /api/v1/clinic
### Description:
取得診所的基本資料
### Request:
+ Header
```json=
{
"Authorization": "Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
//可能還缺什麼資訊??
}
```
+ Path
### Response:
```json
{
"data": {
"id": 12,
"name": "零八零零診所ddddd",
"phoneNumbers": "[\"066878788\",\"068783341\"]",
"address": [
{
"addrArea": "北區",
"addrDetail": "北門路一段201號2樓",
"addrCountry": "台南市",
"addrZIPCode": "70542"
},
{
"addrArea": "東區",
"addrDetail": "東門路二段35號",
"addrCountry": "台南市",
"addrZIPCode": "70542"
}
],
"url": "https:www.0800.com.tw",
"lineId": "@0800fdsfsdfsd",
"introductaion": "0800診所提供XXX療程...XXXX",
"photos": [
{
"photoUrl": "www.imageUrl.jpg",
"description": "圖片描述"
},
{
"photoUrl": "www.imageUrl.jpg",
"description": "第二描述"
}
],
"registNotice": "掛號內容須知XXX...XXX"
},
"message": "成功。"
}
```
:::success
:::
## 更新or建立診所基本資料(ok)
::: info
::: spoiler PUT /api/v1/clinic
### Description:
更新診所的基本資料
### Request:
+ Header
```json=
{
"Authorization": "Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
//可能還缺什麼資訊??
}
```
+ Path
+ body
```json=
{
"name":"零八零零診所ddddd",
"phoneNumbers":["066878788","068783341"],
"address":[
{
"addrCountry":"台南市",
"addrArea":"北區",
"addrDetail":"北門路一段201號2樓",
"addrZIPCode":"70542"
},
{
"addrCountry":"台南市",
"addrArea":"東區",
"addrDetail":"東門路二段35號",
"addrZIPCode":"70542"
}
],
"url":"https:www.0800.com.tw",
"lineId":"@0800fdsfsdfsd",
"introductaion":"0800診所提供XXX療程...XXXX",
"photos":[
{
"photoUrl":"www.imageUrl.jpg",
"description":"圖片描述"
},
{
"photoUrl":"www.imageUrl.jpg",
"description":"第二描述"
}
]
}
```
### Response:
```json=
{
"data": {
"address": [
{
"addrArea": "北區",
"addrDetail": "北門路一段201號2樓",
"addrCountry": "台南市",
"addrZIPCode": "70542"
},
{
"addrArea": "東區",
"addrDetail": "東門路二段35號",
"addrCountry": "台南市",
"addrZIPCode": "70542"
}
],
"photos": [
{
"photoUrl": "www.imageUrl.jpg",
"description": "圖片描述"
},
{
"photoUrl": "www.imageUrl.jpg",
"description": "第二描述"
}
],
"phoneNumbers": "[\"066878788\",\"068783341\"]",
"name": "零八零零診所ddddd",
"url": "https:www.0800.com.tw",
"lineId": "@0800fdsfsdfsd",
"introductaion": "0800診所提供XXX療程...XXXX",
"updatedAt": "2022-12-31T04:24:02.000Z",
"id": 12,
"createdAt": "2022-12-31T03:13:40.000Z",
"registNotice": "掛號內容須知XXX...XXX"
},
"message": "成功。"
}
```
:::info
:::
## 取得診所時刻表
::: success
::: spoiler GET /api/v1/clinic/timeTables
### Description:
取得診所的看診時刻表
最多只有三張時刻表
### Request:
+ Header
```json=
{
"Authorization": "Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
//可能還缺什麼資訊??
}
```
### Response:
| key | type | value | description |
|:---------------- |:------------------------------------------------ |:------------------------------- |:-------------- |
| name | String | 春節時刻表 | 時刻表名稱 |
| description | String | "診次結束前30分鐘停止報到" | 時刻表描述.. |
| backgroundUrl | String | "www.backgroundimg.jpg" | 背景圖片網址 |
| enable | Boolean | true | 是否啟用時刻表 |
| activeFromDate | Date | "2022/01/01" | 啟用日期-起始 |
| activeToDate | Date | "2022/02/30" | 啟用日期-結束 |
| consultationTime | [資料格式 - Outpatient](/cVAlejboTKWyE8ov82Dzdg) | [診次物件1,診次物件2,診次物件3] | 診次清單 |
| timeTableRawData | [資料格式 - DutyObject](/QScfmkfIR6GsRfEZas4rmA) | [值班物件1,值班物件2,值班物件3] | 當班醫師清單 |
```json=
{
data: [
{
id: 1,
name: "春節時刻表",
description: "時刻表描述..診次結束前30分鐘停止報到",
backgroundUrl: "www.backgroundimg.jpg",
enable: true,
activeFromDate: "2022/01/01",
activeToDate: "2022/02/30",
consultationTime: [
{
id: 1,
name: "上午診",
startTime: "08:30",
endTime: "12:00",
enable: true,
},
{
id: 2,
name: "下午診",
startTime: "15:30",
endTime: "18:30",
enable: true,
},
{
id: 3,
name: "晚診",
startTime: "18:00",
endTime: "21:00",
enable: true,
},
],
timeTableRawData: [
{
id: 1,
onDuty: "李美麗",
division: "皮膚科",
workingDay: 1,
workingTime: 1,
isOffDay: false,
},
{
id: 2,
onDuty: "莊大銘",
division: "家醫科",
workingDay: 3,
workingTime: 3,
isOffDay: false,
},
{
id: 3,
onDuty: "null",
division: "null",
workingDay: 7,
workingTime: 1,
isOffDay: true,
},
],
},
{
id: 2,
name: "端午時刻表",
description: "時刻表描述..診次結束前30分鐘停止報到",
backgroundUrl: "www.backgroundimg.jpg",
enable: true,
activeFromDate: "2022/04/01",
activeToDate: "2022/05/30",
consultationTime: [
{
id: 1,
name: "上午診",
startTime: "08:30",
endTime: "12:00",
enable: true,
},
{
id: 2,
name: "下午診",
startTime: "15:30",
endTime: "18:30",
enable: true,
},
{
id: 3,
name: "晚診",
startTime: "18:00",
endTime: "21:00",
enable: true,
},
],
timeTableRawData: [
{
id: 1,
onDuty: "李美麗",
division: "皮膚科",
workingDay: 1,
workingTime: 1,
isOffDay: false,
},
{
id: 2,
onDuty: "莊大銘",
division: "家醫科",
workingDay: 3,
workingTime: 3,
isOffDay: false,
},
{
id: 3,
onDuty: "null",
division: "null",
workingDay: 7,
workingTime: 1,
isOffDay: true,
},
],
},
],
message: "成功"
}
```
:::success
:::
## 更新診所時刻表
::: info
::: spoiler PUT /api/v1/clinic/timeTables/{id}
### Description:
更新診所時刻表的資料
### Request:
+ Header
```json=
{
"Authorization": "Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
//可能還缺什麼資訊??
}
```
+ Path
+ body
```json=
{
id: 1,
name: "春節時刻表",
description: "時刻表描述..診次結束前30分鐘停止報到",
backgroundUrl: "backgroundimg.jpg",
enable: true,
activeFromDate: "2022/01/01",
activeToDate: "2022/02/30",
consultationTime: [
{
id: 1,
name: "上午診",
startTime: "08:30",
endTime: "12:00",
enable: true,
},
{
id: 2,
name: "下午診",
startTime: "15:30",
endTime: "18:30",
enable: true,
},
{
id: 3,
name: "晚診",
startTime: "18:00",
endTime: "21:00",
enable: true,
},
],
timeTableRawData: [
{
id: 1,
onDuty: "李美麗",
division: "皮膚科",
workingDay: 1,
workingTime: 1,
isOffDay: false,
},
{
id: 2,
onDuty: "莊大銘",
division: "家醫科",
workingDay: 3,
workingTime: 3,
isOffDay: false,
},
{
id: 3,
onDuty: "null",
division: "null",
workingDay: 7,
workingTime: 1,
isOffDay: true,
},
],
}
```
### Response:
```json=
{
data: null,
message: "成功"
}
```
:::info
:::
---
==一般設定==
## 取得診所一般設定資訊(ok)
::: success
::: spoiler GET /api/v1/clinic/clinicSettings
### Description:
取得診所一般設定的相關資訊(ok)
### Request:
+ Header
```json=
{
"Authorization": "Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
//可能還缺什麼資訊??
}
```
### Response:
| key | type | value | description |
|:--------------------- |:---------------------------------------------------------------- |:----- |:---------------- |
| departmentTypes | Array\<[資料格式 - DepartmentTypes](/JDOJ1k9BR3Wi8AS7GwMlcw)> | ----- | 部門種類 |
| positionTypes | Array\<[資料格式 - PositionTypes](/7BDA7lEzTOmqtqbZZ6bA4g)> | ----- | 職務類別 |
| medicalDepartments | Array\<[資料格式 - MedicalDepartments](/Ng1S5gLfRnaj6Dcfxxcb8g)> | ----- | 科別/治療別 |
| treatmentList | Array\<[資料格式 - treatmentCategory](/zjp7NG5KQ1eUW_W1PLA1PQ) | ----- | 療程 |
| roomList | Array\<[資料格式 - roomList](/0WOMN7uQQ-mtDKMSM0zsNw) | ----- | 診間資訊 |
| onLineReserveSettings | [資料格式 - OnlineReserve](/8XT_UtzyQYSW_zIzelxb0w) | ----- | 線上預約自動設定 |
```json=
{
"data": [
{
"id": 12,
"name": "零八零零診所ddddd",
"phoneNumbers": "[\"066878788\",\"068783341\"]",
"address": [
{
"addrArea": "北區",
"addrDetail": "北門路一段201號2樓",
"addrCountry": "台南市",
"addrZIPCode": "70542"
},
{
"addrArea": "東區",
"addrDetail": "東門路二段35號",
"addrCountry": "台南市",
"addrZIPCode": "70542"
}
],
"url": "https:www.0800.com.tw",
"lineId": "@0800fdsfsdfsd",
"introductaion": "0800診所提供XXX療程...XXXX",
"photos": [
{
"photoUrl": "www.imageUrl.jpg",
"description": "圖片描述"
},
{
"photoUrl": "www.imageUrl.jpg",
"description": "第二描述"
}
],
"departmentTypes": [
{
"id": 12,
"title": "門診",
"selectable": 1
},
{
"id": 13,
"title": "YYY部門",
"selectable": 1
}
],
"positionTypes": [
{
"id": 42,
"title": "醫師"
},
{
"id": 43,
"title": "護理師",
"selectable": 1
}
],
"medicalDepartments": [
{
"id": 9,
"title": "皮膚科XXX",
"color": "0x229988",
"secectable": 1
},
{
"id": 10,
"title": "牙科",
"color": "0xffffff",
"secectable": 1
}
],
"roomList": [
{
"id": 9,
"name": "手術室",
"roomId": "001XXXX",
"roomDescription": "毛髮移植"
},
{
"id": 10,
"name": "雷射室",
"roomId": "OR1",
"roomDescription": "除疤"
}
],
"treatmentList": [
{
"id": 9,
"category": "雷射健髮",
"timeCost": "30",
"medicalDepartmentId": 1,
"treatmentDescription": "療程說明",
"selectable": 1
},
{
"id": 10,
"category": "除疤",
"timeCost": "30",
"medicalDepartmentId": 2,
"treatmentDescription": "療程說明",
"selectable": 1
}
],
"onLineReserveSettings": {
"id": 1,
"onlineReservable": true,
"periodUnit": 0,
"day": 3,
"reserveAfterUnit": "2",
"autoLockEnable": true,
"type": 0,
"deadLine": "09:00",
"deadLineLock": 0,
"beforeConsult": null
}
}
],
"message": "成功。"
}
```
:::success
:::
## 更新或建立或刪除診所一般設定資訊(ok)
::: info
::: spoiler PUT /api/v1/clinic/clinicSettings
### Description:
更新診所的人員設定的相關資訊
==新增不需要帶入id,更新與刪除需要, 刪除時候,action帶 2==
### Request:
+ Header
```json=
{
"Authorization": "Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
//可能還缺什麼資訊??
}
```
+ body
```json
{
"departmentTypes": [
{
"title": "門診",
"selectable": true,
"action": 1
},
{
"title": "YYY部門",
"selectable": true,
"action": 1
}
],
"positionTypes": [
{
"title": "醫師",
"selectable": false,
"reservable": true,
"action": 1
},
{
"title": "護理師",
"selectable": true,
"reservable": true,
"action": 1
}
],
"medicalDepartments": [
{
"title": "皮膚科XXX",
"color": "0x229988",
"selectable": true,
"action": 1
},
{
"title": "牙科",
"color": "0xffffff",
"selectable": true,
"action": 1
}
],
"roomList": [
{
"roomId": "001XXXX",
"name": "手術室",
"roomDescription": "毛髮移植",
"selectable": true,
"action": 1
},
{
"roomId": "OR1",
"name": "雷射室",
"roomDescription": "除疤",
"selectable": true,
"action": 1
}
],
"treatmentList": [
{
"category": "雷射健髮",
"timeCost": "30",
"medicalDepartmentId": 1,
"treatmentDescription": "療程說明",
"selectable": true,
"action": 1
},
{
"category": "除疤",
"timeCost": "30",
"medicalDepartmentId": 2,
"treatmentDescription": "療程說明",
"selectable": true,
"action": 1
}
],
"onLineReserveSettings": {
"id": 1,
"onlineReservable": true,
"periodUnit": 0,
"day": 3,
"reserveAfterUnit": "2",
"autoLockEnable": true,
"type": 0,
"deadLine": "09:00",
"deadLineLock": 0,
"beforeConsult": null
},
"registNotice": "掛號內容須知XXX...XXX"
}
```
### Response:
```json=
{
data: null,
states: "更新成功"
}
```
:::info
:::
## 取得診所線上預約設定(合併到診所一般設定)
::: success
::: spoiler GET /api/v1/clinic/reserveSetting
### Description:
取得診所的線上預約設定
### Request:
+ Header
```json=
{
"Authorization": "Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
//可能還缺什麼資訊??
}
```
### Response:
| key | type | value | description |
|:----------------- |:------- |:---------- |:------------------------------------------------------------------------------ |
| onlineReservable | Boolean | "true" | 是否開放線上預約, 1:啟用 ,0:禁用 |
| periodUnit | Int | 0 | 0: 週 ; 1: 月 |
| day | Int | 4 | 1:週一, 2:週二,....7:週日 |
| reserverAfterUnit | Int | 2 | 參考單位`periodUnit`- 週/月 + release |
| autoLockEnable | Boolean | "true" | 是否啟用 |
| type | String | "everyday" | 自動鎖定類型, "everyday"/ "beforeClinic" |
| deadLine | Time? | "08:30" | 鎖定時間 |
| deadLineLockType | String | "today" | 鎖定 "today"/ "tomorrow" 的診次 |
| beforeConsult | Time? | "30分鐘" | 用於每個診次前多久鎖定診次預約,這個選項會跟`type`相斥,"beforeClinic"才會有值 |
```json=
{
onlineReservable: true,
periodUnit: 0, // 0: 週, 1: 月
day: 1,
reserverAfterUnit: 2, // 參照periodUnit ,ex 2週 or 2個月
autoLockEnable: true,
type: "everyday", // everyday or beforeClinic
deadLine: "09:00", // 這個時間前
deadLineLock: "today", //鎖定 today or tomorrow的診次
beforeConsult: null, // 如果type是beforeClinic 那這個欄位就要有時間
}
```
:::success
:::
## 更新診所線上預約設定(合併到診所一般設定)
::: info
::: spoiler PUT /api/v1/clinic/reserveSetting
### Description:
更新診所的線上預約設定
### Request:
| key | type | value | description |
|:----------------- |:------- |:-------- |:----------------------------------------------------------------------------- |
| onlineReservable | Boolean | "true" | 是否開放線上預約, 1:啟用 ,0:禁用 |
| periodUnit | Int | 0 | 0: 週 ; 1: 月 |
| day | Int | 4 | 1:週一, 2:週二,....7:週日 , 或者 月份:1~31號 (取決於periodUnit) |
| reserverAfterUnit | String | "2" | 參考單位`periodUnit`- 週/月 + release |
| autoLockEnable | Boolean | "true" | 是否啟用 |
| type | Int | 1 | 自動鎖定類型, 0: 每天 , 1: 每個診次之前 |
| deadLine | Time? | 08:30 | 鎖定時間,只有`type` = 1 才會使用這個時間 |
| deadLineLock | Int | 0 | 鎖定 0: 當天, 1: 隔天 的診次 |
| beforeConsult | String | "30分鐘" | 用於每個診次前多久鎖定診次預約,這個選項會是`type`= 1,"beforeClinic"才會有值 |
+ Header
```json=
{
"Authorization": "Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
//可能還缺什麼資訊??
}
```
+ body
```json
{
onlineReservable: true,
periodUnit: 0, // 0: 週, 1: 月
day: 1,
reserverAfterUnit: 2, // 參照periodUnit ,ex 2週 or 2個月
autoLockEnable: true,
type: "everyday", // everyday or beforeClinic
deadLine: "09:00", // 這個時間前
deadLineLock: "today", //鎖定 today or tomorrow的診次
beforeConsult: null, // 如果type是beforeClinic 那這個欄位就要有時間
}
```
### Response:
```json=
{
data: null,
message: "成功"
}
```
:::info
:::
## 取得診所的診次資訊(ok)
::: success
::: spoiler GET /api/v1/clinic/outpatients?activeAt=2023-02-01
### Description:
取得診所的門診診次清單,顯示最新設定的一筆
### Request:
+ Header
```json=
{
"Authorization": "Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
//可能還缺什麼資訊??
}
```
+ QueryString
activeAt
### Response:
```json=
{
"data": [
{
"id": 43,
"name": "上診",
"startTime": "2023/05/01 09:30",
"endTime": "2023/05/01 12:00",
"activeDate": "2023/05/01",
"order": 1,
"enable": true
},
{
"id": 44,
"name": "下診",
"startTime": "2023/05/01 15:30",
"endTime": "2023/05/01 18:00",
"activeDate": "2023/05/01",
"order": 2,
"enable": true
},
{
"id": 45,
"name": "晚診",
"startTime": "2023/05/01 19:30",
"endTime": "2023/05/01 21:00",
"activeDate": "2023/05/01",
"order": 3,
"enable": true
},
{
"id": 55,
"name": "上診",
"startTime": "2023/04/01 09:30",
"endTime": "2023/04/01 12:00",
"activeDate": "2023/04/01",
"order": 1,
"enable": true
},
{
"id": 56,
"name": "下診",
"startTime": "2023/04/01 15:30",
"endTime": "2023/04/01 18:00",
"activeDate": "2023/04/01",
"order": 2,
"enable": true
},
{
"id": 57,
"name": "晚診",
"startTime": "2023/04/01 19:30",
"endTime": "2023/04/01 21:00",
"activeDate": "2023/04/01",
"order": 3,
"enable": true
}
],
"message": "成功。"
}
```
:::success
:::
## 更新/建立 診所的診次資訊(ok)
::: info
::: spoiler POST /api/v1/clinic/outpatients
### Description:
更新診所的門診診次清單
==更新請帶id==
### Request:
+ Header
```json=
```
+ Path
"id": 1
+ body
```json
[
{
"id": 43, //更新需要帶id
"name": "上診",
"startTime": "2023/05/01 09:30",
"endTime": "2023/05/01 12:00",
"activeDate": "2023/05/01",
"order": 1,
"enable": true
},
{
"name": "下診",
"startTime": "2023/05/01 15:30",
"endTime": "2023/05/01 18:00",
"activeDate": "2023/05/01",
"order": 2,
"enable": true
},
{
"name": "晚診",
"startTime": "2023/05/01 19:30",
"endTime": "2023/05/01 21:00",
"activeDate": "2023/05/01",
"order": 3,
"enable": true
}
]
```
### Response:
```json=
{
data: null,
states: "成功"
}
```
:::info
:::
## 取得診所指定日期區間的診次清單(ok)
::: success
::: spoiler GET /api/v1/clinic/outpatientsAt
### Description:
取得指定日期區間的診次
### Request:
+ Header
```json=
```
+ Path
```json=
```
+ QueryString
```json
first=2023-04-20
last=2023-05-19
```
+ 範例
{{domain}}/api/v1/clinic/outpatientsAt?first=2023-04-20&last=2023-05-19
### Response:
```json=
{
"data": [
[
{
"id": 57,
"clinicId": 12,
"startTime": "2023-04-01T11:30:00.000Z",
"endTime": "2023-04-01T13:00:00.000Z",
"name": "晚診",
"order": 1,
"enable": 1,
"activeDate": "2023-03-31T16:00:00.000Z",
"createdAt": "2023-01-07T04:38:21.000Z",
"updatedAt": "2023-01-07T04:38:21.000Z"
},
{
"id": 56,
"clinicId": 12,
"startTime": "2023-04-01T07:30:00.000Z",
"endTime": "2023-04-01T10:00:00.000Z",
"name": "下診",
"order": 2,
"enable": 1,
"activeDate": "2023-03-31T16:00:00.000Z",
"createdAt": "2023-01-07T04:38:21.000Z",
"updatedAt": "2023-01-07T04:38:21.000Z"
}
],
[
{
"id": 43,
"clinicId": 12,
"startTime": "2023-05-01T01:30:00.000Z",
"endTime": "2023-05-01T04:00:00.000Z",
"name": "上診",
"order": 1,
"enable": 1,
"activeDate": "2023-04-30T16:00:00.000Z",
"createdAt": "2023-01-07T04:13:37.000Z",
"updatedAt": "2023-01-07T04:13:37.000Z"
},
{
"id": 45,
"clinicId": 12,
"startTime": "2023-05-01T11:30:00.000Z",
"endTime": "2023-05-01T13:00:00.000Z",
"name": "晚診",
"order": 2,
"enable": 1,
"activeDate": "2023-04-30T16:00:00.000Z",
"createdAt": "2023-01-07T04:13:37.000Z",
"updatedAt": "2023-01-07T04:13:37.000Z"
},
{
"id": 44,
"clinicId": 12,
"startTime": "2023-05-01T07:30:00.000Z",
"endTime": "2023-05-01T10:00:00.000Z",
"name": "下診",
"order": 3,
"enable": 1,
"activeDate": "2023-04-30T16:00:00.000Z",
"createdAt": "2023-01-07T04:13:37.000Z",
"updatedAt": "2023-01-07T04:13:37.000Z"
}
]
],
"message": "成功。"
}
```
:::success
:::
---
==LINE設定==
## 新增指定常用LINE訊息(ok)
::: info
::: spoiler POST /api/v1/clinic/lineSettings/cannedMsgList
### Description:
新增LINE罐頭訊息內容
### Request:
| key | type | value | description |
|:--------- |:-------- |:------------------ |:-------------------- |
| title | string | "自動發送預約提醒" | 名稱 |
| content | string | "格式化字串樣板" | 內容 |
| type | Int | 1 | 0: 置頂, 1: 其他 |
| enable | Boolean | true | 是否啟用/設定為最愛 |
+ Header
```json=
```
+ body
```json
{
"title": "請假異動公告",
"content": "[病患姓名] 您好,某某醫師請假,[機構名稱] 祝您闔家平安!!",
"type": 1,
"enable": true
}
```
### Response:
```json
{
data: null,
message: "成功"
}
```
:::info
:::
## 取得常用LINE訊息列表(ok)
::: success
::: spoiler GET /api/v1/clinic/lineSettings/cannedMsgList
### Description:
取得LINE罐頭訊息清單
==註記:置頂那一筆需要環境建立時,手動輸入==
### Request:
+ Header
```json=
```
### Response:
| key | type | value | description |
|:--------- |:-------- |:------------------ |:-------------------- |
| id | Int | 1 | id |
| title | string | "自動發送預約提醒" | 名稱 |
| content | string | "格式化字串樣板" | 內容 |
| type | Int | 0 | 0: 置頂, 1: 其他 |
| enable | Boolean | true | 是否啟用/設定為最愛 |
| updatedAt | DateTime | 2022/10/20: 13:52 | 最後修改日期時間 |
```json
{
"data": [
{
"id": 1,
"title": "自動發送預約提醒",
"content": "這邊是格式化罐頭字串XXXXXXXXXXXXDFFF",
"type": 0,
"enable": true,
"updatedAt": "2023-01-04T11:56:44.000Z"
},
{
"id": 2,
"title": "門診異動公告",
"content": "XXX醫生請假,幫YYY取囂愈約",
"type": 1,
"enable": true,
"updatedAt": "2023-01-04T11:56:44.000Z"
}
],
"message": "成功。"
}
```
:::success
:::
## 更新指定常用LINE訊息(ok)
::: info
::: spoiler PUT /api/v1/clinic/lineSettings/cannedMsgList
### Description:
更新指定id的LINE罐頭訊息內容
### Request:
| key | type | value | description |
|:--------- |:-------- |:------------------ |:-------------------- |
| title | string | "自動發送預約提醒" | 名稱 |
| content | string | "格式化字串樣板" | 內容 |
| type | Int | 0 | 0: 置頂, 1: 其他 |
| enable | Boolean | true | 是否啟用/設定為最愛 |
| updatedAt | DateTime | 2022/10/20: 13:52 | 最後修改日期時間 |
+ Header
```json=
```
+ body
```json
{
"id": 1,
"title": "自動發送預約提醒",
"content": "[病患姓名] 您好,提醒您,你的預約將至(如下):[預約資訊],[機構名稱] 祝您闔家平安!!",
"type": 0,
"enable": true
}
```
### Response:
```json
{
data: null,
message: "成功"
}
```
:::info
:::
## 刪除指定常用LINE訊息(ok)
::: info
::: spoiler DELETE /api/v1/clinic/lineSettings/cannedMsgList/:id
### Description:
刪除指定id的LINE罐頭訊息內容
### Request:
+ Header
```json=
```
### Response:
```json
{
data: null,
message: "成功"
}
```
:::info
:::
## Push LINE訊息至訊息池
::: info
::: spoiler POST /api/v1/clinic/lineSettings/msgPool
### Description:
將要發給民眾的樣板訊息 推送到訊息池中
### Request:
+ Header
```json=
```
+ body
```json
{
"includeList":[
1,3,4,7,9,10
], // 必須是病患id
"content": "[病患姓名] 你好,", // 樣板字串
"type": 1. // 1:常用訊息, 0 : 置頂訊息(目前僅Cron job使用)
}
```
### Response:
```json
{
data: null,
message: "成功"
}
```
:::info
:::
###### tags: `掛號系統`