---
# System prepended metadata

title: 指標分析

---

# 指標分析
---
- 常數定義
  - [租戶類型](#租戶類型)
- API 清單
  - [平台管理員查詢指標分析](#平台管理員查詢指標分析)

---

## 常數定義
### 租戶類型
 欄位 | 型態  | 說明  
 ---|---|---
 tenantType | string | 全平台:ALL, 醫療租戶:HOSPITAL, 企業租戶:BUSINESS
 
## API 清單
### 平台管理員查詢指標分析

```url
POST /pa/case/getAnnualStatistic
```
- 僅限平台管理員使用

### Request-平台管理員查詢指標分析-query (查詢條件json)
 欄位 | 型態  | 必填 | 長度限制 | 預設 | 說明  
 ---|---|---|---|---|---
 year | int | N |  | 當前西元年| 要查詢的西元年
 tenantType | string | Y |  | | 要查詢的租戶類型. [租戶類型](#租戶類型)
 hospitalId | string | N | 36 | 查詢所有醫療租戶| 醫療租戶ID, 僅tenantType: HOSPITAL可設定
 diseaseType | string | N | 36 |查詢所有限定醫療租戶所有收案疾病 | 疾病類型, 僅tenantType: HOSPITAL可設定
 businessId | string |N | 36| 查詢所有企業租戶| 企業租戶ID, 僅tenantType: BUSINESS可設定
 
```javascript
{
    "query": {
        "year": 2023,
        "tenantType": "ALL"
    }
}
```

### Error-平台管理員查詢指標分析
 httpCode | 錯誤碼 | 說明
 --- | --- | ---

### Response-平台管理員查詢指標分析
 欄位 | 型態 | 說明 
 ---  | --- | ---
 ACTIVE_COUNT | object | 每個月的活躍人數-APP 30天內有登入人數(針對全平台/醫療租戶/企業租戶) 
 STEPS | object | 每個月的步數總和(針對全平台/醫療租戶/企業租戶) 
 STEPS_HISTORY | object | 當前查詢年度之前(不含)的每個月的步數總和(針對全平台/醫療租戶/企業租戶) 
 REGISTER_COUNT | object | 每個月的註冊人數(針對全平台)
 REGISTER_COUNT_HISTORY | object | 當前查詢年度之前(不含)的每月註冊人數. 用來計算累積人數(針對全平台)
 FIRST_COUNT | object | 每個月的新收案人次(針對醫療租戶) 
 CLOSE_COUNT | object | 每個月的結案人次(針對醫療租戶)
 FIRST_COUNT_HISTORY| object | 當前查詢年度之前(不含)的每個月的開案人數(針對醫療租戶) 
 BCI_VALID_COUNT | object | 每個月的到職人數(扣掉已離職)(針對企業租戶)
 BCI_ALL_COUNT | object | 每個月的到職人數(針對企業租戶)
 BCI_VALID_COUNT_HISTORY | object | 當前查詢年度之前(不含)的每個月的到職人數(扣掉已離職)(針對企業租戶)


```javascript
{
    "httpCode": 200,
    "result": {
        "data": {
            "ACTIVE_COUNT": {
                "1": 0,
                "2": 0,
                "3": 0,
                "4": 0,
                "5": 2,
                "6": 3,
                "7": 0,
                "8": 0,
                "9": 0,
                "10": 0,
                "11": 0,
                "12": 0
            },
            "FIRST_COUNT": {
                "1": 0,
                "2": 0,
                "3": 0,
                "4": 0,
                "5": 0,
                "6": 0,
                "7": 0,
                "8": 0,
                "9": 0,
                "10": 0,
                "11": 0,
                "12": 0
            },
            "BCI_VALID_COUNT": {
                "1": 0,
                "2": 0,
                "3": 3,
                "4": 0,
                "5": 16,
                "6": 0,
                "7": 1,
                "8": 0,
                "9": 3,
                "10": 3,
                "11": 1,
                "12": 1
            },
            "FIRST_COUNT_HISTORY": {
                "1": 0,
                "2": 0,
                "3": 0,
                "4": 0,
                "5": 0,
                "6": 0,
                "7": 0,
                "8": 0,
                "9": 0,
                "10": 0,
                "11": 0,
                "12": 0
            },
            "BCI_ALL_COUNT": {
                "1": 0,
                "2": 0,
                "3": 3,
                "4": 0,
                "5": 18,
                "6": 0,
                "7": 1,
                "8": 0,
                "9": 3,
                "10": 3,
                "11": 1,
                "12": 1
            },
            "STEPS_HISTORY": {
                "1": 0,
                "2": 0,
                "3": 0,
                "4": 0,
                "5": 0,
                "6": 0,
                "7": 0,
                "8": 0,
                "9": 0,
                "10": 0,
                "11": 0,
                "12": 0
            },
            "REGISTER_COUNT_HISTORY": {
                "1": 21,
                "2": 158,
                "3": 39,
                "4": 13,
                "5": 103,
                "6": 0,
                "7": 0,
                "8": 1,
                "9": 0,
                "10": 1,
                "11": 0,
                "12": 0
            },
            "REGISTER_COUNT": {
                "1": 0,
                "2": 0,
                "3": 3,
                "4": 1,
                "5": 7,
                "6": 1,
                "7": 0,
                "8": 1,
                "9": 3,
                "10": 3,
                "11": 0,
                "12": 1
            },
            "CLOSE_COUNT": {
                "1": 0,
                "2": 0,
                "3": 0,
                "4": 0,
                "5": 0,
                "6": 0,
                "7": 0,
                "8": 0,
                "9": 0,
                "10": 0,
                "11": 0,
                "12": 0
            },
            "BCI_VALID_COUNT_HISTORY": {
                "1": 0,
                "2": 0,
                "3": 16,
                "4": 10,
                "5": 92,
                "6": 1,
                "7": 0,
                "8": 0,
                "9": 0,
                "10": 0,
                "11": 0,
                "12": 0
            },
            "STEPS": {
                "1": 0,
                "2": 10292,
                "3": 271438,
                "4": 299504,
                "5": 296413,
                "6": 405201,
                "7": 501249,
                "8": 423119,
                "9": 432123,
                "10": 425682,
                "11": 484193,
                "12": 484105
            }
        }
    }
}
```