|
@ -351,7 +351,9 @@ public class JwSmjkService {
|
|
|
JSONObject jsonObject = new JSONObject(response);
|
|
|
int status = jsonObject.getInt("status");
|
|
|
if (status == 200) {
|
|
|
re = jsonObject.getString("data");
|
|
|
JSONArray jsonArray = jsonObject.getJSONArray("data");
|
|
|
re = jsonArray.toString();
|
|
|
// re = jsonObject.getString("data");
|
|
|
} else {
|
|
|
String msg = "处理失败,请联系管理员";
|
|
|
if(!jsonObject.isNull("msg")){
|
|
@ -399,7 +401,7 @@ public class JwSmjkService {
|
|
|
|
|
|
String response = HttpClientUtil.post(url, params, "UTF-8");
|
|
|
|
|
|
return responseStr(response);
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@ -414,7 +416,7 @@ public class JwSmjkService {
|
|
|
params.add(new BasicNameValuePair("hospitalId", hospitalId));
|
|
|
|
|
|
String response = HttpClientUtil.post(url, params, "UTF-8");
|
|
|
return responseStr(response);
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@ -430,7 +432,7 @@ public class JwSmjkService {
|
|
|
params.add(new BasicNameValuePair("hosDeptId", hosDeptId));
|
|
|
|
|
|
String response = HttpClientUtil.post(url, params, "UTF-8");
|
|
|
return responseStr(response);
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@ -447,7 +449,7 @@ public class JwSmjkService {
|
|
|
params.add(new BasicNameValuePair("doctorId", doctorId));
|
|
|
|
|
|
String response = HttpClientUtil.post(url, params, "UTF-8");
|
|
|
return responseStr(response);
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@ -464,7 +466,7 @@ public class JwSmjkService {
|
|
|
params.add(new BasicNameValuePair("doctorId", doctorId));
|
|
|
|
|
|
String response = HttpClientUtil.post(url, params, "UTF-8");
|
|
|
return responseStr(response);
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
|
|
@ -477,6 +479,7 @@ public class JwSmjkService {
|
|
|
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 url = jwUrl + "/third/guahao/CreateOrder";
|
|
|
List<NameValuePair> params = new ArrayList<>();
|
|
|
params.add(new BasicNameValuePair("hospitalName", hospitalName));
|
|
@ -493,7 +496,22 @@ public class JwSmjkService {
|
|
|
params.add(new BasicNameValuePair("patientPhone", patientPhone));
|
|
|
|
|
|
String response = HttpClientUtil.post(url, params, "UTF-8");
|
|
|
return responseStr(response);
|
|
|
if (!StringUtils.isEmpty(response)) {
|
|
|
JSONObject jsonObject = new JSONObject(response);
|
|
|
int status = jsonObject.getInt("status");
|
|
|
if (status == 200) {
|
|
|
re = jsonObject.getString("data");
|
|
|
} else {
|
|
|
String msg = "处理失败,请联系管理员";
|
|
|
if(!jsonObject.isNull("msg")){
|
|
|
msg = jsonObject.getString("msg");
|
|
|
}
|
|
|
throw new Exception(msg);
|
|
|
}
|
|
|
} else {
|
|
|
throw new Exception("null response.");
|
|
|
}
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
|
|
@ -503,14 +521,30 @@ public class JwSmjkService {
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public boolean CancelOrder(String orderId,String clinicCard) throws Exception{
|
|
|
public Boolean CancelOrder(String orderId,String clinicCard) throws Exception{
|
|
|
boolean re = false;
|
|
|
String url = jwUrl + "/third/guahao/CancelOrder";
|
|
|
List<NameValuePair> params = new ArrayList<>();
|
|
|
params.add(new BasicNameValuePair("orderId", orderId));
|
|
|
params.add(new BasicNameValuePair("clinicCard", clinicCard));
|
|
|
|
|
|
String response = HttpClientUtil.post(url, params, "UTF-8");
|
|
|
return responseBool(response);
|
|
|
if (!StringUtils.isEmpty(response)) {
|
|
|
JSONObject jsonObject = new JSONObject(response);
|
|
|
int status = jsonObject.getInt("status");
|
|
|
if (status == 200) {
|
|
|
re = jsonObject.getBoolean("data");
|
|
|
} else {
|
|
|
String msg = "处理失败,请联系管理员";
|
|
|
if(!jsonObject.isNull("msg")){
|
|
|
msg = jsonObject.getString("msg");
|
|
|
}
|
|
|
throw new Exception(msg);
|
|
|
}
|
|
|
} else {
|
|
|
throw new Exception("null response.");
|
|
|
}
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@ -520,6 +554,7 @@ public class JwSmjkService {
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public String GetDoctorInfo(String hospitalId,String hosDeptId,String doctorId) throws Exception{
|
|
|
String re = "";
|
|
|
String url = jwUrl + "/third/guahao/GetDoctorInfo";
|
|
|
List<NameValuePair> params = new ArrayList<>();
|
|
|
params.add(new BasicNameValuePair("hospitalId", hospitalId));
|
|
@ -527,7 +562,7 @@ public class JwSmjkService {
|
|
|
params.add(new BasicNameValuePair("doctorId", doctorId));
|
|
|
|
|
|
String response = HttpClientUtil.post(url, params, "UTF-8");
|
|
|
return responseStr(response);
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@ -572,7 +607,7 @@ public class JwSmjkService {
|
|
|
params.add(new BasicNameValuePair("patient", patient));
|
|
|
|
|
|
String response = HttpClientUtil.post(url, params, "UTF-8");
|
|
|
return responseStr(response);
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@ -582,6 +617,7 @@ public class JwSmjkService {
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public String GetRegDetail(String patient,String orgCode,String regCode) throws Exception{
|
|
|
String re = "";
|
|
|
String url = jwUrl + "/third/guahao/GetRegDetail";
|
|
|
List<NameValuePair> params = new ArrayList<>();
|
|
|
params.add(new BasicNameValuePair("patient", patient));
|
|
@ -589,7 +625,7 @@ public class JwSmjkService {
|
|
|
params.add(new BasicNameValuePair("regCode", regCode));
|
|
|
|
|
|
String response = HttpClientUtil.post(url, params, "UTF-8");
|
|
|
return responseStr(response);
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
|