|
@ -36,10 +36,12 @@ import com.yihu.wlyy.service.common.account.TokenService;
|
|
import com.yihu.wlyy.service.common.login.LoginLogService;
|
|
import com.yihu.wlyy.service.common.login.LoginLogService;
|
|
import com.yihu.wlyy.service.third.jw.JwArchivesService;
|
|
import com.yihu.wlyy.service.third.jw.JwArchivesService;
|
|
import com.yihu.wlyy.util.*;
|
|
import com.yihu.wlyy.util.*;
|
|
|
|
import org.apache.commons.collections.map.HashedMap;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.json.JSONObject;
|
|
import org.json.JSONObject;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
|
import org.springframework.objenesis.ObjenesisBase;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
@ -406,7 +408,7 @@ public class PatientInfoService extends BaseService {
|
|
json.put("ARCHIVE_TIME", DateUtil.getStringDateShort());//建档时间
|
|
json.put("ARCHIVE_TIME", DateUtil.getStringDateShort());//建档时间
|
|
json.put("ARCHIVE_STATUS","3");//档案状态【1.未管理 2.死亡 3.正常 4.高危】
|
|
json.put("ARCHIVE_STATUS","3");//档案状态【1.未管理 2.死亡 3.正常 4.高危】
|
|
json.put("SICK_NAME",p.getName());//姓名
|
|
json.put("SICK_NAME",p.getName());//姓名
|
|
json.put("SICK_SEX",p.getSex());//性别【1.男 2.女 9 未知】
|
|
|
|
|
|
json.put("SICK_SEX",archive.getSex());//性别【1.男 2.女 9 未知】
|
|
json.put("BIRTHDAY",archive.getBrithday());//出生日期
|
|
json.put("BIRTHDAY",archive.getBrithday());//出生日期
|
|
json.put("ZONE_CODE",archive.getJwCountryCode());//所属社区【ZONE_DICT】
|
|
json.put("ZONE_CODE",archive.getJwCountryCode());//所属社区【ZONE_DICT】
|
|
json.put("IDENTITY_TYPE","1");//证件类型【IDENTITY_TYPE_DICT】
|
|
json.put("IDENTITY_TYPE","1");//证件类型【IDENTITY_TYPE_DICT】
|
|
@ -865,4 +867,52 @@ public class PatientInfoService extends BaseService {
|
|
return rs;
|
|
return rs;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public Map<String,Object> getArchiveComboList(){
|
|
|
|
|
|
|
|
List<SystemDict> education =systemDictDao.findByDictName("ZY_DEGREE_EDUCATION");
|
|
|
|
List<SystemDict> occupation =systemDictDao.findByDictName("ZY_OCCUPATION");
|
|
|
|
List<SystemDict> payment =systemDictDao.findByDictName("ZY_PAYMENT_METHOD");
|
|
|
|
List<SystemDict> allergy =systemDictDao.findByDictName("ZY_HISTORY_OF_DRUG_ALLERGY");
|
|
|
|
List<SystemDict> pastHistory =systemDictDao.findByDictName("ZY_PAST_HISTORY");
|
|
|
|
List<SystemDict> disability =systemDictDao.findByDictName("ZY_DISABILITY");
|
|
|
|
List<SystemDict> familyHistory =systemDictDao.findByDictName("ZY_FAMILY_HISTORY");
|
|
|
|
|
|
|
|
Map<String,Object> rs = new HashedMap();
|
|
|
|
|
|
|
|
rs.put("education",education);
|
|
|
|
rs.put("occupation",occupation);
|
|
|
|
rs.put("payment",payment);
|
|
|
|
rs.put("allergy",allergy);
|
|
|
|
rs.put("pastHistory",pastHistory);
|
|
|
|
rs.put("disability",disability);
|
|
|
|
rs.put("familyHistory",familyHistory);
|
|
|
|
|
|
|
|
return rs;
|
|
|
|
}
|
|
|
|
|
|
|
|
public JSONObject getPatientJWInfo(String idcard)throws Exception{
|
|
|
|
org.json.JSONArray jsonArray = jwArchivesService.getSickArchiveRecord(idcard);
|
|
|
|
JSONObject rs = (JSONObject) jsonArray.get(0);
|
|
|
|
String sql ="SELECT " +
|
|
|
|
" TIMESTAMPDIFF(YEAR,p.birthday,SYSDATE()) age, " +
|
|
|
|
" p.photo, " +
|
|
|
|
" FROM " +
|
|
|
|
" wlyy_patient p " +
|
|
|
|
" WHERE " +
|
|
|
|
" p.idcard = '"+idcard+"'";
|
|
|
|
List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
|
if(list!=null&&list.size()>0){
|
|
|
|
Map<String,Object> s = list.get(0);
|
|
|
|
rs.put("age",s.get("age"));
|
|
|
|
rs.put("photo",s.get("photo"));
|
|
|
|
}
|
|
|
|
return rs;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Map<String,Object> getPatientSignFamily(String idcard){
|
|
|
|
SignFamily f = signFamilyDao.findByIdcard(idcard);
|
|
|
|
Map<String,Object> rs = new HashedMap();
|
|
|
|
rs.put("SignFamily",f);
|
|
|
|
return rs;
|
|
|
|
}
|
|
}
|
|
}
|