# 高風險
1. [**取得所有高風險項目(疾病對應多項指標)**](#取得所有高風險項目疾病對應多項指標)
2. [**取得所有高風險列表(active)**](#取得所有高風險列表active)
3. [**取得所有高風險列表(inactive)**](#取得所有高風險列表inactive)
4. [**更新高風險紀錄狀態**](#更新高風險紀錄狀態)
5. [**取得潛在風險指標追蹤的各疾病人數**](#取得潛在風險指標追蹤的各疾病人數)
## 取得所有高風險項目(疾病對應多項指標)
```url=
GET /highrisk/item/list
```
### Request Body
| 欄位 | 型態 | 必填 | 預設 | 說明 |
|---|---|---|---|---|
### Response Body:
| Parameter | format | desc |
| ---------------- | -------- |----------------|
| id | string | 風險指標ID |
| riskDisease | string | 疾病ID |
| riskDiseaseName | string | 疾病名稱 |
| riskDiseaseI18n | string | 疾病I18N |
| riskItem | string | 指標ID |
| riskItemName | string | 指標名稱 |
| thresholdType | string | 指標的比對類別: greater/greater_equal/lower/lower_equal/greater_lower/greater_lower_equal/greater_equal_lower_equal/text |
| thresholdHigh | string | 指標的比對值, 當thresholdType 是(greater/greater_equal/greater_lower/greater_lower_equal/greater_equal_lower_equal) |
| thresholdLow | string | 指標的比對值, 當thresholdType 是(lower/lower_equal/greater_lower/greater_lower_equal/greater_equal_lower_equal) |
| thresholdText | string | 指標的比對值, 當thresholdType 是text時 顯示這個值 |
| unit | string | 顯示單位 |
| optional | boolean | 該指標是否是必要條件, true: 充要 false: 必要 |
### Response Body Example:
這個例子的結果是
B型肝炎:
年齡 > 18歲
HBSAG: 陽性(或)
吸菸: 有(或)
``` javascript
{
"httpCode": 200,
"result": {
"data": [
{
"id": "7f588b2f-3e00-487e-aabb-70a0ff394206",
"riskItem": "HBSAG",
"riskItemName": "HBsAg",
"riskDisease": "B_HEPATITIS",
"riskDiseaseName": "B型肝炎",
"riskDiseaseI18n": "CASE.HIGH_RISK.DISEASE_B_HEPATITIS",
"unit": "",
"thresholdType": "text",
"optional": true,
"thresholdText": "陽性"
},
{
"id": "f476076c-ae23-4818-9bb9-868f1721689b",
"riskItem": "SMOKE",
"riskItemName": "吸菸",
"riskDisease": "B_HEPATITIS",
"riskDiseaseName": "B型肝炎",
"riskDiseaseI18n": "CASE.HIGH_RISK.DISEASE_B_HEPATITIS",
"unit": "",
"thresholdType": "text",
"optional": true,
"thresholdText": "有"
},
{
"id": "10792d93-7d48-49fb-922e-f1314c0dd9bf",
"riskItem": "AGE",
"riskItemName": "年齡",
"riskDisease": "B_HEPATITIS",
"riskDiseaseName": "B型肝炎",
"riskDiseaseI18n": "CASE.HIGH_RISK.DISEASE_B_HEPATITIS",
"unit": "歲",
"riskResultHigh": 18
"thresholdType": "greater",
"optional": false
}
]
}
}
```
## 取得所有高風險列表(active)
### 僅顯示狀態為 1: 潛在風險 2: 追蹤觀察兩種
```url=
POST /highrisk/record/active/list
```
### Request Body
| 欄位 | 型態 | 必填 | 預設 | 說明 |
|---|---|---|---|---|
|diseaseId|string|N||疾病ID|
|status|integer|N||狀態. 0: 結束追蹤 1: 潛在風險 2: 追蹤觀察 3: 已收案|
|name|string|N||模糊查詢(姓名,電話,編號)|
|cpiId|string|N||個案ID(casePatInfo)|
```javascript=
{
"query": {
"diseaseId": "B_HEPATITIS",
"status": 1,
"name": "",
"cpiId": "1552fc8b-055e-49d0-a7f8-8329389b8c84"
},
"pagination": {
"current": 1,
"pageSize": 15,
"total": 0
},
"sorter": {}
}
```
### Response Body:
以風險疾病為單位, 同一人可能滿足多筆風險疾病
| Parameter | format | desc |
| ---------------- | -------- |----------------|
| id | string | 風險ID |
| riskDisease | string | 疾病ID |
| riskDiseaseName | string | 疾病名稱 |
| riskDiseaseI18n | string | 疾病I18N |
| riskItemNameList | string[] | 滿足該風險疾病的名稱列表 |
| caseDiseaseNameList | string[] | 被收案的疾病名稱列表 |
| status | integer | 狀態. 0: 結束追蹤 1: 潛在風險 2: 追蹤觀察 |
| updateTime | string | 更新時間 |
| householdMemberId | string | 用戶ID |
| cpiId | string | 個案ID |
| name | string | 用戶名稱 |
| gender | integer | 性別. 1: 男生 2: 女生 |
| mobile | string | 電話 |
| handlerId | string | 處理人員ID(accountId, 切換狀態/收案人員) |
| handlerName | string | 處理人員姓名 |
| handlerTenantName | string | 處理人員租戶名稱 |
| handlerDivisionName | string | 處理人員科別名稱 |
### Response Body Example:
``` javascript
{
"httpCode": 200,
"result": {
"data": [
{
"id": "47e525de-25c6-41f8-abda-8bc88cfe9973",
"householdMemberId": "5ae61dcb-40c0-4bfd-8739-77f2e38d2b62",
"cpiId": "94d11499-7eca-4bda-bab1-3f4e852128b7",
"name": "小華(BC_BC)",
"gender": 1,
"caseDiseaseNameListStr": "[\"BC\", \"口腔癌A\"]",
"caseDiseaseNameList": [
"BC",
"口腔癌A"
],
"riskDisease": "ORAL_CANCER_A",
"riskDiseaseName": "口腔癌A",
"riskDiseaseI18N": "CASE.DISEASE_TYPE.ORAL_CANCER_A",
"thresholdOverInfo": "[{\"id\": \"73d02894-a586-489a-a73e-aaa31c5b9a8e\", \"name\": \"年齡\", \"value\": \"Y\"}]",
"riskItemNameList": [
"年齡"
],
"status": 3,
"updateTime": 1624612284000,
"handlerId": "7a17be34-13ae-4687-b971-1e5f586c8e3a",
"handlerName": "w",
"handlerTenantName": "緯緯醫學",
"handlerDivisionName": "外科",
"total": 1
}
],
"pagination": {
"current": 1,
"pageSize": 15,
"total": 0
},
"sorter": {}
}
}
```
## 取得所有高風險列表(inactive)
### 僅顯示狀態為 0: 結束追蹤 3: 已收案兩種
```url=
POST /highrisk/record/inactive/list
```
### Request Body
| 欄位 | 型態 | 必填 | 預設 | 說明 |
|---|---|---|---|---|
|diseaseId|string|N||疾病ID|
|status|integer|N||狀態. 0: 結束追蹤 1: 潛在風險 2: 追蹤觀察 3: 已收案|
|name|string|N||模糊查詢(姓名,電話,編號)|
|cpiId|string|N||個案ID(casePatInfo)|
```javascript=
{
"query": {
"diseaseId": "B_HEPATITIS",
"status": 0,
"name": ""
},
"pagination": {
"current": 1,
"pageSize": 15,
"total": 0
},
"sorter": {}
}
```
### Response Body:
以風險疾病為單位, 同一人可能滿足多筆風險疾病
| Parameter | format | desc |
| ---------------- | -------- |----------------|
| id | string | 風險ID |
| riskDisease | string | 疾病ID |
| riskDiseaseName | string | 疾病名稱 |
| riskDiseaseI18n | string | 疾病I18N |
| riskItemNameList | string[] | 滿足該風險疾病的名稱列表 |
| caseDiseaseNameList | string[] | 被收案的疾病名稱列表 |
| status | integer | 狀態. 0: 結束追蹤 1: 潛在風險 2: 追蹤觀察 |
| updateTime | string | 更新時間 |
| householdMemberId | string | 用戶ID |
| cpiId | string | 個案ID |
| name | string | 用戶名稱 |
| gender | integer | 性別. 1: 男生 2: 女生 |
| mobile | string | 電話 |
| handlerId | string | 處理人員ID(accountId, 切換狀態/收案人員) |
| handlerName | string | 處理人員姓名 |
| handlerTenantName | string | 處理人員租戶名稱 |
| handlerDivisionName | string | 處理人員科別名稱 |
### Response Body Example:
``` javascript
{
"httpCode": 200,
"result": {
"data": [
{
"id": "47e525de-25c6-41f8-abda-8bc88cfe9973",
"householdMemberId": "5ae61dcb-40c0-4bfd-8739-77f2e38d2b62",
"cpiId": "94d11499-7eca-4bda-bab1-3f4e852128b7",
"name": "小華(BC_BC)",
"gender": 1,
"caseDiseaseNameListStr": "[\"BC\", \"口腔癌A\"]",
"caseDiseaseNameList": [
"BC",
"口腔癌A"
],
"riskDisease": "ORAL_CANCER_A",
"riskDiseaseName": "口腔癌A",
"riskDiseaseI18N": "CASE.DISEASE_TYPE.ORAL_CANCER_A",
"thresholdOverInfo": "[{\"id\": \"73d02894-a586-489a-a73e-aaa31c5b9a8e\", \"name\": \"年齡\", \"value\": \"Y\"}]",
"riskItemNameList": [
"年齡"
],
"status": 3,
"updateTime": 1624612284000,
"handlerId": "7a17be34-13ae-4687-b971-1e5f586c8e3a",
"handlerName": "w",
"handlerTenantName": "緯緯醫學",
"handlerDivisionName": "外科",
"total": 1
}
],
"pagination": {
"current": 1,
"pageSize": 15,
"total": 0
},
"sorter": {}
}
],
"pagination": {
"current": 1,
"pageSize": 15,
"total": 0
},
"sorter": {}
}
}
```
## 更新高風險記錄狀態
```url=
POST /highrisk/record/status/update
```
### Request Body
| 欄位 | 型態 | 必填 | 預設 | 說明 |
|---|---|---|---|---|
|id|string|Y||風險紀錄ID|
|status|integer|Y||狀態. 0: 結束追蹤 1: 潛在風險 2: 追蹤觀察 3: 已收案|
```javascript=
{
"id": "b2a618f0-a3f2-43fb-b0fb-4223a2a2f650",
"status": 2
}
```
### Response Body:
以風險疾病為單位, 同一人可能滿足多筆風險疾病
| Parameter | format | desc |
| ---------------- | -------- |----------------|
| data | integer | 更新數量 |
### Response Body Example:
``` javascript
{
"httpCode": 200,
"result": {
"data": 0
}
}
```
## 取得潛在風險指標追蹤的各疾病人數
```url=
GET /highrisk/potentialRisk/count
```
- 狀態[ 0: 結束追蹤 1: 潛在風險 2: 追蹤觀察 3: 已收案 ],此處只含 [ 1: 潛在風險 ]的個案。
### Request Body
| 欄位 | 型態 | 必填 | 預設 | 說明 |
|---|---|---|---|---|
### Response Body
| Parameter | Format | Desc |
| --- | --- | --- |
| diseaseId | String | 疾病ID |
| name | String | 疾病名稱 |
| count | Integer | 人數 |
### Response Body Example
``` javascript
{
"httpCode": 200,
"result": {
"data": [
{
"diseaseId": "DM",
"name": "DM",
"count": 13
},
{
"diseaseId": "LIVER_CANCER",
"name": "肝癌",
"count": 0
},
{
"diseaseId": "HYPERLIPIDEMIA",
"name": "高血脂",
"count": 226
},
{
"diseaseId": "ORAL_CANCER_B",
"name": "口腔癌B",
"count": 0
},
{
"diseaseId": "HEPATITIS_B",
"name": "B型肝炎",
"count": 0
},
{
"diseaseId": "HEPATITIS_C",
"name": "C型肝炎",
"count": 0
},
{
"diseaseId": "HYPERURICEMIA",
"name": "高尿酸",
"count": 0
},
{
"diseaseId": "ORAL_CANCER_A",
"name": "口腔癌A",
"count": 19
},
{
"diseaseId": "HTN",
"name": "高血壓",
"count": 0
}
]
}
}
```