反馈任务

任务列表: /feedbacks GET

请求参数

参数名 示列值 类型 必须 说明 默认值
page 1 number 当前页数 1
pageSize 10 number 每页条数 10
submitStatus 1 number 提交状态:(0:未提交,1:已提交)
name 反馈任务名称 string 反馈任务名称
sort -submitAt string 排序。多个排序字段用,号隔开。sort=-a,b
expand 'feedbackItems' string 获取指定子资源数据: 'feedbackItems'
attributes ["id", "name"] array 本资源的字段。不定义该字段时返回所有字段;空数组不返回字段

返回参数

参数名 示列值 说明
page 1 当前页数
pageSize 10 每页条数
limit 10 同 pageSize
offset 2 起始条数
total 3231 符合条件的总数量
items [{},{}] 返回数据项(具体字段看反馈任务信息)
参数名 示列值 说明
id 1 id
name demo 反馈任务名称
submitStatus 1 提交状态:(0:未提交,1:已提交)
status 1 状态:(0:禁用,1:启用)
feedbackItems [{},{}] 反馈条目信息(反馈条目信息)
submitAt 1650160322 提交时间
createdAt 1650160322 创建时间
updatedAt 1650160322 更新时间
参数名 示列值 说明
type 1 类型(1:网址链接,2:音频,3:反馈,4:富文本,5:文章)
index 1 排序
link https://sumian.com 链接url(type为1时存在)
resource {} 资源信息(type为2时存在资源信息)
contents [{},{}] 反馈内容(type为3时存在,具体字段看反馈信息)
text 富文本 富文本内容(type为4时存在)
article {} 文章信息(type为5时存在)
参数名 示列值 说明
id 1 资源id
title 1 资源名称
type audio 类型
cover https://sumian.com 封面链接
fileUrl https://sumian.com 资源链接
参数名 示列值 说明
id 1 文章id
参数名 示列值 说明
type 1 类型(1:文本图片,2:单选题,3:多选题,4:书写填空,5:问答数据题,6:多选数据题,7:排序题)
index 1 互动内容排序
title 文本 文本内容(文本/单选题目/多选题目/填空内容)
response {} 标题触发的响应内容(响应信息)
images 'https://sumian.com,https://sumian.com' 图片url(type为1时存在)
options [{},{}] 单选,多选题,多选数据题的选项(响应信息)
text '书写内容' type为4时:用户书写内容(反馈任务记录中才有该字段)
comments [{content:'你没病',commentedAt: 1650160322}] type为4时:评论信息(反馈任务记录中才有该字段)
questionType 1 问答数据题/多选数据题/排序题类型(1:清单图,2:滑块标尺图,3:情绪强度图,4:任务难度图,5:任务分级图,6:卡片图,7:四方图)(type为5,6,7时存在)
qaDataQuestion [{},{}] 问答数据题(type为5时存在)
multipleChoiceQuestion [{title:'题目',options:[{},{}],least:3},{}] 多选数据题(type为6时存在)
sortQuestion {} 排序题(type为7时存在)
imageSetting {title:'标题',subtitle:'副标题',names:['图片内文案'],required:1 } 设置图片内容(type为5,6,7时存在)
参数名 示列值 说明
value 选项1 选项文本(当选项为“其他”时,该字段内容为"其他"或者是用户填写的内容)
status 0 用户是否选择了该选项(0:未选择,1:选择)
button 我知道了 按钮文案
text 响应文本 响应的文本
isOther 0 是否是"其他选项"(0:否,1:是)
required 0 当选项为其他时,是否是必填(0:否,1:是)
参数名 示列值 说明
content 你没病 评论内容
commentedAt 1650160322 评论时间
creatorId 1 医生id
creatorName 王医生 医生名称
creatorAvatar www.baidu.com 医生头像
参数名 示列值 说明
title 题目 题目
answer 答案 答案(反馈任务记录才有该字段)
responseText 响应文本 响应文本
responseImage 'https://sumian.com,https://sumian.com' 响应图片
参数名 示列值 说明
title 题目 题目
options [{},{}] 选项(响应信息)
least 3 至少选择多少项
status 1 完成状态(0:未完成,1:已完成)
responseText 响应文本 响应文本
responseImage 'https://sumian.com,https://sumian.com' 响应图片
button 我知道了 按钮文案
参数名 示列值 说明
title 题目 题目
options [{},{}] 选项信息
responseText 响应文本 响应文本
responseImage 'https://sumian.com,https://sumian.com' 响应图片
button 我知道了 按钮文案
参数名 示列值 说明
text 内容 内容
index 1 顺序(反馈任务记录才有该字段)
参数名 示列值 说明
title 标题 标题
subtitle 副标题 副标题
names ['图片内文案'] 图片内文案
required 1 是否必填(0:非必填,1:必填)

返回示列

HTTP/1.1 200 OK
{
    "items": [
        {
            "id": 1,
            "name": "反馈任务名称",
            "submitStatus": 1,
            "status": 1,
            "submitAt": 1650160322,
            "createdAt": 1650160322,
            "updatedAt": 1650160322,
            "feedbackItems": [
                {
                    "type": 1,
                    "link": "https://sumian.com",
                    "createdAt": 1650160322,
                    "updatedAt": 1650160322,
                    "contents": [
                        {
                            "type": 1,
                            "title": "文本",
                            "response": {
                                "button": "我知道了",
                                "text": "响应文本",
                            },
                            "images": 'https://sumian.com,https://sumian.com',
                            "options": [
                                {
                                  "value": "选项1",
                                   "status": 0,
                                   "text": "响应文本",
                                },
                            ],
                        }
                    ],
                }
            ],
        },
    ],
    "page": 1,
    "pageSize": 10,
    "limit": 10,
    "offset": 2,
    "total": 15
}

所有反馈任务: /listAll/feedbacks GET

请求参数

参数名 示列值 类型 必须 说明 默认值
name 反馈任务名称 string 反馈任务名称
expand string 获取指定子资源数据
attributes ["id", "name"] array 本资源的字段。不定义该字段时返回所有字段;空数组不返回字段

返回结果: 反馈任务信息

返回示列

HTTP/1.1 200 OK
[
  {
      "id": 1,
      "name": "反馈任务1"
  }
]

反馈任务详情: /feedbacks/:id GET

请求参数

参数名 示列值 类型 必须 说明 默认值
id 1 number id
expand string 获取指定子资源数据: ''
attributes ["id", "name"] array 本资源的字段。不定义该字段时返回所有字段;空数组不返回字段

返回结果: 反馈任务信息

返回示列

HTTP/1.1 200 OK
{
    "id": 1,
    "name": "反馈任务名称",
    "submitStatus": 1,
    "status": 1,
    "submitAt": 1650160322,
    "createdAt": 1650160322,
    "updatedAt": 1650160322,
    "feedbackItems": [
        {
            "type": 1,
            "link": "https://sumian.com",
            "createdAt": 1650160322,
            "updatedAt": 1650160322,
            "contents": [
                {
                    "type": 1,
                    "title": "文本",
                    "response": {
                        "button": "我知道了",
                        "text": "响应文本",
                    },
                    "images": 'https://sumian.com,https://sumian.com',
                    "options": [
                        {
                          "value": "选项1",
                           "status": 0,
                           "text": "响应文本",
                        },
                    ],
                }
            ],
        }
    ],
}

新建反馈任务: /feedbacks POST

请求参数

参数名 示列值 类型 必须 说明 默认值
name 反馈任务名称 string 反馈任务名称
submitStatus 1 number 提交状态:(0:未提交,1:已提交)
status 1 number 状态:(0:禁用,1:启用)
feedbackItems [{},{}] object[] (反馈条目信息)
参数名 示列值 类型 必须 说明 默认值
type 1 number 类型(1:网址,2:音频,3:反馈,4:富文本,5:文章)
link https://sumian.com string 链接url(type为1时存在)
resource {} object 资源信息(type为2时存在)
contents [{},{}] object[] 反馈信息(type为3时存在,具体字段看反馈信息)
text 富文本 string 富文本(type为4时存在)
article {} object 文章信息(type为5时存在)
参数名 示列值 类型 必须 说明 默认值
id 1 number 资源id
title 资源名称 string 资源名称
type audio string 资源类型
cover https://sumian.com string 封面链接
fileUrl https://sumian.com string 资源链接
参数名 示列值 类型 必须 说明 默认值
id 1 number 文章id
参数名 示列值 类型 必须 说明 默认值
type 1 number 类型(1:文本图片,2:单选题,3:多选题,4:书写填空)
title 文本 string 文本内容(文本/单选题目/多选题目/填空内容)
response {} object 标题触发的响应内容(响应信息)
images ["https://sumian.com","https://sumian.com"] string[] 图片url(type为1时存在)
options [{},{}] object[] 单选,多选题的选项(响应信息)
questionType 1 number 问答数据题类型(1:清单图,2:四方图,3:滑块标尺图,4:情绪强度图,5:任务难度图)(type为5时存在)
qaDataQuestion [{},{}] object[] 问答数据题(type为5时存在)
multipleChoiceQuestion [{title:'题目',options:[{},{}],least:3},{}] object 多选数据题(type为6时存在)
sortQuestion {} object 排序题(type为7时存在)
imageSetting {title:'标题',subtitle:'副标题',names:['图片内文案'],required:1 } object 设置图片内容(type为5时存在)
参数名 示列值 类型 必须 说明
value 选项1 string 选项文本(当选项为“其他”时,该字段内容为"其他"或者是用户填写的内容)
status 0 number 用户是否选择了该选项(0:未选择,1:选择)
button 我知道了 string 按钮文案
text 响应文本 string 响应的文本
isOther 1 number 是否是"其他选项"(0:否,1:是)
required 1 number 当选项为其他时,是否是必填(0:否,1:是)
参数名 示列值 类型 必须 说明
title 题目 string 题目
responseText 响应文本 string 响应文本
responseImage 'https://sumian.com,https://sumian.com' string 响应图片
参数名 示列值 类型 必须 说明
title 题目 string 题目
options [{},{}] object[] 选项(响应信息)
least 3 number 至少选择多少项
status 1 number 完成状态(0:未完成,1:已完成)
responseText 响应文本 string 响应文本
responseImage 'https://sumian.com,https://sumian.com' string 响应图片
button 我知道了 string 按钮文案
参数名 示列值 类型 必须 说明
title 题目 string 题目
options [{},{}] object[] 选项信息
responseText 响应文本 string 响应文本
responseImage 'https://sumian.com,https://sumian.com' string 响应图片
button 我知道了 string 按钮文案
参数名 示列值 类型 必须 说明
text 内容 string 内容
参数名 示列值 类型 必须 说明
title 标题 string 标题
subtitle 副标题 string 副标题
names ['图片内文案'] string[] 图片内文案
required 1 Number 是否必填(0:非必填,1:必填)

返回结果: 反馈任务信息

返回示列

HTTP/1.1 200 OK
{
    "id": 1,
    "name": "反馈任务名称",
    "submitStatus": 1,
    "status": 1,
    "submitAt": 1650160322,
    "createdAt": 1650160322,
    "updatedAt": 1650160322,
    "feedbackItems": [
        {
            "type": 1,
            "link": "https://sumian.com",
            "createdAt": 1650160322,
            "updatedAt": 1650160322,
            "contents": [
                {
                    "type": 1,
                    "title": "文本",
                    "response": {
                        "button": "我知道了",
                        "text": "响应文本",
                    },
                    "images": 'https://sumian.com,https://sumian.com',
                    "options": [
                        {
                          "value": "选项1",
                           "status": 0,
                           "text": "响应文本",
                        },
                    ],
                }
            ],
        }
    ],
}

编辑反馈任务: /feedbacks/:id PUT

请求参数

参数名 示列值 类型 必须 说明 默认值
id 1 number
name 反馈任务名称 string 反馈任务名称
submitStatus 1 number 提交状态:(0:未提交,1:已提交)
status 1 number 状态:(0:禁用,1:启用)
feedbackItems [{},{}] Array (反馈条目信息)

返回结果: 反馈任务信息

返回示列

HTTP/1.1 200 OK
{
    "id": 1,
    "name": "反馈任务名称",
    "submitStatus": 1,
    "status": 1,
    "submitAt": 1650160322,
    "createdAt": 1650160322,
    "updatedAt": 1650160322,
    "feedbackItems": [
        {
            "id": 2,
            "type": 1,
            "link": "https://sumian.com",
            "createdAt": 1650160322,
            "updatedAt": 1650160322,
            "contents": [
                {
                    "type": 1,
                    "title": "文本",
                    "response": {
                        "button": "我知道了",
                        "text": "响应文本",
                    },
                    "images": 'https://sumian.com,https://sumian.com',
                    "options": [
                        {
                          "value": "选项1",
                           "status": 0,
                           "text": "响应文本",
                        },
                    ],
                }
            ],
        }
    ],
}

返回结果: 反馈内容信息

修改反馈任务状态: /feedbacks/:id/status PUT

请求参数

参数名 示列值 类型 必须 说明
id 1 number 方案 id
status 1 number 状态:(0:禁用,1:启用)

返回结果: 反馈任务信息

返回示列

HTTP/1.1 200 OK
{
    "id": 1,
    "name": "反馈任务名称",
    "submitStatus": 1,
    "status": 1,
    "submitAt": 1650160322,
    "createdAt": 1650160322,
    "updatedAt": 1650160322,
    "feedbackItems": [
        {
            "id": 2,
            "type": 1,
            "link": "https://sumian.com",
            "createdAt": 1650160322,
            "updatedAt": 1650160322,
            "contents": [
                {
                    "type": 1,
                    "title": "文本",
                    "response": {
                        "button": "我知道了",
                        "text": "响应文本",
                    },
                    "images": 'https://sumian.com,https://sumian.com',
                    "options": [
                        {
                          "value": "选项1",
                           "status": 0,
                           "text": "响应文本",
                        },
                    ],
                }
            ],
        }
    ],
}

名称是否重复: /isExist/feedbacks GET

请求参数

参数名 示列值 类型 必须 说明
name 名称 string 反馈任务名称

返回示列

HTTP/1.1 200 OK
{
  "isExist": true,
}

反馈任务入库: librarySetting/feedbacks POST

请求参数

参数名 示列值 类型 必须 说明
ids [1] array Y 方案 id 数组
orgIds [1,2] array Y 组织 id 数组
bulk true boolean 是否是批量入库(true:是)

返回示列

HTTP/1.1 200

反馈任务记录详情: /feedbackRecords/:id GET

请求参数

参数名 示列值 类型 必须 说明 默认值
id 1 number 反馈任务记录id 1
expand feedback string 获取指定子资源数据:feedback
attributes ["id", "name"] array 本资源的字段。不定义该字段时返回所有字段;空数组不返回字段

返回参数 任务记录信息

参数名 示列值 说明
id 1 反馈任务记录id
organizationId 1 组织id
memberId 1 患者id
feedbackId 1 反馈任务id
status 1 状态:(0:未完成,1:已完成)
startedAt 1650160322 任务开始时间
endedAt 1650160322 任务完成时间
feedbackItems [{},{}] 反馈条目信息(具体字段看反馈条目信息)