|
@ -39,7 +39,7 @@ public class DiseaseService {
|
|
|
* @param strSSID
|
|
|
*/
|
|
|
@Transactional
|
|
|
public void getResidentEventListJson(String strSSID,String patientCode) {
|
|
|
public void getResidentEventListJson(String strSSID, String patientCode) {
|
|
|
String url = baseurl + "data/getResidentEventListJson?strSSID=" + strSSID;
|
|
|
String response = HttpClientUtil.get(url, "UTF-8");
|
|
|
JSONObject obj = new JSONObject(response);
|
|
@ -87,7 +87,7 @@ public class DiseaseService {
|
|
|
* @param strSSID
|
|
|
*/
|
|
|
@Transactional
|
|
|
public void GetRecordListByCatalogcodesJson(String strSSID,String patientCode) {
|
|
|
public void GetRecordListByCatalogcodesJson(String strSSID, String patientCode) {
|
|
|
String url = baseurl + "data/GetRecordListByCatalogcodesJson?strSSID=" + strSSID;
|
|
|
String response = HttpClientUtil.get(url, "UTF-8");
|
|
|
JSONObject obj = new JSONObject(response);
|
|
@ -105,8 +105,8 @@ public class DiseaseService {
|
|
|
inspection.setOrgId(jo.getInt("ORG_ID"));
|
|
|
inspection.setOrgName(jo.getString("ORG_NAME"));
|
|
|
inspection.setR(jo.getInt("R"));
|
|
|
inspection.setSerial(jo.getInt("SERIAL")+"");
|
|
|
inspection.setType(jo.getInt("TYPE")+"");
|
|
|
inspection.setSerial(jo.getInt("SERIAL") + "");
|
|
|
inspection.setType(jo.getInt("TYPE") + "");
|
|
|
inspection.setUnionssid(jo.getString("UNIONSSID"));
|
|
|
inspection.setXmanId(jo.getString("XMAN_ID"));
|
|
|
inspections.add(inspection);
|
|
@ -116,49 +116,47 @@ public class DiseaseService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
*
|
|
|
* @param patientCode
|
|
|
* @param time 2015
|
|
|
* @return
|
|
|
* @param time 2015
|
|
|
* @return
|
|
|
*/
|
|
|
public List<Visit> getVisits(String patientCode,String time,String icdName) {
|
|
|
StringBuffer sql=new StringBuffer("select * from figure_visit f where 1=1 and f.patient_code =? ");
|
|
|
List<Object> params=new ArrayList<>();
|
|
|
public List<Visit> getVisits(String patientCode, String time, String icdName) {
|
|
|
StringBuffer sql = new StringBuffer("select * from figure_visit f where 1=1 and f.patient_code =? ");
|
|
|
List<Object> params = new ArrayList<>();
|
|
|
params.add(patientCode);
|
|
|
|
|
|
if(!StringUtils.isEmpty(time)){
|
|
|
if (!StringUtils.isEmpty(time)) {
|
|
|
sql.append(" and f.end_time >= ? ");
|
|
|
params.add( LocalDate.of(Integer.valueOf(time),1,1).toString());
|
|
|
params.add(LocalDate.of(Integer.valueOf(time), 1, 1).toString());
|
|
|
|
|
|
sql.append(" and f.end_time < ? ");
|
|
|
params.add( LocalDate.of(Integer.valueOf(time),1,1).plusYears(1).toString());
|
|
|
params.add(LocalDate.of(Integer.valueOf(time), 1, 1).plusYears(1).toString());
|
|
|
}
|
|
|
if(!StringUtils.isEmpty(icdName)){
|
|
|
if (!StringUtils.isEmpty(icdName)) {
|
|
|
sql.append(" and f.diagnosis like ? ");
|
|
|
params.add("%"+icdName+"%");
|
|
|
params.add("%" + icdName + "%");
|
|
|
}
|
|
|
|
|
|
sql.append(" order by f.end_time desc ");
|
|
|
|
|
|
List<Visit> visisList= jdbcTemplate.query(sql.toString(),params.toArray(),new BeanPropertyRowMapper(Visit.class));
|
|
|
List<Visit> visisList = jdbcTemplate.query(sql.toString(), params.toArray(), new BeanPropertyRowMapper(Visit.class));
|
|
|
return visisList;
|
|
|
}
|
|
|
|
|
|
public List<Inspection> getInspections(String patientCode,String time,String type) {
|
|
|
StringBuffer sql=new StringBuffer("select * from figure_inspection f where 1=1 and f.patient_code =? ");
|
|
|
List<Object> params=new ArrayList<>();
|
|
|
public List<Inspection> getInspections(String patientCode, String time, String type) {
|
|
|
StringBuffer sql = new StringBuffer("select * from figure_inspection f where 1=1 and f.patient_code =? ");
|
|
|
List<Object> params = new ArrayList<>();
|
|
|
params.add(patientCode);
|
|
|
|
|
|
if(!StringUtils.isEmpty(time)){
|
|
|
if (!StringUtils.isEmpty(time)) {
|
|
|
sql.append(" and f.end_time >= ? ");
|
|
|
params.add( LocalDate.of(Integer.valueOf(time),1,1).toString());
|
|
|
params.add(LocalDate.of(Integer.valueOf(time), 1, 1).toString());
|
|
|
|
|
|
sql.append(" and f.end_time < ? ");
|
|
|
params.add( LocalDate.of(Integer.valueOf(time),1,1).plusYears(1).toString());
|
|
|
params.add(LocalDate.of(Integer.valueOf(time), 1, 1).plusYears(1).toString());
|
|
|
}
|
|
|
|
|
|
if(!StringUtils.isEmpty(type))
|
|
|
{
|
|
|
if (!StringUtils.isEmpty(type)) {
|
|
|
sql.append(" and ( " +
|
|
|
" f.item like '%血常规%' or " +
|
|
|
" f.item like '%血糖%' or " +
|
|
@ -170,8 +168,17 @@ public class DiseaseService {
|
|
|
|
|
|
|
|
|
sql.append(" order by f.end_time desc ");
|
|
|
List<Inspection> inspectionList= jdbcTemplate.query(sql.toString(),params.toArray(),new BeanPropertyRowMapper(Inspection.class));
|
|
|
List<Inspection> inspectionList = jdbcTemplate.query(sql.toString(), params.toArray(), new BeanPropertyRowMapper(Inspection.class));
|
|
|
return inspectionList;
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
public void deleteInspections(Long id) {
|
|
|
inspectionDao.delete(id);
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
public void deleteVisit(Long id) {
|
|
|
visitDao.delete(id);
|
|
|
}
|
|
|
}
|