|
@ -139,17 +139,19 @@ public class RehabilitationManageService extends BaseService {
|
|
* @return
|
|
* @return
|
|
* @throws Exception
|
|
* @throws Exception
|
|
*/
|
|
*/
|
|
public JSONObject findRehabilitationPlanDetailList(String doctorCode,String patientCode) throws Exception{
|
|
|
|
|
|
public JSONArray findRehabilitationPlanDetailList(String doctorCode,String patientCode) throws Exception{
|
|
Map<String, Object> param = new HashedMap();
|
|
Map<String, Object> param = new HashedMap();
|
|
param.put("doctorCode", doctorCode);
|
|
param.put("doctorCode", doctorCode);
|
|
param.put("patientCode", patientCode);
|
|
param.put("patientCode", patientCode);
|
|
HttpResponse response = HttpUtils.doGet(specialistUrl + findRehabilitationPlanDetailList, param);
|
|
HttpResponse response = HttpUtils.doGet(specialistUrl + findRehabilitationPlanDetailList, param);
|
|
JSONObject result = new JSONObject(response.getContent());
|
|
JSONObject result = new JSONObject(response.getContent());
|
|
if(result.getInt("status")==200){
|
|
if(result.getInt("status")==200){
|
|
JSONObject jsonObject = result.getJSONObject("obj");
|
|
|
|
Patient p = patientDao.findByCode(patientCode);
|
|
|
|
jsonObject.put("patientPhoto",p.getPhoto());
|
|
|
|
return jsonObject;
|
|
|
|
|
|
JSONArray jsonArray = result.getJSONArray("obj");
|
|
|
|
for(int i=0;i<jsonArray.length();i++){
|
|
|
|
Patient p = patientDao.findByCode(patientCode);
|
|
|
|
jsonArray.getJSONObject(i).put("patientPhoto",p.getPhoto());
|
|
|
|
}
|
|
|
|
return jsonArray;
|
|
}
|
|
}
|
|
throw new Exception("请求微服务失败!");
|
|
throw new Exception("请求微服务失败!");
|
|
}
|
|
}
|