|
@ -12,6 +12,7 @@ import com.yihu.jw.entity.base.patient.BasePatientDO;
|
|
import com.yihu.jw.entity.care.prescription.BaseCarePrescriptionDO;
|
|
import com.yihu.jw.entity.care.prescription.BaseCarePrescriptionDO;
|
|
import com.yihu.jw.patient.dao.BasePatientDao;
|
|
import com.yihu.jw.patient.dao.BasePatientDao;
|
|
import com.yihu.jw.restmodel.ResponseContant;
|
|
import com.yihu.jw.restmodel.ResponseContant;
|
|
|
|
import com.yihu.jw.util.common.IdCardUtil;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
@ -111,6 +112,15 @@ public class BaseCarePrescriptionService {
|
|
result.put(ResponseContant.resultFlag,ResponseContant.fail);
|
|
result.put(ResponseContant.resultFlag,ResponseContant.fail);
|
|
result.put(ResponseContant.resultMsg,"续方记录不存在");
|
|
result.put(ResponseContant.resultMsg,"续方记录不存在");
|
|
}else {
|
|
}else {
|
|
|
|
BasePatientDO patientDO = patientDao.findById(prescriptionDO.getPatient());
|
|
|
|
if (null!=patientDO){
|
|
|
|
Integer sex = patientDO.getSex();
|
|
|
|
prescriptionDO.setSex(null==sex?null:1==sex?"男":"女");
|
|
|
|
prescriptionDO.setPhoto(patientDO.getPhoto());
|
|
|
|
try{
|
|
|
|
prescriptionDO.setAge(IdCardUtil.getAgeByIdcardOrBirthday(patientDO.getIdcard(),patientDO.getBirthday())+"");
|
|
|
|
}catch (Exception e){}
|
|
|
|
}
|
|
JSONObject objDo = JSONObject.parseObject(JSON.toJSONStringWithDateFormat(prescriptionDO,"yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteMapNullValue));
|
|
JSONObject objDo = JSONObject.parseObject(JSON.toJSONStringWithDateFormat(prescriptionDO,"yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteMapNullValue));
|
|
result.put(ResponseContant.resultFlag,ResponseContant.success);
|
|
result.put(ResponseContant.resultFlag,ResponseContant.success);
|
|
result.put(ResponseContant.resultMsg,objDo);
|
|
result.put(ResponseContant.resultMsg,objDo);
|