|
@ -22,7 +22,6 @@ import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
|
|
|
import com.yihu.jw.hospital.prescription.dao.OutpatientDao;
|
|
|
import com.yihu.jw.hospital.prescription.service.DsyyPrescriptionService;
|
|
|
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
|
|
|
import com.yihu.jw.hospital.prescription.service.entrance.DsyyEntranceService;
|
|
|
import com.yihu.jw.hospital.prescription.service.entrance.XzzxEntranceService;
|
|
|
import com.yihu.jw.org.dao.BaseOrgDao;
|
|
|
import com.yihu.jw.patient.dao.BasePatientDao;
|
|
@ -97,46 +96,47 @@ public class WlyyBusinessService {
|
|
|
|
|
|
/**
|
|
|
* 推送系统门诊wlyy系统消息
|
|
|
*
|
|
|
* @param doctor
|
|
|
* @param outPatientId
|
|
|
* @return
|
|
|
*/
|
|
|
public Boolean sendWlyyOutpatientMes(String doctor,String outPatientId){
|
|
|
public Boolean sendWlyyOutpatientMes(String doctor, String outPatientId) {
|
|
|
|
|
|
BaseDoctorDO doctorDO = baseDoctorDao.findById(doctor).orElse(null);
|
|
|
|
|
|
if(doctorDO!=null&& StringUtils.isNotBlank(doctorDO.getIdcard())){
|
|
|
WlyyOutpatientDO outpatientDO =outpatientDao.findById(outPatientId).orElse(null);
|
|
|
if (doctorDO != null && StringUtils.isNotBlank(doctorDO.getIdcard())) {
|
|
|
WlyyOutpatientDO outpatientDO = outpatientDao.findById(outPatientId).orElse(null);
|
|
|
BasePatientDO basePatientDO = basePatientDao.findById(outpatientDO.getPatient()).orElse(null);
|
|
|
|
|
|
JSONObject param = new JSONObject();
|
|
|
param.put("idCard",doctorDO.getIdcard());
|
|
|
param.put("sender","hlwyy");
|
|
|
param.put("senderName","互联网医院");
|
|
|
param.put("relationCode",outPatientId);
|
|
|
param.put("idCard", doctorDO.getIdcard());
|
|
|
param.put("sender", "hlwyy");
|
|
|
param.put("senderName", "互联网医院");
|
|
|
param.put("relationCode", outPatientId);
|
|
|
String sex = "";
|
|
|
try {
|
|
|
String sx = IdCardUtil.getSexForIdcard_new(basePatientDO.getIdcard());
|
|
|
if("1".equals(sx)){
|
|
|
if ("1".equals(sx)) {
|
|
|
sex = "男";
|
|
|
}else if("2".equals(sx)){
|
|
|
} else if ("2".equals(sx)) {
|
|
|
sex = "女";
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
logger.error("推送wlyy系统消息 身份证转换性别失败!:"+e.toString());
|
|
|
} catch (Exception e) {
|
|
|
logger.error("推送wlyy系统消息 身份证转换性别失败!:" + e.toString());
|
|
|
}
|
|
|
String age = IdCardUtil.getAgeForIdcard(basePatientDO.getIdcard())==-1?"未知":IdCardUtil.getAgeForIdcard(basePatientDO.getIdcard())+"";
|
|
|
String age = IdCardUtil.getAgeForIdcard(basePatientDO.getIdcard()) == -1 ? "未知" : IdCardUtil.getAgeForIdcard(basePatientDO.getIdcard()) + "";
|
|
|
|
|
|
String content = "您已向"+outpatientDO.getHospitalName()+outpatientDO.getDeptName()+
|
|
|
"医师"+doctorDO.getName()+"发起了协同门诊请求。协同门诊患者:"+outpatientDO.getPatientName()+
|
|
|
"("+sex+" "+age+"岁),协同门诊时间:"+ DateUtil.dateToStr(outpatientDO.getRegisterDate(),"yyyy-MM-dd HH:mm");
|
|
|
String content = "您已向" + outpatientDO.getHospitalName() + outpatientDO.getDeptName() +
|
|
|
"医师" + doctorDO.getName() + "发起了协同门诊请求。协同门诊患者:" + outpatientDO.getPatientName() +
|
|
|
"(" + sex + " " + age + "岁),协同门诊时间:" + DateUtil.dateToStr(outpatientDO.getRegisterDate(), "yyyy-MM-dd HH:mm");
|
|
|
|
|
|
param.put("content",content);
|
|
|
param.put("title","协同门诊消息");
|
|
|
param.put("type",500);
|
|
|
param.put("content", content);
|
|
|
param.put("title", "协同门诊消息");
|
|
|
param.put("type", 500);
|
|
|
|
|
|
JSONObject rs = wlyyHttpService.sendWlyyMes("wlyySendMes",param,null);
|
|
|
if(rs!=null){
|
|
|
JSONObject rs = wlyyHttpService.sendWlyyMes("wlyySendMes", param, null);
|
|
|
if (rs != null) {
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
@ -144,22 +144,22 @@ public class WlyyBusinessService {
|
|
|
}
|
|
|
|
|
|
|
|
|
public Boolean readWlyyOutpatientMes(String outPatientId){
|
|
|
public Boolean readWlyyOutpatientMes(String outPatientId) {
|
|
|
|
|
|
Map<String,Object> res = new HashedMap();
|
|
|
Map<String, Object> res = new HashedMap();
|
|
|
|
|
|
WlyyOutpatientDO outpatientDO =outpatientDao.findById(outPatientId).orElse(null);
|
|
|
WlyyOutpatientDO outpatientDO = outpatientDao.findById(outPatientId).orElse(null);
|
|
|
|
|
|
if(outpatientDO!=null){
|
|
|
if (outpatientDO != null) {
|
|
|
BaseDoctorDO doctorDO = baseDoctorDao.findById(outpatientDO.getDoctor()).orElse(null);
|
|
|
|
|
|
JSONObject param = new JSONObject();
|
|
|
param.put("idCard",doctorDO.getIdcard());
|
|
|
param.put("type",500);
|
|
|
param.put("relationCode",outPatientId);
|
|
|
param.put("idCard", doctorDO.getIdcard());
|
|
|
param.put("type", 500);
|
|
|
param.put("relationCode", outPatientId);
|
|
|
|
|
|
JSONObject rs = wlyyHttpService.sendWlyyMes("wlyyReadMes",param,null);
|
|
|
if(rs!=null){
|
|
|
JSONObject rs = wlyyHttpService.sendWlyyMes("wlyyReadMes", param, null);
|
|
|
if (rs != null) {
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
@ -172,46 +172,47 @@ public class WlyyBusinessService {
|
|
|
* @param idCard
|
|
|
* @return
|
|
|
*/
|
|
|
public Boolean checkSignFamily(String idCard){
|
|
|
public Boolean checkSignFamily(String idCard) {
|
|
|
|
|
|
JSONObject param = new JSONObject();
|
|
|
param.put("idCard",idCard);
|
|
|
JSONObject rs = wlyyHttpService.sendWlyyMes("wlyyCheckSignFamily",param,null);
|
|
|
if(rs!=null){
|
|
|
param.put("idCard", idCard);
|
|
|
JSONObject rs = wlyyHttpService.sendWlyyMes("wlyyCheckSignFamily", param, null);
|
|
|
if (rs != null) {
|
|
|
return true;
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 根据身份证获取i健康居民信息
|
|
|
*
|
|
|
* @param idcard
|
|
|
* @return
|
|
|
*/
|
|
|
public String getPatientCodeByWlyyIdcard(String idcard) throws Exception {
|
|
|
BasePatientDO patientDO = basePatientDao.findByIdcardAndDel(idcard,"1");
|
|
|
BasePatientDO patientDO = basePatientDao.findByIdcardAndDel(idcard, "1");
|
|
|
String result = "";
|
|
|
if(patientDO == null){
|
|
|
|
|
|
Map<String,String> params = new HashMap<>();
|
|
|
params.put("idcard",idcard);
|
|
|
|
|
|
JSONObject rs = wlyyHttpService.sendWlyyMes("wlyyGetPatient",null,params);
|
|
|
if(rs!=null){
|
|
|
if (patientDO == null) {
|
|
|
|
|
|
Map<String, String> params = new HashMap<>();
|
|
|
params.put("idcard", idcard);
|
|
|
|
|
|
JSONObject rs = wlyyHttpService.sendWlyyMes("wlyyGetPatient", null, params);
|
|
|
if (rs != null) {
|
|
|
Integer status = rs.getInteger("status");
|
|
|
if(200 == status){
|
|
|
if (200 == status) {
|
|
|
JSONObject data = rs.getJSONObject("data");
|
|
|
BasePatientDO patient = new BasePatientDO();
|
|
|
String salt = UUID.randomUUID().toString().substring(0,5);
|
|
|
String salt = UUID.randomUUID().toString().substring(0, 5);
|
|
|
String mobile = data.getString("mobile");
|
|
|
String pw = null;
|
|
|
|
|
|
if(StringUtils.isNotBlank(mobile)){
|
|
|
pw = mobile.substring(mobile.length()-6);
|
|
|
}else{
|
|
|
pw = idcard.substring(idcard.length()-6);
|
|
|
|
|
|
if (StringUtils.isNotBlank(mobile)) {
|
|
|
pw = mobile.substring(mobile.length() - 6);
|
|
|
} else {
|
|
|
pw = idcard.substring(idcard.length() - 6);
|
|
|
}
|
|
|
|
|
|
|
|
|
patient.setIdcard(idcard);
|
|
|
patient.setName(data.getString("name"));
|
|
|
patient.setPassword(MD5.md5Hex(pw + "{" + salt + "}"));
|
|
@ -222,10 +223,10 @@ public class WlyyBusinessService {
|
|
|
patient.setLocked(0);
|
|
|
patient.setCreateTime(new Date());
|
|
|
patient.setUpdateTime(new Date());
|
|
|
patient.setBirthday(DateUtil.strToDate(data.getString("birthday"),"yyyyMMdd"));
|
|
|
patient.setBirthday(DateUtil.strToDate(data.getString("birthday"), "yyyyMMdd"));
|
|
|
patient = basePatientDao.save(patient);
|
|
|
result = patient.getId();
|
|
|
if(data.get("ssc")!=null){
|
|
|
if (data.get("ssc") != null) {
|
|
|
PatientMedicareCardDO patientMedicareCardDO = new PatientMedicareCardDO();
|
|
|
patientMedicareCardDO.setDel("1");
|
|
|
patientMedicareCardDO.setPatientCode(patient.getId());
|
|
@ -233,20 +234,21 @@ public class WlyyBusinessService {
|
|
|
patientMedicareCardDO.setType("A_01");
|
|
|
patientMedicareCardDao.save(patientMedicareCardDO);
|
|
|
}
|
|
|
}else{
|
|
|
} else {
|
|
|
throw new Exception("请求i健康接口,获取居民信息失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}else{
|
|
|
result = patientDO.getId();
|
|
|
} else {
|
|
|
result = patientDO.getId();
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* (健康咨询)转发消息
|
|
|
*
|
|
|
* @param senderIdcard
|
|
|
* @param reciverIdcard
|
|
|
* @param messageids
|
|
@ -256,48 +258,49 @@ public class WlyyBusinessService {
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public Boolean wlyyMessageForward(String senderIdcard, String reciverIdcard, String messageids, String title, String sessionType) throws Exception {
|
|
|
|
|
|
Map<String,String> params = new HashMap<>();
|
|
|
params.put("senderIdcard",senderIdcard);
|
|
|
params.put("reciverIdcard",reciverIdcard);
|
|
|
params.put("messageids",messageids);
|
|
|
params.put("title",title);
|
|
|
params.put("sessionType",sessionType);
|
|
|
|
|
|
JSONObject rs = wlyyHttpService.sendWlyyMes("wlyyMessageForward",null,params);
|
|
|
if(rs!=null){
|
|
|
|
|
|
Map<String, String> params = new HashMap<>();
|
|
|
params.put("senderIdcard", senderIdcard);
|
|
|
params.put("reciverIdcard", reciverIdcard);
|
|
|
params.put("messageids", messageids);
|
|
|
params.put("title", title);
|
|
|
params.put("sessionType", sessionType);
|
|
|
|
|
|
JSONObject rs = wlyyHttpService.sendWlyyMes("wlyyMessageForward", null, params);
|
|
|
if (rs != null) {
|
|
|
Integer status = rs.getInteger("status");
|
|
|
if(200 == status){
|
|
|
if (200 == status) {
|
|
|
return true;
|
|
|
}else{
|
|
|
} else {
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 根据居民CODE换取居民请求秘钥
|
|
|
*
|
|
|
* @param patientId
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public String wlyyGetPatientAccetokenByIdcard(String patientId,String wxId,String doctorId) throws Exception {
|
|
|
|
|
|
public String wlyyGetPatientAccetokenByIdcard(String patientId, String wxId, String doctorId) throws Exception {
|
|
|
|
|
|
String idcard = "";
|
|
|
String result = "";
|
|
|
BasePatientDO basePatientDO = basePatientDao.findById(patientId).get();
|
|
|
if(basePatientDO != null){
|
|
|
if (basePatientDO != null) {
|
|
|
idcard = basePatientDO.getIdcard();
|
|
|
|
|
|
Map<String,String> params = new HashMap<>();
|
|
|
params.put("idcard",idcard);
|
|
|
|
|
|
Map<String, String> params = new HashMap<>();
|
|
|
params.put("idcard", idcard);
|
|
|
|
|
|
String patientCardNo = null;
|
|
|
patientMedicareCardDao.deleteByPatientId(patientId);
|
|
|
if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
|
|
|
net.sf.json.JSONArray array =prescriptionService.findPatientCard(patientId);
|
|
|
for (int i=0;i<array.size();i++){
|
|
|
if (wxId.equalsIgnoreCase("xm_zsyy_wx")) {
|
|
|
net.sf.json.JSONArray array = prescriptionService.findPatientCard(patientId);
|
|
|
for (int i = 0; i < array.size(); i++) {
|
|
|
net.sf.json.JSONObject object = array.getJSONObject(i);
|
|
|
String cardType = object.getString("CARD_TYPE");
|
|
|
String cardNo = object.getString("CARD_NO");
|
|
@ -305,10 +308,10 @@ public class WlyyBusinessService {
|
|
|
PatientMedicareCardDO patientMedicareCardDO = new PatientMedicareCardDO();
|
|
|
patientMedicareCardDO.setCode(cardNo);
|
|
|
patientMedicareCardDO.setParentType("A");
|
|
|
if (cardType.equalsIgnoreCase("2")){
|
|
|
if (cardType.equalsIgnoreCase("2")) {
|
|
|
patientMedicareCardDO.setType("A_01");
|
|
|
patientCardNo = cardNo;
|
|
|
}else {
|
|
|
} else {
|
|
|
patientMedicareCardDO.setType("A_03");
|
|
|
}
|
|
|
patientMedicareCardDO.setPatientCode(patientId);
|
|
@ -318,9 +321,9 @@ public class WlyyBusinessService {
|
|
|
patientMedicareCardDO.setRemark(cardTypeName);
|
|
|
patientMedicareCardDao.save(patientMedicareCardDO);
|
|
|
}
|
|
|
}else if (wxId.equalsIgnoreCase("xm_xzzx_wx")){
|
|
|
} else if (wxId.equalsIgnoreCase("xm_xzzx_wx")) {
|
|
|
JSONArray array = xzzxEntranceService.selectPateintCard(patientId);
|
|
|
for (int i=0;i<array.size();i++){
|
|
|
for (int i = 0; i < array.size(); i++) {
|
|
|
JSONObject jsonObject = array.getJSONObject(i);
|
|
|
String cardType = jsonObject.getString("CARD_TYPE");
|
|
|
String cardNo = jsonObject.getString("CARD_NO");
|
|
@ -328,10 +331,10 @@ public class WlyyBusinessService {
|
|
|
PatientMedicareCardDO patientMedicareCardDO = new PatientMedicareCardDO();
|
|
|
patientMedicareCardDO.setCode(cardNo);
|
|
|
patientMedicareCardDO.setParentType("A");
|
|
|
if (cardType.equalsIgnoreCase("01")){
|
|
|
if (cardType.equalsIgnoreCase("01")) {
|
|
|
patientMedicareCardDO.setType("A_01");
|
|
|
patientCardNo = cardNo;
|
|
|
}else {
|
|
|
} else {
|
|
|
patientMedicareCardDO.setType("A_03");
|
|
|
}
|
|
|
patientMedicareCardDO.setPatientCode(patientId);
|
|
@ -341,19 +344,19 @@ public class WlyyBusinessService {
|
|
|
patientMedicareCardDO.setRemark(cardTypeName);
|
|
|
patientMedicareCardDao.save(patientMedicareCardDO);
|
|
|
}
|
|
|
}else {
|
|
|
PatientMedicareCardDO patientMedicareCardDO = patientMedicareCardDao.findByTypeAndPatientCodeAndDel("A_01",patientId,"1");
|
|
|
if (patientMedicareCardDO!=null){
|
|
|
} else {
|
|
|
PatientMedicareCardDO patientMedicareCardDO = patientMedicareCardDao.findByTypeAndPatientCodeAndDel("A_01", patientId, "1");
|
|
|
if (patientMedicareCardDO != null) {
|
|
|
patientCardNo = patientMedicareCardDO.getCode();
|
|
|
}else {
|
|
|
Map<String,String> params2 = new HashMap<>();
|
|
|
params2.put("idcard",idcard);
|
|
|
JSONObject rs = wlyyHttpService.sendWlyyMes("wlyyGetPatient",null,params2);
|
|
|
if(rs!=null) {
|
|
|
} else {
|
|
|
Map<String, String> params2 = new HashMap<>();
|
|
|
params2.put("idcard", idcard);
|
|
|
JSONObject rs = wlyyHttpService.sendWlyyMes("wlyyGetPatient", null, params2);
|
|
|
if (rs != null) {
|
|
|
Integer status = rs.getInteger("status");
|
|
|
if (200 == status) {
|
|
|
JSONObject data = rs.getJSONObject("data");
|
|
|
if (data!=null&&data.get("ssc")!=null){
|
|
|
if (data != null && data.get("ssc") != null) {
|
|
|
patientCardNo = data.getString("ssc");
|
|
|
patientMedicareCardDO = new PatientMedicareCardDO();
|
|
|
patientMedicareCardDO.setPatientCode(patientId);
|
|
@ -366,36 +369,36 @@ public class WlyyBusinessService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (!StringUtils.isNoneBlank(patientCardNo)){
|
|
|
if (!StringUtils.isNoneBlank(patientCardNo)) {
|
|
|
return "社保卡不能为空!";
|
|
|
}
|
|
|
//查询i健康信息,没有就注册;
|
|
|
Map<String,String> patientSccParams = new HashMap<>();
|
|
|
patientSccParams.put("ssc",patientCardNo);
|
|
|
patientSccParams.put("name",basePatientDO.getName());
|
|
|
patientSccParams.put("idCard",basePatientDO.getIdcard());
|
|
|
patientSccParams.put("sex",basePatientDO.getSex().toString());
|
|
|
patientSccParams.put("phone",basePatientDO.getMobile());
|
|
|
patientSccParams.put("birthday",DateUtil.dateToStrShort(basePatientDO.getBirthday()));
|
|
|
Map<String, String> patientSccParams = new HashMap<>();
|
|
|
patientSccParams.put("ssc", patientCardNo);
|
|
|
patientSccParams.put("name", basePatientDO.getName());
|
|
|
patientSccParams.put("idCard", basePatientDO.getIdcard());
|
|
|
patientSccParams.put("sex", basePatientDO.getSex().toString());
|
|
|
patientSccParams.put("phone", basePatientDO.getMobile());
|
|
|
patientSccParams.put("birthday", DateUtil.dateToStrShort(basePatientDO.getBirthday()));
|
|
|
//JSONObject object = wlyyHttpService.sendWlyyMes("wlyyFindAccountBySsc", null, patientSccParams);
|
|
|
|
|
|
JSONObject rs = wlyyHttpService.sendWlyyMes("wlyyGetPatientAccetokenByIdcard",null,params);
|
|
|
if(rs!=null){
|
|
|
JSONObject rs = wlyyHttpService.sendWlyyMes("wlyyGetPatientAccetokenByIdcard", null, params);
|
|
|
if (rs != null) {
|
|
|
Integer status = rs.getInteger("status");
|
|
|
if(200 == status){
|
|
|
if (200 == status) {
|
|
|
JSONObject data = rs.getJSONObject("data");
|
|
|
result = data.getString("patientCode");
|
|
|
}else{
|
|
|
} else {
|
|
|
logger.info(rs.toJSONString());
|
|
|
throw new Exception("请求i健康接口失败");
|
|
|
}
|
|
|
}
|
|
|
try {
|
|
|
baseOperateLogService.saveOperateLog(doctorId,patientId,"JKDA","健康档案","","");
|
|
|
}catch (Exception e){
|
|
|
baseOperateLogService.saveOperateLog(doctorId, patientId, "JKDA", "健康档案", "", "");
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}else {
|
|
|
} else {
|
|
|
throw new Exception("该居民不存在");
|
|
|
}
|
|
|
return result;
|
|
@ -404,21 +407,21 @@ public class WlyyBusinessService {
|
|
|
/**
|
|
|
* 查询I健康接口获取居民信息
|
|
|
*/
|
|
|
public Map<String,Object> findWlyyPatient(String idcard)throws Exception{
|
|
|
public Map<String, Object> findWlyyPatient(String idcard) throws Exception {
|
|
|
|
|
|
JSONObject param = new JSONObject();
|
|
|
param.put("idcard",idcard);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMes("wlyyGetSignFamily",param,null);
|
|
|
if(re!=null){
|
|
|
param.put("idcard", idcard);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMes("wlyyGetSignFamily", param, null);
|
|
|
if (re != null) {
|
|
|
JSONObject p = re.getJSONObject("data");
|
|
|
|
|
|
BasePatientDO patientDO = basePatientDao.findByIdcardAndDel(idcard,"1");
|
|
|
if(patientDO == null){
|
|
|
BasePatientDO patientDO = basePatientDao.findByIdcardAndDel(idcard, "1");
|
|
|
if (patientDO == null) {
|
|
|
BasePatientDO patient = new BasePatientDO();
|
|
|
|
|
|
String salt = UUID.randomUUID().toString().substring(0,5);
|
|
|
String salt = UUID.randomUUID().toString().substring(0, 5);
|
|
|
String mobile = p.getString("mobile");
|
|
|
String pw = mobile.substring(mobile.length()-6);
|
|
|
String pw = mobile.substring(mobile.length() - 6);
|
|
|
|
|
|
patient.setIdcard(idcard);
|
|
|
patient.setName(p.getString("name"));
|
|
@ -441,67 +444,67 @@ public class WlyyBusinessService {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
public Map<String,Object> getPatientInfoMap(BasePatientDO basePatientDO){
|
|
|
Map<String,Object> rs = new HashedMap();
|
|
|
rs.put("id",basePatientDO.getId());
|
|
|
rs.put("name",basePatientDO.getName());
|
|
|
rs.put("sex",basePatientDO.getSex());
|
|
|
rs.put("provinceCode",basePatientDO.getProvinceCode());
|
|
|
rs.put("provinceName",basePatientDO.getProvinceName());
|
|
|
rs.put("cityCode",basePatientDO.getCityCode());
|
|
|
rs.put("cityName",basePatientDO.getCityName());
|
|
|
rs.put("townCode",basePatientDO.getTownCode());
|
|
|
rs.put("townName",basePatientDO.getTownName());
|
|
|
rs.put("idcard",basePatientDO.getIdcard());
|
|
|
rs.put("age",IdCardUtil.getAgeForIdcard(basePatientDO.getIdcard()));
|
|
|
rs.put("mobile",basePatientDO.getMobile());
|
|
|
public Map<String, Object> getPatientInfoMap(BasePatientDO basePatientDO) {
|
|
|
Map<String, Object> rs = new HashedMap();
|
|
|
rs.put("id", basePatientDO.getId());
|
|
|
rs.put("name", basePatientDO.getName());
|
|
|
rs.put("sex", basePatientDO.getSex());
|
|
|
rs.put("provinceCode", basePatientDO.getProvinceCode());
|
|
|
rs.put("provinceName", basePatientDO.getProvinceName());
|
|
|
rs.put("cityCode", basePatientDO.getCityCode());
|
|
|
rs.put("cityName", basePatientDO.getCityName());
|
|
|
rs.put("townCode", basePatientDO.getTownCode());
|
|
|
rs.put("townName", basePatientDO.getTownName());
|
|
|
rs.put("idcard", basePatientDO.getIdcard());
|
|
|
rs.put("age", IdCardUtil.getAgeForIdcard(basePatientDO.getIdcard()));
|
|
|
rs.put("mobile", basePatientDO.getMobile());
|
|
|
return rs;
|
|
|
}
|
|
|
|
|
|
public JSONArray findPatientListBySscOrIdCard(String idcard,String ssc){
|
|
|
public JSONArray findPatientListBySscOrIdCard(String idcard, String ssc) {
|
|
|
|
|
|
Map<String,String> mapParams = new HashedMap();
|
|
|
if(StringUtils.isNotBlank(idcard)){
|
|
|
mapParams.put("idcard",idcard);
|
|
|
Map<String, String> mapParams = new HashedMap();
|
|
|
if (StringUtils.isNotBlank(idcard)) {
|
|
|
mapParams.put("idcard", idcard);
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(ssc)){
|
|
|
mapParams.put("ssc",ssc);
|
|
|
if (StringUtils.isNotBlank(ssc)) {
|
|
|
mapParams.put("ssc", ssc);
|
|
|
}
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMes("findPatientListBySscOrIdCard",null,mapParams);
|
|
|
JSONArray list =null;
|
|
|
if(re!=null){
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMes("findPatientListBySscOrIdCard", null, mapParams);
|
|
|
JSONArray list = null;
|
|
|
if (re != null) {
|
|
|
list = re.getJSONArray("data");
|
|
|
return list;
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
public String makeBase64Qrcode(String doctor){
|
|
|
public String makeBase64Qrcode(String doctor) {
|
|
|
|
|
|
BaseDoctorDO doctorDO = baseDoctorDao.findByIdAndDel(doctor);
|
|
|
|
|
|
Map<String,String> mapParams = new HashedMap();
|
|
|
mapParams.put("doctor",doctorDO.getId()+"_"+doctorDO.getName());
|
|
|
Map<String, String> mapParams = new HashedMap();
|
|
|
mapParams.put("doctor", doctorDO.getId() + "_" + doctorDO.getName());
|
|
|
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMes("makeBase64Qrcode",null,mapParams);
|
|
|
if(re!=null){
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMes("makeBase64Qrcode", null, mapParams);
|
|
|
if (re != null) {
|
|
|
return re.getString("data");
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
public String findWlyyHospital(){
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMes("findWlyyHospital",null,null);
|
|
|
if(re!=null){
|
|
|
public String findWlyyHospital() {
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMes("findWlyyHospital", null, null);
|
|
|
if (re != null) {
|
|
|
JSONArray hospitals = JSONArray.parseArray(re.getString("data"));
|
|
|
logger.info("hospitals size:"+hospitals.size());
|
|
|
if(hospitals!=null&&hospitals.size()>0){
|
|
|
logger.info("hospitals size:" + hospitals.size());
|
|
|
if (hospitals != null && hospitals.size() > 0) {
|
|
|
Integer addCount = 0;
|
|
|
Integer updateCount =0;
|
|
|
for(int i=0;i<hospitals.size();i++){
|
|
|
Integer updateCount = 0;
|
|
|
for (int i = 0; i < hospitals.size(); i++) {
|
|
|
JSONObject h = (JSONObject) hospitals.get(i);
|
|
|
String code = h.getString("code");
|
|
|
if(!baseOrgDao.existsByCode(code)){
|
|
|
if (!baseOrgDao.existsByCode(code)) {
|
|
|
BaseOrgDO org = new BaseOrgDO();
|
|
|
org.setCode(code);
|
|
|
org.setName(h.getString("name"));
|
|
@ -517,7 +520,7 @@ public class WlyyBusinessService {
|
|
|
org.setDel("1");
|
|
|
baseOrgDao.save(org);
|
|
|
addCount++;
|
|
|
}else{
|
|
|
} else {
|
|
|
BaseOrgDO org = baseOrgDao.findByCode(code);
|
|
|
org.setName(h.getString("name"));
|
|
|
org.setProvinceCode(h.getString("province"));
|
|
@ -531,24 +534,24 @@ public class WlyyBusinessService {
|
|
|
updateCount++;
|
|
|
}
|
|
|
}
|
|
|
logger.info("hospitals addCount:"+addCount+" updateCount:"+updateCount);
|
|
|
logger.info("hospitals addCount:" + addCount + " updateCount:" + updateCount);
|
|
|
}
|
|
|
}
|
|
|
return "ok";
|
|
|
}
|
|
|
|
|
|
public String findWlyyDept(){
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMes("findWlyyDept",null,null);
|
|
|
if(re!=null){
|
|
|
public String findWlyyDept() {
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMes("findWlyyDept", null, null);
|
|
|
if (re != null) {
|
|
|
JSONArray depts = JSONArray.parseArray(re.getString("data"));
|
|
|
logger.info("depts size:"+depts.size());
|
|
|
if(depts!=null&&depts.size()>0){
|
|
|
logger.info("depts size:" + depts.size());
|
|
|
if (depts != null && depts.size() > 0) {
|
|
|
Integer addCount = 0;
|
|
|
for(int i=0;i<depts.size();i++){
|
|
|
for (int i = 0; i < depts.size(); i++) {
|
|
|
JSONObject d = (JSONObject) depts.get(i);
|
|
|
String code = d.getString("code");
|
|
|
String hospital = d.getString("hospital");
|
|
|
if(!dictHospitalDeptDao.existsByCodeAndOrgCode(code,hospital)){
|
|
|
if (!dictHospitalDeptDao.existsByCodeAndOrgCode(code, hospital)) {
|
|
|
DictHospitalDeptDO deptDO = new DictHospitalDeptDO();
|
|
|
deptDO.setCode(code);
|
|
|
deptDO.setName(d.getString("name"));
|
|
@ -560,27 +563,27 @@ public class WlyyBusinessService {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
logger.info("Dept addCount"+addCount);
|
|
|
logger.info("Dept addCount" + addCount);
|
|
|
}
|
|
|
}
|
|
|
return "ok";
|
|
|
}
|
|
|
|
|
|
public String findWlyyDoctor()throws Exception{
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMes("findWlyyDoctor",null,null);
|
|
|
if(re!=null){
|
|
|
public String findWlyyDoctor() throws Exception {
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMes("findWlyyDoctor", null, null);
|
|
|
if (re != null) {
|
|
|
JSONArray doctors = JSONArray.parseArray(re.getString("data"));
|
|
|
logger.info("doctors size:"+doctors.size());
|
|
|
if(doctors!=null&&doctors.size()>0){
|
|
|
logger.info("doctors size:" + doctors.size());
|
|
|
if (doctors != null && doctors.size() > 0) {
|
|
|
Integer count = 0;
|
|
|
//获取全部职称.
|
|
|
List<Map<String,Object>> dutys = findDutys();
|
|
|
List<Map<String, Object>> dutys = findDutys();
|
|
|
|
|
|
for(int i=0;i<doctors.size();i++){
|
|
|
for (int i = 0; i < doctors.size(); i++) {
|
|
|
try {
|
|
|
JSONObject doctorJson = (JSONObject) doctors.get(i);
|
|
|
String idcard = doctorJson.getString("idcard");
|
|
|
if(StringUtils.isNotBlank(idcard)) {
|
|
|
if (StringUtils.isNotBlank(idcard)) {
|
|
|
List<BaseDoctorDO> ds = baseDoctorDao.findByIdcard(idcard);
|
|
|
if (ds != null && ds.size() > 0) {
|
|
|
//已有账号更新
|
|
@ -609,10 +612,10 @@ public class WlyyBusinessService {
|
|
|
baseDoctorDao.save(doctor);
|
|
|
|
|
|
//更新机构科室信息
|
|
|
String orgCode =doctorJson.getString("hospital");
|
|
|
if(StringUtils.isNotBlank(orgCode)){
|
|
|
List<BaseDoctorHospitalDO> hospitalDOs = baseDoctorHospitalDao.findByOrgCodeAndDoctorCode(orgCode,doctor.getId());
|
|
|
if(hospitalDOs!=null&&hospitalDOs.size()>0){
|
|
|
String orgCode = doctorJson.getString("hospital");
|
|
|
if (StringUtils.isNotBlank(orgCode)) {
|
|
|
List<BaseDoctorHospitalDO> hospitalDOs = baseDoctorHospitalDao.findByOrgCodeAndDoctorCode(orgCode, doctor.getId());
|
|
|
if (hospitalDOs != null && hospitalDOs.size() > 0) {
|
|
|
BaseDoctorHospitalDO hospitalDO = hospitalDOs.get(0);
|
|
|
hospitalDO.setOrgCode(doctorJson.getString("hospital"));
|
|
|
hospitalDO.setOrgName(doctorJson.getString("hospitalName"));
|
|
@ -691,11 +694,11 @@ public class WlyyBusinessService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}catch (Exception e){
|
|
|
} catch (Exception e) {
|
|
|
logger.info("data error");
|
|
|
}
|
|
|
}
|
|
|
logger.info("add count:"+count);
|
|
|
logger.info("add count:" + count);
|
|
|
}
|
|
|
}
|
|
|
return "ok";
|
|
@ -703,19 +706,20 @@ public class WlyyBusinessService {
|
|
|
|
|
|
/**
|
|
|
* 获取全部职称
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
public List<Map<String,Object>> findDutys(){
|
|
|
public List<Map<String, Object>> findDutys() {
|
|
|
String sql = "select code,name from dict_doctor_duty";
|
|
|
return jdbcTemplate.queryForList(sql);
|
|
|
}
|
|
|
|
|
|
public String getDutysCode(List<Map<String,Object>> dutys,String name){
|
|
|
if(StringUtils.isNotBlank(name)){
|
|
|
for(Map<String,Object> d:dutys){
|
|
|
String duty = (String)d.get("name");
|
|
|
if(name.equals(duty)){
|
|
|
return (String)d.get("code");
|
|
|
public String getDutysCode(List<Map<String, Object>> dutys, String name) {
|
|
|
if (StringUtils.isNotBlank(name)) {
|
|
|
for (Map<String, Object> d : dutys) {
|
|
|
String duty = (String) d.get("name");
|
|
|
if (name.equals(duty)) {
|
|
|
return (String) d.get("code");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@ -727,142 +731,296 @@ public class WlyyBusinessService {
|
|
|
StringBuffer buffer = new StringBuffer();
|
|
|
Random random = new Random();
|
|
|
|
|
|
for(int i = 0; i < length; ++i) {
|
|
|
for (int i = 0; i < length; ++i) {
|
|
|
int pos = random.nextInt(str.length());
|
|
|
buffer.append(str.charAt(pos));
|
|
|
}
|
|
|
|
|
|
return buffer.toString();
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 推送i健康智能助手模版消息
|
|
|
*
|
|
|
* @param wxurl
|
|
|
*/
|
|
|
public void sendDoctorTemplateByDoctorIdcard(String wxurl) {
|
|
|
String re = HttpUtil.sendGet(wxurl);
|
|
|
JSONObject reObject = JSONObject.parseObject(re);
|
|
|
if(200 == reObject.getInteger("status")){
|
|
|
logger.info("请求成功,"+re);
|
|
|
}else{
|
|
|
if (200 == reObject.getInteger("status")) {
|
|
|
logger.info("请求成功," + re);
|
|
|
} else {
|
|
|
logger.info("请求失败");
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//居民是否签约
|
|
|
public JSONObject isSign(String idCard){
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("isSign","?idCard="+idCard);
|
|
|
public JSONObject isSign(String idCard) {
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("isSign", "?idCard=" + idCard);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
//获取医生信息
|
|
|
public JSONObject doctorInfo(String code){
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("doctorInfo","?code="+code);
|
|
|
public JSONObject doctorInfo(String code) {
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("doctorInfo", "?code=" + code);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
//获取居民信息
|
|
|
public JSONObject patientInfo(String code){
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("patientInfo","?code="+code);
|
|
|
public JSONObject patientInfo(String code) {
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("patientInfo", "?code=" + code);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
//获取团队列表
|
|
|
public JSONObject getAdminTeamList(String teamName,String town,String teamId, String leadName, Integer page, Integer pageSize, String hospital,String doctorName,String mobile) {
|
|
|
String param = "?teamName="+nullToTransfor(teamName)+"&leadName="+nullToTransfor(leadName)+"&teamId="+nullToTransfor(teamId)
|
|
|
+"&page="+page+"&pageSize="+pageSize+"&hospital="+nullToTransfor(hospital)+"&doctorName="+nullToTransfor(doctorName)
|
|
|
+"&mobile="+nullToTransfor(mobile)+"&town="+nullToTransfor(town);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("getAdminTeamList",param);
|
|
|
public JSONObject getAdminTeamList(String teamName, String town, String teamId, String leadName, Integer page, Integer pageSize, String hospital, String doctorName, String mobile) {
|
|
|
String param = "?teamName=" + nullToTransfor(teamName) + "&leadName=" + nullToTransfor(leadName) + "&teamId=" + nullToTransfor(teamId)
|
|
|
+ "&page=" + page + "&pageSize=" + pageSize + "&hospital=" + nullToTransfor(hospital) + "&doctorName=" + nullToTransfor(doctorName)
|
|
|
+ "&mobile=" + nullToTransfor(mobile) + "&town=" + nullToTransfor(town);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("getAdminTeamList", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
//获取团队成员列表
|
|
|
public JSONObject getAdminTeamMemberList(String teamId, String doctorName, Integer page, Integer pageSize, String mobile) {
|
|
|
String param = "?teamId="+nullToTransfor(teamId)+"&doctorName="+nullToTransfor(doctorName)+"&page="+page+"&pageSize="+pageSize+"&mobile="+nullToTransfor(mobile);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("getAdminTeamMemberList",param);
|
|
|
String param = "?teamId=" + nullToTransfor(teamId) + "&doctorName=" + nullToTransfor(doctorName) + "&page=" + page + "&pageSize=" + pageSize + "&mobile=" + nullToTransfor(mobile);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("getAdminTeamMemberList", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
//获取社区医生列表
|
|
|
public JSONObject getDoctorList(String hospital, String doctorName, Integer page, Integer pageSize, String mobile) {
|
|
|
String param = "?hospital="+nullToTransfor(hospital)+"&doctorName="+nullToTransfor(doctorName)+"&page="+page+"&pageSize="+pageSize+"&mobile="+nullToTransfor(mobile);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("getDoctorList",param);
|
|
|
String param = "?hospital=" + nullToTransfor(hospital) + "&doctorName=" + nullToTransfor(doctorName) + "&page=" + page + "&pageSize=" + pageSize + "&mobile=" + nullToTransfor(mobile);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("getDoctorList", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
//获取机构列表分页
|
|
|
public JSONObject getHospitalList(String name, Integer page, Integer pageSize, String town) {
|
|
|
String param = "?name="+nullToTransfor(name)+"&town="+nullToTransfor(town)+"&page="+page+"&pageSize="+pageSize;
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("getHospitalList",param);
|
|
|
String param = "?name=" + nullToTransfor(name) + "&town=" + nullToTransfor(town) + "&page=" + page + "&pageSize=" + pageSize;
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("getHospitalList", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
//获取签约列表分页(只查询有效的)
|
|
|
public JSONObject getSignList(String name, Integer page, Integer pageSize, String town,String hospital,String adminTeamCode
|
|
|
,String doctor,String doctorName,String doctorHealthName,String hospitalName,String idcard,String address
|
|
|
,String teamName,String leaderName,String teamId) {
|
|
|
String param = "?name="+nullToTransfor(name)+"&town="+nullToTransfor(town)+"&page="+page+"&pageSize="+pageSize+"&hospital="+nullToTransfor(hospital)+
|
|
|
"&adminTeamCode="+nullToTransfor(adminTeamCode)+"&doctor="+nullToTransfor(doctor)+"&doctorName="+nullToTransfor(doctorName)+
|
|
|
"&doctorHealthName="+nullToTransfor(doctorHealthName)+"&hospitalName="+nullToTransfor(hospitalName)+"&idcard="+nullToTransfor(idcard)+
|
|
|
"&address="+nullToTransfor(address)+"&teamName="+nullToTransfor(teamName)+"&leaderName="+nullToTransfor(leaderName)+"&teamId="+nullToTransfor(teamId);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("getSignList",param);
|
|
|
public JSONObject getSignList(String name, Integer page, Integer pageSize, String town, String hospital, String adminTeamCode
|
|
|
, String doctor, String doctorName, String doctorHealthName, String hospitalName, String idcard, String address
|
|
|
, String teamName, String leaderName, String teamId) {
|
|
|
String param = "?name=" + nullToTransfor(name) + "&town=" + nullToTransfor(town) + "&page=" + page + "&pageSize=" + pageSize + "&hospital=" + nullToTransfor(hospital) +
|
|
|
"&adminTeamCode=" + nullToTransfor(adminTeamCode) + "&doctor=" + nullToTransfor(doctor) + "&doctorName=" + nullToTransfor(doctorName) +
|
|
|
"&doctorHealthName=" + nullToTransfor(doctorHealthName) + "&hospitalName=" + nullToTransfor(hospitalName) + "&idcard=" + nullToTransfor(idcard) +
|
|
|
"&address=" + nullToTransfor(address) + "&teamName=" + nullToTransfor(teamName) + "&leaderName=" + nullToTransfor(leaderName) + "&teamId=" + nullToTransfor(teamId);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("getSignList", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
//获取关联社区列表分页
|
|
|
public JSONObject getTeamRelationList(String teamId, String doctorName, Integer page, Integer pageSize, String mobile,String hospitalName,String teamName,String leaderName) {
|
|
|
String param = "?teamId="+nullToTransfor(teamId)+"&doctorName="+nullToTransfor(doctorName)+"&page="+page
|
|
|
+"&pageSize="+pageSize+"&mobile="+nullToTransfor(mobile)+"&hospitalName="+nullToTransfor(hospitalName)
|
|
|
+"&teamName="+nullToTransfor(teamName)+"&leaderName="+nullToTransfor(leaderName);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("getTeamRelationList",param);
|
|
|
public JSONObject getTeamRelationList(String teamId, String doctorName, Integer page, Integer pageSize, String mobile, String hospitalName, String teamName, String leaderName) {
|
|
|
String param = "?teamId=" + nullToTransfor(teamId) + "&doctorName=" + nullToTransfor(doctorName) + "&page=" + page
|
|
|
+ "&pageSize=" + pageSize + "&mobile=" + nullToTransfor(mobile) + "&hospitalName=" + nullToTransfor(hospitalName)
|
|
|
+ "&teamName=" + nullToTransfor(teamName) + "&leaderName=" + nullToTransfor(leaderName);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("getTeamRelationList", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
private String nullToTransfor(String str){
|
|
|
return StringUtils.isBlank(str)?"":str;
|
|
|
private String nullToTransfor(String str) {
|
|
|
return StringUtils.isBlank(str) ? "" : str;
|
|
|
}
|
|
|
|
|
|
//专科团队保存关联社区
|
|
|
public JSONObject saveIjkTeam(String teamId,String adminTeamIds){
|
|
|
Map<String,String> params = new HashMap<>();
|
|
|
params.put("teamId",teamId);
|
|
|
params.put("adminTeamIds",adminTeamIds);
|
|
|
JSONObject rs = wlyyHttpService.sendWlyyMes("saveIjkTeam",null,params);
|
|
|
public JSONObject saveIjkTeam(String teamId, String adminTeamIds) {
|
|
|
Map<String, String> params = new HashMap<>();
|
|
|
params.put("teamId", teamId);
|
|
|
params.put("adminTeamIds", adminTeamIds);
|
|
|
JSONObject rs = wlyyHttpService.sendWlyyMes("saveIjkTeam", null, params);
|
|
|
return rs;
|
|
|
}
|
|
|
|
|
|
//删除关联社区
|
|
|
public JSONObject delIjkTeam(String teamId,Integer adminTeamId){
|
|
|
Map<String,String> params = new HashMap<>();
|
|
|
params.put("teamId",teamId);
|
|
|
params.put("adminTeamId",adminTeamId+"");
|
|
|
JSONObject rs = wlyyHttpService.sendWlyyMes("delIjkTeam",null,params);
|
|
|
public JSONObject delIjkTeam(String teamId, Integer adminTeamId) {
|
|
|
Map<String, String> params = new HashMap<>();
|
|
|
params.put("teamId", teamId);
|
|
|
params.put("adminTeamId", adminTeamId + "");
|
|
|
JSONObject rs = wlyyHttpService.sendWlyyMes("delIjkTeam", null, params);
|
|
|
return rs;
|
|
|
}
|
|
|
|
|
|
//推送i健康 康复下转居民
|
|
|
public JSONObject pushPatientInfos(RehabilitationPatientInfoDO infoDO){
|
|
|
Map<String,String> params = new HashMap<>();
|
|
|
public JSONObject pushPatientInfos(RehabilitationPatientInfoDO infoDO) {
|
|
|
Map<String, String> params = new HashMap<>();
|
|
|
params.put("jsondata", JSON.toJSONString(infoDO));
|
|
|
JSONObject rs = wlyyHttpService.sendWlyyMes("pushPatientInfos",null,params);
|
|
|
JSONObject rs = wlyyHttpService.sendWlyyMes("pushPatientInfos", null, params);
|
|
|
return rs;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取ijk十大专病信息
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
public JSONObject getSpecialList(){
|
|
|
public JSONObject getSpecialList() {
|
|
|
JSONObject json = new JSONObject();
|
|
|
String sql = "SELECT dict_code code,dict_value name from wlyy_hospital_sys_dict WHERE dict_name = 'ijkSpecialList' ORDER BY sort";
|
|
|
List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
json.put("msg","success");
|
|
|
json.put("data",list);
|
|
|
List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
json.put("msg", "success");
|
|
|
json.put("data", list);
|
|
|
return json;
|
|
|
}
|
|
|
|
|
|
|
|
|
//获取i健康医生信息
|
|
|
public JSONObject getDoctorInfo_IJK(String idcard) {
|
|
|
String param = "?idcard=" + nullToTransfor(idcard);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("getDoctorInfo_IJK", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
|
|
|
public JSONObject getReservationByDoctorAndSource_IJK(String doctorCode, String patientName, String source) {
|
|
|
String param = "?doctorCode=" + nullToTransfor(doctorCode) + "&patientName=" + nullToTransfor(patientName) + "&source=" + source;
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("getReservationByDoctorAndSource_IJK", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
public JSONObject getScreeList_IJK(
|
|
|
String doctor, Integer type, int pageNo, int pageSize, String patientName,
|
|
|
String isDanger, String diseaseType, Integer filterType, String patientCode) {
|
|
|
String param = "?doctor=" + nullToTransfor(doctor) + "&type=" + nullToTransfor(String.valueOf(type)) + "&pageNo=" + nullToTransfor(String.valueOf(pageNo)) + "&pageSize=" + nullToTransfor(String.valueOf(pageSize)) + "&patientName=" + nullToTransfor(patientName) +
|
|
|
"&isDanger=" + nullToTransfor(isDanger) + "&diseaseType=" + nullToTransfor(diseaseType) + "&filterType=" + nullToTransfor(String.valueOf(filterType)) + "&patientCode=" + nullToTransfor(patientCode);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("getScreeList_IJK", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
public JSONObject getHealthIndexById_IJK(Long id) {
|
|
|
String param = "?id=" + id;
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("getHealthIndexById_IJK", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
public JSONObject queryByConsultCode_IJK(String code, Integer type) {
|
|
|
String param = "?code=" + nullToTransfor(code) + "&type=" + nullToTransfor(String.valueOf(type));
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("queryByConsultCode_IJK", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
public JSONObject getScreenResultDetail_IJK(String code) {
|
|
|
String param = "?code=" + nullToTransfor(code);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("getScreenResultDetail_IJK", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
public JSONObject findPatientSignFamily_IJK(String patient) {
|
|
|
String param = "?patient=" + nullToTransfor(patient);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("findPatientSignFamily_IJK", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
public JSONObject getSpecialDisease_IJK() {
|
|
|
String param = "";
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("getSpecialDisease_IJK", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
public JSONObject last_IJK(String patient) {
|
|
|
String param = "?patient=" + nullToTransfor(patient);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("last_IJK", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
public JSONObject patient_IJK(String patient) {
|
|
|
String param = "?patient=" + nullToTransfor(patient);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("patient_IJK", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
public JSONObject getPatientSpecialAndFamilyDoctor_IJK(String patientCode) {
|
|
|
String param = "?patientCode=" + nullToTransfor(patientCode);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("getPatientSpecialAndFamilyDoctor_IJK", param);
|
|
|
return re;
|
|
|
|
|
|
}
|
|
|
|
|
|
public JSONObject selectAllCompleteServiceItemsByPatient_IJK(String patient) {
|
|
|
String param = "?patient=" + nullToTransfor(patient);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("selectAllCompleteServiceItemsByPatient_IJK", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
public JSONObject selectAllPlaneByPatient_IJK(String patient, String eventType) {
|
|
|
String param = "?patient=" + nullToTransfor(patient) + "&eventType=" + nullToTransfor(eventType);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("selectAllPlaneByPatient_IJK", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
public JSONObject calendarPlanDetailListBypatient_IJK(
|
|
|
String executeStartTime, String executeEndTime, String patient, Integer searchTask,
|
|
|
String doctorCode, Integer status, String taskExecutor) {
|
|
|
String param = "?executeStartTime=" + nullToTransfor(executeStartTime) + "&executeEndTime=" + nullToTransfor(executeEndTime) + "&patient=" + nullToTransfor(patient) + "&searchTask=" + nullToTransfor(String.valueOf(searchTask)) +
|
|
|
"&doctorCode=" + nullToTransfor(doctorCode) + "&status=" + nullToTransfor(String.valueOf(status)) + "&taskExecutor=" + nullToTransfor(String.valueOf(taskExecutor));
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("calendarPlanDetailListBypatient_IJK", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
public JSONObject calendarPlanDetailItems_IJK(String executeStartTime, String executeEndTime, String planId, Integer searchTask, String doctorCode, Integer status) {
|
|
|
String param = "?executeStartTime=" + nullToTransfor(executeStartTime) + "&executeEndTime=" + nullToTransfor(executeEndTime) + "&planId=" + nullToTransfor(planId) + "&searchTask=" + nullToTransfor(String.valueOf(searchTask)) +
|
|
|
"&doctorCode=" + nullToTransfor(doctorCode) + "&status=" + nullToTransfor(String.valueOf(status));
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("calendarPlanDetailItems_IJK", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
public JSONObject planSchedule_IJK(String planId, String patientCode) {
|
|
|
String param = "?planId=" + nullToTransfor(planId) + "&patientCode=" + nullToTransfor(patientCode);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("planSchedule_IJK", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
public JSONObject selectByMedicalCode_IJK(String medical) {
|
|
|
String param = "?medical=" + nullToTransfor(medical);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("selectByMedicalCode_IJK", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
public JSONObject selectPlanServerDoctor_IJK(String planId) {
|
|
|
String param = "?planId=" + nullToTransfor(planId);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("selectPlanServerDoctor_IJK", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
public JSONObject getRehabilitationPlanLog_IJK(String planId) {
|
|
|
String param = "?planId=" + nullToTransfor(planId);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("getRehabilitationPlanLog_IJK", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
public JSONObject calendarPlanDetailList_IJK(String executeStartTime, String executeEndTime, String planId, Integer searchTask, String doctorCode, Integer status, String taskExecutor) {
|
|
|
String param = "?executeStartTime=" + nullToTransfor(executeStartTime) + "&executeEndTime=" + nullToTransfor(executeEndTime) + "&searchTask=" + nullToTransfor(String.valueOf(searchTask)) +
|
|
|
"&doctorCode=" + nullToTransfor(doctorCode) + "&status=" + nullToTransfor(String.valueOf(status)) + "&taskExecutor=" + nullToTransfor(String.valueOf(taskExecutor));
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("calendarPlanDetailList_IJK", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
public JSONObject getPatientDrugList_IJK(String patient) {
|
|
|
String param = "?patient=" + nullToTransfor(patient);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("getPatientDrugList_IJK", param);
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
public JSONObject selectBySpecialistDoctor_IJK(
|
|
|
String doctorCode, String doctorType, String patientInfo, String diseaseCode,
|
|
|
String level, String area, Integer page, Integer pageSize,
|
|
|
String filterPlan, String turnDownState, String eventType) {
|
|
|
String param = "?doctorCode=" + nullToTransfor(doctorCode) + "&doctorType=" + nullToTransfor(doctorType) + "&patientInfo=" + nullToTransfor(patientInfo) + "&diseaseCode=" + nullToTransfor(diseaseCode) +
|
|
|
"&level=" + nullToTransfor(level) + "&area=" + nullToTransfor(area) + "&page=" + nullToTransfor(String.valueOf(page)) + "&pageSize=" + nullToTransfor(String.valueOf(pageSize)) +
|
|
|
"&filterPlan=" + nullToTransfor(filterPlan) + "&turnDownState=" + nullToTransfor(turnDownState) + "&eventType=" + nullToTransfor(eventType);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("selectBySpecialistDoctor_IJK", param);
|
|
|
return re;
|
|
|
|
|
|
}
|
|
|
|
|
|
public JSONObject getPatientCount_IJK(String doctor) {
|
|
|
String param = "?doctor=" + nullToTransfor(doctor);
|
|
|
JSONObject re = wlyyHttpService.sendWlyyMesGet("getPatientCount_IJK", param);
|
|
|
return re;
|
|
|
}
|
|
|
}
|