|
@ -353,8 +353,14 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
|
|
|
jsonArray.add(jb);
|
|
|
String token = upNsUserToken();
|
|
|
String res = postToInter(token, api, jsonArray);
|
|
|
|
|
|
return res;
|
|
|
JSONObject rs = (JSONObject) JSONObject.parse(res);
|
|
|
String msg = rs.getString("msg");
|
|
|
if("200".equals(msg)){
|
|
|
JSONArray reqContent = rs.getJSONArray("reqContent");
|
|
|
JSONObject req = (JSONObject)reqContent.get(0);
|
|
|
return req.getString("id");
|
|
|
}
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
// 5 网上预约挂号 micc.upAppointmentOnline --- 完成
|
|
@ -462,11 +468,13 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
|
|
|
" i.create_time, " +
|
|
|
" p.`name`, " +
|
|
|
" p.idcard, " +
|
|
|
" d.doctorIdCard," +
|
|
|
" p.mobile " +
|
|
|
"FROM " +
|
|
|
" wlyy_inspection i " +
|
|
|
"JOIN wlyy_outpatient o ON o.id = i.outpatient_id " +
|
|
|
"JOIN base_patient p ON p.id = o.patient " +
|
|
|
" JOIN wlyy_outpatient o ON o.id = i.outpatient_id " +
|
|
|
" JOIN base_patient p ON p.id = o.patient " +
|
|
|
" JOIN base_doctor d ON p.id = o.doctor " +
|
|
|
"WHERE " +
|
|
|
" i.create_time >='"+startDate+"' " +
|
|
|
" and i.create_time <='"+endDate+"'" +
|
|
@ -484,7 +492,7 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
|
|
|
Boolean errorFlag = false;
|
|
|
try {
|
|
|
String[] dept = depToSubject(ins.get("dept").toString());
|
|
|
String docInterId = achNsDoctorRecord(ins.get("doctor").toString());
|
|
|
String docInterId = achNsDoctorRecord((String)ins.get("doctorIdCard"));
|
|
|
jb.put("id",orgCode + (String)ins.get("id"));
|
|
|
jb.put("cd_org", orgCode);
|
|
|
jb.put("cd_area", orgArea);
|
|
@ -634,7 +642,7 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
|
|
|
|
|
|
String sql = "select a.id,a.type,c.name as docName,c.idcard as docIdCard,c.id as docId\n" +
|
|
|
" ,b.patient,b.name as patientName,b.birthday,a.czrq,a.end_time\n" +
|
|
|
" ,a.symptoms,d.sex,d.phone,d.idcard as patIdCard,d.city_code, e.dept_code, e.dept_name\n" +
|
|
|
" ,a.symptoms,d.sex,d.mobile,d.idcard as patIdCard,d.city_code, e.dept_code, e.dept_name\n" +
|
|
|
" from wlyy_consult a \n" +
|
|
|
" ,wlyy_consult_team b\n" +
|
|
|
" LEFT JOIN base_doctor c on c.id = b.doctor\n" +
|
|
@ -665,7 +673,7 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
|
|
|
//基于科室转换成国家诊疗科目代码
|
|
|
String[] dept = depToSubject(info.get("dept_code").toString());
|
|
|
// 获取监管平台唯一标识
|
|
|
String visitDocCode = achNsDoctorRecord(info.get("docId").toString());
|
|
|
String visitDocCode = achNsDoctorRecord((String)info.get("docIdCard"));
|
|
|
|
|
|
jb.put("id_online_ask", (String)info.get("id"));
|
|
|
jb.put("net_service_code", "1");
|
|
@ -685,7 +693,7 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
|
|
|
jb.put("cost_type", "");
|
|
|
jb.put("pt_birthdate", info.get("birthday") == null? "":info.get("birthday").toString());
|
|
|
jb.put("ge_code", info.get("sex")== null? "0":info.get("sex"));
|
|
|
jb.put("pt_tel",info.get("phone") == null ? "0":info.get("phone"));
|
|
|
jb.put("pt_tel",info.get("mobile") == null ? "0":info.get("mobile"));
|
|
|
jb.put("card_type", "1");
|
|
|
jb.put("id_no", info.get("patIdCard")== null? "0":info.get("patIdCard"));
|
|
|
jb.put("pt_district",info.get("city_code") == null?"":info.get("city_code"));
|
|
@ -707,6 +715,7 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
|
|
|
if(!errorFlag){
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
jsonArray.add(jb);
|
|
|
String str = jb.toJSONString();
|
|
|
res = postToInter(token,api, jsonArray);
|
|
|
|
|
|
JSONObject resJson = (JSONObject) JSONObject.parse(res);
|
|
@ -740,9 +749,9 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
|
|
|
" , a.dept, a.dept_name, c.name as paName, c.idcard as paId, c.sex,c.mobile,a.create_time,b.charge_type\n" +
|
|
|
" ,a.register_date, a.end_time,a.icd10,a.icd10_name,a.origin_adm_no, a.description ,d.req_fee\n" +
|
|
|
" from wlyy_outpatient a \n" +
|
|
|
" left join base_doctor b on b.id = a.doctor\n" +
|
|
|
" left join wlyy_charge_dict d on d.charge_type = b.charge_type\n" +
|
|
|
" left join base_patient c on c.id = a.patient\n" +
|
|
|
" join base_doctor b on b.id = a.doctor\n" +
|
|
|
" join wlyy_charge_dict d on d.charge_type = b.charge_type\n" +
|
|
|
" join base_patient c on c.id = a.patient\n" +
|
|
|
" where a.register_no != '' and a.dept is not null and a.dept != '' " +
|
|
|
" and a.register_date is not null " ;
|
|
|
|
|
@ -768,7 +777,7 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
|
|
|
//基于科室转换成国家诊疗科目代码
|
|
|
String[] dept = depToSubject(info.get("dept").toString());
|
|
|
// 获取监管平台唯一标识
|
|
|
String visitDocCode = achNsDoctorRecord(info.get("docId").toString());
|
|
|
String visitDocCode = achNsDoctorRecord((String)info.get("docIdCard"));
|
|
|
|
|
|
jb.put("id_online_med", orgCode + info.get("register_no"));
|
|
|
jb.put("net_service_code", "4");
|
|
@ -968,19 +977,19 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
|
|
|
|
|
|
String sql = "select a.id, a.prescription_id, a.drug_no,a.drug_name, a.dosage\n" +
|
|
|
" ,a.unit,a.quantity,a.pack_unit,a.usage_code,a.supply_code\n" +
|
|
|
" ,a.specification,a.pack_retprice,a.quantity*a.pack_retprice as drug_total_price\n" +
|
|
|
" ,a.specification,a.pack_retprice,a.quantity,a.pack_retprice as drug_total_price\n" +
|
|
|
" from wlyy_prescription_info a \n" +
|
|
|
" LEFT JOIN wlyy_prescription b \n" +
|
|
|
" on b.id = a.prescription_id\n" +
|
|
|
" where a.dosage is not null";
|
|
|
" where a.dosage is not null and a.dosage <> '' ";
|
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
|
sql = sql + " b.create_time >= '" + startDate + "' ";
|
|
|
sql = sql + " and b.create_time >= '" + startDate + "' ";
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(endDate)){
|
|
|
sql = sql + " and b.create_time < '" + endDate + "' ";
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(keyId)){
|
|
|
sql = sql + " and a.id < '" + keyId + "' ";
|
|
|
sql = sql + " and a.id = '" + keyId + "' ";
|
|
|
}
|
|
|
List list = jdbcTemplate.queryForList(sql);
|
|
|
|