|
@ -0,0 +1,51 @@
|
|
|
package com.yihu.wlyy.service.app.prescription;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.yihu.wlyy.entity.patient.prescription.Prescription;
|
|
|
import com.yihu.wlyy.entity.patient.prescription.PrescriptionLog;
|
|
|
import com.yihu.wlyy.repository.prescription.PrescriptionDao;
|
|
|
import com.yihu.wlyy.service.BaseService;
|
|
|
import com.yihu.wlyy.service.third.jw.JwPrescriptionService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
/**
|
|
|
* 线下调整处方
|
|
|
* Created by yeshijie on 2017/8/17.
|
|
|
*/
|
|
|
@Service
|
|
|
public class PrescriptionAdjustService extends BaseService {
|
|
|
|
|
|
@Autowired
|
|
|
private JwPrescriptionService jwPrescriptionService;
|
|
|
@Autowired
|
|
|
private PrescriptionDao prescriptionDao;
|
|
|
|
|
|
/**
|
|
|
* 线下调整处方
|
|
|
* @param code
|
|
|
*/
|
|
|
public void adjustPrescription(String code){
|
|
|
Prescription prescription = prescriptionDao.findByCode(code);
|
|
|
if(prescription.getStatus()== PrescriptionLog.PrescriptionLogStatus.revieweding.getValue()){
|
|
|
//待审核状态才可以线下调整处方
|
|
|
|
|
|
String response = jwPrescriptionService.saveRecipe(code,prescription.getJwGisterTypeCode(),prescription.getJwDeptCode());
|
|
|
JSONObject json = JSONObject.parseObject(response);
|
|
|
if(json.getInteger("status")==200){
|
|
|
JSONObject data = json.getJSONObject("data");
|
|
|
|
|
|
}else{
|
|
|
//请求报错
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|