|
@ -10,6 +10,7 @@ import com.yihu.wlyy.service.common.model.Result;
|
|
|
import com.yihu.wlyy.service.common.util.AmoutUtils;
|
|
|
import com.yihu.wlyy.service.common.util.CommonUtil;
|
|
|
import com.yihu.wlyy.service.common.util.DateUtil;
|
|
|
import com.yihu.wlyy.service.common.util.StringUtil;
|
|
|
import com.yihu.wlyy.service.dao.*;
|
|
|
import com.yihu.wlyy.service.dao.consult.ConsultTeamDao;
|
|
|
import com.yihu.wlyy.service.dao.prescription.*;
|
|
@ -697,15 +698,25 @@ public class PrescriptionService extends ZysoftBaseService{
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public String getRecipe(String cardNo,String appointRecipeNo) throws Exception
|
|
|
public String getRecipe(String cardNo,String appointRecipeNo,String preCode) throws Exception
|
|
|
{
|
|
|
Patient patient = patientDao.findBySsc(cardNo);
|
|
|
SignFamily signFamily = signFamilyDao.findByPatient(patient.getCode());
|
|
|
//
|
|
|
String[] hospitalMapping = getHospitalMapping(signFamily.getHospital()); //获取机构映射
|
|
|
String hospital = hospitalMapping[0];
|
|
|
String licence = hospitalMapping[1];
|
|
|
|
|
|
String hospital="";
|
|
|
String licence="";
|
|
|
if(signFamily!=null){
|
|
|
String[] hospitalMapping = getHospitalMapping(signFamily.getHospital()); //获取机构映射
|
|
|
hospital = hospitalMapping[0];
|
|
|
licence = hospitalMapping[1];
|
|
|
}else{
|
|
|
//如果签约过期,重历史处方获取机构数据
|
|
|
if(StringUtils.isNotBlank(preCode)){
|
|
|
Prescription p = prescriptionDao.findByCode(preCode);
|
|
|
String[] hospitalMapping = getHospitalMapping(p.getHospital()); //获取机构映射
|
|
|
hospital = hospitalMapping[0];
|
|
|
licence = hospitalMapping[1];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
Map<String,String> header = new HashMap<>();
|
|
|
header.put("ORGCODE",hospital);
|