# 防疫指標總覽 --- API 清單 * [防疫指標統計](#防疫指標統計) * [指標異常名單](#指標異常名單) * [個案體溫記錄列表](#個案體溫記錄列表) * [匯出單日全部體溫量測記錄資料](#匯出單日全部體溫量測記錄資料) * [匯出異常體溫量測記錄資料](#匯出異常體溫量測記錄資料) * [疫苗接種狀況](#疫苗接種狀況) --- ## 防疫指標統計 ```url= POST /epidemic-prevention/indicator-stats ``` Request 欄位 | 型態 | 必填 | 預設 | 說明 ---|---|---|---|--- measureDate | timestamp | Y | | 查詢日期 temperatureBase | float | Y | 體溫基準值, 預設為37.5 ```javascript { "query": { "measureDate": 1614528000000, "temperatureBase": 37.5 } } ``` Response 欄位 | 型態 | 說明 -----| -----|-------- abnormal | int | 指標異常總人數 total | json | 員工總人數 -male | int | 男性員工人數 -female | int | 女性員工人數 -other | int | 未設定性別員工人數 indicatorStats | json array | 指標統計array -itemName | string | 項目名稱, MEASURE: 體溫量測, HIGHEST: 最高體溫 -gender | int | 性別, 1:男性, 2: 女性, 0: 全部 -temperature | float | 體溫, 基本上同傳入的 temperatureBase -count | int | 人數 temperatureStats | json array | 體溫分析array -normal | json | 體溫正常json -male | int | 體溫正常男性人數 -female | int | 體溫正常女性人數 -abnormal | json | 體溫異常json -male | int | 體溫異常男性人數 -female | int | 體溫異常女性人數 recordStats | json array | 紀錄狀況分析array -recordCount | int | 有記錄人數 -noRecordCount | int | 無記錄人數 ```javascript { "httpCode": 20, "result": { "data": { "abnormal": 5880, "total": { "male": 1000, "female": 2000, "other": 0 }, "indicatorStats": [ { "itemName": "MEASURE", "gender": 1, "temperature": 37.5, "count": 12 }, { "itemName": "HIGHEST", "gender": 1, "temperature": 38.1, "count": 1 } ], "temperatureStats": { "normal": { "male": 21, "female": 22 }, "abnormal": { "male": 12, "female": 8 } }, "recordStats": { "recordCount": 62, "noRecordCount": 38 } } } } ``` ## 指標異常名單 ```url= POST /epidemic-prevention/abnormal-list ``` Request 欄位 | 型態 | 必填 | 預設 | 說明 ---|---|---|---|--- startDate | timestamp | Y | | 開始日期 endDate | timestamp | Y | | 結束日期 temperatureBase | float | Y | 37.5 | 體溫基準值, 預設為37.5 gender | int | | | 性別, 1:男, 2:女, 未填表示全部 pagination | json | | | 分頁 -current | int | | 1 | 當前頁數 -pageSize | int | | 10 | 每頁結果數量,-1 為顯示所有 sorter | json | | 排序欄位 -field | string | | temperature | 排序欄位, 可排序欄位:employeeNo, name, gender, temperature, 預設temperature -order | string | | desc | 升冪或降冪, 預設為desc ```javascript { "query": { "startDate": 1614528000000, "endDate": 1614528000000, "temperatureBase" : 37.5 }, "pagination": { "current": 1, "total": 1, "pageSize": 10 }, "sorter": { "field": "temperature", "order": "desc" } } ``` Response 欄位 | 型態 | 說明 -----| -----|-------- householdMemberId | string | householdMemberId measureDate | timestamp | 紀錄時間 employeeNo | string | 員工編號 name | string | 姓名 gender | int | 性別, 1: 男, 2: 女 mobile | string | 手機號碼 temperature | float | 體溫 ```javascript { "httpCode": 200, "result": { "data": [ { "householdMemberId": "e9a3042a-7ae1-4069-a2f6-fef3bb69b50a", "measureDate": 1609545600000, "employeeNo": "10903220", "name": "林安平", "gender": 1, "mobile": "09123456789, "temperature": 38.1, }, ... ], "pagination": { "current": 1, "pageSize": 10, "total": 2 }, "sorter": {} } } ``` ## 個案體溫記錄列表 * [參閱生理量測下的取得體溫記錄列表](#https://hackmd.io/o6HdTr4USBe3HmbkT6gedA#%E5%8F%96%E5%BE%97%E9%AB%94%E6%BA%AB%E8%A8%98%E9%8C%84%E5%88%97%E8%A1%A8-POST-temperatureRecordlist) ## 匯出單日全部體溫量測記錄資料 ```url= POST /epidemic-prevention/export-measure-list ``` Request 欄位 | 型態 | 必填 | 預設 | 說明 ---|---|---|---|--- measureDate | timestamp | Y | | 查詢日期 temperatureBase | float | Y | 37.5 | 體溫基準值, 預設為37.5 ```javascript { "query": { "measureDate": 1614528000000, "temperatureBase": 37.5 } } ``` Response * httpCode 400 - [errorMsg](https://gitlab.devpack.cc/Wei_Chang/wicc-kmuh/wikis/Type-Definition#service_error) | errorMsg | desc | | --------- |-------- | |NOT_EXIST| 資料檔不存在 | * httpCode 200 -Download file ``` File name: 每日體溫統計_YYYYMMDD-HHMM.xlsx ``` ## 匯出異常體溫量測記錄資料 ```url= POST /epidemic-prevention/export-abnormal-list ``` Request 欄位 | 型態 | 必填 | 預設 | 說明 ---|---|---|---|--- startDate | timestamp | Y | | 開始日期 endDate | timestamp | Y | | 結束日期 temperatureBase | float | Y | 37.5 | 體溫基準值, 預設為37.5 ```javascript { "query": { "startDate": 1614528000000, "endDate": 1614528000000, "temperatureBase": 37.5 } } ``` Response * httpCode 400 - [errorMsg](https://gitlab.devpack.cc/Wei_Chang/wicc-kmuh/wikis/Type-Definition#service_error) | errorMsg | desc | | --------- |-------- | |NOT_EXIST| 資料檔不存在 | * httpCode 200 -Download file ``` File name: 體溫異常統計_YYYYMMDD-HHMM.xlsx ``` ## 疫苗接種狀況 ```url= POST /epidemic-prevention/vaccination-stats ``` Request 欄位 | 型態 | 必填 | 預設 | 說明 ---|---|---|---|--- vaccineId | string | Y | | 疫苗ID ```javascript { "query": { "vaccineId": "6810a8d8-a9f4-4693-876a-490819ff7129" } } ``` Response 欄位 | 型態 | 說明 -----| -----|-------- shot | json | 已接種json -male | int | 已接種男性員工人數 -female | int | 已接種女性員工人數 unShot | json | 未接種json -male | int | 未接種男性員工人數 -female | int | 未接種女性員工人數 ```javascript { "httpCode": 20, "result": { "data": { "shot": { "male": 1000, "female": 2000 }, "unShot": { "male": 1000, "female": 2000 } } } } ```