# 洗腎
1. [**取得腹膜透析紀錄**](#取得腹膜透析紀錄)
2. [**更新/新增腹膜透析紀錄**](#更新/新增腹膜透析紀錄)
3. [**刪除腹膜透析紀錄**](#刪除腹膜透析紀錄)
4. [**匯出腹膜透析紀錄**](#匯出腹膜透析紀錄)
## 取得腹膜透析紀錄
```url=
POST /pd/record/list
```
### Request Body
| 欄位 | 型態 | 必填 | 預設 | 說明 |
|---|---|---|---|---|
| query | json | | | 分頁 |
| - startDate | String | Y | | 開始日期 |
| - endDate | String | | | 結束日期|
### Request Body Example:
``` javascript
{
"query": {
"startDate":"2021-04-15",
"endDate":"2021-04-16"
}
}
```
### Response Body:
| Parameter | format | desc | sort supported|
| ---------------- | -------- |----------------|-------------- |
| householdMemberId | String | 成員ID | |
| userName | String | 成員姓名 | |
| recordDate | String | 紀錄日期 | |
| totalDehydration | Int | 當日脫水量 | |
| totalUrineVolume | Int | 當日尿量 | |
| list | json array | 當日記錄 | |
| id | String | 紀錄ID | |
| recordTime | String | 紀錄時間 | |
| resolutionPotency | float | 透析液濃度 | |
| dischargeVolume | Int | 排出量 | |
| injectionVolume | String | 注入量 | |
| urineVolume | String | 尿量 | |
| dehydration | String | 脫水量 | |
### Response Body Example:
``` javascript
{
"httpCode": 200,
"result": {
"data": [
{
"householdMemberId": "ae485dd3-c6c6-49c2-9851-96f5e1e746ce",
"userName": "李維",
"recordDate": "2021-04-15",
"totalDehydration": -100,
"totalRecord": 1,
"totalUrineVolume": 91,
"list": [
{
"id": "d5474601-0e79-4aeb-ab51-fc16d23dff52",
"recordTime": "18:30",
"resolutionPotency": 1.5,
"dischargeVolume": 1100,
"injectionVolume": 2100,
"urineVolume": 91,
"dehydration": -100
}
]
}
]
}
}
```
## 更新/新增腹膜透析紀錄
```url=
POST /pd/record/update
```
### Request Body
| 欄位 | 型態 | 必填 | 預設 | 說明 |
|---|---|---|---|---|
| id | String | | | 紀錄ID,更新紀錄時此欄位必填 |
| recordDate | Int | Y | | 紀錄時間(包含到分)(新增/更新都必填. 但是更新時不更新此欄位 |
| resolutionPotency | float | | | 透析液濃度|
| dischargeVolume | Int | | | 排出量|
| injectionVolume | Int | | | 注入量|
| urineVolume | Int | | | 尿量|
| dehydration | Int | | | 脫水量|
### Request Body Example:
``` javascript
{
"id":"",
"recordDate": 1618482600000,
"resolutionPotency": 1.5,
"dischargeVolume": 1100,
"injectionVolume": 2100,
"urineVolume": 91,
"dehydration": -100
}
```
### Response Body:
| Parameter | format | desc | sort supported|
| ---------------- | -------- |----------------|-------------- |
| data | Int | 更新/新增筆數 | |
|
### Response Body Example:
``` javascript
{
"httpCode": 200,
"result": {
"data": 1
}
}
```
## 刪除腹膜透析紀錄
```url=
POST /pd/record/delete
```
### Request Body
| 欄位 | 型態 | 必填 | 預設 | 說明 |
|---|---|---|---|---|
| id | String | | | 紀錄ID |
### Request Body Example:
``` javascript
{
"id":"d5474601-0e79-4aeb-ab51-fc16d23dff52"
}
```
### Response Body:
| Parameter | format | desc | sort supported|
| ---------------- | -------- |----------------|-------------- |
| data | Int | 刪除筆數 | |
|
### Response Body Example:
``` javascript
{
"httpCode": 200,
"result": {
"data": 1
}
}
```
## 匯出腹膜透析紀錄
```url=
POST /pd/record/export-list
```
### Request Body
| 欄位 | 型態 | 必填 | 預設 | 說明 |
|---|---|---|---|---|
| query | json | | | 分頁 |
| - startDate | String | Y | | 開始日期 |
| - endDate | String | | | 結束日期|
### Request Body Example:
File