Przeglądaj źródła

心脏审方修改

wangjun 4 lat temu
rodzic
commit
8525cb9a40

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

@ -2178,7 +2178,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) 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) throws Exception {
        Map<String, Object> result = new HashedMap();
@ -2196,6 +2196,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            wlyyPrescriptionDO1 = prescriptionDao.findById(prescriptionId);
            prescriptionDO =wlyyPrescriptionDO1.get(0);
        }else{
            if (StringUtils.isNotBlank(hisId)){
                prescriptionDO.setHisId(hisId);
            }
            prescriptionDO.setOutpatientId(outPatientId);
            prescriptionDO.setType(1);
            prescriptionDO.setDept(outpatientDO.getDept());

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

@ -3182,26 +3182,16 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
        return map;
    }
    //组装审药参数并发送到entrance
    public String checkInputInfo(String prescriptionId,String payType,String doctor,String patient,List<WlyyPrescriptionDiagnosisDO> diagnosisDOS,List<WlyyPrescriptionInfoDO> infos) throws Exception{
    public String checkInputInfo(String hisId,String payType,String doctor,String patient,List<WlyyPrescriptionDiagnosisDO> diagnosisDOS,List<WlyyPrescriptionInfoDO> infos) throws Exception{
        JSONObject jsonObject = initEntranceParam(payType,doctor,patient,diagnosisDOS);
        String tjPrescriptionId = "";
        WlyyPrescriptionCheckDO wlyyPrescriptionCheckDO;
        //如果重新审核药品 一定要把返回的orderNo的值拿到赋值到prescriptionId里
        if (StringUtils.isNotEmpty(prescriptionId)){
            tjPrescriptionId = prescriptionId;
            jsonObject.put("PATIENT_PRES_ID",tjPrescriptionId);
            wlyyPrescriptionCheckDO = prescriptionCheckDao.findOne(tjPrescriptionId);
        if (StringUtils.isNotEmpty(hisId)){
            jsonObject.put("PATIENT_PRES_ID",hisId);
        }else {
            wlyyPrescriptionCheckDO = new WlyyPrescriptionCheckDO();
            tjPrescriptionId = UUID.randomUUID().toString();
            wlyyPrescriptionCheckDO.setId(tjPrescriptionId);
            jsonObject.put("PATIENT_PRES_ID",tjPrescriptionId);
            hisId = UUID.randomUUID().toString();
            jsonObject.put("PATIENT_PRES_ID",hisId);
        }
        wlyyPrescriptionCheckDO.setCreateUser(doctor);
        wlyyPrescriptionCheckDO.setCreateUserName(null==jsonObject.get("DOCTOR_NAME")?"":jsonObject.get("DOCTOR_NAME").toString());
        wlyyPrescriptionCheckDO.setDept(null==jsonObject.get("DEPT_CODE")?"":jsonObject.get("DEPT_CODE").toString());
        wlyyPrescriptionCheckDO.setDeptName(null==jsonObject.get("DEPT_NAME")?"":jsonObject.get("DEPT_NAME").toString());
        if (null!=infos&&infos.size()>0) {
            String response = "";
            String returnJson = "";
@ -3225,10 +3215,9 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
                if (StringUtils.isNotBlank(obj)) {
                    List<Map<String,Object>> returnList = transXmlCommen(obj);
                    Map<String,Object> checkIdMap = new HashMap<>();
                    checkIdMap.put("prescriptionOnly",tjPrescriptionId);
                    checkIdMap.put("prescriptionOnly",hisId);
                    returnList.add(checkIdMap);
                    returnJson = JSONArray.toJSONString(returnList);
                    wlyyPrescriptionCheckDO.setReason(returnJson);
                    logger.info("返回到互联网医院的解析后的结果:"+returnJson);
                    wlyyHttpLogDO.setDoctor(doctor);
                    wlyyHttpLogDO.setCreateTime(new Date());
@ -3237,7 +3226,6 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
                    wlyyHttpLogDO.setName("checkPrescription");
                } else {
                    returnJson = "审方返回接口为空请检查参数是否正确";
                    wlyyPrescriptionCheckDO.setStatus(1);
                    logger.info(returnJson);
                    wlyyHttpLogDO.setCode("error");
                    wlyyHttpLogDO.setDoctor(doctor);
@ -3248,7 +3236,6 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
                }
            } else {
                returnJson = "entranceUrl接口调用失败";
                wlyyPrescriptionCheckDO.setStatus(1);
                wlyyHttpLogDO.setCode("error");
                wlyyHttpLogDO.setDoctor(doctor);
                wlyyHttpLogDO.setCreateTime(new Date());
@ -3257,9 +3244,6 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
                wlyyHttpLogDO.setName("checkPrescription");
            }
            wlyyHttpLogDao.save(wlyyHttpLogDO);
            wlyyPrescriptionCheckDO.setStatus(1);
            prescriptionCheckDao.save(wlyyPrescriptionCheckDO);
            wlyyPrescriptionCheckDO.setReason(returnJson);
            return returnJson;
        }else {
            return "药品信息为空";

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

@ -273,6 +273,19 @@ public class WlyyPrescriptionDO extends UuidIdentityEntity {
     */
    private String voucherNo;
    /**
     * 处方审方唯一标识
     */
    private String hisId;
    @Column(name = "his_id")
    public String getHisId() {
        return hisId;
    }
    public void setHisId(String hisId) {
        this.hisId = hisId;
    }
    @Column(name = "outpatient_id")
    public String getOutpatientId() {
        return outpatientId;

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

@ -463,12 +463,14 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                    @ApiParam(name = "emrJson", value = "电子病历")
                                        @RequestParam(value = "emrJson", required = false)String emrJson,
                                    @ApiParam(name = "prescriptionId", value = "处方id")
                                        @RequestParam(value = "prescriptionId", required = false)String prescriptionId)throws Exception {
        Map<String,Object> result = prescriptionService.makeDiagnosis(outPatientId,prescriptionId,advice,type,infoJsons,diagnosisJson,inspectionJson,emrJson);
                                        @RequestParam(value = "prescriptionId", required = false)String prescriptionId,
                                    @ApiParam(name = "hisId", value = "审方唯一标识")
                                        @RequestParam(value = "hisId", required = false)String hisId)throws Exception {
        Map<String,Object> result = prescriptionService.makeDiagnosis(outPatientId,prescriptionId,advice,type,infoJsons,diagnosisJson,inspectionJson,emrJson,hisId);
        try {
            
            com.alibaba.fastjson.JSONObject msgObj = new com.alibaba.fastjson.JSONObject();
            
            List<WlyyPrescriptionDiagnosisDO> diagnosisDOs = (List<WlyyPrescriptionDiagnosisDO>) com.alibaba.fastjson.JSONArray.parseArray(diagnosisJson, WlyyPrescriptionDiagnosisDO.class);
            String zd_str = "";
            String jl_str = advice;