提交修改
This commit is contained in:
parent
94fce468f9
commit
6cf9264fca
@ -261,6 +261,25 @@ public class BMedicalInvoiceResp extends BBaseResp {
|
||||
private String name;
|
||||
@JsonProperty("word")
|
||||
private String word;
|
||||
@JsonProperty("medi_info")
|
||||
private String mediInfo; //医保目录查询结果,**当 medi_query 参数存在时,仅在「收费项目」的数组里返回,**以下参数同此说明
|
||||
@JsonProperty("medi_check")
|
||||
private String mediCheck; //查询是否成功,“1”表示成功,“0”表示不成功
|
||||
@JsonProperty("medi_name")
|
||||
private String mediName; //药品名
|
||||
@JsonProperty("medi_type")
|
||||
private String mediType; //医保类别
|
||||
@JsonProperty("medi_region")
|
||||
private String mediRegion; //医保目录的城市
|
||||
@JsonProperty("medi_code")
|
||||
private String mediCode; // 药品编码
|
||||
@JsonProperty("medi_register")
|
||||
private String mediRegister; // 药品注册号
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@NoArgsConstructor
|
||||
@ -279,6 +298,21 @@ public class BMedicalInvoiceResp extends BBaseResp {
|
||||
private String name;
|
||||
@JsonProperty("word")
|
||||
private String word;
|
||||
@JsonProperty("medi_info")
|
||||
private String mediInfo; //医保目录查询结果,**当 medi_query 参数存在时,仅在「收费项目」的数组里返回,**以下参数同此说明
|
||||
@JsonProperty("medi_check")
|
||||
private String mediCheck; //查询是否成功,“1”表示成功,“0”表示不成功
|
||||
@JsonProperty("medi_name")
|
||||
private String mediName; //药品名
|
||||
@JsonProperty("medi_type")
|
||||
private String mediType; //医保类别
|
||||
@JsonProperty("medi_region")
|
||||
private String mediRegion; //医保目录的城市
|
||||
@JsonProperty("medi_code")
|
||||
private String mediCode; // 药品编码
|
||||
@JsonProperty("medi_register")
|
||||
private String mediRegister; // 药品注册号
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,49 @@
|
||||
package com.heyu.api.controller.medical;
|
||||
|
||||
|
||||
import com.heyu.api.baidu.handle.medical.BMedicalInvoiceHandle;
|
||||
import com.heyu.api.baidu.request.medical.BMedicalInvoiceRequest;
|
||||
import com.heyu.api.baidu.response.medical.BMedicalInvoiceResp;
|
||||
import com.heyu.api.controller.BaseController;
|
||||
import com.heyu.api.data.annotation.CacheResult;
|
||||
import com.heyu.api.data.annotation.NotIntercept;
|
||||
import com.heyu.api.data.utils.ApiR;
|
||||
import com.heyu.api.data.utils.R;
|
||||
import com.heyu.api.resp.medical.MedicalInvoiceResp;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
|
||||
/***
|
||||
* https://console.bce.baidu.com/support/?_=1740575657628×tamp=1740580001377#/api?product=AI&project=%E6%96%87%E5%AD%97%E8%AF%86%E5%88%AB&parent=%E5%8C%BB%E7%96%97%E7%A5%A8%E6%8D%AEOCR&api=rest%2F2.0%2Focr%2Fv1%2Fmedical_invoice&method=post
|
||||
*
|
||||
*医疗发票识别
|
||||
*/
|
||||
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/medical")
|
||||
@NotIntercept
|
||||
public class MedicalInvoiceController extends BaseController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private BMedicalInvoiceHandle bMedicalInvoiceHandle;
|
||||
|
||||
@RequestMapping("/invoice")
|
||||
@CacheResult
|
||||
public R invoice(BMedicalInvoiceRequest req) {
|
||||
MedicalInvoiceResp resp = new MedicalInvoiceResp();
|
||||
|
||||
ApiR<BMedicalInvoiceResp> bR = bMedicalInvoiceHandle.handle(req);
|
||||
if(bR.isSuccess()){
|
||||
BMedicalInvoiceResp bMedicalInvoiceResp = bR.getData();
|
||||
|
||||
|
||||
}
|
||||
return R.error();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
package com.heyu.api.resp.medical;
|
||||
|
||||
|
||||
import com.heyu.api.data.dto.BaseResp;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class MedicalInvoiceResp extends BaseResp {
|
||||
|
||||
private String province; // 省市:支持返回以下省市 , n北京/广东/河北/河南/江苏/山东/上海/天津/浙江等
|
||||
private String invoiceType; //票据种类
|
||||
private String amountInWords; //大写合计金额
|
||||
private String sex; //性别
|
||||
private String insuranceType; //医保类型
|
||||
private String name; //姓名
|
||||
private String socialSecurityNum; //社保卡号
|
||||
private String dischargeDate; //出院时间
|
||||
private String hospitalNum; // 住院号
|
||||
private String hospitalName; //医院名称
|
||||
private List<List<CostDTO>> costCategories; //项目大类:治疗费、检查费等项目大类
|
||||
private List<CostDTO> regionSupplement; //地区字段:根据省市返回改地区特有的字段
|
||||
private String clinicNum; // 门诊号
|
||||
private String amountInFiguers; //小写合计金额
|
||||
private String admissionDate; // 入院时间
|
||||
private String hospitalType; //医疗机构类型
|
||||
private String refundAmount; //退费金额
|
||||
private String date; //开票日期
|
||||
private String chargingUnit; //收款单位
|
||||
private List<List<CostDTO>> costDetail; //明细类别:药物/检查的明细类别
|
||||
private String paymentAmount; //补缴金额
|
||||
private String prepayAmount; // 预缴金额
|
||||
private String personalPayment; //个人账户支付
|
||||
private String hospitalDay; //住院天数
|
||||
private String businessNum; //业务流水号
|
||||
private String insurancePayment; //医保统筹支付
|
||||
private String payee; //收款人
|
||||
private String recordNum; //病例号
|
||||
private String invoiceNum; //发票号码
|
||||
|
||||
@Data
|
||||
public static class CostDTO {
|
||||
private String name; //字段名,包括:收费项目、金额
|
||||
private String word; //name字段对应的识别结果
|
||||
private String mediInfo; //医保目录查询结果,**当 medi_query 参数存在时,仅在「收费项目」的数组里返回,**以下参数同此说明
|
||||
private String mediCheck; //查询是否成功,“1”表示成功,“0”表示不成功
|
||||
private String mediName; //药品名
|
||||
private String mediType; //医保类别
|
||||
private String mediRegion; //医保目录的城市
|
||||
private String mediCode; // 药品编码
|
||||
private String mediRegister; // 药品注册号
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user