|
@ -299,12 +299,15 @@ public class RehabilitationPlanService extends BaseJpaService<RehabilitationPlan
|
|
|
//创建康复计划
|
|
|
public PatientRehabilitationPlanDO createPatientRehabilitationPlan(PatientRehabilitationPlanDO planDO, List<RehabilitationDetailDO> details) {
|
|
|
|
|
|
String sql = "SELECT t.plan_doctor,t.plan_doctor_name from wlyy_rehabilitation_plan_template t,base_disease_hospital d " +
|
|
|
String sql = "SELECT t.plan_doctor,t.plan_doctor_name,t.id followupFormType from wlyy_rehabilitation_plan_template t,base_disease_hospital d " +
|
|
|
"WHERE d.id='" + planDO.getDisease() + "' and t.id =d.rehabilitation_template_id ";
|
|
|
List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
String planTemplateId = null;
|
|
|
if (list.size() > 0) {
|
|
|
planDO.setPlanDoctor(list.get(0).get("plan_doctor") + "");
|
|
|
planDO.setPlanDoctorName(list.get(0).get("plan_doctor_name") + "");
|
|
|
Map<String, Object> map = list.get(0);
|
|
|
planDO.setPlanDoctor(map.get("plan_doctor") + "");
|
|
|
planDO.setPlanDoctorName(map.get("plan_doctor_name") + "");
|
|
|
planTemplateId = list.get(0).get("id")+"";
|
|
|
}
|
|
|
|
|
|
PatientMedicalRecordsDO recordsDO = planDO.getMedicalRecordsDO();
|
|
@ -339,6 +342,18 @@ public class RehabilitationPlanService extends BaseJpaService<RehabilitationPlan
|
|
|
|
|
|
RehabilitationDetailDO detail = new RehabilitationDetailDO();
|
|
|
detail.setHospitalServiceItemId(templateDetailDO.getHospitalServiceItemId());
|
|
|
if("6".equals(templateDetailDO.getHospitalServiceItemId())){
|
|
|
String sql2 = "SELECT followup_form_type from wlyy_rehabilitation_template_detail WHERE template_id = '"+planTemplateId+"'";
|
|
|
List<Map<String, Object>> list2 = jdbcTemplate.queryForList(sql2);
|
|
|
String followup_form_type = "1";
|
|
|
if(list2.size()>0){
|
|
|
followup_form_type = list2.get(0).get("followup_form_type")+"";
|
|
|
if("null".equals(followup_form_type)){
|
|
|
followup_form_type = "1";
|
|
|
}
|
|
|
}
|
|
|
detail.setFollowupFormType(followup_form_type);
|
|
|
}
|
|
|
detail.setCreateTime(new Date());
|
|
|
detail.setStatus(0);
|
|
|
detail.setType(1);
|