/ocr/experiment_report

1.接口描述

该API是用于识别提取医疗化验报告上的文字信息。

请求方式:

POST

请求URL:

https://cloudapi.deepfinch.com/ocr/experiment_report

调试工具

Debugging Tool

2.请求参数

2.1 请求头域

字段 类型 必需 描述
X-DF-API-ID string API调用凭证信息,详细信息请参考API调用
X-DF-API-SECRET string API调用凭证信息,详细信息请参考API调用

2.2 请求体

字段 类型 必需 描述
file file 见下方注释 需上传的图片文件,上传本地图片进行检测时选取此参数
url string 见下方注释 图片网络地址,采用抓取网络图片方式时需选取此参数

请求参数 fileurl 二选一。
url 中若含有特殊字符,则需要对这些字符进行转义,所有中文和特殊字符必需以UTF-8编码转义。
目前支持 http/https 协议的网络地址。下载限时 5s,超时后仍未下载完成则属于失败。
参数 file 需把图片文件以 multipart/form-data 的形式放到 POST 消息体中。

3.返回参数

字段 类型 描述
request_id string 本次请求的 id
status string 状态。正常为 OK ,其他值表示失败。详见错误码
result objectArray 识别结果

3.1 result 字段的参数

字段 类型 说明
is_normal bool 当前检查结果是否正常
project_name object 项目名称
project_result object 检查结果
project_code object 项目代码
project_unit object 单位
project_reference_interval object 参考区间

3.1.1 字段的参数

字段 类型 说明
txt str 提取文本
region list 文本坐标

输出示例:

{
    "request_id": "TIDa4fd495e776c4829bee3231d5a50c10a",
    "status": "OK",
    "result": [
        {
            "is_normal": true,
            "project_name": {
                "region": [
                    147.83373922413793,
                    923.1987111527271,
                    377.57536099137934,
                    923.1987111527271,
                    377.57536099137934,
                    953.1726952810624,
                    147.83373922413793,
                    953.1726952810624
                ],
                "txt": "红细胞分布宽度(CV)"
            },
            "project_result": {
                "region": [
                    419.52817887931036,
                    923.1987111527271,
                    477.4630226293104,
                    923.1987111527271,
                    477.4630226293104,
                    951.1744296725068,
                    419.52817887931036,
                    951.1744296725068
                ],
                "txt": "12.5"
            },
            "project_code": {
                "region": [],
                "txt": ""
            },
            "project_unit": {
                "region": [
                    549.3821390086207,
                    921.2004455441714,
                    575.3529310344828,
                    921.2004455441714,
                    575.3529310344828,
                    951.1744296725068,
                    549.3821390086207,
                    951.1744296725068
                ],
                "txt": "%"
            },
            "project_reference_interval": {
                "region": [
                    671.2450862068966,
                    921.2004455441714,
                    805.0945528017243,
                    921.2004455441714,
                    805.0945528017243,
                    951.1744296725068,
                    671.2450862068966,
                    951.1744296725068
                ],
                "txt": "10.9-15.4"
            }
        },
        {
            "is_normal": true,
            "project_name": {
                "region": [
                    147.83373922413793,
                    923.1987111527271,
                    377.57536099137934,
                    923.1987111527271,
                    377.57536099137934,
                    953.1726952810624,
                    147.83373922413793,
                    953.1726952810624
                ],
                "txt": "红细胞分布宽度(CV)"
            },
            "project_result": {
                "region": [
                    419.52817887931036,
                    923.1987111527271,
                    477.4630226293104,
                    923.1987111527271,
                    477.4630226293104,
                    951.1744296725068,
                    419.52817887931036,
                    951.1744296725068
                ],
                "txt": "12.5"
            },
            "project_code": {
                "region": [],
                "txt": ""
            },
            "project_unit": {
                "region": [
                    549.3821390086207,
                    921.2004455441714,
                    575.3529310344828,
                    921.2004455441714,
                    575.3529310344828,
                    951.1744296725068,
                    549.3821390086207,
                    951.1744296725068
                ],
                "txt": "%"
            },
            "project_reference_interval": {
                "region": [
                    671.2450862068966,
                    921.2004455441714,
                    805.0945528017243,
                    921.2004455441714,
                    805.0945528017243,
                    951.1744296725068,
                    671.2450862068966,
                    951.1744296725068
                ],
                "txt": "10.9-15.4"
            }
        },
        {
            "is_normal": false,
            "project_name": {
                "region": [
                    147.83373922413793,
                    923.1987111527271,
                    377.57536099137934,
                    923.1987111527271,
                    377.57536099137934,
                    953.1726952810624,
                    147.83373922413793,
                    953.1726952810624
                ],
                "txt": "红细胞分布宽度(CV)"
            },
            "project_result": {
                "region": [
                    419.52817887931036,
                    923.1987111527271,
                    477.4630226293104,
                    923.1987111527271,
                    477.4630226293104,
                    951.1744296725068,
                    419.52817887931036,
                    951.1744296725068
                ],
                "txt": "12.5"
            },
            "project_code": {
                "region": [],
                "txt": ""
            },
            "project_unit": {
                "region": [
                    549.3821390086207,
                    921.2004455441714,
                    575.3529310344828,
                    921.2004455441714,
                    575.3529310344828,
                    951.1744296725068,
                    549.3821390086207,
                    951.1744296725068
                ],
                "txt": "%"
            },
            "project_reference_interval": {
                "region": [
                    671.2450862068966,
                    921.2004455441714,
                    805.0945528017243,
                    921.2004455441714,
                    805.0945528017243,
                    951.1744296725068,
                    671.2450862068966,
                    951.1744296725068
                ],
                "txt": "10.9-15.4"
            }
        },
        {
            "is_normal": false,
            "project_name": {
                "region": [
                    147.83373922413793,
                    923.1987111527271,
                    377.57536099137934,
                    923.1987111527271,
                    377.57536099137934,
                    953.1726952810624,
                    147.83373922413793,
                    953.1726952810624
                ],
                "txt": "红细胞分布宽度(CV)"
            },
            "project_result": {
                "region": [
                    419.52817887931036,
                    923.1987111527271,
                    477.4630226293104,
                    923.1987111527271,
                    477.4630226293104,
                    951.1744296725068,
                    419.52817887931036,
                    951.1744296725068
                ],
                "txt": "12.5"
            },
            "project_code": {
                "region": [],
                "txt": ""
            },
            "project_unit": {
                "region": [
                    549.3821390086207,
                    921.2004455441714,
                    575.3529310344828,
                    921.2004455441714,
                    575.3529310344828,
                    951.1744296725068,
                    549.3821390086207,
                    951.1744296725068
                ],
                "txt": "%"
            },
            "project_reference_interval": {
                "region": [
                    671.2450862068966,
                    921.2004455441714,
                    805.0945528017243,
                    921.2004455441714,
                    805.0945528017243,
                    951.1744296725068,
                    671.2450862068966,
                    951.1744296725068
                ],
                "txt": "10.9-15.4"
            }
        }
    ]
}

4.错误码

状态码 status 字段 说明
400 INVALID_ARGUMENT 请求参数错误
400 DETECTION_FAILED 图片检测失败
401 UNAUTHORIZED 未授权或授权失败
403 RATE_LIMIT_EXCEEDED 调用频率超出限额
404 NOT_FOUND 请求路径错误
500 INTERNAL_ERROR 服务器内部错误

输出示例:

{
  "status": "INVALID_ARGUMENT",
  "reason": "must specify 'file'",
  "request_id": "TID8bf47ab6eda64476973cc5f5b6ebf57e"
}

5.输入示例

results matching ""

    No results matching ""