|
@ -4,13 +4,17 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.yihu.jw.care.dao.label.PatientLabelDao;
|
|
|
import com.yihu.jw.care.dao.sign.*;
|
|
|
import com.yihu.jw.care.service.common.DictService;
|
|
|
import com.yihu.jw.care.util.ConstantUtil;
|
|
|
import com.yihu.jw.doctor.dao.BaseDoctorDao;
|
|
|
import com.yihu.jw.doctor.dao.BaseDoctorHospitalDao;
|
|
|
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
|
|
|
import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
|
|
|
import com.yihu.jw.entity.base.org.BaseOrgDO;
|
|
|
import com.yihu.jw.entity.base.patient.BasePatientDO;
|
|
|
import com.yihu.jw.entity.care.label.PatientLabelDO;
|
|
|
import com.yihu.jw.entity.care.sign.*;
|
|
|
import com.yihu.jw.org.dao.BaseOrgDao;
|
|
|
import com.yihu.jw.patient.dao.BasePatientDao;
|
|
@ -25,6 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.util.Date;
|
|
|
import java.util.Iterator;
|
|
@ -58,6 +63,10 @@ public class CapacityAssessmentRecordService extends BaseJpaService<CapacityAsse
|
|
|
@Autowired
|
|
|
private CapacityAssessmentSocialAbilityDao CASocialAbilityDao;
|
|
|
@Autowired
|
|
|
private PatientLabelDao patientLabelDao;
|
|
|
@Autowired
|
|
|
private DictService dictService;
|
|
|
@Autowired
|
|
|
private BaseOrgDao baseOrgDao;
|
|
|
|
|
|
|
|
@ -153,9 +162,8 @@ public class CapacityAssessmentRecordService extends BaseJpaService<CapacityAsse
|
|
|
* @param doctorId
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public void capacityAssessment(String jsonData,String doctorId) throws Exception{
|
|
|
|
|
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(jsonData);
|
|
|
CapacityAssessmentRecordDO recordDO = objectMapper.readValue(jsonObject.getJSONObject("assessment").toJSONString(), CapacityAssessmentRecordDO.class);
|
|
|
|
|
@ -169,6 +177,15 @@ public class CapacityAssessmentRecordService extends BaseJpaService<CapacityAsse
|
|
|
recordDO.setServicePackageStatus(0);
|
|
|
recordDO.setStatus(0);
|
|
|
capacityAssessmentRecordDao.save(recordDO);
|
|
|
|
|
|
//生成居民标签
|
|
|
patientLabelDao.deleteByPatient(recordDO.getPatient());
|
|
|
PatientLabelDO patientLabelDO = new PatientLabelDO();
|
|
|
patientLabelDO.setCzrq(new Date());
|
|
|
patientLabelDO.setLabelType("1");
|
|
|
patientLabelDO.setLabelCode(String.valueOf(recordDO.getLevelConclusion()));
|
|
|
patientLabelDO.setLabelName(dictService.fingByNameAndCode(ConstantUtil.DICT_SERVICE_TYPE,patientLabelDO.getLabelCode()));
|
|
|
patientLabelDao.save(patientLabelDO);
|
|
|
}
|
|
|
}
|
|
|
|