|
@ -375,7 +375,7 @@ public class FollowUpService extends BaseService {
|
|
|
public Iterable<Followup> addFollowupPlan(String doctorCode, String patientCode, String data) throws Exception {
|
|
|
//批量随访计划
|
|
|
JavaType javaType = objectMapper.getTypeFactory().constructParametricType(List.class, Map.class);
|
|
|
List<Map<String, String>> list = objectMapper.readValue(data, javaType);
|
|
|
List<Map<String, Object>> list = objectMapper.readValue(data, javaType);
|
|
|
if (list != null && list.size() > 0) {
|
|
|
//获取患者信息
|
|
|
Patient patient = patientDao.findByCode(patientCode);
|
|
@ -385,16 +385,16 @@ public class FollowUpService extends BaseService {
|
|
|
ConcernDO concern = concernService.getByDoctorAndPatient(doctorCode,patientCode);
|
|
|
|
|
|
List<Followup> followupPlan = new ArrayList<>();
|
|
|
for (Map<String, String> map : list) {
|
|
|
for (Map<String, Object> map : list) {
|
|
|
//获取医生信息
|
|
|
Doctor doctor = doctorDao.findByCode(map.get("doctor"));
|
|
|
Doctor doctor = doctorDao.findByCode(map.get("doctor").toString());
|
|
|
if (doctor == null) {
|
|
|
throw new Exception("not exit doctor:" + doctorCode + ".\r\n");
|
|
|
}
|
|
|
|
|
|
Followup followup = new Followup();
|
|
|
followup.setFollowupType(map.get("type").toString());
|
|
|
Date date = DateUtil.strToDate(map.get("date"));
|
|
|
Date date = DateUtil.strToDate(map.get("date").toString());
|
|
|
followup.setFollowupDate(date);
|
|
|
followup.setFollowupPlanDate(date);
|
|
|
followup.setDoctorCode(doctor.getCode());
|