# 健康趨勢 [**取得檢驗檢查日期列表**](#取得檢驗檢查日期列表) [**取得檢驗檢查趨勢內容**](#取得檢驗檢查趨勢內容) [**健康趨勢v2**](#健康趨勢v2) ## 取得檢驗檢查日期列表 ### 所有檢驗資料正規化後, 依日期整理後回傳當天的檢驗資料是否有包含異常值 ```url= POST /{contextPath}/healthTrend/date/list ``` ### Request Body Param | 欄位 | 型態 | 必填 | 預設 | 說明 | |---|---|---|---|---| | householdMemberId | String| Y || 用戶ID(APP查詢免填) | ### Request Body Example: ```javascript= { "householdMemberId":"4894d961-f83b-43f5-8189-13cb77cf3506" } ``` ### Response Body Param * data | 欄位 | 型態 | 說明 | | -----| -----|-------- | | abnormal| Bool| 當天是否有異常檢驗紀錄 | checkupDate| String| 日期, 格式YYYY-MM-DD| ### Response Body Example ```json= { "httpCode": 200, "result": { "data": [ { "abnormal": true, "checkupDate": "2021-04-07" },... ] } } ``` ## 取得檢驗檢查趨勢內容 ### 查詢用戶當天的所有量測值(包含上次量測值) ```url= POST /{contextPath}/healthTrend/data ``` ### Request Body Param | 欄位 | 型態 | 必填 | 預設 | 說明 | |---|---|---|---|---| | householdMemberId | String| Y || 用戶ID(APP查詢免填) | | checkupDate | String| Y || 檢查日期 | ### Request Body Example: ```javascript= { "householdMemberId":"4894d961-f83b-43f5-8189-13cb77cf3506", "checkupDate": "2021-05-21" } ``` ### Response Body Param * data | 欄位 | 型態 | 說明 | | -----| -----|-------- | | householdMemberId| String| 用戶ID | checkupDate| String| 查詢日期 | abnormalNum| Integer| 查詢日期當天的異常數量 | itemList| object[]| 量測指標列表 | indicatorId| String | 檢測指標ID| | indicatorName| String| 檢測指標名稱| | trendList | object[] | 趨勢列表, 該指標的所有量測數值, 按時間排序, 新的在最上面| | -value | String | 檢驗數值 | | -abnormal | Bool | 數值是否異常| | -sourceType | String | 檢驗數值來源(COMPANY_EXAM: 企業健檢, HEALTH_BANK: 健康存摺, HEALTH_BANK_CHECK: 健康存摺-其他檢驗)| | -checkupDate| String | 檢驗日期, 格式YYYY-MM-DD| | -unit| String | 量測值單位| ### Response Body Example ```json= { "httpCode": 200, "result": { "data": { "householdMemberId": "f0a7fab2-287e-4493-81c2-b8d24be5a89d", "checkupDate": "2021-04-01", "abnormalNum": 3, "itemList": [ { "indicatorId": "047165be-4f9f-408c-b3df-2963abfe8086", "indicatorName": "SGPT", "trendList": [ { "value": "24.0", "abnormal": false, "checkupDate": "2021-04-01", "indicatorId": "047165be-4f9f-408c-b3df-2963abfe8086", "indicatorName": "SGPT", "sourceType": "COMPANY_EXAM", "unit": "IU/l" }, { "value": "39.0", "abnormal": false, "checkupDate": "2021-03-01", "indicatorId": "047165be-4f9f-408c-b3df-2963abfe8086", "indicatorName": "SGPT", "sourceType": "COMPANY_EXAM", "unit": "IU/l" } ] }, ] } } } ``` ## 健康趨勢v2 ```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 } ] } ] } } ```