|
@ -17,6 +17,7 @@ import com.yihu.wlyy.entity.patient.SignFamily;
|
|
|
import com.yihu.wlyy.entity.patient.prescription.Prescription;
|
|
|
import com.yihu.wlyy.entity.patient.prescription.PrescriptionDiagnosis;
|
|
|
import com.yihu.wlyy.entity.patient.prescription.PrescriptionInfo;
|
|
|
import com.yihu.wlyy.entity.patient.prescription.PrescriptionReviewed;
|
|
|
import com.yihu.wlyy.repository.consult.ConsultTeamDao;
|
|
|
import com.yihu.wlyy.repository.consult.ConsultTeamDoctorDao;
|
|
|
import com.yihu.wlyy.repository.consult.ConsultTeamLogDao;
|
|
@ -30,6 +31,7 @@ import com.yihu.wlyy.repository.patient.SignFamilyDao;
|
|
|
import com.yihu.wlyy.repository.prescription.PrescriptionDao;
|
|
|
import com.yihu.wlyy.repository.prescription.PrescriptionDiagnosisDao;
|
|
|
import com.yihu.wlyy.repository.prescription.PrescriptionInfoDao;
|
|
|
import com.yihu.wlyy.repository.prescription.PrescriptionReviewedDao;
|
|
|
import com.yihu.wlyy.service.app.health.HealthEduArticleService;
|
|
|
import com.yihu.wlyy.service.app.health.PatientHealthGuidanceService;
|
|
|
import com.yihu.wlyy.service.app.prescription.PrescriptionLogService;
|
|
@ -121,6 +123,8 @@ public class ConsultTeamService extends ConsultService {
|
|
|
private ImUtill ImUtill;
|
|
|
@Autowired
|
|
|
private HttpClientUtil HttpClientUtil;
|
|
|
@Autowired
|
|
|
private PrescriptionReviewedDao prescriptionReviewedDao;
|
|
|
|
|
|
@Autowired
|
|
|
WeiXinAccessTokenUtils accessTokenUtils;
|
|
@ -1010,6 +1014,7 @@ public class ConsultTeamService extends ConsultService {
|
|
|
*/
|
|
|
public String savePrescription(Prescription prescription,String jwCode,Doctor doctor,Patient p,ConsultTeam ct,String reason){
|
|
|
String re = "";
|
|
|
//续方主表
|
|
|
prescription.setCode(getCode());
|
|
|
prescription.setParentCode(jwCode);
|
|
|
prescription.setHospitalName(doctor.getHospitalName());
|
|
@ -1029,7 +1034,7 @@ public class ConsultTeamService extends ConsultService {
|
|
|
prescription.setConsult(ct.getConsult());
|
|
|
prescriptionDao.save(prescription);
|
|
|
|
|
|
//保存续方疾病类型和药品(处方)信息
|
|
|
//保存续方药品(处方)信息
|
|
|
PrescriptionInfo prescriptionInfo = new PrescriptionInfo();
|
|
|
prescriptionInfo.setPrescriptionCode(prescription.getCode());
|
|
|
prescriptionInfo.setCode(getCode());
|
|
@ -1063,6 +1068,7 @@ public class ConsultTeamService extends ConsultService {
|
|
|
prescriptionInfo.setRemark("");//备注
|
|
|
prescriptionInfoDao.save(prescriptionInfo);
|
|
|
|
|
|
//保存续方疾病类型
|
|
|
PrescriptionDiagnosis diagnosis = new PrescriptionDiagnosis();
|
|
|
diagnosis.setCode("1");
|
|
|
diagnosis.setPrescriptionCode(prescription.getCode());
|
|
@ -1071,6 +1077,18 @@ public class ConsultTeamService extends ConsultService {
|
|
|
diagnosis.setUpdateTime(new Date());
|
|
|
prescriptionDiagnosisDao.save(diagnosis);
|
|
|
|
|
|
//保存审核信息
|
|
|
PrescriptionReviewed reviewed = new PrescriptionReviewed();
|
|
|
reviewed.setPrescriptionCode(prescription.getCode());
|
|
|
reviewed.setCode(getCode());
|
|
|
reviewed.setStatus(0);
|
|
|
reviewed.setCreateTime(new Date());
|
|
|
reviewed.setDoctor(prescription.getDoctor());
|
|
|
reviewed.setDoctorName(prescription.getDoctorName());
|
|
|
reviewed.setHospital(prescription.getHospital());
|
|
|
reviewed.setHospitalName(prescription.getHospitalName());
|
|
|
prescriptionReviewedDao.save(reviewed);
|
|
|
|
|
|
re +=diagnosis.getName();
|
|
|
|
|
|
prescriptionLogService.addLog(prescription,3,1,1);
|