---
# System prepended metadata

title: 健檢資料

---

# 健檢資料

指標子分類

| subCategoery                    | 說明         |
|---------------------------------|------------|
| GENERAL_TEST                    | 一般檢驗       |
| BLOOD_GENERAL_TEST              | 血液一般檢驗     |
| URINE_GENERAL_TEST              | 尿液一般檢驗     |
| URINE_SPECIAL_TEST              | 尿液特殊檢驗     |
| BIOCHEMICAL_TEST                | 生化檢驗       |
| DIABETES_INSPECTION             | 糖尿病檢查      |
| LIVER_FUNCTION_INSPECTION       | 肝功能檢查      |
| CARDIOVASCULAR_LIPID_INSPECTION | 心臟血管與血脂肪檢查 |
| THYROID_FUNCTION_INSPECTION     | 甲狀腺功能檢查    |
| GENERAL_EXAM                    | 一般檢查       |
| X_RAY_EXAM                      | X光檢查       |
| PHYSIOTHERAPY_EXAM              | 理學檢查       |
| OTHER_EXAM                      | 其他         |

--- 
API

* [APP全指標清單(依子分類)](#APP全指標清單(依子分類))
* [APP手動匯入指標](#APP手動匯入指標)
* [APP手動編輯健檢資料](#APP手動編輯健檢資料)
* [APP手動刪除健檢資料](#APP手動刪除健檢資料)
* [APP健康趨勢列表](#APP健康趨勢列表)
* [指標子類別清單](#指標子類別清單)
* [指標分類查詢](#指標分類查詢)

---

## APP全指標清單(依子分類)

````url
GET indicatorDataCategory/list
````

* 限APP個人用戶

### Request
--

### Response

- subCategory

| 欄位           | 型態        | 說明      |
|--------------|-----------|---------|
| subCategory1 | JsonArray | 該子分類下指標 |
| subCategory2 | JsonArray | 該子分類下指標 |
| subCategory3 | JsonArray | 該子分類下指標 |

...

indicator_object

| 欄位          | 型態     | 說明           |
|-------------|--------|--------------|
| id          | String | 指標id         |
| name        | String | 指標名          |
| description | String | 指標說明         |
| unit        | String | 單位           |
| dataType    | String | TEXT、NUMERIC |

```json
{
  "httpCode": 200,
  "result": {
    "data": {
      "GENERAL_TEST": [
        {
          "id": "047165be-4f9f-408c-b3df-2963abfe8086",
          "name": "ALT(GPT)",
          "description": "丙胺酸轉胺酶(肝功能指數)",
          "unit": "U/L",
          "dataType": "NUMERIC"
        },
        {
          "id": "0602a6d9-6411-460e-8f61-89cf1cc25050",
          "name": "U.A",
          "description": "尿酸",
          "unit": "mg/dL",
          "dataType": "NUMERIC"
        },
        {
          "id": "25642ab7-8ce3-45aa-acd4-7a627d5f33f3",
          "name": "AST(GOT)",
          "description": "天門冬胺酸轉胺酶(肝功能指數)",
          "unit": "U/L",
          "dataType": "NUMERIC"
        },
        {
          "id": "4fd29eac-e055-48c5-97b3-4c71156fda8a",
          "name": "HDL-C",
          "description": "高密度脂蛋白(好膽固醇)",
          "unit": "mg/dL",
          "dataType": "NUMERIC"
        }
      ],
      "BIOCHEMICAL_TEST": [
        {
          "id": "d81beda1-6d54-4a69-8680-28f00eaaff36",
          "name": "(Iron & TIBC)_Iron",
          "description": "血清鐵",
          "unit": "μg/dL",
          "dataType": "NUMERIC"
        },
        {
          "id": "2f537536-c31b-4729-8be3-ab8b3abcbb96",
          "name": "(Iron & TIBC)_TIBC",
          "description": "血清鐵結合量",
          "unit": "μg/dL",
          "dataType": "NUMERIC"
        },
        {
          "id": "54a218df-c3ba-4278-b6ba-ec143cb76803",
          "name": "Chloride, Cl",
          "description": "氯",
          "unit": "mmol/L",
          "dataType": "NUMERIC"
        }
      ]
    }
  }
}
```

## APP手動匯入指標

````url
POST normalizeExamData/add
````

* 限APP個人用戶，每日同指標只允許一個手動匯入資料

### Request

| 欄位                       | 型態        | 必填 | 長度限制 | 說明      |
|--------------------------|-----------|----|------|---------|
| Date                     | Date      | Y  |      | 日期      |
| normalizeExamInfoMessage | String    | Y  | 30   | 備註資訊    |
| normalizeExamDataList    | JsonArray | Y  | 150  | 指標id與數值 |

normalizeExamData

| 欄位          | 型態     | 必填 | 長度限制 | 說明   |
|-------------|--------|----|------|------|
| indicatorId | String | Y  | 36   | 指標id |
| oriValue    | String | Y  | 50   | 數值   |

```json
{
  "checkDate": "2023-06-18",
  "normalizeExamInfoMessage": "infoMessage",
  "normalizeExamDataList": [
    {
      "indicatorId": "e8d119d2-6be7-4232-93d6-947219f88d87",
      "oriValue": "10.1"
    },
    {
      "indicatorId": "f7833a4c-8100-47a3-ab9e-7e16a71b3525",
      "oriValue": "10.2"
    },
    {
      "indicatorId": "4fd29eac-e055-48c5-97b3-4c71156fda8a",
      "oriValue": "10.3"
    }
  ]
}
```

### Response

| 欄位                  | 型態     | 說明                  |
|---------------------|--------|---------------------|
| normalizeExamInfoId | String | normalizeExamInfoId |

```json
{
  "httpCode": 200,
  "result": {
    "data": {
      "normalizeExamInfoId": "3c4fc600-8bc2-45a7-b5df-e2e36c5bfc1f"
    }
  }
}
```

## APP手動編輯健檢資料

````url
POST normalizeExamData/update
````

### Request

| 欄位                       | 型態        | 必填 | 長度限制 | 說明      |
|--------------------------|-----------|----|------|---------|
| Date                     | Date      | Y  |      | 日期      |
| normalizeExamInfoMessage | String    | Y  | 30   | 備註資訊    |
| normalizeExamDataList    | JsonArray | N  | 150  | 指標id與數值 |
| deleteIndicatorIdList    | JsonArray | N  | 150  | 欲刪除指標id |

normalizeExamData

| 欄位          | 型態     | 必填 | 長度限制 | 說明   |
|-------------|--------|----|------|------|
| indicatorId | String | Y  | 36   | 指標id |
| oriValue    | String | Y  | 50   | 數值   |

```json
{
  "checkDate": "2023-07-12",
  "normalizeExamInfoMessage": "更新InfoMessage",
  "normalizeExamDataList": [
    {
      "indicatorId": "047165be-4f9f-408c-b3df-2963abfe8086",
      "oriValue": "1"
    },
    {
      "indicatorId": "32849749-a043-4dee-8c56-f636017aae1a",
      "oriValue": "1"
    },
    {
      "indicatorId": "e68e0a83-02c9-4951-a2fc-a8e3e054f32c",
      "oriValue": "111"
    },
    {
      "indicatorId": "19390e71-e626-4869-aab9-64ebda238e77",
      "oriValue": "111"
    }
  ],
  "deleteIndicatorIdList": [
    "19390e71-e626-4869-aab9-64ebda238e77",
    "047165be-4f9f-408c-b3df-2963abfe8086"
  ]
}
```

### Response

| 欄位                  | 型態     | 說明                  |
|---------------------|--------|---------------------|
| normalizeExamInfoId | String | normalizeExamInfoId |

```json
{
  "httpCode": 200,
  "result": {
    "data": {
      "normalizeExamInfoId": "3c4fc600-8bc2-45a7-b5df-e2e36c5bfc1f"
    }
  }
}
````

## APP手動刪除健檢資料

````url
POST normalizeExamData/delete
````

### Request

| 欄位                       | 型態        | 必填 | 長度限制 | 說明      |
|--------------------------|-----------|----|------|---------|
| Date                     | Date      | Y  |      | 日期      |


```json
{
  "checkDate":"2023-07-12"
}
```

### Response

| 欄位                  | 型態     | 說明                  |
|---------------------|--------|---------------------|
| normalizeExamInfoId | String | normalizeExamInfoId |

```json
{
  "httpCode": 200,
  "result": {
    "data": {
      "normalizeExamInfoId": "3c4fc600-8bc2-45a7-b5df-e2e36c5bfc1f"
    }
  }
}
````

## APP健康趨勢列表

```http request
GET /api/normalizeExamData/list HTTP/1.1
```

依app端token權限查詢

### Request Body Example:

--

### Response Body Param

| 欄位            | 型態      | 說明                                                                              |
|---------------|---------|---------------------------------------------------------------------------------|
| checkDate     | Date    | 健檢時間                                                                            |
| sourceType    | Sting   | 資料來源 (PERSONAL_EXAM、COMPANY_EXAM、HEALTH_BANK)                                   |
| tenantId      | String  | 企業匯入租戶id，手動輸入及企業匯入為空字串                                                          |
| info          | String  | 健檢報告info:<br/>PERSONAL_EXAM:（自行設定名稱）<br/>COMPANY_EXAM:租戶名稱<br/>HEALTH_BANK:健康存摺 |
| hasAbnormal   | Boolean | 該份健檢是否有異常值                                                                      |
| indicatorList | Array   | 健檢數值                                                                            |

#### indicator

| 欄位                   | 型態      | 說明         |
|----------------------|---------|------------|
| id                   | Sting   | 指標id       |
| name                 | Sting   | 指標名稱       |
| description          | Sting   | 指標說明(中文名稱) |
| unit                 | Sting   | 單位         |
| thresholdDescription | Sting   | 閥值說明       |
| value                | Sting   | 該次檢驗值      |
| checkDate            | Date    | 該次檢驗時間     |
| isAbnormal           | Boolean | 該次是否異常     |
| previousValue        | Sting   | 前次檢驗值      |
| previousCheckDate    | Date    | 前次檢驗時間     |
| previousIsAbnormal   | Boolean | 前次是否異常     |

#### sourceType

| sourceType    | 說明     |
|---------------|--------|
| PERSONAL_EXAM | 手動輸入   |
| COMPANY_EXAM  | 企業匯入   |
| HEALTH_BANK   | 健康存摺匯入 |

### Response Body Example

```json
{
  "httpCode": 200,
  "result": {
    "data": [
      {
        "checkDate": 1606060800000,
        "sourceType": "PERSONAL_EXAM",
        "tenantId": "",
        "info": "台大醫院健檢(自行設定名稱)",
        "hasAbnormal": true,
        "indicatorList": [
          {
            "id": "047165be-4f9f-408c-b3df-2963abfe8086",
            "name": "ALT(GPT)",
            "description": "丙胺酸轉胺酶(肝功能指數)",
            "unit": "U/L",
            "thresholdDescription": "0 ~ 41",
            "value": "55555",
            "checkDate": 1606060800000,
            "isAbnormal": true
          },
          {
            "id": "e8d119d2-6be7-4232-93d6-947219f88d87",
            "name": "BUN",
            "description": "尿素氮(腎功能)",
            "unit": "mg/dL",
            "thresholdDescription": "7~25",
            "value": "55555",
            "checkDate": 1606060800000,
            "isAbnormal": true
          },
          {
            "id": "c9953fc5-e6a8-4da7-a306-b8d52155fd74",
            "name": "CRE",
            "description": "肌酸酐(腎功能)",
            "unit": "mg/dL",
            "thresholdDescription": "0.6-1.3",
            "value": "55555",
            "checkDate": 1606060800000,
            "isAbnormal": true
          }
        ]
      },
      {
        "checkDate": 1559145600000,
        "sourceType": "HEALTH_BANK",
        "tenantId": "",
        "info": "健康存摺",
        "hasAbnormal": true,
        "indicatorList": [
          {
            "id": "f7833a4c-8100-47a3-ab9e-7e16a71b3525",
            "name": "T-CHO",
            "description": "總膽固醇",
            "unit": "mg/dL",
            "thresholdDescription": "< 200",
            "value": "136",
            "checkDate": 1559145600000,
            "isAbnormal": false
          },
          {
            "id": "57998af1-0f95-49cc-86bc-a9a78d160473",
            "name": "TG",
            "description": "三酸甘油酯",
            "unit": "mg/dL",
            "thresholdDescription": "< 150",
            "value": "104",
            "checkDate": 1559145600000,
            "isAbnormal": false
          },
          {
            "id": "4fd29eac-e055-48c5-97b3-4c71156fda8a",
            "name": "HDL-C",
            "description": "高密度脂蛋白(好膽固醇)",
            "unit": "mg/dL",
            "thresholdDescription": "> 40",
            "value": "33",
            "checkDate": 1559145600000,
            "isAbnormal": true
          }
        ]
      },
      {
        "checkDate": 1688140800000,
        "sourceType": "COMPANY_EXAM",
        "tenantId": "5efcfd67-334e-45b3-bf49-7e52f5172891",
        "info": "企客第一家",
        "hasAbnormal": true,
        "indicatorList": [
          {
            "id": "4fd29eac-e055-48c5-97b3-4c71156fda8a",
            "name": "HDL-C",
            "description": "高密度脂蛋白(好膽固醇)",
            "unit": "mg/dL",
            "thresholdDescription": "> 40",
            "value": "40",
            "checkDate": 1688140800000,
            "isAbnormal": false,
            "previousValue": "65.000",
            "previousCheckDate": 1606060800000,
            "previousIsAbnormal": false
          },
          {
            "id": "0602a6d9-6411-460e-8f61-89cf1cc25050",
            "name": "U.A",
            "description": "尿酸",
            "unit": "mg/dL",
            "thresholdDescription": "企客第一家 男",
            "value": "33",
            "checkDate": 1688140800000,
            "isAbnormal": true,
            "previousValue": "12.800",
            "previousCheckDate": 1606060800000,
            "previousIsAbnormal": true
          }
        ]
      },
      {
        "checkDate": 1693497600000,
        "sourceType": "PERSONAL_EXAM",
        "tenantId": "",
        "info": "偉偉醫院健檢(自行設定名稱)",
        "hasAbnormal": false,
        "indicatorList": [
          {
            "id": "09aa4105-46d6-4843-ae44-27f0117b6f3f",
            "name": "Anti-HBe",
            "description": "e抗體 恢復期",
            "unit": "S/CO",
            "thresholdDescription": "Negative (>1.000S/CO)",
            "value": "q",
            "checkDate": 1693497600000,
            "isAbnormal": false,
            "previousValue": "(-)",
            "previousCheckDate": 1686326400000,
            "previousIsAbnormal": true
          }
        ]
      }
    ]
  }
}
```

## 指標子類別清單

```http request
GET /indicatorData/subCategory/list HTTP/1.1
```

### Request
--

### Response

| 欄位           | 型態     | 說明      |
|--------------|--------|---------|
| subCategory1 | String | keyName |
| subCategory2 | String | keyName |
| subCategory3 | String | keyName |

...

```json
{
  "httpCode": 200,
  "result": {
    "data": [
      "GENERAL_TEST",
      "BLOOD_GENERAL_TEST",
      "URINE_GENERAL_TEST",
      "URINE_SPECIAL_TEST",
      "BIOCHEMICAL_TEST",
      "DIABETES_INSPECTION",
      "LIVER_FUNCTION_INSPECTION",
      "CARDIOVASCULAR_LIPID_INSPECTION",
      "THYROID_FUNCTION_INSPECTION",
      "GENERAL_EXAM",
      "X_RAY_EXAM",
      "PHYSIOTHERAPY_EXAM",
      "OTHER_EXAM"
    ]
  }
}
```

## 指標分類查詢

```http request
POST /api/indicatorExamData/query HTTP/1.1
```

### Request

| 欄位                | 型態     | 必填 | 長度限制 | 說明     |
|-------------------|--------|----|------|--------|
| householdMemberId | String | Y  | 36   | 個案id   |
| subCategory       | String | N  |      | 欲查詢子類別 |

````json
{
  "query": {
    "householdMemberId": "8a9e980a-c612-4f87-af07-a97a5f0fbed5",
    "subCategory": "GENERAL_TEST"
    //不帶subCategory查詢為全部
  },
  "pagination": {
    "current": 1,
    "pageSize": 10
  },
  "sorter": {
    "field": "name"
  }
}
````

### Response

| 欄位                 | 型態   | 說明               |
| -------------------- |:------ |:------------------ |
| id                   | String | 指標id             |
| subCategory          | String | 子類別             |
| name                 | String | 檢驗檢查項目       |
| description          | String | 檢驗檢查名稱       |
| unit                 | String | 單位(可能為null)   |
| thresholdDescription | String | 標準值(可能為null) |
| valueList            | Array  | 檢驗值List         |

Value
| 欄位       | 型態  | 說明           |
| ---------- |:----- |:-------------- |
| yyyy-MM-dd | array | 該日期下檢驗值 |


ExamValue
| 欄位       | 型態   | 說明                                               |
| ---------- |:------ |:-------------------------------------------------- |
| value      | String | 檢驗值                                             |
| sourceType | String | 檢驗類型(COMPANY_EXAM、PERSONAL_EXAM、HEALTH_BANK) |


....

```json
{
    "httpCode": 200,
    "result": {
        "data": [
            {
                "id": "1530dab2-ade2-485b-802d-900bb9133e6c",
                "subCategory": "X_RAY_EXAM",
                "name": "chest x-ray",
                "description": "胸部X光",
                "valueList": [
                    {
                        "2023-08-29": [
                            {
                                "value": "111",
                                "sourceType": "PERSONAL_EXAM"
                            }
                        ]
                    },
                    {
                        "2023-08-30": [
                            {
                                "value": "11",
                                "sourceType": "COMPANY_EXAM"
                            },
                            {
                                "value": "22",
                                "sourceType": "PERSONAL_EXAM"
                            },
                            {
                                "value": "33",
                                "sourceType": "HEALTH_BANK"
                            },
                            {
                                "value": "44",
                                "sourceType": "HEALTH_BANK"
                            }
                        ]
                    }
                ]
            },
            {
                "id": "f4544fcc-fd91-4729-bc2b-72e3894b12c0",
                "subCategory": "GENERAL_EXAM",
                "name": "color vision",
                "description": "辨色力(色盲)",
                "valueList": [
                    {
                        "2023-08-30": [
                            {
                                "value": "0.9",
                                "sourceType": "COMPANY_EXAM"
                            }
                        ]
                    }
                ]
            },
            {
                "id": "c9953fc5-e6a8-4da7-a306-b8d52155fd74",
                "subCategory": "GENERAL_TEST",
                "name": "CRE",
                "description": "肌酸酐(腎功能)",
                "thresholdDescription": "0.6-1.3",
                "unit": "mg/dL",
                "valueList": [
                    {
                        "2023-08-30": [
                            {
                                "value": "100.0",
                                "sourceType": "COMPANY_EXAM"
                            }
                        ]
                    }
                ]
            }
        ],
        "pagination": {
            "current": 1,
            "pageSize": 10,
            "total": 23
        },
        "sorter": {
            "field": "name"
        },
        "total": 23
    }
}
```