Browse Source

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

# Conflicts:
#	common/common-entity/src/main/java/com/yihu/jw/entity/IntegerIdentityEntity.java
wangzhinan 2 years ago
parent
commit
cd9fa58083

+ 8 - 7
business/base-service/src/main/java/com/yihu/jw/healthCare/service/HealthCareService.java

@ -105,27 +105,27 @@ public class HealthCareService {
    public void initConfig() throws Exception{
        logger.info("初始话参数!");
        List<WlyyHospitalSysDictDO> hospitalSysDictDOS = hospitalSysDictDao.findByDictName("ylzConfigTest");
        List<WlyyHospitalSysDictDO> hospitalSysDictDOS = hospitalSysDictDao.findByDictName("ylzConfig");
        if (hospitalSysDictDOS==null||hospitalSysDictDOS.size()==0){
            throw new Exception("尚未添加配置参数");
        }else {
            for (WlyyHospitalSysDictDO hospitalSysDictDO:hospitalSysDictDOS){
                if (hospitalSysDictDO.getId().equalsIgnoreCase("ylzConfigUrlTest")){
                if (hospitalSysDictDO.getId().equalsIgnoreCase("ylzConfigUrl")){
                    ylzConfigUrl = hospitalSysDictDO.getDictValue();
                }
                if (hospitalSysDictDO.getId().equalsIgnoreCase("ylzConfigAppidTest")){
                if (hospitalSysDictDO.getId().equalsIgnoreCase("ylzConfigAppid")){
                    ylzConfigAppid = hospitalSysDictDO.getDictValue();
                }
                if (hospitalSysDictDO.getId().equalsIgnoreCase("ylzConfigAppSecretTest")){
                if (hospitalSysDictDO.getId().equalsIgnoreCase("ylzConfigAppSecret")){
                    ylzConfigAppSecret = hospitalSysDictDO.getDictValue();
                }
                if (hospitalSysDictDO.getId().equalsIgnoreCase("ylzConfigEncryptKeyTest")){
                if (hospitalSysDictDO.getId().equalsIgnoreCase("ylzConfigEncryptKey")){
                    ylzConfigEncryptKey = hospitalSysDictDO.getDictValue();
                }
                if (hospitalSysDictDO.getId().equalsIgnoreCase("ylzConfigSignKeyTest")){
                if (hospitalSysDictDO.getId().equalsIgnoreCase("ylzConfigSignKey")){
                    ylzConfigSignKey = hospitalSysDictDO.getDictValue();
                }
                if (hospitalSysDictDO.getId().equalsIgnoreCase("ylzConfigOrgCodeTest")){
                if (hospitalSysDictDO.getId().equalsIgnoreCase("ylzConfigOrgCode")){
                    ylzConfigOrgCode = hospitalSysDictDO.getDictValue();
                }
            }
@ -1497,6 +1497,7 @@ public class HealthCareService {
        data.put("doctor_level",ylzMedicalRelationDO.getDoctorLevel());//医师诊查费等级
        data.put("trt_fee_level",ylzMedicalRelationDO.getDoctorLevel());//医师诊查费等级
        data.put("dept_code",ylzMedicalRelationDO.getDeptCode());//科室编码
        data.put("disease_code",ylzMedicalRelationDO.getDiseaseCode());//病种编码
        data.put("charge_qty",1);//本次收费次数
        JSONArray array = new JSONArray();
        JSONObject object = new JSONObject();

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

@ -16,6 +16,9 @@ public interface PrescriptionDiagnosisDao extends PagingAndSortingRepository<Wly
    @Query("select a from WlyyPrescriptionDiagnosisDO a where a.prescriptionId = ?1 and a.del=?2 ")
    List<WlyyPrescriptionDiagnosisDO> findByPrescriptionId(String prescriptionId,Integer del);
    @Query("select a from WlyyPrescriptionDiagnosisDO a where a.prescriptionId = ?1 and a.del=1 and a.type = ?2 ")
    List<WlyyPrescriptionDiagnosisDO> findByPrescriptionIdAndType(String prescriptionId,Integer type);
    @Modifying
    @Query("update WlyyPrescriptionDiagnosisDO p set p.del=0 where p.id=?1")
    void deleteById(String id);

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

@ -622,6 +622,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                " o.consumer as \"consumer\"," +
                " o.consumer_name as \"consumerName\"," +
                " o.consumer_mobile as \"consumerMobile\", "+
                " o.disease_code as \"diseaseCode\", "+
                " o.disease_name as \"diseaseName\", "+
                " o.fee as \"fee\", ";
        if ("xm_ykyy_wx".equals(wechatId)) {
            if (flag){
@ -745,6 +747,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        rs.put("address", basePatientDO.getAddress());
        rs.put("mobile", basePatientDO.getMobile());
        rs.put("birthday", DateUtil.dateToStr(basePatientDO.getBirthday(), "yyyy-MM-dd"));
        rs.put("diseaseCode",outpatientDO.getDiseaseCode());
        rs.put("diseaseName",outpatientDO.getDiseaseName());
        String hisPatient="";
        PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(basePatientDO.getId());
        if(null!=patientMappingDO){
@ -2532,8 +2536,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @return
     * @throws Exception
     */
    public List<Map<String,Object>> getICD10(String pyKey) throws Exception {
        String sql = "select code,name,py_code,d_code from dict_icd10 where 1=1 ";
    public List<Map<String,Object>> getICD10(String pyKey,String flag) throws Exception {
        String sql = "select code,name,py_code,d_code from dict_icd10 where 1=1 and flag ='"+flag+"' ";
        if (StringUtils.isNoneBlank(pyKey)){
            sql += " and (py_code like '%"+pyKey+"%' or name like '%"+pyKey+"%') ";
        }
@ -2695,7 +2699,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @param diagnosisJson
     * @return
     */
    public Map<String, Object> makeDiagnosis(String outPatientId,String prescriptionId, String advice, String type, String infoJsons, String diagnosisJson, String inspectionJson, String emrJson,String hisId) throws Exception {
    public Map<String, Object> makeDiagnosis(String outPatientId,String prescriptionId, String advice, String type, String infoJsons, String diagnosisJson, String inspectionJson, String emrJson,String hisId,String diseaseCode,String diseaseName) throws Exception {
        Map<String, Object> result = new HashedMap();
@ -2703,6 +2707,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        WlyyOutpatientDO outpatientDO = outpatientDao.findOne(outPatientId);
        //设置医嘱
        outpatientDO.setAdvice(advice);
        //设置特殊病种
        outpatientDO.setDiseaseCode(diseaseCode);
        outpatientDO.setDiseaseName(diseaseName);
        //========================处方操作=============================================================
        //创建处方记录
@ -3625,6 +3632,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                " p.real_order AS \"realOrder\" ,"+
                " p.origin_real_order AS \"originRealOrder\"," +
                " o.patient_name as \"patientName\", "+
                " o.doctor_name as \"doctorName\", "+
                " p.check_status as \"checkStatus\", "+
                " p.check_reason as \"checkReason\"  "+
                " FROM " +
@ -7093,7 +7101,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("isSort");//isSort:1按照后台顺序,0按照系统排序
        if (hospitalSysDictDO!=null&&hospitalSysDictDO.getDictValue().equalsIgnoreCase("1")){
            sql +=" and d.del='1' order by d.sort asc  ";
            sql +=" and d.del='1' order by d.sort,d.id asc  ";
        }else {
            if("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
                if (flag){
@ -14611,6 +14619,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            wlyyHisSettleVO.setOutChargeNo(outChargeNo);
            wlyyHisSettleVO.setOrgCode("6");
            wlyyHisSettleVO.setXyzf00("0");
            wlyyHisSettleVO.setBqbm00(ylzMedicalRelationDO.getDiseaseCode());
            wlyyHisSettleVO.setChannelType("09");
            wlyyHisSettleVO.setDjlsh0(ylzMedicalRelationDO.getBillSerial());
            wlyyHisSettleVO.setMzlsh0(ylzMedicalRelationDO.getInsuranceSerial());

+ 12 - 5
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/EntranceService.java

@ -36,10 +36,7 @@ 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;
import com.yihu.jw.hospital.prescription.dao.DoctorZsInfoDao;
import com.yihu.jw.hospital.prescription.dao.OutpatientDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionEmrDao;
import com.yihu.jw.hospital.prescription.dao.*;
import com.yihu.jw.hospital.prescription.service.entrance.util.ConvertUtil;
import com.yihu.jw.hospital.prescription.service.entrance.util.MqSdkUtil;
import com.yihu.jw.hospital.prescription.service.entrance.util.WebserviceUtil;
@ -189,7 +186,8 @@ public class EntranceService {
    private BusinessOrderDao businessOrderDao;
    @Autowired
    private BasePatientMedicareCardDao basePatientMedicareCardDao;
    @Autowired
    private PrescriptionDiagnosisDao diagnosisDao;
    @Autowired
    private YlzMedicailRelationDao ylzMedicailRelationDao;
    @Autowired
@ -3058,6 +3056,11 @@ public class EntranceService {
            if (StringUtils.isNotEmpty(hisSettleVO.getInsutype())) {
                sbs.append("<insutype>"+hisSettleVO.getInsutype()+"</insutype>");
            }
            if (StringUtils.isNotEmpty(hisSettleVO.getBqbm00())){
                sbs.append("<bqbm00>"+hisSettleVO.getBqbm00()+"</bqbm00>");
            }
            sbs.append("<isMedicalNewInterface>1</isMedicalNewInterface>");
            sbs.append("</root>]]></Msg>");
@ -3161,6 +3164,8 @@ public class EntranceService {
                    net.sf.json.JSONObject resultJSON = msgInfoJson.getJSONObject("receipt");
                    if (resultJSON!=null){
                        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByLog_no(resultJSON.getString("xtgzh0"));
                        List<WlyyPrescriptionDO> prescriptionDOS = prescriptionDao.findByRealOrderAndStatusList(resultJSON.getString("xtgzh0"));
                        String diseaseCode = outpatientDO.getDiseaseCode();
                        List<YlzMedicalIcdDO> icdDOList = new ArrayList<>();
                        List<YlzMedicalMxDO> mxDOList = new ArrayList<>();
                        if (ylzMedicalRelationDO==null){
@ -3190,6 +3195,7 @@ public class EntranceService {
                            ylzMedicalRelationDO.setPersonAccount("0");
                            ylzMedicalRelationDO.setDataSource("53");
                            ylzMedicalRelationDO.setBalance(cardFee+"");
                            ylzMedicalRelationDO.setDiseaseCode(diseaseCode);
                            ylzMedicalRelationDO.setPreCount(resultJSON.getString("cfxms0"));
                            BaseDoctorDO baseDoctorDO = baseDoctorDao.findById(outpatientDO.getDoctor());
                            if (baseDoctorDO!=null){
@ -3324,6 +3330,7 @@ public class EntranceService {
                        }else {
                            ylzMedicalRelationDO.setOrgCode("3502000303");
                            ylzMedicalRelationDO.setRegionCode("350200");
                            ylzMedicalRelationDO.setDiseaseCode(diseaseCode);
                            ylzMedicalRelationDO.setIdcard(outpatientDO.getIdcard());
                            ylzMedicalRelationDO.setName(resultJSON.getString("xming0"));
                            ylzMedicalRelationDO.setCertType("01");

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

@ -300,6 +300,27 @@ public class WlyyOutpatientDO extends UuidIdentityEntity {
    private String medicalState;//医保状态(1医保0不用医保)
    private String diseaseCode;//特殊病种编码
    private String diseaseName;//特殊病种名称
    @Column(name = "disease_code")
    public String getDiseaseCode() {
        return diseaseCode;
    }
    public void setDiseaseCode(String diseaseCode) {
        this.diseaseCode = diseaseCode;
    }
    @Column(name = "disease_name")
    public String getDiseaseName() {
        return diseaseName;
    }
    public void setDiseaseName(String diseaseName) {
        this.diseaseName = diseaseName;
    }
    @Column(name = "medical_state")
    public String getMedicalState() {
        return medicalState;

+ 14 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/hospital/prescription/WlyyHisSettleVO.java

@ -238,6 +238,20 @@ public class WlyyHisSettleVO extends UuidIdentityVOWithOperator {
    @ApiModelProperty(value = "医保结算时间",example = "医保结算时间")
    private String setlTime;
    /**
     * 特殊病种
     */
    @ApiModelProperty(value = "特殊病种",example = "特殊病种")
    private String bqbm00;
    public String getBqbm00() {
        return bqbm00;
    }
    public void setBqbm00(String bqbm00) {
        this.bqbm00 = bqbm00;
    }
    public String getSetlTime() {
        return setlTime;
    }

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

@ -626,9 +626,11 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.getICD10)
    @ApiOperation(value = "获取ICD10诊断编码", notes = "获取ICD10诊断编码")
    public ListEnvelop getICD10(@ApiParam(name = "pyKey", value = "拼音关键字")
                                @RequestParam(value = "pyKey", required = false) String pyKey) throws Exception {
                                @RequestParam(value = "pyKey", required = false) String pyKey,
                                @ApiParam(name = "flag", value = "1是普通诊断2特殊病种")
                                @RequestParam(value = "flag", required = false) String flag) throws Exception {
        if (wxId.equalsIgnoreCase("xm_zsyy_wx")) {
            return success(prescriptionService.getICD10(pyKey));
            return success(prescriptionService.getICD10(pyKey,flag));
        } else if (wxId.equalsIgnoreCase("xm_xzzx_wx")) {
            return success(xzzxEntranceService.selectIcd10Dict(pyKey));
        } else if (wxId.equalsIgnoreCase("sd_tnzyy_wx")) {
@ -729,6 +731,10 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                    @RequestParam(value = "outPatientId", required = true) String outPatientId,
                                    @ApiParam(name = "advice", value = "医嘱")
                                    @RequestParam(value = "advice", required = false) String advice,
                                    @ApiParam(name = "diseaseCode", value = "特殊病种")
                                        @RequestParam(value = "diseaseCode", required = false) String diseaseCode,
                                    @ApiParam(name = "diseaseName", value = "特殊病种名称")
                                        @RequestParam(value = "diseaseName", required = false) String diseaseName,
                                    @ApiParam(name = "type", value = "1需要提交his,2不提交只下诊断")
                                    @RequestParam(value = "type", required = true) String type,
                                    @ApiParam(name = "infoJsons", value = "药品json")
@ -745,7 +751,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                    @RequestParam(value = "hisId", required = false) String hisId,
                                    @ApiParam(name = "orderId", value = "上门服务订单号")
                                    @RequestParam(value = "orderId", required = false) String orderId) throws Exception {
        Map<String, Object> result = prescriptionService.makeDiagnosis(outPatientId, prescriptionId, advice, type, infoJsons, diagnosisJson, inspectionJson, emrJson, hisId);
        Map<String, Object> result = prescriptionService.makeDiagnosis(outPatientId, prescriptionId, advice, type, infoJsons, diagnosisJson, inspectionJson, emrJson, hisId,diseaseCode,diseaseName);
        try {
            com.alibaba.fastjson.JSONObject msgObj = new com.alibaba.fastjson.JSONObject();