|
@ -8,6 +8,7 @@ import com.yihu.jw.dict.dao.DictHospitalDeptDao;
|
|
import com.yihu.jw.doctor.dao.BaseDoctorDao;
|
|
import com.yihu.jw.doctor.dao.BaseDoctorDao;
|
|
import com.yihu.jw.doctor.dao.BaseDoctorHospitalDao;
|
|
import com.yihu.jw.doctor.dao.BaseDoctorHospitalDao;
|
|
import com.yihu.jw.doctor.dao.BaseDoctorRoleDao;
|
|
import com.yihu.jw.doctor.dao.BaseDoctorRoleDao;
|
|
|
|
import com.yihu.jw.entity.base.dict.BaseJobCategoryDO;
|
|
import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
|
|
import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
|
|
import com.yihu.jw.entity.base.dict.DictIcd10DO;
|
|
import com.yihu.jw.entity.base.dict.DictIcd10DO;
|
|
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
|
|
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
|
|
@ -79,6 +80,8 @@ public class YkyyEntranceService {
|
|
|
|
|
|
private final static String jdbcUrl="http://192.168.33.197:10023/ykyy/jdbcSQLQuery";
|
|
private final static String jdbcUrl="http://192.168.33.197:10023/ykyy/jdbcSQLQuery";
|
|
|
|
|
|
|
|
private final static String updateJdxx="http://192.168.33.197:10023/ykyy/updateJdxx";
|
|
|
|
|
|
private final static String orgCode ="350211A5004";
|
|
private final static String orgCode ="350211A5004";
|
|
|
|
|
|
private final static String orgName ="厦门大学附属厦门眼科中心";
|
|
private final static String orgName ="厦门大学附属厦门眼科中心";
|
|
@ -133,8 +136,6 @@ public class YkyyEntranceService {
|
|
@Autowired
|
|
@Autowired
|
|
private JdbcTemplate jdbcTemplate;
|
|
private JdbcTemplate jdbcTemplate;
|
|
@Autowired
|
|
@Autowired
|
|
private DictDoctorDutyDao dictDoctorDutyDao;
|
|
|
|
@Autowired
|
|
|
|
private BasePatientMedicareCardDao patientMedicareCardDao;
|
|
private BasePatientMedicareCardDao patientMedicareCardDao;
|
|
@Autowired
|
|
@Autowired
|
|
private WlyyInspectionDao wlyyInspectionDao;
|
|
private WlyyInspectionDao wlyyInspectionDao;
|
|
@ -2130,6 +2131,7 @@ public class YkyyEntranceService {
|
|
JSONObject object = array.getJSONObject(0);
|
|
JSONObject object = array.getJSONObject(0);
|
|
String yjxh = object.getString("yjxh");
|
|
String yjxh = object.getString("yjxh");
|
|
natAppointmentDO.setRealOrder(yjxh);
|
|
natAppointmentDO.setRealOrder(yjxh);
|
|
|
|
natAppointmentDO.setIsSuccess("1");
|
|
baseNatAppointmentDao.save(natAppointmentDO);
|
|
baseNatAppointmentDao.save(natAppointmentDO);
|
|
}else {
|
|
}else {
|
|
}
|
|
}
|
|
@ -3029,6 +3031,63 @@ public class YkyyEntranceService {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public JSONObject selectByAddress(String cardNo) throws Exception {
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
String address = null;
|
|
|
|
String zydm = null;
|
|
|
|
String jtdh = null;
|
|
|
|
JSONArray array = new JSONArray();
|
|
|
|
String sql = "SELECT brid as \"brid\",hkdz as \"hkdz\",zydm as \"zydm\",jtdh as \"jtdh\" from portal_his.V_ZKSG_BRCX@xec_link where jzkh = '"+cardNo+"'";
|
|
|
|
Map<String,Object> params = new HashedMap();
|
|
|
|
params.put("sql",sql);
|
|
|
|
HttpResponse response = HttpUtils.doGet(url,params);
|
|
|
|
String content = response.getContent();
|
|
|
|
logger.info("response:"+content);
|
|
|
|
JSONObject rs = JSON.parseObject(content);
|
|
|
|
Integer status = rs.getInteger("status");
|
|
|
|
if (status==200){
|
|
|
|
array = rs.getJSONArray("detailModelList");
|
|
|
|
if (array!=null&&array.size()!=0){
|
|
|
|
JSONObject object = array.getJSONObject(0);
|
|
|
|
address=object.getString("hkdz");
|
|
|
|
zydm = object.getString("zydm");
|
|
|
|
jtdh = object.getString("jtdh");
|
|
|
|
jsonObject.put("address",address);
|
|
|
|
jsonObject.put("zydm",zydm);
|
|
|
|
jsonObject.put("jtdh",jtdh);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
return jsonObject;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 通过卡号更新患者信息
|
|
|
|
*/
|
|
|
|
public void updatePatientJd(String patient,String address,String phone,Float zy, boolean demoFlag) throws Exception {
|
|
|
|
BasePatientDO basePatientDO = basePatientDao.findById(patient);
|
|
|
|
PatientMedicareCardDO patientMedicareCardDO = patientMedicareCardDao.findByTypeAndPatientCodeAndDel("A_01",patient,"1");
|
|
|
|
JSONArray jsonArray = findHisPatient(patientMedicareCardDO.getCode(),demoFlag);
|
|
|
|
if(jsonArray!=null&&jsonArray.size()>0){
|
|
|
|
//获取居民信息
|
|
|
|
JSONObject json = jsonArray.getJSONObject(0);
|
|
|
|
String brid = json.getString("brid");
|
|
|
|
Float id = Float.parseFloat(brid);
|
|
|
|
Map<String,Object> params = new HashedMap();
|
|
|
|
params.put("brid",id);
|
|
|
|
params.put("sfzh",basePatientDO.getIdcard());
|
|
|
|
params.put("lxdh",phone);
|
|
|
|
params.put("lxdz",address);
|
|
|
|
params.put("zy",zy);
|
|
|
|
HttpResponse response = HttpUtils.doGet(updateJdxx,params);
|
|
|
|
logger.info("更新患者信息"+response);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public String saveJdxx(String brxm,String csny,Float brxb,String czgh,String sfzh,Float sjhm,String ybkh,String lxdz,Float zy){
|
|
public String saveJdxx(String brxm,String csny,Float brxb,String czgh,String sfzh,Float sjhm,String ybkh,String lxdz,Float zy){
|
|
return hibenateUtils.saveJdxx(brxm,DateUtil.strToDateShort(csny),brxb,czgh,sfzh,sjhm,ybkh,lxdz,zy);
|
|
return hibenateUtils.saveJdxx(brxm,DateUtil.strToDateShort(csny),brxb,czgh,sfzh,sjhm,ybkh,lxdz,zy);
|