Преглед изворни кода

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

# Conflicts:
#	svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/PatientConsultEndpoint.java
wangzhinan пре 4 година
родитељ
комит
901c66897f

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

@ -2132,16 +2132,19 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                outpatientDao.save(outpatientDO);
                //先下单
                businessOrderService.savePrescriptionOrder(prescription.getId());
                //同步his
                ykyyEntranceService.findByRealOrder(prescription.getId(),demoFlag);
                List<WlyyPrescriptionDO> prescriptionDOList = prescriptionDao.findById(prescription.getId());
                if (prescriptionDOList != null && prescriptionDOList.size() != 0) {
                    WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDOList.get(0);
                    BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(outpatientDO.getId());
                    logger.info("cfsb", wlyyPrescriptionDO.getRealOrder());
                    ykyyService.updateDrugorderInfo(businessOrderDO.getOrderNo(), wlyyPrescriptionDO.getOrderId(), wlyyPrescriptionDO.getRealOrder());
                if(!demoFlag){
                    //同步his
                    ykyyEntranceService.findByRealOrder(prescription.getId(),demoFlag);
                    List<WlyyPrescriptionDO> prescriptionDOList = prescriptionDao.findById(prescription.getId());
                    if (prescriptionDOList != null && prescriptionDOList.size() != 0) {
                        WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDOList.get(0);
                        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(outpatientDO.getId());
                        logger.info("cfsb", wlyyPrescriptionDO.getRealOrder());
                        ykyyService.updateDrugorderInfo(businessOrderDO.getOrderNo(), wlyyPrescriptionDO.getOrderId(), wlyyPrescriptionDO.getRealOrder());
                    }
                }
                result.put("code", 1);
                result.put("mes", "诊断完成");
                return result;

+ 51 - 6
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/YkyyPrescriptionService.java

@ -308,7 +308,34 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
     PRIMARY KEY (`id`),
     */
    public JSONArray getDrugDictionary(String chargeCode, String pyKey, String winNo, String groupNo) throws Exception {
        JSONArray mapList = ykyyEntranceService.findYkYpxx(chargeCode, null, null, pyKey);
        JSONArray mapList = new JSONArray();
        if (demoFlag){
            JSONObject jsonObject = new JSONObject();
            jsonObject.put("ypcd","400");
            jsonObject.put("ypjl",0.5);
            jsonObject.put("yfzf",0);
            jsonObject.put("kcsl",0);
            jsonObject.put("jldw","mg");
            jsonObject.put("lsjg",0.1);
            jsonObject.put("ypdm","0601");
            jsonObject.put("zfpb",0);
            jsonObject.put("yfgg","1ml:0.5mg");
            jsonObject.put("ypmc","维生素B12注射液");
            jsonObject.put("yfsx",null);
            jsonObject.put("fyfs",2);
            jsonObject.put("gyffmc","注射");
            jsonObject.put("jbywbz",1);
            jsonObject.put("yfbz",1);
            jsonObject.put("ybfl",null);
            jsonObject.put("yfdw","支");
            jsonObject.put("gyff",13);
            jsonObject.put("ypmc2","维生素B12注射液");
            jsonObject.put("ydyp",0);
            jsonObject.put("py_code","WSSB12ZS");
            mapList.add(jsonObject);
        }else {
            mapList = ykyyEntranceService.findYkYpxx(chargeCode, null, null, pyKey);
        }
        JSONArray array = new JSONArray();
        for (int i=0;i<mapList.size();i++){
            JSONObject map = mapList.getJSONObject(i);
@ -345,9 +372,18 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
    /**
     * 获取药品用法
     */
    public JSONArray getDrugUse(String drugNo, String pyKey) throws Exception {
        JSONArray mapList = ykyyEntranceService.findYpyf(pyKey);
    public JSONArray getDrugUse(String drugNo, String pyKey,boolean demoFlag) throws Exception {
        JSONArray mapList = new JSONArray();
        if (demoFlag){
            JSONObject jsonObject = new JSONObject();
            jsonObject.put("xmmc","含服");
            jsonObject.put("pydm","HF");
            jsonObject.put("ypyf",64);
            mapList.add(jsonObject);
        }else {
            mapList = ykyyEntranceService.findYpyf(pyKey);
        }
        JSONArray array = new JSONArray();
        for (int i=0;i<mapList.size();i++){
            JSONObject map = mapList.getJSONObject(i);
@ -365,8 +401,17 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
     *
     * @return
     */
    public JSONArray getDrugFrequency() throws Exception {
        JSONArray mapList = ykyyEntranceService.findSypc(null);
    public JSONArray getDrugFrequency(boolean demoFlag) throws Exception {
        JSONArray mapList = new JSONArray();
        if (demoFlag){
            JSONObject jsonObject = new JSONObject();
            jsonObject.put("pcmc","qd");
            jsonObject.put("pcmc1","每日一次");
            jsonObject.put("mrcs",1);
            mapList.add(jsonObject);
        }else {
            mapList= ykyyEntranceService.findSypc(null);
        }
        JSONArray array = new JSONArray();
        for (int i=0;i<mapList.size();i++){
            JSONObject map = mapList.getJSONObject(i);

+ 3 - 1
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -299,10 +299,11 @@ public class ImService {
		
		List<Map<String, Object>> rstotal = hibenateUtils.createSQLQuery(totalSql);
		
		String consultCode = "";
		String consultCode = null;
		if (rstotal != null && rstotal.size() > 0) {
			consultCode = rstotal.get(0).get("consultCode").toString();
		}
		logger.info("未结束判断语句"+totalSql+"======consultCode"+consultCode);
		return consultCode;
	}
	
@ -879,6 +880,7 @@ public class ImService {
	public JSONObject addTeamConsult(ConsultTeamDo ct, String patient, String doctor) throws Exception {
		JSONObject re = new JSONObject();
		boolean boo = StringUtils.isEmpty(getUnfinishedConsult(patient, doctor));
		logger.info("boo"+boo);
		if (!StringUtils.isEmpty(getUnfinishedConsult(patient, doctor))) {//判断是否有未结束的咨询移到同步方法中
//			re.put("status", -3);
//			return re;

+ 2 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/YkyyPrescriptionEndpoint.java

@ -177,14 +177,14 @@ public class YkyyPrescriptionEndpoint extends EnvelopRestEndpoint {
                                  @RequestParam(value = "pyKey", required = false)String pyKey,
                                  @ApiParam(name = "drugNo", value = "药品编码")
                                  @RequestParam(value = "drugNo", required = false)String drugNo)throws Exception {
        return success(prescriptionService.getDrugUse(drugNo,pyKey));
        return success(prescriptionService.getDrugUse(drugNo,pyKey,demoFlag));
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.getDrugFrequency)
    @ApiOperation(value = "获取用药频次", notes = "获取用药频次")
    public ListEnvelop getDrugFrequency()throws Exception {
        return success(prescriptionService.getDrugFrequency());
        return success(prescriptionService.getDrugFrequency(demoFlag));
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.getInspectionDictionary)