智能分诊服务 FunctionCode | 暂无
智能分诊是一款基于人工智能技术的医疗辅助接口,旨在通过分析患者输入的症状描述或健康问题,快速、精准地推荐最适合的医生科室或诊疗方向。该接口结合自然语言处理(NLP)、医疗知识图谱及机器学习算法,模拟专业分诊逻辑,帮助患者或医疗平台高效匹配医疗资源,降低误诊风险,优化就医流程。
简介
症状智能解析,支持文本、语音转文本等多种输入形式,自动提取症状关键词(如部位、持续时间、严重程度等)。
科室精准推荐,根据症状关联度输出推荐科室列表(如呼吸内科、皮肤科、骨科等),并标注匹配概率及推荐依据。
适用场景:
在线问诊平台:引导患者挂号前选择正确科室,减少无效问诊。
医院自助服务系统:优化院内导诊流程,缓解分诊台压力。
急诊预检分诊:辅助快速识别高危患者,提升急救效率。
| 正式环境 | 测试环境 |
|---|---|
| https://api.linkingopen.com/service/ser-b007/ | https://api.linkingopen.com/test/service/ser-b007 |
1、分诊接口
- 接口地址:/api/ai/triage/consult
请求参数
| 名称 | 描述 | 类型 | 必填 |
|---|---|---|---|
| hospitalId | 医院唯一标识,平台提供 | String | 是 |
| token | 用户会话token , 详见 创建用户会话 | String | 是 |
| questId | 问题唯一标识 | String | 是 |
| quest | 问题 | String | 是 |
| stream | 流式响应,默认否 | Boolean | 否 |
| user | 用户信息 | User | 否 |
User
| 名称 | 描述 | 类型 | 必填 |
|---|---|---|---|
| age | 年龄 | Integer | 否 |
| sex | 性别(0女,1男) | Integer | 否 |
返回参数
| 名称 | 描述 | 类型 | 必填 |
|---|---|---|---|
| streamAnswer | 流式返回答案 | String | 是 |
| departments | 推荐科室列表,如果有则分诊结束 | Department[] | 否 |
| doctors | 推荐医生列表,如果有则分诊结束 | Doctor[] | 否 |
| flowStatus | 多轮对话状态(END 结束,PROCESS 进行中) | String | 是 |
Department
| 名称 | 描述 | 类型 | 必填 |
|---|---|---|---|
| deptCode | 科室代码 | String | 是 |
| deptName | 科室名称 | String | 是 |
| deptUrl | 科室URL | String | 是 |
| deptPartition | 科室所在院区 | String | 否 |
| deptWeight | 科室权重 | Integer | 否 |
Doctor
| 名称 | 描述 | 类型 | 必填 |
|---|---|---|---|
| doctorCode | 医生代码 | String | 是 |
| doctorName | 医生名称 | String | 是 |
| doctorTitle | 医生职称 | String | 是 |
| doctorUrl | 医生URL | String | 是 |
| doctorWeight | 医生权重 | Integer | 否 |
| doctorPartition | 医生所在院区 | String | 否 |
| goodAtDisease | 擅长疾病 | String[] | 是 |
接口示例
说明:
- flowStatus = "END" 时,推荐科室和医生 ,否则继续追问
json
{
"hospitalId": "1234",
"token": "3255f44d8e9792e59aa8f7c179040866",
"questId": "e94ca1133bebdc571abd247534bdf5b9",
"quest": "头痛",
"user": {
"age": 30,
"sex": 1
}
}json
{
"code": 0,
"message": "操作成功",
"data": {
"streamAnswer": "根据您的描述,您可能患有慢性咽炎或其他喉部疾病。建议您前往耳鼻喉科进行进一步检查和治疗。祝您早日康复!",
"flowStatus": "END",
"departments": [
{
"deptCode": "1000",
"deptName": "耳鼻喉科",
"deptUrl": "http://digitaltwin.linkingcloud.cn/ebhk/guahao",
"deptPartition": "东院",
"deptWeight": 1
}
],
"doctors": [
{
"doctorCode": "1000",
"doctorName": "A医生",
"doctorTitle": "主任医师",
"doctorPartition": "西院",
"doctorUrl": "http://digitaltwin.linkingcloud.cn/ebhk/ays/guahao",
"doctorWeight": 1,
"goodAtDisease": [
"慢性咽炎"
]
}
]
}
}2、创建用户会话
- 接口地址:/api/ai/intenation/createSession
请求参数
| 名称 | 描述 | 类型 | 必填 |
|---|---|---|---|
| hospitalId | 医院唯一标识,平台提供 | String | 是 |
| userId | 用户唯一标识 | String | 是 |
返回参数
| 名称 | 描述 | 类型 | 必填 |
|---|---|---|---|
| token | 用户会话token , 2小时有效 | String | 是 |
接口示例
json
{
"hospitalId": "1234",
"userId": "222"
}json
{
"code": 0,
"message": "操作成功",
"data": {
"token": "xxx",
}
}3、科室医生同步
- 接口地址:由调用方提供 POST 接口地址
返回参数
| 名称 | 描述 | 类型 | 必填 |
|---|---|---|---|
| tenantId | 服务商唯一标识,平台提供 | String | 否 |
| hospitalId | 医院唯一标识,平台提供 | String | 是 |
| departments | 科室列表 | Department[] | 是 |
Department
| 名称 | 描述 | 类型 | 必填 |
|---|---|---|---|
| deptCode | 科室代码 | String | 是 |
| deptName | 科室名称 | String | 是 |
| deptUrl | 科室URL | String | 是 |
| deptWeight | 科室权重 | Integer | 否 |
| deptPartition | 科室所在院区 | String | 否 |
| doctors | 医生列表 | Doctor[] | 是 |
Doctor
| 名称 | 描述 | 类型 | 必填 |
|---|---|---|---|
| doctorCode | 医生代码 | String | 是 |
| doctorName | 医生名称 | String | 是 |
| doctorTitle | 医生职称 | String | 是 |
| doctorUrl | 医生URL | String | 是 |
| doctorWeight | 医生权重 | Integer | 否 |
| doctorPartition | 医生所在院区 | String | 否 |
| goodAtDisease | 擅长疾病 | String[] | 是 |
接口示例
json
{
"code": 0,
"message": "操作成功",
"data": {
"tenantId": "",
"hospitalId": "1234",
"departments": [
{
"deptCode": "1000",
"deptName": "耳鼻喉科",
"deptWeight": 1,
"deptPartition": "东院",
"deptUrl": "http://digitaltwin.linkingcloud.cn/ebhk/guahao",
"doctors": [
{
"doctorCode": "1000",
"doctorName": "A医生",
"doctorTitle": "主任医师",
"doctorWeight": 1,
"doctorPartition": "西院",
"doctorUrl": "http://digitaltwin.linkingcloud.cn/ebhk/ays/guahao",
"goodAtDisease": [
"慢性咽炎"
]
}
]
}
]
}
}