---
# System prepended metadata

title: 衛教資訊

---

# 衛教資訊

---
API 清單
* [WEB] [取得WE端衛教列表](#取得WE端衛教列表)
* [APP] [取得APP端衛教列表](#取得APP端衛教列表)
* [APP/WEB] [取得單一衛教資訊明細](#取得單一衛教資訊明細)
* [WEB] [新增衛教](#新增衛教)
* [WEB] [更新衛教](#更新衛教)
* [WEB] [衛教統計](#衛教統計)
* [APP] [衛教曝光](#衛教曝光)
* [APP] [衛教點擊](#衛教點擊)
* [WEB] [租戶個案衛教紀錄查詢](#租戶個案衛教紀錄查詢)
* [WEB] [租戶衛教紀錄查詢](#租戶衛教紀錄查詢)
* [WEB] [租戶衛教紀錄匯出EXCEL](#租戶衛教紀錄匯出EXCEL)
---


## 取得WE端衛教列表

```url
POST /healthEdu/list
```

Request
|  欄位 | 型態  | 必填 | 預設 | 說明  |
|---|---|---|---|---|
| query | json | | | 查詢條件 |
| - fileName | string | | | 衛教名稱關鍵字 |
| pagination | json | | | 分頁 |
| - current | int | | 1 | 當前頁數 |
| - pageSize | int | | -2 | 每頁結果數量，-1 為顯示所有|
| sorter | json |  | | 排序欄位, 預設是用更新時間降序排列 |
| - field | string | | updateTime | 排序欄位 |
| - order | string | | desc | 生序或降序 

```javascript
{
    "query": {
        "fileName": ""
    },
    "pagination": {
        "current": 1,
        "total": 1,
        "pageSize": 10
    },
    "sorter": {}
}
```

Response
|  欄位 | 型態   | 說明  |
| -----| -----|-------- |
| id | string | uuid |
| fileName | string | 名稱 |
| fileType | string | 副檔名 |
| objectKey | string |storage 中的 objectKey |
| contentType | string | MineType 格式 |
| thumbnail | string | 縮圖 |
| updateTime | int | 最後更新時間 |
| publishType | string |派送類別,ALL, DISEASE, NAME |
| publishTarget | array | 派送類別: NAME 格式: ```{"name": "李維","householdMemberId": "ae485dd3-c6c6-49c2-9851-96f5e1e746ce"}```或 疾病階段(disease_indicator_level.id) |
| publishDisease |  Array[...disease] | 疾病Id (若publishTarget: DISEASE 才回傳)|
| url | string | 可 download 的 url, 時效 3600 秒|
| bannerFileName | string |推廣圖片檔案名稱 |
| bannerFileType | string |推廣圖片檔案類型 |
| bannerObjectKey | string |storage 中的 objectKey |
| bannerContentType | string |推廣圖片 MineType 格式 |
| bannerThumbnail | string |推廣圖片檔案縮圖 |
| bannerUrl | string |推廣圖片網址 |

```javascript
{
    "httpCode": 200,
    "result": {
        "data": [
            {
                "id": "85c7770b-dac0-4b08-a604-7376dcd50e66",
                "fileName": "1599725252204",
                "fileType": "jpg",
                "objectKey": "health_edu/8b2e8e8a-0f0b-44a1-823d-4e05c124dcfa.jpg",
                "contentType": "image/jpeg",
                "thumbnail": "data:image/png;base64,iVBORw0KGg",
                "publishDisease": [],
                "creator": "hc_admin_1_6403700@yopmail.com",
                "url": "http://192.168.101.120/swift/v1/AUTH_test/kmuh/health_edu/8b2e8e8a-0f0b-44a1-823d-4e05c124dcfa.jpg?temp_url_sig=015f666b93939e012785286a5c5f4894a1cf70e7&temp_url_expires=1610515165",
                "createTime": "2021-01-13 11:19",
                "updateTime": "2021-01-13 11:19",
                "publishType": "NAME"
                "publishTarget":[
                    {
                        "name": "李維",
                        "householdMemberId": "ae485dd3-c6c6-49c2-9851-96f5e1e746ce"
                    }
                ],
                "bannerFileName": "",
                "bannerFileType": "",
                "bannerObjectKey": "",
                "bannerContentType": "",
                "bannerThumbnail": ""
                "bannerUrl": "http://192.168.101.120/swift/v1/AUTH_test/kmuh/health_edu/59e1d5ea-5c27-4d46-aed5-dd3724153786.jpg?temp_url_sig=42a2d76ae3d1f9742d398c70d8130ceb98a314ae&temp_url_expires=1625810878"
            },
            {
                "id": "5e8297da-fe89-4280-b635-a27723fea47b",
                "fileName": "1599725252204",
                "fileType": "jpg",
                "objectKey": "health_edu/424611bc-d22a-4fcd-9414-27572baff2ef.jpg",
                "contentType": "image/jpeg",
                "thumbnail": "data:image/png;base64,iVBORw0..",
                "publishDisease": [],
                "creator": "hc_admin_1_6403700@yopmail.com",
                "url": "http://192.168.101.120/swift/v1/AUTH_test/kmuh/health_edu/424611bc-d22a-4fcd-9414-27572baff2ef.jpg?temp_url_sig=df785799219b367558946df390d8d669e4e62f2f&temp_url_expires=1610515165",
                "createTime": "2020-12-30 16:12",
                "updateTime": "2021-01-12 16:47",
                "publishType": "DISEASE"
                "publishTarget":[
                    {
                        "disease": "DM"
                    },
                    {
                        "disease": "ECKD",
                        "diseaseStage": "23c3c7d9-a4c6-4fa4-8854-293eca54df50"
                    }
                ],
            }
        ],
        "pagination": {
            "current": 1,
            "pageSize": 10,
            "total": 2
        },
        "sorter": {}
    }
}
```

## 取得APP端衛教列表

```url
POST /healthEdu/viwer/list
```

Request
|  欄位 | 型態  | 必填 | 預設 | 說明  |
|---|---|---|---|---|
| query | json | | | 查詢條件 |
| - fileName | string | | | 衛教名稱關鍵字 |
| - targetTenantId | string | | | 需要優先排序的租戶ID, 有帶的話會將該租戶設定的衛教資訊優先排序 |
| pagination | json | | | 分頁 |
| - current | int | | 1 | 當前頁數 |
| - pageSize | int | | -2 | 每頁結果數量，-1 為顯示所有|
| sorter | json |  | | 排序欄位, 預設是用更新時間降序排列 |
| - field | string | | updateTime | 排序欄位 |
| - order | string | | desc | 生序或降序 

```javascript
{
    "query": {
        "fileName": ""
    },
    "pagination": {
        "current": 1,
        "total": 1,
        "pageSize": 10
    },
    "sorter": {}
}
```

Response
|  欄位 | 型態   | 說明  |
| -----| -----|-------- |
| id | string | uuid |
| fileName | string | 名稱 |
| fileType | string | 副檔名 |
| objectKey | string |storage 中的 objectKey |
| contentType | string | MineType 格式 |
| thumbnail | string | 縮圖 |
| updateTime | int | 最後更新時間 |
| publishType | string |派送類別,ALL, DISEASE, NAME |
| publishTarget | array | 派送類別: NAME 格式: ```{"name": "李維","householdMemberId": "ae485dd3-c6c6-49c2-9851-96f5e1e746ce"}```或 疾病階段(disease_indicator_level.id) |
| publishDisease |  Array[...disease] | 疾病Id (若publishTarget: DISEASE 才回傳)|
| url | string | 可 download 的 url, 時效 3600 秒|
| bannerFileName | string |推廣圖片檔案名稱 |
| bannerFileType | string |推廣圖片檔案類型 |
| bannerObjectKey | string |storage 中的 objectKey |
| bannerContentType | string |推廣圖片 MineType 格式 |
| bannerThumbnail | string |推廣圖片檔案縮圖 |
| bannerUrl | string |推廣圖片網址 |
| readStatus | boolean |是否已讀(已讀:true, 未讀:false) |

```javascript
{
    "httpCode": 200,
    "result": {
        "data": [
            {
                "id": "85c7770b-dac0-4b08-a604-7376dcd50e66",
                "fileName": "1599725252204",
                "fileType": "jpg",
                "objectKey": "health_edu/8b2e8e8a-0f0b-44a1-823d-4e05c124dcfa.jpg",
                "contentType": "image/jpeg",
                "thumbnail": "data:image/png;base64,iVBORw0KGg",
                "publishDisease": [],
                "creator": "hc_admin_1_6403700@yopmail.com",
                "url": "http://192.168.101.120/swift/v1/AUTH_test/kmuh/health_edu/8b2e8e8a-0f0b-44a1-823d-4e05c124dcfa.jpg?temp_url_sig=015f666b93939e012785286a5c5f4894a1cf70e7&temp_url_expires=1610515165",
                "createTime": "2021-01-13 11:19",
                "updateTime": "2021-01-13 11:19",
                "publishType": "NAME"
                "publishTarget":[
                    {
                        "name": "李維",
                        "householdMemberId": "ae485dd3-c6c6-49c2-9851-96f5e1e746ce"
                    }
                ],
                "bannerFileName": "",
                "bannerFileType": "",
                "bannerObjectKey": "",
                "bannerContentType": "",
                "bannerThumbnail": ""
                "bannerUrl": "http://192.168.101.120/swift/v1/AUTH_test/kmuh/health_edu/59e1d5ea-5c27-4d46-aed5-dd3724153786.jpg?temp_url_sig=42a2d76ae3d1f9742d398c70d8130ceb98a314ae&temp_url_expires=1625810878",
                "readStatus": false
            },
            {
                "id": "5e8297da-fe89-4280-b635-a27723fea47b",
                "fileName": "1599725252204",
                "fileType": "jpg",
                "objectKey": "health_edu/424611bc-d22a-4fcd-9414-27572baff2ef.jpg",
                "contentType": "image/jpeg",
                "thumbnail": "data:image/png;base64,iVBORw0..",
                "publishDisease": [],
                "creator": "hc_admin_1_6403700@yopmail.com",
                "url": "http://192.168.101.120/swift/v1/AUTH_test/kmuh/health_edu/424611bc-d22a-4fcd-9414-27572baff2ef.jpg?temp_url_sig=df785799219b367558946df390d8d669e4e62f2f&temp_url_expires=1610515165",
                "createTime": "2020-12-30 16:12",
                "updateTime": "2021-01-12 16:47",
                "publishType": "DISEASE"
                "publishTarget":[
                    {
                        "disease": "DM"
                    },
                    {
                        "disease": "ECKD",
                        "diseaseStage": "23c3c7d9-a4c6-4fa4-8854-293eca54df50"
                    }
                ],
                "readStatus": true
            }
        ],
        "pagination": {
            "current": 1,
            "pageSize": 10,
            "total": 2
        },
        "sorter": {}
    }
}
```


## 取得單一衛教資訊明細

```url
GET /healthEdu/info?id={id}
```

* App端 call 此API時, 會自動計算點擊
* 若衛教資訊的contentType為URL, APP端在點擊時直接開啟URL而沒有call /healthEdu/info API時, APP端需另外再call /healthEdu/click API 以便計算點擊

Request
|  欄位 | 型態  | 必填 | 預設 | 說明  |
|---|---|---|---|---|
| id | string | Y | | 衛教uuid |

```url
GET /healthEdu/info?id=027f91c4-f64d-4f73-9631-81c739707f21
```

Response
|  欄位 | 型態   | 說明  |
| -----| -----|-------- |
| id | string | uuid |
| fileName | string | 名稱 |
| fileType | string | 副檔名 |
| objectKey | string |storage 中的 objectKey |
| contentType | string | MineType 格式 |
| thumbnail | string | 縮圖 |
| updateTime | int | 最後更新時間 |
| publishType | string |派送類別,ALL, DISEASE, NAME |
| publishTarget | array | 派送類別: NAME 格式: ```{"name": "李維","householdMemberId": "ae485dd3-c6c6-49c2-9851-96f5e1e746ce"}```或 疾病階段(disease_indicator_level.id) |
| publishDisease |  Array[...disease] | 疾病Id (若publishTarget: DISEASE 才回傳)|
| url | string | 可 download 的 url, 時效 3600 秒|
| bannerFileName | string |推廣圖片檔案名稱 |
| bannerFileType | string |推廣圖片檔案類型 |
| bannerObjectKey | string |storage 中的 objectKey |
| bannerContentType | string |推廣圖片 MineType 格式 |
| bannerThumbnail | string |推廣圖片檔案縮圖 |
| bannerUrl | string |推廣圖片網址 |

```javascript
{
    "httpCode": 200,
    "result": {
        "data": {
            "id": "85c7770b-dac0-4b08-a604-7376dcd50e66",
            "fileName": "1599725252204",
            "fileType": "jpg",
            "objectKey": "health_edu/8b2e8e8a-0f0b-44a1-823d-4e05c124dcfa.jpg",
            "contentType": "image/jpeg",
            "thumbnail": "data:image/png;base64,iVBORw0KGg",
            "publishDisease": [],
            "creator": "hc_admin_1_6403700@yopmail.com",
            "url": "http://192.168.101.120/swift/v1/AUTH_test/kmuh/health_edu/8b2e8e8a-0f0b-44a1-823d-4e05c124dcfa.jpg?temp_url_sig=015f666b93939e012785286a5c5f4894a1cf70e7&temp_url_expires=1610515165",
            "createTime": "2021-01-13 11:19",
            "updateTime": "2021-01-13 11:19",
            "publishType": "NAME"
            "publishTarget":[
                {
                    "name": "李維",
                    "householdMemberId": "ae485dd3-c6c6-49c2-9851-96f5e1e746ce"
                }
            ],
            "bannerFileName": "",
            "bannerFileType": "",
            "bannerObjectKey": "",
            "bannerContentType": "",
            "bannerThumbnail": ""
            "bannerUrl": "http://192.168.101.120/swift/v1/AUTH_test/kmuh/health_edu/59e1d5ea-5c27-4d46-aed5-dd3724153786.jpg?temp_url_sig=42a2d76ae3d1f9742d398c70d8130ceb98a314ae&temp_url_expires=1625810878"
        }
    }
}
```

## 新增衛教

```url
POST /healthEdu/add
```

Request
|  欄位 | 型態  | 必填 | 預設 | 說明  |
|---|---|---|---|---|
| objectKey | string | Y | | 若衛教類型為圖片/影片: 先取得衛教圖片/影片上傳網址並上傳成功，取其 objectKey。若衛教類型為超連結則直接存放URL網址 |
| fileName | string | Y | |檔名，不包含副檔名，限制30字|
| fileType | string | Y | |衛教類型若為圖片/影片則填入副檔名，若為超連結則填入'URL'字串|
| contentType | string | Y | |MineType|
| thumbnail | string | Y | |縮圖後的 base64|
| isMultipart | boolean | N | |是否分塊上傳，預設為 false|
| totalPart | int |**N** (isMultipart=false)<br>**Y** (isMultipart=true) | |總分塊數量，不可小於2|
| uploadId | string |**N** (isMultipart=false)<br>**Y** (isMultipart=true) | |從 /healthEdu/upload/getUrl 取得的 uploadId |
| publishType | string | Y | | 派送類別,ALL, DISEASE, ID_CARD_NO, NAME, NON_CASE_MEMBER |
| publishTarget | json array | Y |  | publishType為ID_CARD_NO, DISEASE, NAME時, 需帶入派送對象的資料, 否則帶空陣列[] |
| -idCardNo | string | N | | 派送的身份證字號 |
| -disease | string | N | | 派送的疾病別 |
| -diseaseStage | string | N | | 派送的疾病階段 |
| -householdMemberId | string | N | | 派送的householdMemberId |
| -name | string | N | | 派送的姓名 |




```javascript
{
    "contentType": "image/jpeg",
    "fileName": "1599725252204",
    "fileType": "jpg",
    "isMultipart": false,
    "objectKey": "health_edu/8b2e8e8a-0f0b-44a1-823d-4e05c124dcfa.jpg",
    "thumbnail":"data:image/png;base64,iVBORw0KGgoA...",
    "publishType": "DISEASE"
    "publishTarget":[
        {
            "disease": "DM"
        },
        {
            "disease": "ECKD",
            "diseaseStage": "23c3c7d9-a4c6-4fa4-8854-293eca54df50"
        }
    ]
}
```

Response
```javascript
{
    "httpCode": 200,
    "result": {
        "data": "d748a774-dc53-41f0-96c1-8174fe6d2d1f"
    }
}
```

## 更新衛教

```url
POST /healthEdu/update
```
Request
|  欄位 | 型態  | 必填 | 預設 | 說明  |
|---|---|---|---|---|
| id | string | Y | | 衛教uuid |
| objectKey | string | Y | | 若衛教類型為圖片/影片: 先取得衛教圖片/影片上傳網址並上傳成功，取其 objectKey。若衛教類型為超連結則直接存放URL網址 |
| fileName | string | Y | |檔名，不包含副檔名，限制30字|
| fileType | string | Y | |衛教類型若為圖片/影片則填入副檔名，若為超連結則填入'URL'字串|
| contentType | string | Y | |MineType|
| thumbnail | string | Y | |縮圖後的 base64|
| isMultipart | boolean | N | |是否分塊上傳，預設為 false|
| totalPart | int |**N** (isMultipart=false)<br>**Y** (isMultipart=true) | |總分塊數量，不可小於2|
| uploadId | string |**N** (isMultipart=false)<br>**Y** (isMultipart=true) | |從 /healthEdu/upload/getUrl 取得的 uploadId |
| publishType | string | Y | | 派送類別,ALL, DISEASE, ID_CARD_NO, NAME, NON_CASE_MEMBER |
| publishTarget | json array | Y |  | publishType為ID_CARD_NO, DISEASE, NAME時, 需帶入派送對象的資料, 否則帶空陣列[] |
| -idCardNo | string | N | | 派送的身份證字號 |
| -disease | string | N | | 派送的疾病別 |
| -diseaseStage | string | N | | 派送的疾病階段 |
| -householdMemberId | string | N | | 派送的householdMemberId |
| -name | string | N | | 派送的姓名 |


```javascript
{
    "id": "d748a774-dc53-41f0-96c1-8174fe6d2d1f",
    "contentType": "image/jpeg",
    "fileName": "1599725252204",
    "fileType": "jpg",
    "isMultipart": false,
    "objectKey": "health_edu/8b2e8e8a-0f0b-44a1-823d-4e05c124dcfa.jpg",
    "thumbnail":"data:image/png;base64,iVBORw0KGgoA...",
    "publishType": "ID_CARD_NO"
    "publishTarget":[
        {
            "idCardNo": "T123456789"
        },
        {
            "idCardNo": "T123456780"
        }
    ],
    ""
}
```

Response
```javascript
{
    "httpCode": 200,
    "result": {
        "data": "d748a774-dc53-41f0-96c1-8174fe6d2d1f"
    }
}
```

## 衛教統計

```url
POST /healthEdu/statistics
```

#### Request
 欄位 | 型態  | 必填 | 預設 | 說明  
 ---|---|---|---|---
 healthEduId | string | Y |  | 衛教id
 

```javascript
{
    "healthEduId": "ddb19c99-dd16-46b9-883e-92446070761b"
}
```

#### Response
 欄位 | 型態 | 說明 
 ---  | --- | ---
 healthEduInfo | json | 衛教info json
 reachInfo | json | 衛教曝光分析json
 clickInfo | json | 衛教點擊分析json

* healthEduInfo (衛教info json)

 |  欄位 | 型態   | 說明  |
| -----| -----|-------- |
| id | string | uuid |
| fileName | string | 衛教內容 |
| fileType | string | 衛教類型. URL: 連結 |
| objectKey | string |當fileType=URL時存放連結, 其他的話存放storage 中的 objectKey |
| contentType | string | MineType 格式 |
| thumbnail | string | 縮圖 |
| updateTime | int | 最後更新時間 |
| publishType | string |派送類別,ALL, DISEASE, NAME |
| publishTarget | array | 派送類別: NAME 格式: ```{"name": "李維","householdMemberId": "ae485dd3-c6c6-49c2-9851-96f5e1e746ce"}```或 疾病階段(disease_indicator_level.id) |
| publishDisease |  Array[...disease] | 疾病Id (若publishTarget: DISEASE 才回傳)|
| url | string | 可 download 的 url, 時效 3600 秒|
| bannerFileName | string |推廣圖片檔案名稱 |
| bannerFileType | string |推廣圖片檔案類型 |
| bannerObjectKey | string |storage 中的 objectKey |
| bannerContentType | string |推廣圖片 MineType 格式 |
| bannerThumbnail | string |推廣圖片檔案縮圖 |
| bannerUrl | string |推廣圖片網址 |
 
 
* reachInfo (衛教曝光分析json)

 欄位 | 型態 | 說明 
 ---  | --- | ---
 totalCount | int | 總曝光人數
 totalTimes | int | 總曝光人次
 totalMaleCount | int | 總男性曝光人數
 totalFemaleCount | int | 總女性曝光人數
 totalMaleTimes | int | 總男性曝光人次
 totalFemaleTimes | int | 總女性曝光人次
 totalMaleCountRate | double | 總男性人數佔比
 totalFemaleCountRate | double | 總女性人數佔比
 totalMaleTimesRate | double | 總男性人次佔比
 totalFemaleTimesRate | double | 總女性人次佔比
 details | json array | 年齡統計 json array
 
* clickInfo (衛教點擊分析json)

 欄位 | 型態 | 說明 
 ---  | --- | ---
 totalCount | int | 總點擊人數
 totalTimes | int | 總點擊人次
 totalMaleCount | int | 總男性點擊人數
 totalFemaleCount | int | 總女性點擊人數
 totalMaleTimes | int | 總男性點擊人次
 totalFemaleTimes | int | 總女性點擊人次
 totalMaleCountRate | double | 總男性人數佔比
 totalFemaleCountRate | double | 總女性人數佔比
 totalMaleTimesRate | double | 總男性人次佔比
 totalFemaleTimesRate | double | 總女性人次佔比
 clickRate | double | 點擊率, 點擊率 = 點擊人數/曝光人數
 details | json array | 年齡統計 json array
 
* details (json array of reachInfo, clickInfo, registerInfo, signInInfo)

 欄位 | 型態 | 說明 
 ---  | --- | ---
 ageLevel | string | 年齡level
 label | string | 年齡區間顯示(標X軸)
 maleCount | int | 男性人數
 femaleCount | int | 女性人數
 maleTimes | int | 男性人次
 femaleTimes | int | 女性人次


```javascript
{
    "httpCode": 200,
    "result": {
        "data": {
            "healthEduInfo": {
                "id": "d739e1d9-eed4-468c-8752-3c375b42320e",
                "fileName": "平台DM",
                "fileType": "URL",
                "objectKey": "weqweqwe",
                "contentType": "URL",
                "thumbnail": "",
                "publishTarget": [
                    {
                        "disease": "DM"
                    }
                ],
                "creator": "pa@yopmail.com",
                "createTime": 1624538276430,
                "updateTime": 1624549631762,
                "publishType": "DISEASE"
            },
            "reachInfo": {
                "totalCount": 0,
                "totalTimes": 0,
                "totalMaleCount": 0,
                "totalFemaleCount": 0,
                "totalMaleTimes": 0,
                "totalFemaleTimes": 0,
                "totalMaleCountRate": 0.0,
                "totalFemaleCountRate": 0.0,
                "totalMaleTimesRate": 0.0,
                "totalFemaleTimesRate": 0.0,
                "details": [
                    {
                        "ageLevel": "level1",
                        "label": "30歲以下",
                        "maleCount": 0,
                        "femaleCount": 0,
                        "maleTimes": 0,
                        "femaleTimes": 0
                    },
                    {
                        "ageLevel": "level2",
                        "label": "30-39歲",
                        "maleCount": 0,
                        "femaleCount": 0,
                        "maleTimes": 0,
                        "femaleTimes": 0
                    },
                    {
                        "ageLevel": "level3",
                        "label": "40-49歲",
                        "maleCount": 0,
                        "femaleCount": 0,
                        "maleTimes": 0,
                        "femaleTimes": 0
                    },
                    {
                        "ageLevel": "level4",
                        "label": "50-59歲",
                        "maleCount": 0,
                        "femaleCount": 0,
                        "maleTimes": 0,
                        "femaleTimes": 0
                    },
                    {
                        "ageLevel": "level5",
                        "label": "60歲以上",
                        "maleCount": 0,
                        "femaleCount": 0,
                        "maleTimes": 0,
                        "femaleTimes": 0
                    }
                ]
            },
            "clickInfo": {
                "totalCount": 0,
                "totalTimes": 0,
                "totalMaleCount": 0,
                "totalFemaleCount": 0,
                "totalMaleTimes": 0,
                "totalFemaleTimes": 0,
                "totalMaleCountRate": 0.0,
                "totalFemaleCountRate": 0.0,
                "totalMaleTimesRate": 0.0,
                "totalFemaleTimesRate": 0.0,
                "clickRate": 0.0,
                "details": [
                    {
                        "ageLevel": "level1",
                        "label": "30歲以下",
                        "maleCount": 0,
                        "femaleCount": 0,
                        "maleTimes": 0,
                        "femaleTimes": 0
                    },
                    {
                        "ageLevel": "level2",
                        "label": "30-39歲",
                        "maleCount": 0,
                        "femaleCount": 0,
                        "maleTimes": 0,
                        "femaleTimes": 0
                    },
                    {
                        "ageLevel": "level3",
                        "label": "40-49歲",
                        "maleCount": 0,
                        "femaleCount": 0,
                        "maleTimes": 0,
                        "femaleTimes": 0
                    },
                    {
                        "ageLevel": "level4",
                        "label": "50-59歲",
                        "maleCount": 0,
                        "femaleCount": 0,
                        "maleTimes": 0,
                        "femaleTimes": 0
                    },
                    {
                        "ageLevel": "level5",
                        "label": "60歲以上",
                        "maleCount": 0,
                        "femaleCount": 0,
                        "maleTimes": 0,
                        "femaleTimes": 0
                    }
                ]
            }
        }
    }
}
```

## 衛教曝光

```url
POST /healthEdu/reach
```

* App 端控制衛教資訊已在畫面呈現給User時, call 此API計算衛教資訊的的曝光

#### Request
 
 欄位 | 型態  | 必填 | 預設 | 說明
 ---|---|---|---|---
 healthEduList | string array | Y | | 衛教資訊id List, 最多傳入50組衛教資訊id, 衛教資訊id不可重覆 
 
```javascript
{
    "healthEduList": [
        "5186bb71-258e-4980-9f08-45aafa421acb",
        "9ebffd77-610f-404d-844e-13484ca3474f"
    ]
}
```

#### Response
 欄位 | 型態 | 說明 
 ---  | --- | ---
 count | int | 已計入的數量
 

```javascript
// HttpStatus:200
{
    "httpCode": 200,
    "result": {
        "data": {
            "count": 2
        }
    }
}
```


## 衛教點擊

```url
POST /healthEdu/click
```

* 目前情境下, App端不需特地call 此API, 因已在 /healthEdu/info 這支API裡計算
* 若衛教資訊的contentType為URL,點擊時直接開啟URL而沒有call /healthEdu/info API時, APP端需另外再call此API以便計算點擊

#### Request
 
 欄位 | 型態  | 必填 | 預設 | 說明
 ---|---|---|---|---
 id | string | Y | | 衛教資訊id 
 
```javascript
{
    "id": "9ebffd77-610f-404d-844e-13484ca3474f"
}
```

#### Response
 欄位 | 型態 | 說明 
 ---  | --- | ---
 count | int | 已計入的數量
 

```javascript
// HttpStatus:200
{
    "httpCode": 200,
    "result": {
        "data": {
            "count": 1
        }
    }
}
```


## 租戶個案衛教紀錄查詢

```url
POST /healthEdu/click/personal/list
```

#### Request
 

| 欄位              | 型態   | 必填 | 長度 | 說明                    |
| ----------------- |:------ | ---- |:---- |:----------------------- |
| householdMemberId | string | Y    | 36   | 個案id                  |
| eduKeyword        | string | N    | 200  | 衛教名稱keyword  (null、空字串為查詢全部)               |
| startDate         | date   | Y    |      | yyyy-MM-dd or timestamp |
| endDate           | date   | Y    |      | yyyy-MM-dd or timestamp |

 
```json
{
    "query": {
        "householdMemberId": "8a9e980a-c612-4f87-af07-a97a5f0fbed5",
        "eduKeyword": "",
        "startDate": "2020-01-01",
        "endDate": "2023-09-01"
    },
    "pagination": {
        "current": 1,
        "pageSize": 10
    },
    "sorter": {}
}
```

#### Response
 | 欄位       | 型態   | 說明             |
 | ---------- |:------ |:---------------- |
 | fileName   | string | 衛教名稱         |
 | updateTime | date   | 最近一次閱讀時間 |
 

```json
{
    "httpCode": 200,
    "result": {
        "data": [
            {
                "fileName": "流感衛教",
                "updateTime": 1656550876232
            },
            {
                "fileName": "test123",
                "updateTime": 1656550843654
            }
        ],
        "pagination": {
            "current": 1,
            "pageSize": 10,
            "total": 2
        },
        "sorter": {},
        "total": 2
    }
}
```


## 租戶衛教紀錄查詢

```url
POST /healthEdu/click/tenant/list
```

#### Request
 

| 欄位        | 型態   | 必填 | 長度 | 說明                                     |
| ----------- |:------ | ---- |:---- |:---------------------------------------- |
| startDate   | date   | Y    |      | yyyy-MM-dd or timestamp                  |
| endDate     | date   | Y    |      | yyyy-MM-dd or timestamp                  |
| nameKeyword | string | Y    | 36   | 姓名keyword  (null、空字串為查詢全部)    |
| eduKeyword  | string | N    | 200  | 衛教名稱keyword (null、空字串為查詢全部) |

 
```json
{
    "query": {
        "startDate": "2020-01-01",
        "endDate": "2023-09-01",
        "nameKeyword":"",
        "eduKeyword":""
    },
    "pagination": {
        "current": 1,
        "pageSize": 10
    },
    "sorter": {}
}
```

#### Response
 | 欄位              | 型態   | 說明             |
 | ----------------- |:------ |:---------------- |
 | householdMemberId | string | 個案id           |
 | cpiId             | string | case_pat_info.id |
 | fileName          | string | 衛教名稱         |
 | updateTime        | date   | 最近一次閱讀時間 |
 | name              | string | 個案姓名         |
 | mobile            | string | 個案手機         |
 

```json
{
    "httpCode": 200,
    "result": {
        "data": [
            {
                "householdMemberId": "c0fbb6d5-53c4-4962-bc17-1591e4903b2f",
                "cpiId": "498c5ed0-c183-4186-95ca-d88d642b1bc6",
                "fileName": "test3",
                "updateTime": 1682563032911,
                "name": "becca222",
                "mobile": "0933816312"
            },
            {
                "householdMemberId": "150b53f5-7126-4900-9fb0-87a08b45e06b",
                "cpiId": "e8ebdf9a-23db-44e2-9935-623429d5449c",
                "fileName": "test123",
                "updateTime": 1678757086673,
                "name": "呂學霖",
                "mobile": "0973621449"
            }
        ],
        "pagination": {
            "current": 1,
            "pageSize": 10,
            "total": 5
        },
        "sorter": {},
        "total": 5
    }
}
```

## 租戶衛教紀錄匯出EXCEL


```url
POST /healthEdu/click/tenant/export
```

#### Request
 

| 欄位        | 型態   | 必填 | 長度 | 說明                                     |
| ----------- |:------ | ---- |:---- |:---------------------------------------- |
| startDate   | date   | Y    |      | yyyy-MM-dd or timestamp                  |
| endDate     | date   | Y    |      | yyyy-MM-dd or timestamp                  |

 
```json
{
    "query": {
        "startDate": "2020-01-01",
        "endDate": "2023-09-01",
    }
}
```

#### Response

 healthEduStatistics_yyyyMMddHHmm.xlsx