|
@ -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("该排班信息错误或者不存在!");
|
|
}
|
|
}
|