Browse Source

Merge branch 'dev' of wangzhinan/patient-co-management into dev

trick9191 7 years ago
parent
commit
18312f029b

+ 8 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/message/MessageService.java

@ -134,7 +134,7 @@ public class MessageService extends BaseService {
        // 体征指标未读消息总数
        // 体征指标未读消息总数
        Integer healthIndex = messageDao.amountUnreadHealthByReceiver(doctor);
        Integer healthIndex = messageDao.amountUnreadHealthByReceiver(doctor);
        JSONObject indexJson = new JSONObject();
        JSONObject indexJson = new JSONObject();
        indexJson.put("amount", healthIndex);
        indexJson.put("l", healthIndex);
        if (healthIndex > 0) {
        if (healthIndex > 0) {
            PageRequest pageRequest = new PageRequest(0, 1);
            PageRequest pageRequest = new PageRequest(0, 1);
            List<Message> msgs = messageDao.amountUnreadHealthLastByReceiver(doctor, pageRequest);
            List<Message> msgs = messageDao.amountUnreadHealthLastByReceiver(doctor, pageRequest);
@ -848,8 +848,14 @@ public class MessageService extends BaseService {
            familyJson.put("familyList",familyObject);
            familyJson.put("familyList",familyObject);
        }
        }
        JSONObject jsonObject = new JSONObject();
        JSONObject object = new JSONObject();
        object.put("count",familyList.size()+specialist.size());
        object.put("unTreatedCount",familyList.size()+specialist.size());
        object.put("messageCount",0);
        object.put("dialogueCount",0);
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("MsgCount",object);
        jsonObject.put("specialist",specialistJson);
        jsonObject.put("specialist",specialistJson);
        jsonObject.put("familyList",familyJson);
        jsonObject.put("familyList",familyJson);
        return jsonObject;
        return jsonObject;

+ 12 - 11
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/guahao/GuahaoXMService.java

@ -92,8 +92,8 @@ public class GuahaoXMService extends BaseService implements IGuahaoService {
     * 解析挂号后
     * 解析挂号后
     */
     */
    private String CreateOrderAfter(String response, String hospitalId, String hospitalName, String hosDeptId, String hosDeptName, String doctorId, String doctorName, String sectionType, String startTime, String endTime, String patient, String patientName, String cardNo, String clinicCard, String patientPhone, String dname, String dcode,String surveyCode) throws Exception {
    private String CreateOrderAfter(String response, String hospitalId, String hospitalName, String hosDeptId, String hosDeptName, String doctorId, String doctorName, String sectionType, String startTime, String endTime, String patient, String patientName, String cardNo, String clinicCard, String patientPhone, String dname, String dcode,String surveyCode) throws Exception {
        String code = "321321321";
       /* if (response.startsWith("error") || response.startsWith("System-Error")) {
        String code = "";
        if (response.startsWith("error") || response.startsWith("System-Error")) {
            throw new Exception(response);
            throw new Exception(response);
        } else if (response.toLowerCase().startsWith("ok")) {      //预约成功
        } else if (response.toLowerCase().startsWith("ok")) {      //预约成功
            // 预约成功,获取预约号
            // 预约成功,获取预约号
@ -102,7 +102,7 @@ public class GuahaoXMService extends BaseService implements IGuahaoService {
            code = response.split("\\|")[0];
            code = response.split("\\|")[0];
        } else {
        } else {
            throw new Exception(response);
            throw new Exception(response);
        }*/
        }
        Patient patient1 = null;
        Patient patient1 = null;
        try {
        try {
@ -113,12 +113,12 @@ public class GuahaoXMService extends BaseService implements IGuahaoService {
        }
        }
        // 查询医生职称和头像
        // 查询医生职称和头像
        GuahaoDoctor doctor = null;
        GuahaoDoctor doctor = null;
        /*try{
        try{
            doctor = jwSmjkService.getGuahaoDoctor(doctorId, hospitalId, hosDeptId);
            doctor = jwSmjkService.getGuahaoDoctor(doctorId, hospitalId, hosDeptId);
        }catch (Exception e){
        }catch (Exception e){
            e.printStackTrace();
            e.printStackTrace();
            System.out.println("获取医生信息失败");
            System.out.println("获取医生信息失败");
        }*/
        }
        // 保存预约记录
        // 保存预约记录
        PatientReservation reservation = new PatientReservation();
        PatientReservation reservation = new PatientReservation();
        reservation.setCode(code);
        reservation.setCode(code);
@ -130,10 +130,10 @@ public class GuahaoXMService extends BaseService implements IGuahaoService {
        reservation.setDeptName(hosDeptName);
        reservation.setDeptName(hosDeptName);
        reservation.setDoctorCode(doctorId);
        reservation.setDoctorCode(doctorId);
        reservation.setDoctorName(doctorName);
        reservation.setDoctorName(doctorName);
        /*if(doctor!=null){
        if(doctor!=null){
            reservation.setDoctorJob(doctor.getTitle());
            reservation.setDoctorJob(doctor.getTitle());
            reservation.setDoctorPhoto(doctor.getPhoto());
            reservation.setDoctorPhoto(doctor.getPhoto());
        }*/
        }
        reservation.setIdcard(cardNo);
        reservation.setIdcard(cardNo);
        reservation.setName(patientName);
        reservation.setName(patientName);
        reservation.setPatient(patient);
        reservation.setPatient(patient);
@ -193,8 +193,9 @@ public class GuahaoXMService extends BaseService implements IGuahaoService {
            message.setDel("1");
            message.setDel("1");
            message.setState(1);
            message.setState(1);
            JSONObject object = new JSONObject();
            JSONObject object = new JSONObject();
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            object.put("name",patient1.getName());
            object.put("name",patient1.getName());
            object.put("carq",patientReservation.getCzrq());
            object.put("carq",sdf.format(patientReservation.getCzrq()));
            object.put("title",surveyScreenResult.getTemplateTitle());
            object.put("title",surveyScreenResult.getTemplateTitle());
            object.put("screenResult",surveyScreenResult.getScreenResult());
            object.put("screenResult",surveyScreenResult.getScreenResult());
            message.setReason(object.toString());
            message.setReason(object.toString());
@ -1241,9 +1242,9 @@ public class GuahaoXMService extends BaseService implements IGuahaoService {
            String startTime = map.get("startTime");
            String startTime = map.get("startTime");
            String endTime = map.get("endTime");
            String endTime = map.get("endTime");
           /* String response = jwSmjkService.webRegisterByFamily(cardNo, patientName, clinicCard, sectionType, startTime, hospitalId, hosDeptId, hosDeptName, doctorId, doctorName,patientPhone);
*/
            re = CreateOrderAfter(null, hospitalId, hospitalName, hosDeptId, hosDeptName, doctorId, doctorName, sectionType, startTime, endTime, patient, patientName, cardNo, clinicCard, patientPhone, dname, dcode,surveyCode);
            String response = jwSmjkService.webRegisterByFamily(cardNo, patientName, clinicCard, sectionType, startTime, hospitalId, hosDeptId, hosDeptName, doctorId, doctorName,patientPhone);
/* String response = "e07cfa6a-e134-4329-bb99-9b7dbffea79e|516|熊永强";*/
            re = CreateOrderAfter(response, hospitalId, hospitalName, hosDeptId, hosDeptName, doctorId, doctorName, sectionType, startTime, endTime, patient, patientName, cardNo, clinicCard, patientPhone, dname, dcode,surveyCode);
        } else {
        } else {
            throw new Exception("该排班信息错误或者不存在!");
            throw new Exception("该排班信息错误或者不存在!");
        }
        }