|
@ -3,8 +3,10 @@ package com.yihu.wlyy.service.third.guahao;
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
import com.yihu.wlyy.entity.patient.PatientReservation;
|
|
import com.yihu.wlyy.entity.patient.PatientReservation;
|
|
|
|
import com.yihu.wlyy.entity.patient.SignFamily;
|
|
import com.yihu.wlyy.repository.organization.HospitalMappingDao;
|
|
import com.yihu.wlyy.repository.organization.HospitalMappingDao;
|
|
import com.yihu.wlyy.repository.patient.PatientReservationDao;
|
|
import com.yihu.wlyy.repository.patient.PatientReservationDao;
|
|
|
|
import com.yihu.wlyy.repository.patient.SignFamilyDao;
|
|
import com.yihu.wlyy.service.common.account.PatientService;
|
|
import com.yihu.wlyy.service.common.account.PatientService;
|
|
import com.yihu.wlyy.service.third.jw.JwSmjkService;
|
|
import com.yihu.wlyy.service.third.jw.JwSmjkService;
|
|
import com.yihu.wlyy.util.DateUtil;
|
|
import com.yihu.wlyy.util.DateUtil;
|
|
@ -38,7 +40,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
private String ORDER_CREATE = "WebRegisterVerify"; //新建预约
|
|
private String ORDER_CREATE = "WebRegisterVerify"; //新建预约
|
|
private String ORDER_CANCEL = "Unregister"; //取消预约
|
|
private String ORDER_CANCEL = "Unregister"; //取消预约
|
|
private String ORDER_INFO = "GetReservationRecord";//预约信息
|
|
private String ORDER_INFO = "GetReservationRecord";//预约信息
|
|
private String REG_LIST ="GetRegList";//获取市民预约挂号信息
|
|
|
|
|
|
private String REG_LIST = "GetRegList";//获取市民预约挂号信息
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private PatientService patientService;
|
|
private PatientService patientService;
|
|
@ -49,31 +51,29 @@ public class GuahaoXMService implements IGuahaoService {
|
|
@Autowired
|
|
@Autowired
|
|
private PatientReservationDao patientReservationDao;
|
|
private PatientReservationDao patientReservationDao;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
SignFamilyDao signFamilyDao;
|
|
|
|
|
|
private ObjectMapper objectMapper = new ObjectMapper();
|
|
private ObjectMapper objectMapper = new ObjectMapper();
|
|
|
|
|
|
/**
|
|
/**
|
|
* 解析挂号后
|
|
* 解析挂号后
|
|
*/
|
|
*/
|
|
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) 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) throws Exception {
|
|
String code = "";
|
|
String code = "";
|
|
if(response.startsWith("error")||response.startsWith("System-Error"))
|
|
|
|
{
|
|
|
|
|
|
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")) { //预约成功
|
|
// 预约成功,获取预约号
|
|
// 预约成功,获取预约号
|
|
code = response.replace("OK:", "").replace("ok:", "");
|
|
code = response.replace("OK:", "").replace("ok:", "");
|
|
}
|
|
|
|
else if(response.split("\\|").length==3){
|
|
|
|
|
|
} else if (response.split("\\|").length == 3) {
|
|
code = response.split("\\|")[0];
|
|
code = response.split("\\|")[0];
|
|
}
|
|
|
|
else{
|
|
|
|
|
|
} else {
|
|
throw new Exception(response);
|
|
throw new Exception(response);
|
|
}
|
|
}
|
|
|
|
|
|
// 查询医生职称和头像
|
|
// 查询医生职称和头像
|
|
GuahaoDoctor doctor = GetDoctorInfo(doctorId,hospitalId,hosDeptId);
|
|
|
|
|
|
GuahaoDoctor doctor = GetDoctorInfo(doctorId, hospitalId, hosDeptId);
|
|
// 保存预约记录
|
|
// 保存预约记录
|
|
PatientReservation reservation = new PatientReservation();
|
|
PatientReservation reservation = new PatientReservation();
|
|
reservation.setCode(code);
|
|
reservation.setCode(code);
|
|
@ -96,12 +96,20 @@ public class GuahaoXMService implements IGuahaoService {
|
|
reservation.setStartTime(startTime);
|
|
reservation.setStartTime(startTime);
|
|
reservation.setEndTime(endTime);
|
|
reservation.setEndTime(endTime);
|
|
reservation.setStatus(1);
|
|
reservation.setStatus(1);
|
|
if(StringUtils.isNotBlank(dname)){
|
|
|
|
|
|
if (StringUtils.isNotEmpty(dcode)) {
|
|
|
|
SignFamily signFamily = signFamilyDao.findByjiatingPatient(patient);
|
|
|
|
if (signFamily == null) {
|
|
|
|
throw new Exception("can not find patient's family sign info");
|
|
|
|
}
|
|
|
|
reservation.setSignType(2);
|
|
|
|
reservation.setAdminTeamCode(signFamily.getAdminTeamId());
|
|
|
|
}
|
|
|
|
if (StringUtils.isNotBlank(dname)) {
|
|
reservation.setDname(dname);//代理签约维护待签约人名称
|
|
reservation.setDname(dname);//代理签约维护待签约人名称
|
|
}
|
|
}
|
|
if(StringUtils.isNotBlank(dcode)){
|
|
|
|
|
|
if (StringUtils.isNotBlank(dcode)) {
|
|
reservation.setDoctor(dcode);//代理签约维护待签约人编码
|
|
reservation.setDoctor(dcode);//代理签约维护待签约人编码
|
|
SendP2PUtil.sendP2Pmsg(dcode,patient,"1","我已成功为您预约:"+startTime+","+hospitalName+hosDeptName+doctorName+"医生的号源。您可直接前往医院就诊</br><a name='guahao' href='javascript:void(0)' data-id='"+code+"'>点击查看详情</a>");
|
|
|
|
|
|
SendP2PUtil.sendP2Pmsg(dcode, patient, "1", "我已成功为您预约:" + startTime + "," + hospitalName + hosDeptName + doctorName + "医生的号源。您可直接前往医院就诊</br><a name='guahao' href='javascript:void(0)' data-id='" + code + "'>点击查看详情</a>");
|
|
}
|
|
}
|
|
// 保存预约记录
|
|
// 保存预约记录
|
|
patientReservationDao.save(reservation);
|
|
patientReservationDao.save(reservation);
|
|
@ -112,22 +120,21 @@ public class GuahaoXMService implements IGuahaoService {
|
|
/**
|
|
/**
|
|
* 预约排班xml转列表
|
|
* 预约排班xml转列表
|
|
*/
|
|
*/
|
|
private List<Map<String,Object>> xmlToList(String xml) throws Exception{
|
|
|
|
List<Map<String,Object>> re = new ArrayList<>();
|
|
|
|
|
|
private List<Map<String, Object>> xmlToList(String xml) throws Exception {
|
|
|
|
List<Map<String, Object>> re = new ArrayList<>();
|
|
if (StringUtils.isEmpty(xml)) {
|
|
if (StringUtils.isEmpty(xml)) {
|
|
// 请求失败
|
|
// 请求失败
|
|
throw new Exception("获取医生排班表失败!");
|
|
throw new Exception("获取医生排班表失败!");
|
|
} else if (StringUtils.startsWith(xml, "System-Error")) {
|
|
} else if (StringUtils.startsWith(xml, "System-Error")) {
|
|
// 调用失败
|
|
// 调用失败
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
}
|
|
|
|
else if (StringUtils.startsWith(xml, "Error")) {
|
|
|
|
|
|
} else if (StringUtils.startsWith(xml, "Error")) {
|
|
// 调用失败
|
|
// 调用失败
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
}
|
|
}
|
|
Document document = DocumentHelper.parseText(xml);
|
|
Document document = DocumentHelper.parseText(xml);
|
|
Element root = document.getRootElement();
|
|
Element root = document.getRootElement();
|
|
if(root.element("doctor")!=null) //包含doctor节点
|
|
|
|
|
|
if (root.element("doctor") != null) //包含doctor节点
|
|
{
|
|
{
|
|
root = root.element("doctor");
|
|
root = root.element("doctor");
|
|
}
|
|
}
|
|
@ -145,7 +152,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
String used = e.attributeValue("used");
|
|
String used = e.attributeValue("used");
|
|
// 1正常、2满号、3已过期
|
|
// 1正常、2满号、3已过期
|
|
String status = e.attributeValue("status");
|
|
String status = e.attributeValue("status");
|
|
Map<String,Object> map = new HashMap<>();
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
map.put("date", date);
|
|
map.put("date", date);
|
|
map.put("time", time);
|
|
map.put("time", time);
|
|
map.put("max", max);
|
|
map.put("max", max);
|
|
@ -153,7 +160,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
map.put("status", status);
|
|
map.put("status", status);
|
|
// 排班信息
|
|
// 排班信息
|
|
List<?> sections = e.elements();
|
|
List<?> sections = e.elements();
|
|
List<Map<String,String>> arrangeList = new ArrayList<>();
|
|
|
|
|
|
List<Map<String, String>> arrangeList = new ArrayList<>();
|
|
for (Object s : sections) {
|
|
for (Object s : sections) {
|
|
Element section = (Element) s;
|
|
Element section = (Element) s;
|
|
// 限号
|
|
// 限号
|
|
@ -165,7 +172,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
// 结束时间
|
|
// 结束时间
|
|
String end_time = section.attributeValue("end_time");
|
|
String end_time = section.attributeValue("end_time");
|
|
|
|
|
|
Map<String,String> item = new HashMap<>();
|
|
|
|
|
|
Map<String, String> item = new HashMap<>();
|
|
item.put("max", s_max);
|
|
item.put("max", s_max);
|
|
item.put("used", s_used);
|
|
item.put("used", s_used);
|
|
item.put("startTime", start_time);
|
|
item.put("startTime", start_time);
|
|
@ -184,23 +191,20 @@ public class GuahaoXMService implements IGuahaoService {
|
|
/**
|
|
/**
|
|
* 获取医院列表
|
|
* 获取医院列表
|
|
*/
|
|
*/
|
|
public List<Map<String,String>> GetOrgList(String city,String filter,String type,Integer pageIndex,Integer pageSize) throws Exception{
|
|
|
|
List<Map<String,String>> re = new ArrayList<>();
|
|
|
|
|
|
public List<Map<String, String>> GetOrgList(String city, String filter, String type, Integer pageIndex, Integer pageSize) throws Exception {
|
|
|
|
List<Map<String, String>> re = new ArrayList<>();
|
|
|
|
|
|
String[] values = null;
|
|
String[] values = null;
|
|
|
|
|
|
//医院列表
|
|
//医院列表
|
|
if(type.equals("1"))
|
|
|
|
{
|
|
|
|
|
|
if (type.equals("1")) {
|
|
values = SOAPUtil.getCredential("<?xml version=\"1.0\" encoding=\"utf-8\"?><root type=\"1\"></root>", true);
|
|
values = SOAPUtil.getCredential("<?xml version=\"1.0\" encoding=\"utf-8\"?><root type=\"1\"></root>", true);
|
|
}
|
|
|
|
else if(type.equals("2")) //社区列表
|
|
|
|
|
|
} else if (type.equals("2")) //社区列表
|
|
{
|
|
{
|
|
values = SOAPUtil.getCredential("<?xml version=\"1.0\" encoding=\"utf-8\"?><root type=\"2\"></root>", true);
|
|
values = SOAPUtil.getCredential("<?xml version=\"1.0\" encoding=\"utf-8\"?><root type=\"2\"></root>", true);
|
|
}
|
|
}
|
|
|
|
|
|
if(values!=null && values.length==3)
|
|
|
|
{
|
|
|
|
|
|
if (values != null && values.length == 3) {
|
|
JSONArray params = new JSONArray();
|
|
JSONArray params = new JSONArray();
|
|
|
|
|
|
JSONObject param1 = new JSONObject();
|
|
JSONObject param1 = new JSONObject();
|
|
@ -225,8 +229,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
} else if (StringUtils.startsWith(xml, "System-Error")) {
|
|
} else if (StringUtils.startsWith(xml, "System-Error")) {
|
|
// 调用失败
|
|
// 调用失败
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
}
|
|
|
|
else if (StringUtils.startsWith(xml, "Error")) {
|
|
|
|
|
|
} else if (StringUtils.startsWith(xml, "Error")) {
|
|
// 调用失败
|
|
// 调用失败
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
}
|
|
}
|
|
@ -238,24 +241,24 @@ public class GuahaoXMService implements IGuahaoService {
|
|
String shortName = e.attribute("short_name").getValue();
|
|
String shortName = e.attribute("short_name").getValue();
|
|
String code = e.attribute("code").getValue();
|
|
String code = e.attribute("code").getValue();
|
|
String name = e.getText();
|
|
String name = e.getText();
|
|
Map<String,String> map = new HashMap<>();
|
|
|
|
|
|
Map<String, String> map = new HashMap<>();
|
|
map.put("id", code);
|
|
map.put("id", code);
|
|
map.put("name", shortName);
|
|
map.put("name", shortName);
|
|
map.put("address", name);
|
|
map.put("address", name);
|
|
String photo = hospitalMappingDao.getPhotoByMappingCode(code,"1");
|
|
|
|
|
|
String photo = hospitalMappingDao.getPhotoByMappingCode(code, "1");
|
|
map.put("photo", photo);
|
|
map.put("photo", photo);
|
|
|
|
|
|
re.add(map);
|
|
re.add(map);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return re;
|
|
|
|
|
|
return re;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取科室接口
|
|
* 获取科室接口
|
|
*/
|
|
*/
|
|
public List<Map<String,String>> GetOrgDepList(String hospitalId,String filter,Integer pageIndex,Integer pageSize) throws Exception{
|
|
|
|
List<Map<String,String>> re = new ArrayList<>();
|
|
|
|
|
|
public List<Map<String, String>> GetOrgDepList(String hospitalId, String filter, Integer pageIndex, Integer pageSize) throws Exception {
|
|
|
|
List<Map<String, String>> re = new ArrayList<>();
|
|
JSONArray params = new JSONArray();
|
|
JSONArray params = new JSONArray();
|
|
|
|
|
|
JSONObject param1 = new JSONObject();
|
|
JSONObject param1 = new JSONObject();
|
|
@ -270,8 +273,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
} else if (StringUtils.startsWith(xml, "System-Error")) {
|
|
} else if (StringUtils.startsWith(xml, "System-Error")) {
|
|
// 调用失败
|
|
// 调用失败
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
}
|
|
|
|
else if (StringUtils.startsWith(xml, "Error")) {
|
|
|
|
|
|
} else if (StringUtils.startsWith(xml, "Error")) {
|
|
// 调用失败
|
|
// 调用失败
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
}
|
|
}
|
|
@ -280,24 +282,23 @@ public class GuahaoXMService implements IGuahaoService {
|
|
List<?> child = root.elements();
|
|
List<?> child = root.elements();
|
|
for (Object o : child) {
|
|
for (Object o : child) {
|
|
Element e = (Element) o;
|
|
Element e = (Element) o;
|
|
if(e.getName().equals("dept"))
|
|
|
|
{
|
|
|
|
|
|
if (e.getName().equals("dept")) {
|
|
String code = e.attribute("code").getValue();
|
|
String code = e.attribute("code").getValue();
|
|
String name = e.attribute("name").getValue();
|
|
String name = e.attribute("name").getValue();
|
|
Map<String,String> map = new HashMap<>();
|
|
|
|
|
|
Map<String, String> map = new HashMap<>();
|
|
map.put("id", code);
|
|
map.put("id", code);
|
|
map.put("name", name);
|
|
map.put("name", name);
|
|
map.put("hospitalId", hospitalId);
|
|
map.put("hospitalId", hospitalId);
|
|
re.add(map);
|
|
re.add(map);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return re;
|
|
|
|
|
|
return re;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取医生列表接口
|
|
* 获取医生列表接口
|
|
*/
|
|
*/
|
|
public List<GuahaoDoctor> GetDoctorList(String hospitalId,String hosDeptId,String filter,Integer pageIndex,Integer pageSize) throws Exception{
|
|
|
|
|
|
public List<GuahaoDoctor> GetDoctorList(String hospitalId, String hosDeptId, String filter, Integer pageIndex, Integer pageSize) throws Exception {
|
|
List<GuahaoDoctor> re = new ArrayList<>();
|
|
List<GuahaoDoctor> re = new ArrayList<>();
|
|
JSONArray params = new JSONArray();
|
|
JSONArray params = new JSONArray();
|
|
|
|
|
|
@ -319,7 +320,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
|
|
|
|
JSONObject param4 = new JSONObject();
|
|
JSONObject param4 = new JSONObject();
|
|
param4.put("key", "?strEnd");
|
|
param4.put("key", "?strEnd");
|
|
param4.put("value", DateUtil.getNextDay(nowDate,nextDays)); //一周后时间
|
|
|
|
|
|
param4.put("value", DateUtil.getNextDay(nowDate, nextDays)); //一周后时间
|
|
params.put(param4);
|
|
params.put(param4);
|
|
|
|
|
|
String xml = SOAPUtil.post(DOCTOR_LIST, params);
|
|
String xml = SOAPUtil.post(DOCTOR_LIST, params);
|
|
@ -329,8 +330,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
} else if (StringUtils.startsWith(xml, "System-Error")) {
|
|
} else if (StringUtils.startsWith(xml, "System-Error")) {
|
|
// 调用失败
|
|
// 调用失败
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
}
|
|
|
|
else if (StringUtils.startsWith(xml, "Error")) {
|
|
|
|
|
|
} else if (StringUtils.startsWith(xml, "Error")) {
|
|
// 调用失败
|
|
// 调用失败
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
}
|
|
}
|
|
@ -353,8 +353,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
String name = e.attributeValue("name");
|
|
String name = e.attributeValue("name");
|
|
// 照片
|
|
// 照片
|
|
String photo = "";
|
|
String photo = "";
|
|
if(e.attribute("photo")!=null)
|
|
|
|
{
|
|
|
|
|
|
if (e.attribute("photo") != null) {
|
|
photo = e.attributeValue("photo");
|
|
photo = e.attributeValue("photo");
|
|
}
|
|
}
|
|
// 挂号费
|
|
// 挂号费
|
|
@ -382,14 +381,14 @@ public class GuahaoXMService implements IGuahaoService {
|
|
doctor.setHospitalName(orgname);
|
|
doctor.setHospitalName(orgname);
|
|
re.add(doctor);
|
|
re.add(doctor);
|
|
}
|
|
}
|
|
return re;
|
|
|
|
|
|
return re;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取医生排班接口(包含排班详细)
|
|
* 获取医生排班接口(包含排班详细)
|
|
* status 0 停诊、1正常、2满号、3已过期
|
|
* status 0 停诊、1正常、2满号、3已过期
|
|
*/
|
|
*/
|
|
public List<Map<String,Object>> GetDoctorArrange(String hospitalId,String hosDeptId,String doctorId) throws Exception{
|
|
|
|
|
|
public List<Map<String, Object>> GetDoctorArrange(String hospitalId, String hosDeptId, String doctorId) throws Exception {
|
|
|
|
|
|
JSONArray params = new JSONArray();
|
|
JSONArray params = new JSONArray();
|
|
JSONObject param1 = new JSONObject();
|
|
JSONObject param1 = new JSONObject();
|
|
@ -415,20 +414,20 @@ public class GuahaoXMService implements IGuahaoService {
|
|
|
|
|
|
JSONObject param5 = new JSONObject();
|
|
JSONObject param5 = new JSONObject();
|
|
param5.put("key", "?strEnd");
|
|
param5.put("key", "?strEnd");
|
|
param5.put("value", DateUtil.getNextDay(nowDate,nextDays)); //一周后时间
|
|
|
|
|
|
param5.put("value", DateUtil.getNextDay(nowDate, nextDays)); //一周后时间
|
|
params.put(param5);
|
|
params.put(param5);
|
|
|
|
|
|
String xml = SOAPUtil.post(DOCTOR_ARRANGE, params);
|
|
String xml = SOAPUtil.post(DOCTOR_ARRANGE, params);
|
|
|
|
|
|
return xmlToList(xml);
|
|
|
|
|
|
return xmlToList(xml);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取医生排班接口(一级)
|
|
* 获取医生排班接口(一级)
|
|
* status 0 停诊、1正常、2满号、3已过期
|
|
* status 0 停诊、1正常、2满号、3已过期
|
|
*/
|
|
*/
|
|
public List<Map<String,String>> GetDoctorArrangeSimple(String hospitalId,String hosDeptId,String doctorId) throws Exception{
|
|
|
|
List<Map<String,String>> re = new ArrayList<>();
|
|
|
|
|
|
public List<Map<String, String>> GetDoctorArrangeSimple(String hospitalId, String hosDeptId, String doctorId) throws Exception {
|
|
|
|
List<Map<String, String>> re = new ArrayList<>();
|
|
|
|
|
|
JSONArray params = new JSONArray();
|
|
JSONArray params = new JSONArray();
|
|
JSONObject param1 = new JSONObject();
|
|
JSONObject param1 = new JSONObject();
|
|
@ -454,7 +453,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
|
|
|
|
JSONObject param5 = new JSONObject();
|
|
JSONObject param5 = new JSONObject();
|
|
param5.put("key", "?strEnd");
|
|
param5.put("key", "?strEnd");
|
|
param5.put("value", DateUtil.getNextDay(nowDate,nextDays)); //一周后时间
|
|
|
|
|
|
param5.put("value", DateUtil.getNextDay(nowDate, nextDays)); //一周后时间
|
|
params.put(param5);
|
|
params.put(param5);
|
|
|
|
|
|
String xml = SOAPUtil.post(DOCTOR_ARRANGE_SIMPLE, params);
|
|
String xml = SOAPUtil.post(DOCTOR_ARRANGE_SIMPLE, params);
|
|
@ -464,8 +463,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
} else if (StringUtils.startsWith(xml, "System-Error")) {
|
|
} else if (StringUtils.startsWith(xml, "System-Error")) {
|
|
// 调用失败
|
|
// 调用失败
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
}
|
|
|
|
else if (StringUtils.startsWith(xml, "Error")) {
|
|
|
|
|
|
} else if (StringUtils.startsWith(xml, "Error")) {
|
|
// 调用失败
|
|
// 调用失败
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
}
|
|
}
|
|
@ -484,7 +482,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
String used = e.attributeValue("used");
|
|
String used = e.attributeValue("used");
|
|
// 1正常、2满号、3已过期
|
|
// 1正常、2满号、3已过期
|
|
String status = e.attributeValue("status");
|
|
String status = e.attributeValue("status");
|
|
Map<String,String> map = new HashMap<>();
|
|
|
|
|
|
Map<String, String> map = new HashMap<>();
|
|
map.put("date", date);
|
|
map.put("date", date);
|
|
map.put("time", time);
|
|
map.put("time", time);
|
|
map.put("max", max);
|
|
map.put("max", max);
|
|
@ -493,13 +491,13 @@ public class GuahaoXMService implements IGuahaoService {
|
|
|
|
|
|
re.add(map);
|
|
re.add(map);
|
|
}
|
|
}
|
|
return re;
|
|
|
|
|
|
return re;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 创建挂号单
|
|
* 创建挂号单
|
|
*/
|
|
*/
|
|
public String CreateOrder(String hospitalId,String hospitalName,String hosDeptId,String hosDeptName,String doctorId,String doctorName,String arrangeDate,String patient,String patientName,String cardNo,String clinicCard,String patientPhone) throws Exception{
|
|
|
|
|
|
public String CreateOrder(String hospitalId, String hospitalName, String hosDeptId, String hosDeptName, String doctorId, String doctorName, String arrangeDate, String patient, String patientName, String cardNo, String clinicCard, String patientPhone) throws Exception {
|
|
String re = "";
|
|
String re = "";
|
|
|
|
|
|
Patient p = patientService.findByCode(patient);
|
|
Patient p = patientService.findByCode(patient);
|
|
@ -507,8 +505,8 @@ public class GuahaoXMService implements IGuahaoService {
|
|
throw new Exception("患者信息不存在!");
|
|
throw new Exception("患者信息不存在!");
|
|
}
|
|
}
|
|
|
|
|
|
Map<String,String> map = objectMapper.readValue(arrangeDate,Map.class);
|
|
|
|
if(map.containsKey("sectionType") && map.containsKey("startTime")) {
|
|
|
|
|
|
Map<String, String> map = objectMapper.readValue(arrangeDate, Map.class);
|
|
|
|
if (map.containsKey("sectionType") && map.containsKey("startTime")) {
|
|
String sectionType = map.get("sectionType");
|
|
String sectionType = map.get("sectionType");
|
|
String startTime = map.get("startTime");
|
|
String startTime = map.get("startTime");
|
|
String endTime = map.get("endTime");
|
|
String endTime = map.get("endTime");
|
|
@ -555,14 +553,13 @@ public class GuahaoXMService implements IGuahaoService {
|
|
} else if (StringUtils.startsWith(response, "System-Error")) {
|
|
} else if (StringUtils.startsWith(response, "System-Error")) {
|
|
// 调用失败
|
|
// 调用失败
|
|
throw new Exception(response.substring(response.indexOf(":") + 1, response.length()));
|
|
throw new Exception(response.substring(response.indexOf(":") + 1, response.length()));
|
|
} else if (StringUtils.startsWith(response, "Error")) {
|
|
|
|
|
|
} else if (StringUtils.startsWith(response, "Error")) {
|
|
// 调用失败
|
|
// 调用失败
|
|
throw new Exception(response.substring(response.indexOf(":") + 1, response.length()));
|
|
throw new Exception(response.substring(response.indexOf(":") + 1, response.length()));
|
|
}
|
|
}
|
|
|
|
|
|
re = CreateOrderAfter(response,hospitalId,hospitalName,hosDeptId,hosDeptName,doctorId,doctorName,sectionType,startTime,endTime,patient,patientName,cardNo,clinicCard,patientPhone,null,null);
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
|
|
re = CreateOrderAfter(response, hospitalId, hospitalName, hosDeptId, hosDeptName, doctorId, doctorName, sectionType, startTime, endTime, patient, patientName, cardNo, clinicCard, patientPhone, null, null);
|
|
|
|
} else {
|
|
throw new Exception("该排班信息错误或者不存在!");
|
|
throw new Exception("该排班信息错误或者不存在!");
|
|
}
|
|
}
|
|
|
|
|
|
@ -570,13 +567,10 @@ public class GuahaoXMService implements IGuahaoService {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* 取消挂号单
|
|
* 取消挂号单
|
|
*/
|
|
*/
|
|
public boolean CancelOrder(String orderId,String clinicCard) throws Exception
|
|
|
|
{
|
|
|
|
|
|
public boolean CancelOrder(String orderId, String clinicCard) throws Exception {
|
|
JSONArray params = new JSONArray();
|
|
JSONArray params = new JSONArray();
|
|
|
|
|
|
JSONObject param1 = new JSONObject();
|
|
JSONObject param1 = new JSONObject();
|
|
@ -608,8 +602,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
} else if (StringUtils.startsWith(xml, "System-Error")) {
|
|
} else if (StringUtils.startsWith(xml, "System-Error")) {
|
|
// 调用失败
|
|
// 调用失败
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
}
|
|
|
|
else if (StringUtils.startsWith(xml, "Error")) {
|
|
|
|
|
|
} else if (StringUtils.startsWith(xml, "Error")) {
|
|
// 调用失败
|
|
// 调用失败
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
}
|
|
}
|
|
@ -624,8 +617,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
/**
|
|
/**
|
|
* 获取医生信息
|
|
* 获取医生信息
|
|
*/
|
|
*/
|
|
public GuahaoDoctor GetDoctorInfo(String doctorId,String hospitalId,String hosDeptId) throws Exception
|
|
|
|
{
|
|
|
|
|
|
public GuahaoDoctor GetDoctorInfo(String doctorId, String hospitalId, String hosDeptId) throws Exception {
|
|
GuahaoDoctor doctor = new GuahaoDoctor();
|
|
GuahaoDoctor doctor = new GuahaoDoctor();
|
|
|
|
|
|
JSONArray params = new JSONArray();
|
|
JSONArray params = new JSONArray();
|
|
@ -644,7 +636,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
params.put(param3);
|
|
params.put(param3);
|
|
JSONObject param4 = new JSONObject();
|
|
JSONObject param4 = new JSONObject();
|
|
param4.put("key", "?strEnd");
|
|
param4.put("key", "?strEnd");
|
|
param4.put("value", DateUtil.getNextDay(nowDate,nextDays)); //一周后时间
|
|
|
|
|
|
param4.put("value", DateUtil.getNextDay(nowDate, nextDays)); //一周后时间
|
|
params.put(param4);
|
|
params.put(param4);
|
|
|
|
|
|
String xml = SOAPUtil.post(DOCTOR_LIST, params);
|
|
String xml = SOAPUtil.post(DOCTOR_LIST, params);
|
|
@ -654,8 +646,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
} else if (StringUtils.startsWith(xml, "System-Error")) {
|
|
} else if (StringUtils.startsWith(xml, "System-Error")) {
|
|
// 调用失败
|
|
// 调用失败
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
}
|
|
|
|
else if (StringUtils.startsWith(xml, "Error")) {
|
|
|
|
|
|
} else if (StringUtils.startsWith(xml, "Error")) {
|
|
// 调用失败
|
|
// 调用失败
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
}
|
|
}
|
|
@ -667,8 +658,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
// 医生编码
|
|
// 医生编码
|
|
String code = e.attributeValue("code");
|
|
String code = e.attributeValue("code");
|
|
|
|
|
|
if(code.equals(doctorId))
|
|
|
|
{
|
|
|
|
|
|
if (code.equals(doctorId)) {
|
|
// 性别
|
|
// 性别
|
|
String sex = e.attributeValue("sex");
|
|
String sex = e.attributeValue("sex");
|
|
// 职称
|
|
// 职称
|
|
@ -681,8 +671,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
String name = e.attributeValue("name");
|
|
String name = e.attributeValue("name");
|
|
// 照片
|
|
// 照片
|
|
String photo = "";
|
|
String photo = "";
|
|
if(e.attribute("photo")!=null)
|
|
|
|
{
|
|
|
|
|
|
if (e.attribute("photo") != null) {
|
|
photo = e.attributeValue("photo");
|
|
photo = e.attributeValue("photo");
|
|
}
|
|
}
|
|
// 挂号费
|
|
// 挂号费
|
|
@ -711,15 +700,14 @@ public class GuahaoXMService implements IGuahaoService {
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return doctor;
|
|
|
|
|
|
return doctor;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取预约状态
|
|
* 获取预约状态
|
|
* 0 撤销 1 确认 2 已诊 3停诊
|
|
* 0 撤销 1 确认 2 已诊 3停诊
|
|
*/
|
|
*/
|
|
public Integer GetOrderStatus(String hospitalId,String orderId,String clinicCard) throws Exception
|
|
|
|
{
|
|
|
|
|
|
public Integer GetOrderStatus(String hospitalId, String orderId, String clinicCard) throws Exception {
|
|
Integer re = null;
|
|
Integer re = null;
|
|
try {
|
|
try {
|
|
StringBuffer sb = new StringBuffer();
|
|
StringBuffer sb = new StringBuffer();
|
|
@ -789,9 +777,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
} else {
|
|
} else {
|
|
throw new Exception("获取预约状态失败!");
|
|
throw new Exception("获取预约状态失败!");
|
|
}
|
|
}
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
|
|
} catch (Exception ex) {
|
|
ex.printStackTrace();
|
|
ex.printStackTrace();
|
|
}
|
|
}
|
|
return re;
|
|
return re;
|
|
@ -800,10 +786,9 @@ public class GuahaoXMService implements IGuahaoService {
|
|
/**
|
|
/**
|
|
* 根据患者医保卡获取近三个月的预约记录
|
|
* 根据患者医保卡获取近三个月的预约记录
|
|
*/
|
|
*/
|
|
public List<PatientReservation> GetRegList(String patientCode,String strStart,String strEnd) throws Exception
|
|
|
|
{
|
|
|
|
|
|
public List<PatientReservation> GetRegList(String patientCode, String strStart, String strEnd) throws Exception {
|
|
Patient patient = patientService.findByCode(patientCode);
|
|
Patient patient = patientService.findByCode(patientCode);
|
|
if(patient==null){
|
|
|
|
|
|
if (patient == null) {
|
|
throw new Exception("不存在该用户!");
|
|
throw new Exception("不存在该用户!");
|
|
}
|
|
}
|
|
|
|
|
|
@ -830,7 +815,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
params.put(param4);
|
|
params.put(param4);
|
|
JSONObject param5 = new JSONObject();
|
|
JSONObject param5 = new JSONObject();
|
|
param5.put("key", "?strKey");
|
|
param5.put("key", "?strKey");
|
|
param5.put("value",values[2]); //一周后时间
|
|
|
|
|
|
param5.put("value", values[2]); //一周后时间
|
|
params.put(param5);
|
|
params.put(param5);
|
|
String xml = SOAPUtil.post(REG_LIST, params);
|
|
String xml = SOAPUtil.post(REG_LIST, params);
|
|
if (StringUtils.isEmpty(xml)) {
|
|
if (StringUtils.isEmpty(xml)) {
|
|
@ -839,8 +824,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
} else if (StringUtils.startsWith(xml, "System-Error")) {
|
|
} else if (StringUtils.startsWith(xml, "System-Error")) {
|
|
// 调用失败
|
|
// 调用失败
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
}
|
|
|
|
else if (StringUtils.startsWith(xml, "Error")) {
|
|
|
|
|
|
} else if (StringUtils.startsWith(xml, "Error")) {
|
|
// 调用失败
|
|
// 调用失败
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
}
|
|
}
|
|
@ -849,7 +833,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
List<?> child = root.elements();
|
|
List<?> child = root.elements();
|
|
|
|
|
|
|
|
|
|
if(child.size()>0) {
|
|
|
|
|
|
if (child.size() > 0) {
|
|
for (Object o : child) {
|
|
for (Object o : child) {
|
|
Element e = (Element) o;
|
|
Element e = (Element) o;
|
|
// 医生编码
|
|
// 医生编码
|
|
@ -918,8 +902,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
/**
|
|
/**
|
|
* 根据患者,预约编号,机构编号获取单条记录预约记录
|
|
* 根据患者,预约编号,机构编号获取单条记录预约记录
|
|
*/
|
|
*/
|
|
public PatientReservation getRegDetail(String patientCode,String orgCode,String regCode) throws Exception
|
|
|
|
{
|
|
|
|
|
|
public PatientReservation getRegDetail(String patientCode, String orgCode, String regCode) throws Exception {
|
|
//获取签名信息
|
|
//获取签名信息
|
|
Patient patient = patientService.findByCode(patientCode);
|
|
Patient patient = patientService.findByCode(patientCode);
|
|
StringBuffer sb = new StringBuffer();
|
|
StringBuffer sb = new StringBuffer();
|
|
@ -953,8 +936,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
} else if (StringUtils.startsWith(xml, "System-Error")) {
|
|
} else if (StringUtils.startsWith(xml, "System-Error")) {
|
|
// 调用失败
|
|
// 调用失败
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
}
|
|
|
|
else if (StringUtils.startsWith(xml, "Error")) {
|
|
|
|
|
|
} else if (StringUtils.startsWith(xml, "Error")) {
|
|
// 调用失败
|
|
// 调用失败
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
throw new Exception(xml.substring(xml.indexOf(":") + 1, xml.length()));
|
|
}
|
|
}
|
|
@ -962,12 +944,11 @@ public class GuahaoXMService implements IGuahaoService {
|
|
Element root = document.getRootElement();
|
|
Element root = document.getRootElement();
|
|
List<?> child = root.elements();
|
|
List<?> child = root.elements();
|
|
|
|
|
|
if(patient==null){
|
|
|
|
|
|
if (patient == null) {
|
|
throw new Exception("获取挂号人员信息失败!");
|
|
throw new Exception("获取挂号人员信息失败!");
|
|
}
|
|
}
|
|
|
|
|
|
if(child.size()>0)
|
|
|
|
{
|
|
|
|
|
|
if (child.size() > 0) {
|
|
Element e = (Element) child.get(0);
|
|
Element e = (Element) child.get(0);
|
|
// 医生编码
|
|
// 医生编码
|
|
String regdate = e.attributeValue("regdate");//预约日期
|
|
String regdate = e.attributeValue("regdate");//预约日期
|
|
@ -979,14 +960,14 @@ public class GuahaoXMService implements IGuahaoService {
|
|
String OrgCode = e.attributeValue("org_code");//医疗机构编码
|
|
String OrgCode = e.attributeValue("org_code");//医疗机构编码
|
|
String org = e.attributeValue("org_name");//医疗机构名称
|
|
String org = e.attributeValue("org_name");//医疗机构名称
|
|
String DeptCode = e.attributeValue("dept_code");//科室代码
|
|
String DeptCode = e.attributeValue("dept_code");//科室代码
|
|
String dept =e.attributeValue("dept_name");//科室
|
|
|
|
|
|
String dept = e.attributeValue("dept_name");//科室
|
|
String DoctorCode = e.attributeValue("doctor_code");//医生代码
|
|
String DoctorCode = e.attributeValue("doctor_code");//医生代码
|
|
String doctor = e.attributeValue("doctor_name");//医生
|
|
String doctor = e.attributeValue("doctor_name");//医生
|
|
String Introduction = e.attributeValue("introduction");//医生简介
|
|
String Introduction = e.attributeValue("introduction");//医生简介
|
|
String status = e.attributeValue("status");//状态:删除、新建、确认、已诊
|
|
String status = e.attributeValue("status");//状态:删除、新建、确认、已诊
|
|
String enter_time = e.attributeValue("enter_time");//预约登记时间
|
|
String enter_time = e.attributeValue("enter_time");//预约登记时间
|
|
String notes = e.attributeValue("notes");//备注
|
|
String notes = e.attributeValue("notes");//备注
|
|
String code = e.getText();//预约号
|
|
|
|
|
|
String code = e.getText();//预约号
|
|
PatientReservation patientReservation = new PatientReservation();
|
|
PatientReservation patientReservation = new PatientReservation();
|
|
patientReservation.setCode(code);
|
|
patientReservation.setCode(code);
|
|
patientReservation.setSectionType(time);
|
|
patientReservation.setSectionType(time);
|
|
@ -1005,7 +986,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
patientReservation.setName(patient.getName());
|
|
patientReservation.setName(patient.getName());
|
|
patientReservation.setIdcard(patient.getIdcard());
|
|
patientReservation.setIdcard(patient.getIdcard());
|
|
patientReservation.setPhone(patient.getMobile());
|
|
patientReservation.setPhone(patient.getMobile());
|
|
switch (status){
|
|
|
|
|
|
switch (status) {
|
|
case "删除":
|
|
case "删除":
|
|
patientReservation.setStatus(0);
|
|
patientReservation.setStatus(0);
|
|
break;
|
|
break;
|
|
@ -1018,30 +999,31 @@ public class GuahaoXMService implements IGuahaoService {
|
|
case "已诊":
|
|
case "已诊":
|
|
patientReservation.setStatus(3);
|
|
patientReservation.setStatus(3);
|
|
break;
|
|
break;
|
|
default:patientReservation.setStatus(4);
|
|
|
|
};
|
|
|
|
|
|
default:
|
|
|
|
patientReservation.setStatus(4);
|
|
|
|
}
|
|
|
|
;
|
|
patientReservation.setSsc(patient.getSsc());
|
|
patientReservation.setSsc(patient.getSsc());
|
|
GuahaoDoctor guahaoDoctor = GetDoctorInfo(DoctorCode, OrgCode, DeptCode);
|
|
GuahaoDoctor guahaoDoctor = GetDoctorInfo(DoctorCode, OrgCode, DeptCode);
|
|
patientReservation.setDoctorPhoto(guahaoDoctor.getPhoto());//照片
|
|
patientReservation.setDoctorPhoto(guahaoDoctor.getPhoto());//照片
|
|
patientReservation.setDoctorJob(guahaoDoctor.getTitle());//职称
|
|
patientReservation.setDoctorJob(guahaoDoctor.getTitle());//职称
|
|
return patientReservation;
|
|
return patientReservation;
|
|
}
|
|
|
|
else{
|
|
|
|
|
|
} else {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
JwSmjkService jwSmjkService;
|
|
JwSmjkService jwSmjkService;
|
|
|
|
|
|
/******************************** 基卫内网服务 ************************************************/
|
|
/******************************** 基卫内网服务 ************************************************/
|
|
public List<Map<String,Object>> GetDoctorArrangeTenDay(String hospitalId,String hosDeptId,String doctorId) throws Exception {
|
|
|
|
|
|
public List<Map<String, Object>> GetDoctorArrangeTenDay(String hospitalId, String hosDeptId, String doctorId) throws Exception {
|
|
|
|
|
|
String strStart = DateUtil.getStringDateShort(); //当前时间;
|
|
String strStart = DateUtil.getStringDateShort(); //当前时间;
|
|
String strEnd = DateUtil.getNextDay(strStart,11); //10天预约
|
|
|
|
|
|
String strEnd = DateUtil.getNextDay(strStart, 11); //10天预约
|
|
|
|
|
|
String response = jwSmjkService.getRegDeptSpeDoctorSectionList(hospitalId,hosDeptId,strStart,strEnd,doctorId);
|
|
|
|
|
|
String response = jwSmjkService.getRegDeptSpeDoctorSectionList(hospitalId, hosDeptId, strStart, strEnd, doctorId);
|
|
|
|
|
|
return xmlToList(response);
|
|
return xmlToList(response);
|
|
}
|
|
}
|
|
@ -1049,8 +1031,7 @@ public class GuahaoXMService implements IGuahaoService {
|
|
/**
|
|
/**
|
|
* 转诊预约挂号
|
|
* 转诊预约挂号
|
|
*/
|
|
*/
|
|
public String CreateOrderByDoctor(String hospitalId,String hospitalName,String hosDeptId,String hosDeptName,String doctorId,String doctorName,String arrangeDate,String patient,String patientName,String cardNo,String clinicCard,String patientPhone,String dname,String dcode) throws Exception
|
|
|
|
{
|
|
|
|
|
|
public String CreateOrderByDoctor(String hospitalId, String hospitalName, String hosDeptId, String hosDeptName, String doctorId, String doctorName, String arrangeDate, String patient, String patientName, String cardNo, String clinicCard, String patientPhone, String dname, String dcode) throws Exception {
|
|
String re = "";
|
|
String re = "";
|
|
|
|
|
|
Patient p = patientService.findByCode(patient);
|
|
Patient p = patientService.findByCode(patient);
|
|
@ -1058,17 +1039,16 @@ public class GuahaoXMService implements IGuahaoService {
|
|
throw new Exception("患者信息不存在!");
|
|
throw new Exception("患者信息不存在!");
|
|
}
|
|
}
|
|
|
|
|
|
Map<String,String> map = objectMapper.readValue(arrangeDate,Map.class);
|
|
|
|
if(map.containsKey("sectionType") && map.containsKey("startTime")) {
|
|
|
|
|
|
Map<String, String> map = objectMapper.readValue(arrangeDate, Map.class);
|
|
|
|
if (map.containsKey("sectionType") && map.containsKey("startTime")) {
|
|
String sectionType = map.get("sectionType");
|
|
String sectionType = map.get("sectionType");
|
|
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);
|
|
|
|
|
|
String response = jwSmjkService.webRegisterByFamily(cardNo, patientName, clinicCard, sectionType, startTime, hospitalId, hosDeptId, hosDeptName, doctorId, doctorName);
|
|
|
|
|
|
re = CreateOrderAfter(response,hospitalId,hospitalName,hosDeptId,hosDeptName,doctorId,doctorName,sectionType,startTime,endTime,patient,patientName,cardNo,clinicCard,patientPhone,dname,dcode);
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
|
|
re = CreateOrderAfter(response, hospitalId, hospitalName, hosDeptId, hosDeptName, doctorId, doctorName, sectionType, startTime, endTime, patient, patientName, cardNo, clinicCard, patientPhone, dname, dcode);
|
|
|
|
} else {
|
|
throw new Exception("该排班信息错误或者不存在!");
|
|
throw new Exception("该排班信息错误或者不存在!");
|
|
}
|
|
}
|
|
|
|
|