浏览代码

[医保代码]

wangzhinan 3 年之前
父节点
当前提交
efe81c8a47
共有 14 个文件被更改,包括 580 次插入92 次删除
  1. 29 20
      business/base-service/src/main/java/com/yihu/jw/healthCare/service/HealthCareService.java
  2. 6 1
      business/base-service/src/main/java/com/yihu/jw/hospital/healthCare/YlzMedicailBillDao.java
  3. 4 0
      business/base-service/src/main/java/com/yihu/jw/hospital/healthCare/YlzMedicailIcdDao.java
  4. 4 0
      business/base-service/src/main/java/com/yihu/jw/hospital/healthCare/YlzMedicailMxDao.java
  5. 2 0
      business/base-service/src/main/java/com/yihu/jw/hospital/healthCare/YlzMedicailRelationDao.java
  6. 3 0
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/dao/OutpatientDao.java
  7. 41 0
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
  8. 411 2
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java
  9. 3 3
      common/common-entity/src/main/java/com/yihu/jw/entity/hospital/healthCare/YlzMedicalIcdDO.java
  10. 3 3
      common/common-entity/src/main/java/com/yihu/jw/entity/hospital/healthCare/YlzMedicalMxDO.java
  11. 0 42
      common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/WlyyOutpatientDO.java
  12. 0 21
      common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/WlyyPrescriptionDO.java
  13. 61 0
      svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/XzzxCotroller.java
  14. 13 0
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

+ 29 - 20
business/base-service/src/main/java/com/yihu/jw/healthCare/service/HealthCareService.java

@ -996,13 +996,13 @@ public class HealthCareService {
     *
     * 返回值
     *
     * @param outpatientId
     * @param registerNo 挂号号
     * @return
     * @throws Exception
     */
    public String register(String outpatientId) throws Exception{
    public String register(String registerNo) throws Exception{
        String funid = "N20.17.04.01";
        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByOutpatient(outpatientId);
        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByOutpatient(registerNo);
        if (ylzMedicalRelationDO==null){
            throw new Exception("上传医保挂号失败:结算信息为空!");
        }
@ -1041,13 +1041,13 @@ public class HealthCareService {
     *
     * 返回值
     *
     * @param outpatientId
     * @param registerNo 挂号号
     * @return
     * @throws Exception
     */
    public String registerBack(String outpatientId) throws Exception{
    public String registerBack(String registerNo) throws Exception{
        String funid = "N20.17.04.02";
        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByOutpatient(outpatientId);
        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByOutpatient(registerNo);
        if (ylzMedicalRelationDO==null){
            throw new Exception("医保挂号冲销失败:结算信息为空!");
        }
@ -1078,13 +1078,13 @@ public class HealthCareService {
    /**
     * 2.5.3医保费用明细上传(N20.17.04.03)
     *
     * @param outpatientId
     * @param registerNo 挂号号
     * @return
     * @throws Exception
     */
    public String feeDetailUpload(String outpatientId) throws Exception{
    public String feeDetailUpload(String registerNo) throws Exception{
        String funid = "N20.17.04.03";
        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByOutpatient(outpatientId);
        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByOutpatient(registerNo);
        if (ylzMedicalRelationDO==null){
            throw new Exception("医保费用明细上传:结算信息为空!");
        }
@ -1164,13 +1164,13 @@ public class HealthCareService {
     *
     * 返回值
     *
     * @param outpatientId
     * @param registerNo 挂号号
     * @return
     * @throws Exception
     */
    public String feeDetailRefund(String outpatientId,String prescriptionId,String remark) throws Exception{
    public String feeDetailRefund(String registerNo,String remark) throws Exception{
        String funid = "N20.17.04.04";
        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByOutpatient(outpatientId);
        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByOutpatient(registerNo);
        if (ylzMedicalRelationDO==null){
            throw new Exception("医保费用明细上传:结算信息为空!");
        }
@ -1200,13 +1200,14 @@ public class HealthCareService {
     *
     * 返回值
     *
     * @param outpatientId
     * @param registerNo 挂号号
     * @return
     * @throws Exception
     */
    public String preSettlement(String outpatientId) throws Exception{
    public String preSettlement(String registerNo) throws Exception{
        String funid = "N20.17.04.05";
        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByOutpatient(outpatientId);
        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByOutpatient(registerNo);
        if (ylzMedicalRelationDO==null){
            throw new Exception("医保费用明细上传:结算信息为空!");
        }
@ -1319,14 +1320,14 @@ public class HealthCareService {
     *
     * 返回值
     *
     * @param outpatientId
     * @param registerNo 挂号号
     * @return
     * @throws Exception
     */
    public String getSettlementResultUrl(String outpatientId) throws Exception{
    public String getSettlementResultUrl(String registerNo) throws Exception{
        String funid = "N20.17.04.07";
        JSONObject data = new JSONObject();
        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByOutpatient(outpatientId);
        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByOutpatient(registerNo);
        if (ylzMedicalRelationDO==null){
            throw new Exception("获取医保结算页面地址:结算信息为空!");
        }
@ -1396,11 +1397,15 @@ public class HealthCareService {
        if (wlyyOutpatientDO==null){
            throw new Exception("医保上传户病史病情及医学报告失败!门诊为空");
        }
        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByOutpatient(wlyyOutpatientDO.getRegisterNo());
        if (ylzMedicalRelationDO==null){
            throw new Exception("获取医保结算页面地址:结算信息为空!");
        }
        data.put("region_code","350200");//参保地区划代码
        data.put("idcard",wlyyOutpatientDO.getId());//身份证号
        data.put("name",wlyyOutpatientDO.getPatientName());//姓名
        data.put("cert_type","01");//证件类型
        data.put("insurance_serial",wlyyOutpatientDO.getInsuranceSerial());//医保流水号
        data.put("insurance_serial",ylzMedicalRelationDO.getInsuranceSerial());//医保流水号
        data.put("blood_type",wlyyOutpatientDO.getBloodType());//血型
        data.put("allergy",wlyyOutpatientDO.getAllergy());//过敏史
        data.put("diagnosis",wlyyOutpatientDO.getIcd10Name());//病理诊断
@ -1438,7 +1443,11 @@ public class HealthCareService {
        if (wlyyOutpatientDO==null){
            throw new Exception("医保上传户病史病情及医学报告失败!门诊为空");
        }
        data.put("insurance_serial",wlyyOutpatientDO.getInsuranceSerial());//医保流水号
        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByOutpatient(wlyyOutpatientDO.getRegisterNo());
        if (ylzMedicalRelationDO==null){
            throw new Exception("获取医保结算页面地址:结算信息为空!");
        }
        data.put("insurance_serial",ylzMedicalRelationDO.getInsuranceSerial());//医保流水号
        data.put("insurance_med_hist_serial",wlyyOutpatientDO.getInsuranceMedHistserial());//医保病史上传流水号
        data.put("invalid_reason",remark);//作废原因
        data.put("data_source","53");//数据来源

+ 6 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/healthCare/YlzMedicailBillDao.java

@ -1,15 +1,20 @@
package com.yihu.jw.hospital.healthCare;
import com.yihu.jw.entity.hospital.healthCare.YlzMedicalBillDO;
import com.yihu.jw.entity.hospital.healthCare.YlzMedicalIcdDO;
import com.yihu.jw.entity.hospital.healthCare.YlzMedicalRelationDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Created by wangzhinan 20211003
 */
public interface YlzMedicailBillDao extends PagingAndSortingRepository<YlzMedicalBillDO, String>, JpaSpecificationExecutor<YlzMedicalBillDO> {
    @Query("from YlzMedicalBillDO a where a.medicalId = ?1 ")
    List<YlzMedicalBillDO> findByMedicalId(String medicalId);
}

+ 4 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/healthCare/YlzMedicailIcdDao.java

@ -3,6 +3,7 @@ package com.yihu.jw.hospital.healthCare;
import com.yihu.jw.entity.hospital.healthCare.YlzMedicalIcdDO;
import com.yihu.jw.entity.hospital.healthCare.YlzMedicalRelationDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
@ -16,4 +17,7 @@ public interface YlzMedicailIcdDao extends PagingAndSortingRepository<YlzMedical
    @Query("from YlzMedicalIcdDO a where a.medicalId = ?1 ")
    List<YlzMedicalIcdDO> findByMedicalId(String medicalId);
    @Modifying
    @Query("delete from YlzMedicalIcdDO  where medicalId = ?1")
    void deleteByMedicalId(String medicalId);
}

+ 4 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/healthCare/YlzMedicailMxDao.java

@ -3,6 +3,7 @@ package com.yihu.jw.hospital.healthCare;
import com.yihu.jw.entity.hospital.healthCare.YlzMedicalIcdDO;
import com.yihu.jw.entity.hospital.healthCare.YlzMedicalMxDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
@ -16,4 +17,7 @@ public interface YlzMedicailMxDao extends PagingAndSortingRepository<YlzMedicalM
    @Query("from YlzMedicalMxDO a where a.medicalId = ?1 ")
    List<YlzMedicalMxDO> findByMedicalId(String medicalId);
    @Modifying
    @Query("delete from YlzMedicalMxDO  where medicalId = ?1")
    void deleteByMedicalId(String medicalId);
}

+ 2 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/healthCare/YlzMedicailRelationDao.java

@ -18,4 +18,6 @@ public interface YlzMedicailRelationDao extends PagingAndSortingRepository<YlzMe
    @Query("from YlzMedicalRelationDO a where a.relationCode = ?1 ")
    YlzMedicalRelationDO findByOutpatient(String relationCode);
    @Query("from YlzMedicalRelationDO a where a.logNo = ?1 ")
    YlzMedicalRelationDO findByLog_no(String logNo);
}

+ 3 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/dao/OutpatientDao.java

@ -33,6 +33,9 @@ public interface OutpatientDao extends PagingAndSortingRepository<WlyyOutpatient
    @Query("from WlyyOutpatientDO a where a.doctor = ?1 and a.status in(2,3)")
    List<WlyyOutpatientDO> findByDoctorList(String doctor);
    @Query("from WlyyOutpatientDO a where a.registerNo = ?1 ")
    List<WlyyOutpatientDO> findByRegisterNoList(String registerNo);
    @Query("from WlyyOutpatientDO a where a.realOrder = ?1 ")
    WlyyOutpatientDO findByRealOrder(String realOrder);

+ 41 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -51,6 +51,7 @@ import com.yihu.jw.entity.hospital.prescription.*;
import com.yihu.jw.entity.order.BusinessOrderDO;
import com.yihu.jw.entity.ylzinfo.OauthYlzConfigDO;
import com.yihu.jw.file_upload.FileUploadService;
import com.yihu.jw.healthCare.service.HealthCareService;
import com.yihu.jw.hospital.consult.dao.BaseAdviceTreatmentDao;
import com.yihu.jw.hospital.consult.dao.HospitalWaitingRoomDao;
import com.yihu.jw.hospital.consult.dao.WlyyConsultAdviceDao;
@ -324,6 +325,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    private EnterpriseService enterpriseService;
    @Autowired
    private TasyNatService tasyNatService;
    @Autowired
    private HealthCareService healthCareService;
    @Value("${demo.flag}")
    private boolean demoFlag;
@ -13056,4 +13059,42 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            return "";
        }
    }
    /**
     * 获取患者待结算信息页面
     * @param outpatientId
     * @return
     * @throws Exception
     */
    public JSONObject getSettlementInfo(String outpatientId) throws Exception {
        logger.info("获取患者待结算信息开始!");
        WlyyOutpatientDO outpatientDO = outpatientDao.findById(outpatientId);
        String registerNo = outpatientDO.getRegisterNo();
        WlyyHospitalSysDictDO sysDictDO = hospitalSysDictDao.findById("ylzConfigOrgCode");
        if (wechatId.equalsIgnoreCase("xm_xzzx_wx")){
            xzzxEntranceService.getSettleInfHospital(outpatientDO.getCardNo(),registerNo,sysDictDO.getDictValue());
        }
        logger.info("获取患者待结算信息结束!");
        logger.info("医保挂号开始!");
        String register = healthCareService.register(registerNo);
        logger.info("医保挂号结束!");
        logger.info("医保费用明细上传开始!");
        String feeDetailUpload= healthCareService.feeDetailUpload(registerNo);
        logger.info("医保费用明细上传结束!");
        logger.info("医保预结算信息开始!");
        String preSettlement =  healthCareService.preSettlement(registerNo);
        logger.info("医保预结算信息结束!");
        logger.info("获取医保结算页面地址开始!");
        String getSettlementResultUrl = healthCareService.getSettlementResultUrl(registerNo);
        logger.info("获取医保结算页面地址结束!");
        JSONObject object = new JSONObject();
        object.put("register",register);
        object.put("feeDetailUpload",feeDetailUpload);
        object.put("preSettlement",preSettlement);
        object.put("getSettlementResultUrl",getSettlementResultUrl);
        return object;
    }
}

+ 411 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java

@ -18,6 +18,10 @@ import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.wx.BasePatientWechatDo;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
import com.yihu.jw.entity.hospital.dict.WlyyChargeDictDO;
import com.yihu.jw.entity.hospital.healthCare.YlzMedicalBillDO;
import com.yihu.jw.entity.hospital.healthCare.YlzMedicalIcdDO;
import com.yihu.jw.entity.hospital.healthCare.YlzMedicalMxDO;
import com.yihu.jw.entity.hospital.healthCare.YlzMedicalRelationDO;
import com.yihu.jw.entity.hospital.httplog.WlyyHttpLogDO;
import com.yihu.jw.entity.hospital.mapping.DoctorMappingDO;
import com.yihu.jw.entity.hospital.mapping.PatientMappingDO;
@ -25,6 +29,10 @@ import com.yihu.jw.entity.hospital.prescription.*;
import com.yihu.jw.file_upload.FileUploadService;
import com.yihu.jw.hospital.dict.WlyyChargeDictDao;
import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
import com.yihu.jw.hospital.healthCare.YlzMedicailBillDao;
import com.yihu.jw.hospital.healthCare.YlzMedicailIcdDao;
import com.yihu.jw.hospital.healthCare.YlzMedicailMxDao;
import com.yihu.jw.hospital.healthCare.YlzMedicailRelationDao;
import com.yihu.jw.hospital.httplog.dao.WlyyHttpLogDao;
import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
import com.yihu.jw.hospital.mapping.dao.PatientMappingDao;
@ -44,6 +52,7 @@ import com.yihu.jw.utils.WebserviceUtil;
import com.yihu.jw.wechat.dao.BasePatientWechatDao;
import com.yihu.utils.security.MD5;
import net.sf.json.xml.XMLSerializer;
import netscape.javascript.JSObject;
import nu.xom.*;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
@ -123,10 +132,18 @@ public class XzzxEntranceService{
    private BaseDoctorHospitalDao baseDoctorHospitalDao;
    @Autowired
    private PrescriptionEmrDao prescriptionEmrDao;
    @Autowired
    private YlzMedicailRelationDao ylzMedicailRelationDao;
    @Autowired
    private YlzMedicailIcdDao ylzMedicailIcdDao;
    @Autowired
    private YlzMedicailMxDao ylzMedicailMxDao;
    @Value("${fastDFS.fastdfs_file_url}")
    private String fastdfs_file_url;
    @Autowired
    private FileUploadService fileUploadService;
    @Autowired
    private YlzMedicailBillDao ylzMedicailBillDao;
    private static String key="bvvsf3JA0mUXMU+mVnMaOQ==";
@ -2230,22 +2247,414 @@ public class XzzxEntranceService{
        params.put("msgBody",msgBody);
        logger.info("getSettleInfo params:"+params.toString());
        String xml = getXzzxWebServiceInfo("CallInterface",params,getSelectUrl());
        logger.info("getSettleInfo json:"+xml);
        XMLSerializer xmlSerializer = new XMLSerializer();
        String json = xmlSerializer.read(xml).toString();
        JSONObject object = JSONObject.parseObject(json);
        logger.info("getSettleInfo json:"+xml);
        List<WlyyOutpatientDO> wlyyOutpatientDOS = outpatientDao.findByRegisterNoList(his_serial);
        String outpatientId= null;
        if (wlyyOutpatientDOS!=null&&wlyyOutpatientDOS.size()!=0){
            outpatientId = wlyyOutpatientDOS.get(0).getId();
        }else {
            throw new Exception("门诊信息为空!");
        }
        JSONArray array = JSONArray.parseArray(json).getJSONArray(0);
        for (int i=0;i<array.size();i++){
            JSONObject object = array.getJSONObject(i);
            YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByLog_no(object.getString("log_no"));
            if (ylzMedicalRelationDO==null){
                ylzMedicalRelationDO = new YlzMedicalRelationDO();
                ylzMedicalRelationDO.setLogNo(object.getString("log_no"));
                ylzMedicalRelationDO.setOrgCode(object.getString("ret_code"));
                ylzMedicalRelationDO.setRegionCode(object.getString("region_code"));
                ylzMedicalRelationDO.setIdcard(object.getString("idcard"));
                ylzMedicalRelationDO.setName(object.getString("name"));
                ylzMedicalRelationDO.setCertType(object.getString("cert_type"));
                ylzMedicalRelationDO.setMedicalMode(object.getString("medical_mode"));
                ylzMedicalRelationDO.setMedicalType(object.getString("medical_type"));
                ylzMedicalRelationDO.setHisSerial(object.getString("his_serial"));
                ylzMedicalRelationDO.setHisSettleNo(object.getString("his_settle_no"));
                ylzMedicalRelationDO.setDeptCode(object.getString("dept_code"));
                ylzMedicalRelationDO.setDeptName(object.getString("dept_name"));
                ylzMedicalRelationDO.setHisDeptCode(object.getString("his_dept_code"));
                ylzMedicalRelationDO.setHisDeptName(object.getString("his_dept_name"));
                ylzMedicalRelationDO.setEmergencySign(object.getString("emergency_sign"));
                ylzMedicalRelationDO.setTraumaSign(object.getString("trauma_sign"));
                ylzMedicalRelationDO.setDate(DateUtil.strToDateLong(object.getString("date")));
                ylzMedicalRelationDO.setItemCount(object.getString("item_count"));
                ylzMedicalRelationDO.setTotalAmount(object.getString("total_amount"));
                ylzMedicalRelationDO.setPreCharges(object.getString("pre_charges"));
                ylzMedicalRelationDO.setDataSource(object.getString("data_source"));
                ylzMedicalRelationDO.setPreCount(object.getString("pre_count"));
                ylzMedicalRelationDO.setDoctorLevel(object.getString("doctor_level"));
                ylzMedicalRelationDO.setDel(1);
                ylzMedicalRelationDO.setRelationCode(his_serial);
                ylzMedicalRelationDO.setCreateTime(new Date());
                ylzMedicalRelationDO = ylzMedicailRelationDao.save(ylzMedicalRelationDO);
                JSONArray zdArray = object.getJSONArray("zdlist");
                for (int j=0;j<zdArray.size();j++){
                    JSONObject zdObject = zdArray.getJSONObject(j);
                    YlzMedicalIcdDO ylzMedicalIcdDO = new YlzMedicalIcdDO();
                    ylzMedicalIcdDO.setMedicalId(ylzMedicalRelationDO.getId());
                    ylzMedicalIcdDO.setDel(1);
                    ylzMedicalIcdDO.setCreateTime(new Date());
                    ylzMedicalIcdDO.setDiseaseType(zdObject.getString("disease_type"));
                    ylzMedicalIcdDO.setDiseaseCodeIcd10(zdObject.getString("disease_code_icd10"));
                    ylzMedicalIcdDO.setDiseaseNameIcd10(zdObject.getString("disease_name_icd10"));
                    ylzMedicalIcdDO.setDiseaseOrder(zdObject.getString("disease_order"));
                    ylzMedicailIcdDao.save(ylzMedicalIcdDO);
                }
                JSONArray mxArray = object.getJSONArray("mxlist");
                for (int k=0;k<mxArray.size();k++){
                    JSONObject mxObject = zdArray.getJSONObject(k);
                    YlzMedicalMxDO ylzMedicalMxDO = new YlzMedicalMxDO();
                    ylzMedicalMxDO.setMedicalId(ylzMedicalRelationDO.getId());
                    ylzMedicalMxDO.setDel(1);
                    ylzMedicalMxDO.setPrescriptionCode(mxObject.getString("prescription_code"));
                    ylzMedicalMxDO.setHisDetailSn(mxObject.getString("his_detail_sn"));
                    ylzMedicalMxDO.setItemCode(mxObject.getString("item_code"));
                    ylzMedicalMxDO.setItemName(mxObject.getString("item_name"));
                    ylzMedicalMxDO.setInvoiceType(object.getString("invoice_type"));
                    ylzMedicalMxDO.setSpecificationType(object.getString("specification_type"));
                    ylzMedicalMxDO.setDosageForm(object.getString("dosage_form"));
                    ylzMedicalMxDO.setChargeUnit(object.getString("charge_unit"));
                    ylzMedicalMxDO.setPrice(object.getString("price"));
                    ylzMedicalMxDO.setAmount(object.getString("amount"));
                    ylzMedicalMxDO.setTotalMoney(object.getString("total_money"));
                    ylzMedicalMxDO.setSingleDose(object.getString("single_dose"));
                    ylzMedicalMxDO.setUseFrequency(object.getString("use_frequency"));
                    ylzMedicalMxDO.setMedicalWay(object.getString("medical_way"));
                    ylzMedicalMxDO.setPrescriptionDate(DateUtil.strToDateLong(object.getString("prescription_date")));
                    ylzMedicalMxDO.setMedicationDays(object.getString("medication_days"));
                    ylzMedicalMxDO.setDeptCode(object.getString("dept_code"));
                    ylzMedicalMxDO.setDeptName(object.getString("dept_name"));
                    ylzMedicalMxDO.setHisDeptCode(object.getString("his_dept_code"));
                    ylzMedicalMxDO.setHisDeptName(object.getString("his_dept_name"));
                    ylzMedicalMxDO.setMedicalPerName(object.getString("medical_per_name"));
                    ylzMedicalMxDO.setMedicalPerId(object.getString("medical_per_id"));
                    ylzMedicalMxDO.setLimitType(object.getString("medical_per_id"));
                    ylzMedicalMxDO.setActgDate(DateUtil.strToDateLong(object.getString("actg_date")));
                    ylzMedicalMxDO.setHisItemName(object.getString("his_item_name"));
                    ylzMedicalMxDO.setHisItemCode(object.getString("his_item_code"));
                    ylzMedicalMxDO.setClerkDays(DateUtil.strToDateLong(object.getString("clerk_days")));
                    ylzMedicalMxDO.setPeopleType(object.getString("people_type"));
                    ylzMedicailMxDao.save(ylzMedicalMxDO);
                }
            }else {
                ylzMedicalRelationDO.setOrgCode(object.getString("ret_code"));
                ylzMedicalRelationDO.setRegionCode(object.getString("region_code"));
                ylzMedicalRelationDO.setIdcard(object.getString("idcard"));
                ylzMedicalRelationDO.setName(object.getString("name"));
                ylzMedicalRelationDO.setCertType(object.getString("cert_type"));
                ylzMedicalRelationDO.setMedicalMode(object.getString("medical_mode"));
                ylzMedicalRelationDO.setMedicalType(object.getString("medical_type"));
                ylzMedicalRelationDO.setHisSerial(object.getString("his_serial"));
                ylzMedicalRelationDO.setHisSettleNo(object.getString("his_settle_no"));
                ylzMedicalRelationDO.setDeptCode(object.getString("dept_code"));
                ylzMedicalRelationDO.setDeptName(object.getString("dept_name"));
                ylzMedicalRelationDO.setHisDeptCode(object.getString("his_dept_code"));
                ylzMedicalRelationDO.setHisDeptName(object.getString("his_dept_name"));
                ylzMedicalRelationDO.setEmergencySign(object.getString("emergency_sign"));
                ylzMedicalRelationDO.setTraumaSign(object.getString("trauma_sign"));
                ylzMedicalRelationDO.setDate(DateUtil.strToDateLong(object.getString("date")));
                ylzMedicalRelationDO.setItemCount(object.getString("item_count"));
                ylzMedicalRelationDO.setTotalAmount(object.getString("total_amount"));
                ylzMedicalRelationDO.setPreCharges(object.getString("pre_charges"));
                ylzMedicalRelationDO.setDataSource(object.getString("data_source"));
                ylzMedicalRelationDO.setPreCount(object.getString("pre_count"));
                ylzMedicalRelationDO.setDoctorLevel(object.getString("doctor_level"));
                ylzMedicalRelationDO.setDel(1);
                ylzMedicalRelationDO.setRelationCode(outpatientId);
                ylzMedicalRelationDO.setCreateTime(new Date());
                ylzMedicalRelationDO = ylzMedicailRelationDao.save(ylzMedicalRelationDO);
                logger.info("删除YlzMedicalIcdDO");
                ylzMedicailIcdDao.deleteByMedicalId(ylzMedicalRelationDO.getId());
                JSONArray zdArray = object.getJSONArray("zdlist");
                for (int j=0;j<zdArray.size();j++){
                    JSONObject zdObject = zdArray.getJSONObject(j);
                    YlzMedicalIcdDO ylzMedicalIcdDO = new YlzMedicalIcdDO();
                    ylzMedicalIcdDO.setMedicalId(ylzMedicalRelationDO.getId());
                    ylzMedicalIcdDO.setDel(1);
                    ylzMedicalIcdDO.setCreateTime(new Date());
                    ylzMedicalIcdDO.setDiseaseType(zdObject.getString("disease_type"));
                    ylzMedicalIcdDO.setDiseaseCodeIcd10(zdObject.getString("disease_code_icd10"));
                    ylzMedicalIcdDO.setDiseaseNameIcd10(zdObject.getString("disease_name_icd10"));
                    ylzMedicalIcdDO.setDiseaseOrder(zdObject.getString("disease_order"));
                    ylzMedicailIcdDao.save(ylzMedicalIcdDO);
                }
                logger.info("删除YlzMedicalMxDO");
                ylzMedicailMxDao.deleteByMedicalId(ylzMedicalRelationDO.getId());
                JSONArray mxArray = object.getJSONArray("mxlist");
                for (int k=0;k<mxArray.size();k++){
                    JSONObject mxObject = zdArray.getJSONObject(k);
                    YlzMedicalMxDO ylzMedicalMxDO = new YlzMedicalMxDO();
                    ylzMedicalMxDO.setMedicalId(ylzMedicalRelationDO.getId());
                    ylzMedicalMxDO.setDel(1);
                    ylzMedicalMxDO.setPrescriptionCode(mxObject.getString("prescription_code"));
                    ylzMedicalMxDO.setHisDetailSn(mxObject.getString("his_detail_sn"));
                    ylzMedicalMxDO.setItemCode(mxObject.getString("item_code"));
                    ylzMedicalMxDO.setItemName(mxObject.getString("item_name"));
                    ylzMedicalMxDO.setInvoiceType(object.getString("invoice_type"));
                    ylzMedicalMxDO.setSpecificationType(object.getString("specification_type"));
                    ylzMedicalMxDO.setDosageForm(object.getString("dosage_form"));
                    ylzMedicalMxDO.setChargeUnit(object.getString("charge_unit"));
                    ylzMedicalMxDO.setPrice(object.getString("price"));
                    ylzMedicalMxDO.setAmount(object.getString("amount"));
                    ylzMedicalMxDO.setTotalMoney(object.getString("total_money"));
                    ylzMedicalMxDO.setSingleDose(object.getString("single_dose"));
                    ylzMedicalMxDO.setUseFrequency(object.getString("use_frequency"));
                    ylzMedicalMxDO.setMedicalWay(object.getString("medical_way"));
                    ylzMedicalMxDO.setPrescriptionDate(DateUtil.strToDateLong(object.getString("prescription_date")));
                    ylzMedicalMxDO.setMedicationDays(object.getString("medication_days"));
                    ylzMedicalMxDO.setDeptCode(object.getString("dept_code"));
                    ylzMedicalMxDO.setDeptName(object.getString("dept_name"));
                    ylzMedicalMxDO.setHisDeptCode(object.getString("his_dept_code"));
                    ylzMedicalMxDO.setHisDeptName(object.getString("his_dept_name"));
                    ylzMedicalMxDO.setMedicalPerName(object.getString("medical_per_name"));
                    ylzMedicalMxDO.setMedicalPerId(object.getString("medical_per_id"));
                    ylzMedicalMxDO.setLimitType(object.getString("medical_per_id"));
                    ylzMedicalMxDO.setActgDate(DateUtil.strToDateLong(object.getString("actg_date")));
                    ylzMedicalMxDO.setHisItemName(object.getString("his_item_name"));
                    ylzMedicalMxDO.setHisItemCode(object.getString("his_item_code"));
                    ylzMedicalMxDO.setClerkDays(DateUtil.strToDateLong(object.getString("clerk_days")));
                    ylzMedicalMxDO.setPeopleType(object.getString("people_type"));
                    ylzMedicailMxDao.save(ylzMedicalMxDO);
                }
            }
        }
        return xml;
    }
    /**
     *2.1.2结算确认
     *
     * @param his_serial his挂号号
     * @param icCardNo 卡号
     * @param org_code 医院编码
     * @return
     * @throws Exception
     */
    public String confirmSettle(String his_serial,String icCardNo,String org_code)throws Exception{
        String api = "confirmSettle";
        String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " +
                "<root> " +
                "   <serverName>"+api+"</serverName>  " +
                "   <format>xml</format>" +
                "   <callOperator></callOperator> " +
                "   <certificate>"+key+"</certificate> " +
                "</root>";
        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByOutpatient(his_serial);
        String condition ="";
        if (ylzMedicalRelationDO!=null){
            if (!StringUtils.isEmpty(ylzMedicalRelationDO.getLogNo())){
                condition += "<log_no>"+ylzMedicalRelationDO.getLogNo()+"</log_noc>";
            }
            if (!StringUtils.isEmpty(icCardNo)){
                condition += "<icCardNo>"+icCardNo+"</icCardNo>";
            }
            if (!StringUtils.isEmpty(org_code)){
                condition += "<org_code>"+org_code+"</org_code>";
            }
            if (!StringUtils.isEmpty("")){
                condition += "<acc_class>"+"</acc_class>";
            }
            if (!StringUtils.isEmpty(ylzMedicalRelationDO.getInsuranceSerial())){
                condition += "<insurance_serial>"+ylzMedicalRelationDO.getInsuranceSerial()+"</insurance_serial>";
            }
            if (!StringUtils.isEmpty(ylzMedicalRelationDO.getBillSerial())){
                condition += "<bill_serial>"+ylzMedicalRelationDO.getBillSerial()+"</bill_serial>";
            }
            if (!StringUtils.isEmpty(ylzMedicalRelationDO.getTotalAmount())){
                condition += "<total_amount>"+ylzMedicalRelationDO.getTotalAmount()+"</total_amount>";
            }
            if (!StringUtils.isEmpty(ylzMedicalRelationDO.getPersonCash())){
                condition += "<person_cash>"+ylzMedicalRelationDO.getPersonCash()+"</person_cash>";
            }
            if (!StringUtils.isEmpty(ylzMedicalRelationDO.getPersonAccount())){
                condition += "<person_account>"+ylzMedicalRelationDO.getPersonAccount()+"</person_account>";
            }
            if (!StringUtils.isEmpty(ylzMedicalRelationDO.getFundPrice())){
                condition += "<fund_amount>"+ylzMedicalRelationDO.getFundPrice()+"</fund_amount>";
            }
            if (!StringUtils.isEmpty(ylzMedicalRelationDO.getJkzhPay())){
                condition += "<jkzh_pay>"+ylzMedicalRelationDO.getJkzhPay()+"</jkzh_pay>";
            }
            if (!StringUtils.isEmpty(ylzMedicalRelationDO.getOwnPay())){
                condition += "<own_pay>"+ylzMedicalRelationDO.getOwnPay()+"</own_pay>";
            }
            if (!StringUtils.isEmpty(ylzMedicalRelationDO.getAccountBalance())){
                condition += "<account_balance>"+ylzMedicalRelationDO.getAccountBalance()+"</account_balance>";
            }
            if (!StringUtils.isEmpty(ylzMedicalRelationDO.getHospitalizationQty())){
                condition += "<hospitalization_qty>"+ylzMedicalRelationDO.getHospitalizationQty()+"</hospitalization_qty>";
            }
            List<YlzMedicalBillDO> ylzMedicalBillDOS = ylzMedicailBillDao.findByMedicalId(ylzMedicalRelationDO.getId());
             condition += "<fplist>";
            for (YlzMedicalBillDO ylzMedicalBillDO :ylzMedicalBillDOS){
                if (!StringUtils.isEmpty(ylzMedicalBillDO.getInvoiceType())){
                    condition += "<invoice_type>"+ylzMedicalBillDO.getInvoiceType()+"</invoice_type>";
                }
                if (!StringUtils.isEmpty(ylzMedicalBillDO.getInvoiceTypeName())){
                    condition += "<invoice_type_name>"+ylzMedicalBillDO.getInvoiceType()+"</invoice_type_name>";
                }
                if (!StringUtils.isEmpty(ylzMedicalBillDO.getProjectPay())){
                    condition += "<project_pay>"+ylzMedicalBillDO.getProjectPay()+"</project_pay>";
                }
                if (!StringUtils.isEmpty(ylzMedicalBillDO.getInvoicePay())){
                    condition += "<invoice_pay>"+ylzMedicalBillDO.getInvoicePay()+"</invoice_pay>";
                }
                if (!StringUtils.isEmpty(ylzMedicalBillDO.getOwnPay())){
                    condition += "<own_pay>"+ylzMedicalBillDO.getOwnPay()+"</own_pay>";
                }
                if (!StringUtils.isEmpty(ylzMedicalBillDO.getSpecialPay())){
                    condition += "<special_pay>"+ylzMedicalBillDO.getSpecialPay()+"</special_pay>";
                }
                if (!StringUtils.isEmpty(ylzMedicalBillDO.getUninsurancePay())){
                    condition += "<uninsurance_pay>"+ylzMedicalBillDO.getUninsurancePay()+"</uninsurance_pay>";
                }
            }
            condition += "</fplist>";
        }
        String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                "<root>"+condition+"</root>";
        Map<String,String> params = new HashedMap();
        params.put("msgHeader",msgHeader);
        params.put("msgBody",msgBody);
        logger.info("confirmSettle params:"+params.toString());
        String xml = getXzzxWebServiceInfo("CallInterface",params,getSelectUrl());
        logger.info("confirmSettle json:"+xml);
        XMLSerializer xmlSerializer = new XMLSerializer();
        String json = xmlSerializer.read(xml).toString();
        return json;
    }
    /**
     * 2.1.4电子票开票结果确认
     *
     * @param sick_id 病人ID
     * @param settle_no HIS结算号
     * @param einvoice_code 电子票据代码
     * @param einvoice_number 电子票据号码
     * @param einvoice_check_coder 电子票据校验码
     * @return
     * @throws Exception
     */
    public String eleInvoiceConfirm(String sick_id,String settle_no,String einvoice_code,String einvoice_number,String einvoice_check_coder)throws Exception{
        String api = "eleInvoiceConfirm";
        String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " +
                "<root> " +
                "   <serverName>"+api+"</serverName>  " +
                "   <format>xml</format>" +
                "   <callOperator></callOperator> " +
                "   <certificate>"+key+"</certificate> " +
                "</root>";
        String condition ="";
        if (!StringUtils.isEmpty(sick_id)){
            condition += "<sick_id>"+sick_id+"</sick_id>";
        }
        if (!StringUtils.isEmpty(settle_no)){
            condition += "<settle_no>"+settle_no+"</settle_no>";
        }
        if (!StringUtils.isEmpty(einvoice_code)){
            condition += "<einvoice_code>"+einvoice_code+"</einvoice_code>";
        }
        if (!StringUtils.isEmpty(einvoice_number)){
            condition += "<einvoice_number>"+einvoice_number+"</einvoice_number>";
        }
        String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                "<root>"+condition+"</root>";
        Map<String,String> params = new HashedMap();
        params.put("msgHeader",msgHeader);
        params.put("msgBody",msgBody);
        logger.info("confirmSettle params:"+params.toString());
        String xml = getXzzxWebServiceInfo("CallInterface",params,getSelectUrl());
        logger.info("confirmSettle json:"+xml);
        XMLSerializer xmlSerializer = new XMLSerializer();
        String json = xmlSerializer.read(xml).toString();
        return json;
    }
//=====================微信模板消息推送接口================================
//=====================hospital应用调用entrance应用============start=================
    /**
     * 2.1.1获取患者结算信息
     * @param icCardNo 社会保障卡号
     * @param his_serial HIS挂号号
     * @param org_code 医院编码
     * @return
     */
    public JSONObject getSettleInfHospital(String icCardNo,String his_serial,String org_code){
        JSONObject jsonObject= new JSONObject();
        String response="";
        String url = entranceUrl+"getSettleInfo?icCardNo="+icCardNo+"&his_serial="+his_serial+"&org_code="+org_code;
        response = httpClientUtil.get(url,"GBK");
        logger.info("response:"+response);
        JSONObject object = JSONObject.parseObject(response);
        if (object.getInteger("status")==200){
            jsonObject = JSONObject.parseObject(object.getString("obj"));
        }
        return jsonObject;
    }
    /**
     * 2结算确认
     * @param icCardNo 社会保障卡号
     * @param his_serial HIS挂号号
     * @param org_code 医院编码
     * @return
     */
    public JSONObject confirmSettleHospital(String icCardNo,String his_serial,String org_code){
        JSONObject jsonObject= new JSONObject();
        String response="";
        String url = entranceUrl+"confirmSettle?icCardNo="+icCardNo+"&his_serial="+his_serial+"&org_code="+org_code;
        response = httpClientUtil.get(url,"GBK");
        logger.info("response:"+response);
        JSONObject object = JSONObject.parseObject(response);
        if (object.getInteger("status")==200){
            jsonObject = JSONObject.parseObject(object.getString("obj"));
        }
        return jsonObject;
    }
    /**
     * 2.1.4电子票开票结果确认
     *
     * @param sick_id 病人ID
     * @param settle_no HIS结算号
     * @param einvoice_code 电子票据代码
     * @param einvoice_number 电子票据号码
     * @param einvoice_check_coder 电子票据校验码
     * @return
     */
    public JSONObject eleInvoiceConfirmHospital(String sick_id,String settle_no,String einvoice_code,String einvoice_number,String einvoice_check_coder){
        JSONObject jsonObject= new JSONObject();
        String response="";
        String url = entranceUrl+"eleInvoiceConfirm?sick_id="+sick_id+"&settle_no="+settle_no+"&einvoice_code="+einvoice_code+"&einvoice_number="+einvoice_number+"&einvoice_check_coder="+einvoice_check_coder;
        response = httpClientUtil.get(url,"GBK");
        logger.info("response:"+response);
        JSONObject object = JSONObject.parseObject(response);
        if (object.getInteger("status")==200){
            jsonObject = JSONObject.parseObject(object.getString("obj"));
        }
        return jsonObject;
    }
    /**
     * 查询患者就诊卡
     * @param patient 居民code

+ 3 - 3
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/healthCare/YlzMedicalIcdDO.java

@ -19,7 +19,7 @@ public class YlzMedicalIcdDO extends UuidIdentityEntity {
    private String diseaseNameIcd10;
    private String diseaseType;
    private String diseaseOrder;
    private String del;
    private Integer del;
    private Date createTime;
    public String getMedicalId() {
@ -62,11 +62,11 @@ public class YlzMedicalIcdDO extends UuidIdentityEntity {
        this.diseaseOrder = diseaseOrder;
    }
    public String getDel() {
    public Integer getDel() {
        return del;
    }
    public void setDel(String del) {
    public void setDel(Integer del) {
        this.del = del;
    }

+ 3 - 3
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/healthCare/YlzMedicalMxDO.java

@ -43,7 +43,7 @@ public class YlzMedicalMxDO extends UuidIdentityEntity {
    private String hisItemCode;
    private Date clerkDays;
    private String peopleType;
    private String del;
    private Integer del;
    private Date createTime;
    public String getMedicalId() {
@ -54,11 +54,11 @@ public class YlzMedicalMxDO extends UuidIdentityEntity {
        this.medicalId = medicalId;
    }
    public String getDel() {
    public Integer getDel() {
        return del;
    }
    public void setDel(String del) {
    public void setDel(Integer del) {
        this.del = del;
    }

+ 0 - 42
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/WlyyOutpatientDO.java

@ -291,13 +291,6 @@ public class WlyyOutpatientDO extends UuidIdentityEntity {
     * 是否同意查看就诊记录1已同意0未同意
     */
    private String isAgree;
    private String insuranceSerial;//医保流水号
    private Integer medicalStatus;//医保状态
    private String invalidSerial;//医保作废流水号
    private String billSerial;//医保收费流水号
    private String insuranceMedHistserial;//医保病史上传流水号
@ -332,41 +325,6 @@ public class WlyyOutpatientDO extends UuidIdentityEntity {
        this.insuranceMedHistserial = insuranceMedHistserial;
    }
    @Column(name = "bill_serial")
    public String getBillSerial() {
        return billSerial;
    }
    public void setBillSerial(String billSerial) {
        this.billSerial = billSerial;
    }
    @Column(name = "invalid_serial")
    public String getInvalidSerial() {
        return invalidSerial;
    }
    public void setInvalidSerial(String invalidSerial) {
        this.invalidSerial = invalidSerial;
    }
    @Column(name = "medical_status")
    public Integer getMedicalStatus() {
        return medicalStatus;
    }
    public void setMedicalStatus(Integer medicalStatus) {
        this.medicalStatus = medicalStatus;
    }
    @Column(name = "insurance_serial")
    public String getInsuranceSerial() {
        return insuranceSerial;
    }
    public void setInsuranceSerial(String insuranceSerial) {
        this.insuranceSerial = insuranceSerial;
    }
    @Column(name = "is_agree")
    public String getIsAgree() {

+ 0 - 21
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/WlyyPrescriptionDO.java

@ -279,27 +279,6 @@ public class WlyyPrescriptionDO extends UuidIdentityEntity {
    private Date disableTime;
    private String detailSerial;//医保明细上传流水号
    private Integer medicalStatus;//医保上传1上传0未上传
    @Column(name ="medical_status")
    public Integer getMedicalStatus() {
        return medicalStatus;
    }
    public void setMedicalStatus(Integer medicalStatus) {
        this.medicalStatus = medicalStatus;
    }
    @Column(name ="detail_serial")
    public String getDetailSerial() {
        return detailSerial;
    }
    public void setDetailSerial(String detailSerial) {
        this.detailSerial = detailSerial;
    }
    @Column(name = "disable_time")
    public Date getDisableTime() {

+ 61 - 0
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/XzzxCotroller.java

@ -690,4 +690,65 @@ public class XzzxCotroller extends EnvelopRestEndpoint {
        return ObjEnvelop.getSuccess("ok",xzzxEntranceService.BrowseSingleEMR(bstrEmrID));
    }
    /**
     * 1获取患者结算信息
     * @return
     * @throws Exception
     */
    @GetMapping(value = "/getSettleInfo")
    @ApiOperation(value = "2.1.1获取患者结算信息", notes = "2.1.1获取患者结算信息")
    public ObjEnvelop getSettleInfo(@ApiParam(name = "icCardNo", value = "社会保障卡号", required = false)
                                         @RequestParam(value = "icCardNo",required = false)String icCardNo,
                                    @ApiParam(name = "his_serial", value = "HIS挂号号", required = false)
                                        @RequestParam(value = "his_serial",required = false) String his_serial,
                                    @ApiParam(name = "org_code", value = "医院编码", required = false)
                                        @RequestParam(value = "org_code",required = false) String org_code)throws Exception{
        return ObjEnvelop.getSuccess("ok",xzzxEntranceService.getSettleInfo(icCardNo,his_serial,org_code));
    }
    /**
     * 2结算确认
     * @return
     * @throws Exception
     */
    @GetMapping(value = "/confirmSettle")
    @ApiOperation(value = "2.1.2结算确认", notes = "2.1.2结算确认")
    public ObjEnvelop confirmSettle(@ApiParam(name = "icCardNo", value = "社会保障卡号", required = false)
                                    @RequestParam(value = "icCardNo",required = false)String icCardNo,
                                    @ApiParam(name = "his_serial", value = "HIS挂号号", required = false)
                                    @RequestParam(value = "his_serial",required = false) String his_serial,
                                    @ApiParam(name = "org_code", value = "医院编码", required = false)
                                    @RequestParam(value = "org_code",required = false) String org_code)throws Exception{
        return ObjEnvelop.getSuccess("ok",xzzxEntranceService.confirmSettle(his_serial,icCardNo,org_code));
    }
    /**
     * 2.1.4电子票开票结果确认
     *
     * @param sick_id 病人ID
     * @param settle_no HIS结算号
     * @param einvoice_code 电子票据代码
     * @param einvoice_number 电子票据号码
     * @param einvoice_check_coder 电子票据校验码
     * @return
     * @throws Exception
     */
    @GetMapping(value = "/eleInvoiceConfirm")
    @ApiOperation(value = "2.1.4电子票开票结果确认", notes = "2.1.4电子票开票结果确认")
    public ObjEnvelop eleInvoiceConfirm(@ApiParam(name = "sick_id", value = "病人ID", required = false)
                                    @RequestParam(value = "sick_id",required = false)String sick_id,
                                    @ApiParam(name = "settle_no", value = "HIS结算号", required = false)
                                    @RequestParam(value = "settle_no",required = false) String settle_no,
                                    @ApiParam(name = "einvoice_code", value = "电子票据代码", required = false)
                                    @RequestParam(value = "einvoice_code",required = false) String einvoice_code,
                                    @ApiParam(name = "einvoice_number", value = "电子票据号码", required = false)
                                        @RequestParam(value = "einvoice_number",required = false) String einvoice_number,
                                    @ApiParam(name = "einvoice_check_coder", value = "电子票据校验码", required = false)
                                        @RequestParam(value = "einvoice_check_coder",required = false) String einvoice_check_coder)throws Exception{
        return ObjEnvelop.getSuccess("ok",xzzxEntranceService.eleInvoiceConfirm(sick_id,settle_no,einvoice_code,einvoice_number,einvoice_check_coder));
    }
}

+ 13 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -3318,4 +3318,17 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            return failedObjEnvelopException(e);
        }
    }*/
    @PostMapping("/getSettlementInfo")
    @ApiOperation(value = "获取患者待结算信息页面", notes = "获取患者待结算信息页面")
    public Envelop getSettlementInfo(
            @ApiParam(name = "outpatientId", value = "outpatientId")
            @RequestParam(value = "outpatientId", required = false)String outpatientId)throws Exception {
        try {
            return success("操作成功",prescriptionService.getSettlementInfo(outpatientId));
        }catch (Exception e){
            return Envelop.getError(e.getMessage());
        }
    }
}