outpatient_case_history

1.接口描述

该 API 用于识别提取门诊病历上的文字信息。

  • 图片要求:
    1. 格式为 JPG(JPEG),PNG
    2. 宽和高大于 128px,小于等于 6000px
    3. 小于等于 5 MB

请求方式

POST

请求URL

2.请求参数

字段 类型 必需 描述
request_id string 本次请求的id
image_file file 见下方注释 需上传的图片文件。上传本地图片进行检测时选取此参数
image_base64 string 见下方注释 base64编码的图片内容
image_url string 见下方注释 网络影像的url地址

请求参数 image_fileimage_base64image_url 三选一。
url 中若含有特殊字符,则需要对这些字符进行转义,所有中文和特殊字符必需以UTF-8编码转义。
参数 image_file 需把图片文件以 multipart/form-data 的形式放到 POST 消息体中。

3.返回参数

字段 类型 说明
status string 状态,正常为 OK
time_cost float 接口耗时单位秒
degree int 图片旋转角度
medical_result object 提取结果

3.1 medical_result 字段的参数:

字段 类型 说明
patient_name string 患者姓名
hospital_name string 医院名称
department string 科室
treatment_date string 就诊日期
chief_complaint array 主诉
diagnosis array 诊断
tcm_diagnosis array 诊断(中医)
current_medical_history array 现病史
past_history array 既往史
personal_history array 个人史
family_history array 家族史
marriage_and_childbirth_history array 婚育史
text_regions object 提取信息的坐标

3.1.1 text_regions 字段的参数:

  • 坐标输出格式 : [左上角x, 左上角y,右上角x,右上角y,左下角x,左下角y,右下角x, 右下角y]
字段 类型 说明
patient_name array 患者姓名
hospital_name array 医院名称
department array 科室
treatment_date array 就诊日期
chief_complaint array 主诉坐标列表,数组单个坐标元素与提取内容按顺序一一对应
diagnosis array 诊断坐标列表,数组单个坐标元素与提取内容按顺序一一对应
tcm_diagnosis array 诊断坐标列表,数组单个坐标元素与提取内容按顺序一一对应
current_medical_history array 现病史坐标列表,数组单个坐标元素与提取内容按顺序一一对应
past_history array 既往史坐标列表,数组单个坐标元素与提取内容按顺序一一对应
personal_history array 个人史坐标列表,数组单个坐标元素与提取内容按顺序一一对应
family_history array 家族史坐标列表,数组单个坐标元素与提取内容按顺序一一对应
marriage_and_childbirth_history array 婚育史坐标列表,数组单个坐标元素与提取内容按顺序一一对应
返回结果示例
{
    "degree": 0,
    "medical_result": {
        "chief_complaint": [
            "发热3天"
        ],
        "current_medical_history": [
            "患儿无明显诱因下发热,热峰39.5℃,无寒战、惊厥,鼻涕,偶有咳嗽、咳痰,无喘息,无腹泻、呕吐。精神好,食欲可,大小便正常。"
        ],
        "department": "儿科门诊",
        "diagnosis": [
            "发热原因待查"
        ],
        "tcm_diagnosis": [],
        "family_history": null,
        "hospital_name": "江苏省人民医院",
        "marriage_and_childbirth_history": null,
        "past_history": [
            "否认武汉等疫区或病人接触史无特殊。无药物过敏史,无发热惊厥。"
        ],
        "patient_name": "XXX",
        "personal_history": null,
        "text_regions": {
            "chief_complaint": [
                [
                    114.2384,
                    246.2232,
                    263.0723,
                    246.3233,
                    114.8432,
                    246.3233,
                    263.0732,
                    246.3232
                ]
            ],
            "current_medical_history": [
                [
                    223.8123,
                    281.323,
                    941.4732,
                    281.4343,
                    114.8423,
                    246.4343,
                    263.0732,
                    246.3232
                ]
            ],
            "department": [
                260.3232,
                149.3232,
                765.8233,
                149.3232,
                114.8423,
                246.4343,
                263.0732,
                246.2323
            ],
            "diagnosis": [
                [
                    114.4234,
                    877.4343,
                    325.8523,
                    877.4344,
                    114.8443,
                    246.3232,
                    263.0732,
                    246.3233
                ]
            ],
            "tcm_diagnosis": [],
            "family_history": [],
            "hospital_name": [
                293.7223,
                149.3232,
                799.5232,
                149.2323,
                114.8455,
                246.5555,
                263.0723,
                246.3232
            ],
            "marriage_and_childbirth_history": [],
            "past_history": [
                [
                    150.96,
                    380.3232,
                    593.2223,
                    380.3233,
                    114.8432,
                    246.3233,
                    263.0733,
                    246.3233
                ]
            ],
            "patient_name": [
                111.0232,
                211.3233,
                246.9232,
                211.3233,
                114.8432,
                246.3233,
                263.0723,
                246.3233
            ],
            "personal_history": [],
            "treatment_date": [
                713.7323,
                212.3232,
                956.7232,
                212.3232,
                114.8433,
                246.3232,
                263.0732,
                246.3233
            ]
        },
        "treatment_date": "2020-01-25"
    },
    "time_cost": 0.01,
    "status": "OK"
}

4.错误码

状态码 status 字段 说明
400 INVALID_ARGUMENT 请求参数错误
400 DETETION_FAILED 图片检测失败
403 NO_PERMISSION 无调用权限
403 OUT_OF_QUOTA 调用次数超出限额
404 NOT_FOUND 请求路径错误
500 INTERNAL_ERROR 服务器内部错误

备注: 以上40X系列错误描述请参考error字段

输出样例
{
  "status": "PARAMETER_ERROR",
  "error": "image_file、image_base64 or image_url required",
}

results matching ""

    No results matching ""