版本V1.0
1. HTTP 方法:POST
2. 测试URL:
http://danjusaomiao.51developer.com/home/ocrapi/hospital_laboratory_sheet
3. Header如下:
参数 |
值 |
Content-Type |
application/x-www-form-urlencoded |
4. URL参数:
参数 |
格式 |
说明 |
必须 |
app_id |
string |
应用ID(app_id),由索米提供 |
是 |
cur_time |
string |
当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的秒数。 |
是 |
app_token |
string |
令牌,计算方法:md5 (app_id + app_key + cur_time),3个值拼接的字符串,进行MD5哈希计算(32位小写),其中app_id和secret_key由索米提供,调用方管理。 |
是 |
注:
· app_key:接口密钥,由索米OCR开放平台提供,调用方注意保管,如泄露,可联系索米技术人员重置;
· app_token有效期:出于安全性考虑,每个app_token的有效期为 5 分钟(用 cur_time 计算),同时 cur_time 要与标准时间同步,否则,时间相差太大,服务端会直接认为 cur_time 无效;
*app_token*生成示例(PHP):
$app_id = "abcd1234";
$app_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
$cur_time = "1502607694";
$app_token = md5($app_id . $app_key . $cur_time);
5. Body中放置请求参数,参数详情如下:
参数 |
格式 |
说明 |
必须 |
image |
string |
图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4MB,支持jpg/png/bmp格式 |
是 |
6. 返回参数
参数 |
格式 |
说明 |
status |
string |
"success":表示成功,其他表示失败。 |
data |
json |
OCR识别结果。当status为success时有意义,否则无意义。 |
data.sheet_id |
string |
单据编号,OCR接口自动编号,便于核对校验 |
data.sheet_name |
string |
单据名称(目前暂不支持该字段识别,预留备用) |
data.user_realname |
string |
用户姓名(目前暂不支持该字段识别,预留备用) |
data.user_age |
string |
年龄(目前暂不支持该字段识别,预留备用) |
data.card_no |
string |
诊疗卡号(目前暂不支持该字段识别,预留备用) |
data.department |
string |
病区科室(目前暂不支持该字段识别,预留备用) |
data.bed_no |
string |
床号(目前暂不支持该字段识别,预留备用) |
data.sample_no |
string |
标本编号(目前暂不支持该字段识别,预留备用) |
data.sample_source |
string |
标本来源(目前暂不支持该字段识别,预留备用) |
data.examine_doctor |
string |
检验医师(目前暂不支持该字段识别,预留备用) |
data.verify_doctor |
string |
审核医师(目前暂不支持该字段识别,预留备用) |
data.hospital |
string |
医院(目前暂不支持该字段识别,预留备用) |
data.receive_time |
string |
接收时间(目前暂不支持该字段识别,预留备用) |
data.report_time |
string |
报告时间(目前暂不支持该字段识别,预留备用) |
data.row_list |
json数组 |
OCR结果项列表 |
data.row_list[0].row_id |
string |
行编号,OCR接口自动编号,便于核对校验 |
data.row_list[0].row_index |
string |
序号(越小越靠上) |
data.row_list[0].short_name |
string |
简称 |
data.row_list[0].project_name |
string |
项目 |
data.row_list[0].examine_method |
string |
试验方法 |
data.row_list[0].result_value |
string |
结果值 |
data.row_list[0].tip |
string |
提示 |
data.row_list[0].reference_value |
string |
参考值 |
data.row_list[0].unit |
string |
单位 |
七、返回示例
{ "status": "success", "data": { "sheet_id": "205", "sheet_name": "", "user_realname": "", "user_age": "", "user_gender": "", "card_no": "", "department": "", "bed_no": "", "sample_no": "", "sample_source": "", "examine_doctor": "", "verify_doctor": "", "hospital": "", "receive_time": "0000\/00\/00", "report_time": "0000\/00\/00", "row_list": [{ "row_id": "1690", "row_index": "1", "short_name": "BIL", "project_name": "胆红素", "examine_method": "", "result_value": "-0", "tip": "[", "reference_value": "[", "unit": "[" }, { "row_id": "1691", "row_index": "2", "short_name": "BLD", "project_name": "尿隐血", "examine_method": "", "result_value": "-0", "tip": "[", "reference_value": "[", "unit": "cell\/ul" }, { "row_id": "1692", "row_index": "3", "short_name": "GLU", "project_name": "葡萄糖", "examine_method": "", "result_value": "-0", "tip": "[", "reference_value": "[", "unit": "[" }, { "row_id": "1693", "row_index": "4", "short_name": "KET", "project_name": "酮体", "examine_method": "", "result_value": "-0", "tip": "[", "reference_value": "[", "unit": "[" }, { "row_id": "1694", "row_index": "5", "short_name": "NIT", "project_name": "亚硝酸盐", "examine_method": "", "result_value": "-", "tip": "[", "reference_value": "[", "unit": "[" }, { "row_id": "1695", "row_index": "6", "short_name": "PH", "project_name": "酸碱度", "examine_method": "", "result_value": "5.1", "tip": "[", "reference_value": "5.5-7.0", "unit": "[" }, { "row_id": "1696", "row_index": "7", "short_name": "PRO", "project_name": "蛋白质", "examine_method": "", "result_value": "", "tip": "[", "reference_value": "[", "unit": "[" }, { "row_id": "1697", "row_index": "8", "short_name": "SG", "project_name": "尿比重", "examine_method": "", "result_value": "1.03", "tip": "[", "reference_value": "1.010-1.025", "unit": "[" }, { "row_id": "1698", "row_index": "9", "short_name": "URO", "project_name": "尿胆原", "examine_method": "", "result_value": "3.2", "tip": "[", "reference_value": "3.2-16", "unit": "umol\/L" }, { "row_id": "1699", "row_index": "10", "short_name": "VC", "project_name": "维生素C", "examine_method": "", "result_value": "4", "tip": "[", "reference_value": "[", "unit": "mmol\/L" }, { "row_id": "1700", "row_index": "11", "short_name": "WBC", "project_name": "白细胞", "examine_method": "", "result_value": "[", "tip": "[", "reference_value": "[", "unit": "[" }] } } |
联系地址:北京市海淀区东北旺西路8号院23号楼三层306-027
联系邮箱:raelene@suomitek.com
北京索米科技有限公司 京ICP备18049577号