|
@@ -48,85 +48,159 @@ public class DataService {
|
|
|
|
|
|
private static String SAVE_PRINT_URL = "https://risserver3.pacsonline.cn/butt/savePrint";
|
|
private static String SAVE_PRINT_URL = "https://risserver3.pacsonline.cn/butt/savePrint";
|
|
|
|
|
|
-// private static String SAVE_EXAMINFO_URL = "http://10.200.199.136:9605/api/postExamInfo";
|
|
|
|
- private static String SAVE_EXAMINFO_URL = "http://111.53.165.106:9605/api/postExamInfo";
|
|
|
|
|
|
+ private static String SAVE_EXAMINFO_URL = "http://10.200.199.136:9605/api/postExamInfo";
|
|
|
|
+// private static String SAVE_EXAMINFO_URL = "http://111.53.165.106:9605/api/postExamInfo";
|
|
|
|
|
|
|
|
|
|
private static final OkHttpClient OKHTTP_CLIENT = new OkHttpClient();
|
|
private static final OkHttpClient OKHTTP_CLIENT = new OkHttpClient();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+// /**
|
|
|
|
+// * 互认-检查信息
|
|
|
|
+// *
|
|
|
|
+// * @param instutionId
|
|
|
|
+// * @param number
|
|
|
|
+// */
|
|
|
|
+// public static String postExamInfo(com.jfinal.plugin.activerecord.Record record) {
|
|
|
|
+// Map<String, String> params = new HashMap<>();
|
|
|
|
+// params.put("request_time", "1");
|
|
|
|
+// params.put("request_no", "2");
|
|
|
|
+//
|
|
|
|
+// JSONObject jsonObject = new JSONObject();
|
|
|
|
+// JSONObject jsonObjectA = new JSONObject();
|
|
|
|
+// jsonObjectA.put("AA", "张治勤");
|
|
|
|
+// jsonObjectA.put("AB", "01");
|
|
|
|
+// jsonObjectA.put("AC", "140302194905040815");
|
|
|
|
+// jsonObjectA.put("AD", "1");
|
|
|
|
+// jsonObjectA.put("AE", "1949-05-04 00:00:00");
|
|
|
|
+// jsonObjectA.put("AF", "15333038893");
|
|
|
|
+// jsonObjectA.put("AG", "");
|
|
|
|
+//
|
|
|
|
+//
|
|
|
|
+// JSONObject jsonObjectB = new JSONObject();
|
|
|
|
+// jsonObjectB.put("BA", "");
|
|
|
|
+// jsonObjectB.put("BB", "1810151251");
|
|
|
|
+// jsonObjectB.put("BC", "382346");
|
|
|
|
+// jsonObjectB.put("BD", "CT-926658");
|
|
|
|
+// jsonObjectB.put("BE", "2025-05-27 17:57:00");
|
|
|
|
+// jsonObjectB.put("BF", "急诊科");
|
|
|
|
+// jsonObjectB.put("BG", "郭占杰");
|
|
|
|
+// jsonObjectB.put("BH", "636");
|
|
|
|
+// jsonObjectB.put("BI", "");
|
|
|
|
+// jsonObjectB.put("BJ", "76岁");
|
|
|
|
+// jsonObjectB.put("BK", "121403004061412685");
|
|
|
|
+// jsonObjectB.put("BL", "阳泉市第一人民医院");
|
|
|
|
+// jsonObjectB.put("BM", "");
|
|
|
|
+// jsonObjectB.put("BN", "");
|
|
|
|
+//
|
|
|
|
+//
|
|
|
|
+// JSONObject jsonObjectC = new JSONObject();
|
|
|
|
+// jsonObjectC.put("CA", "84090050");
|
|
|
|
+// jsonObjectC.put("CB", "25004415784");
|
|
|
|
+// jsonObjectC.put("CC", "CT");
|
|
|
|
+// jsonObjectC.put("CD", "CT检查(首部位)");
|
|
|
|
+// jsonObjectC.put("CE", "228929");
|
|
|
|
+// jsonObjectC.put("CF", "");
|
|
|
|
+// jsonObjectC.put("CG", "头颅CT平扫");
|
|
|
|
+// jsonObjectC.put("CH", "B020ZYZZZ-00");
|
|
|
|
+// jsonObjectC.put("CI", "2025-05-27 18:04:00");
|
|
|
|
+// jsonObjectC.put("CJ", "1");
|
|
|
|
+// jsonObjectC.put("CK", "");
|
|
|
|
+// jsonObjectC.put("CL", "");
|
|
|
|
+// jsonObjectC.put("CM", "84090050");
|
|
|
|
+// jsonObjectC.put("CN", "CT-926658");
|
|
|
|
+// jsonObjectC.put("CO", "3");
|
|
|
|
+//
|
|
|
|
+// jsonObject.put("A", jsonObjectA);
|
|
|
|
+// jsonObject.put("B", jsonObjectB);
|
|
|
|
+// jsonObject.put("C", jsonObjectC);
|
|
|
|
+// try {
|
|
|
|
+// String bbString= jsonObject.toJSONString();
|
|
|
|
+// String encodedString = Base64.getEncoder().encodeToString(jsonObject.toJSONString().getBytes());
|
|
|
|
+//
|
|
|
|
+// String aaString= SM4Utils.sm4Encrypt("zLxapoeqWYpoeqWY",encodedString);
|
|
|
|
+// System.out.println(bbString);
|
|
|
|
+// System.out.println(aaString);
|
|
|
|
+//
|
|
|
|
+//
|
|
|
|
+// } catch (CryptoException e) {
|
|
|
|
+// // TODO Auto-generated catch block
|
|
|
|
+// e.printStackTrace();
|
|
|
|
+// }
|
|
|
|
+// try {
|
|
|
|
+// String encodedString = Base64.getEncoder().encodeToString(jsonObject.toJSONString().getBytes());
|
|
|
|
+//
|
|
|
|
+// params.put("data", SM4Utils.sm4Encrypt("zLxapoeqWYpoeqWY",encodedString));
|
|
|
|
+// } catch (CryptoException e) {
|
|
|
|
+// // TODO Auto-generated catch block
|
|
|
|
+// e.printStackTrace();
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// String content = postWithParameters(SAVE_EXAMINFO_URL, params);
|
|
|
|
+// return content;
|
|
|
|
+//
|
|
|
|
+// }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 互认-检查信息
|
|
* 互认-检查信息
|
|
*
|
|
*
|
|
* @param instutionId
|
|
* @param instutionId
|
|
* @param number
|
|
* @param number
|
|
*/
|
|
*/
|
|
- public static String postExamInfo(com.jfinal.plugin.activerecord.Record record) {
|
|
|
|
|
|
+ public String postExamInfo(com.jfinal.plugin.activerecord.Record record) {
|
|
Map<String, String> params = new HashMap<>();
|
|
Map<String, String> params = new HashMap<>();
|
|
params.put("request_time", "1");
|
|
params.put("request_time", "1");
|
|
- params.put("request_no", "12");
|
|
|
|
|
|
+ params.put("request_no", "2");
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
JSONObject jsonObject = new JSONObject();
|
|
JSONObject jsonObjectA = new JSONObject();
|
|
JSONObject jsonObjectA = new JSONObject();
|
|
- jsonObjectA.put("AA", "张治勤");
|
|
|
|
- jsonObjectA.put("AB", "01");
|
|
|
|
- jsonObjectA.put("AC", "140302194905040815");
|
|
|
|
- jsonObjectA.put("AD", "1");
|
|
|
|
- jsonObjectA.put("AE", "1949-05-04");
|
|
|
|
- jsonObjectA.put("AF", "15333038893");
|
|
|
|
- jsonObjectA.put("AG", "");
|
|
|
|
|
|
+ jsonObjectA.put("AA", checkStr(record.getStr("姓名")));
|
|
|
|
+ jsonObjectA.put("AB", checkStr(record.getStr("证件类型编码")));
|
|
|
|
+ jsonObjectA.put("AC", checkStr(record.getStr("证件号码")));
|
|
|
|
+ jsonObjectA.put("AD", checkStr(record.getStr("性别编码")));
|
|
|
|
+ jsonObjectA.put("AE", checkStr(record.getStr("出生日期")));
|
|
|
|
+ jsonObjectA.put("AF", checkStr(record.getStr("联系电话")));
|
|
|
|
+ jsonObjectA.put("AG", checkStr(record.getStr("电子健康卡号")));
|
|
|
|
|
|
|
|
|
|
JSONObject jsonObjectB = new JSONObject();
|
|
JSONObject jsonObjectB = new JSONObject();
|
|
- jsonObjectB.put("BA", "1");
|
|
|
|
- jsonObjectB.put("BB", "1810151251");
|
|
|
|
- jsonObjectB.put("BC", "382346");
|
|
|
|
- jsonObjectB.put("BD", "CT-926658");
|
|
|
|
- jsonObjectB.put("BE", "2025-05-27 17:57:00");
|
|
|
|
- jsonObjectB.put("BF", "急诊科");
|
|
|
|
- jsonObjectB.put("BG", "郭占杰");
|
|
|
|
- jsonObjectB.put("BH", "636");
|
|
|
|
- jsonObjectB.put("BI", "");
|
|
|
|
- jsonObjectB.put("BJ", "");
|
|
|
|
|
|
+ jsonObjectB.put("BA", checkStr(record.getStr("就诊类型编码")));
|
|
|
|
+ jsonObjectB.put("BB", checkStr(record.getStr("就诊卡号")));
|
|
|
|
+ jsonObjectB.put("BC", checkStr(record.getStr("患者编号")));
|
|
|
|
+ jsonObjectB.put("BD", checkStr(record.getStr("影像号")));
|
|
|
|
+ jsonObjectB.put("BE", checkStr(record.getStr("就诊申请时间")));
|
|
|
|
+ jsonObjectB.put("BF", checkStr(record.getStr("就诊科室名称")));
|
|
|
|
+ jsonObjectB.put("BG", checkStr(record.getStr("申请医师名称")));
|
|
|
|
+ jsonObjectB.put("BH", checkStr(record.getStr("申请医生编码")));
|
|
|
|
+ jsonObjectB.put("BI", checkStr(record.getStr("主诉")));
|
|
|
|
+ jsonObjectB.put("BJ", checkStr(record.getStr("年龄")));
|
|
jsonObjectB.put("BK", "121403004061412685");
|
|
jsonObjectB.put("BK", "121403004061412685");
|
|
jsonObjectB.put("BL", "阳泉市第一人民医院");
|
|
jsonObjectB.put("BL", "阳泉市第一人民医院");
|
|
- jsonObjectB.put("BM", "");
|
|
|
|
- jsonObjectB.put("BN", "");
|
|
|
|
|
|
+ jsonObjectB.put("BM", checkStr(record.getStr("临床诊断名称")));
|
|
|
|
+ jsonObjectB.put("BN", checkStr(record.getStr("临床诊断代码")));
|
|
|
|
|
|
|
|
|
|
JSONObject jsonObjectC = new JSONObject();
|
|
JSONObject jsonObjectC = new JSONObject();
|
|
- jsonObjectC.put("CA", "84090050");
|
|
|
|
- jsonObjectC.put("CB", "25004415784");
|
|
|
|
- jsonObjectC.put("CC", "CT");
|
|
|
|
- jsonObjectC.put("CD", "CT检查(首部位)");
|
|
|
|
- jsonObjectC.put("CE", "228929");
|
|
|
|
- jsonObjectC.put("CF", "");
|
|
|
|
- jsonObjectC.put("CG", "-");
|
|
|
|
- jsonObjectC.put("CH", "-");
|
|
|
|
- jsonObjectC.put("CI", "2025-05-27 18:04:00");
|
|
|
|
- jsonObjectC.put("CJ", "1");
|
|
|
|
- jsonObjectC.put("CK", "");
|
|
|
|
- jsonObjectC.put("CL", "");
|
|
|
|
- jsonObjectC.put("CM", "84090050");
|
|
|
|
- jsonObjectC.put("CN", "CT-926658");
|
|
|
|
- jsonObjectC.put("CO", "3");
|
|
|
|
|
|
+ jsonObjectC.put("CA", checkStr(record.getStr("医嘱编号")));
|
|
|
|
+ jsonObjectC.put("CB", checkStr(record.getStr("申请单编号")));
|
|
|
|
+ jsonObjectC.put("CC", checkStr(record.getStr("检查类型")));
|
|
|
|
+ jsonObjectC.put("CD", checkStr(record.getStr("检查项目名称")));
|
|
|
|
+ jsonObjectC.put("CE", checkStr(record.getStr("检查项目编码")));
|
|
|
|
+ jsonObjectC.put("CF", checkStr(record.getStr("标本部位")));
|
|
|
|
+ jsonObjectC.put("CG", checkStr(record.getStr("互认项目名称")));
|
|
|
|
+ jsonObjectC.put("CH", checkStr(record.getStr("互认项目编码")));
|
|
|
|
+ jsonObjectC.put("CI", checkStr(record.getStr("检查时间")));
|
|
|
|
+ jsonObjectC.put("CJ", checkStr(record.getStr("胶片类型")));
|
|
|
|
+ jsonObjectC.put("CK", checkStr(record.getStr("操作技师")));
|
|
|
|
+ jsonObjectC.put("CL", checkStr(record.getStr("操作技师编码")));
|
|
|
|
+ jsonObjectC.put("CM", checkStr(record.getStr("检查UID")));
|
|
|
|
+ jsonObjectC.put("CN", checkStr(record.getStr("检查号")));
|
|
|
|
+ jsonObjectC.put("CO", checkStr(record.getStr("检查状态")));
|
|
|
|
|
|
jsonObject.put("A", jsonObjectA);
|
|
jsonObject.put("A", jsonObjectA);
|
|
jsonObject.put("B", jsonObjectB);
|
|
jsonObject.put("B", jsonObjectB);
|
|
jsonObject.put("C", jsonObjectC);
|
|
jsonObject.put("C", jsonObjectC);
|
|
- try {
|
|
|
|
- String bbString= jsonObject.toJSONString();
|
|
|
|
-
|
|
|
|
- String aaString= SM4Utils.sm4Encrypt("zLxapoeqWYpoeqWY",jsonObject.toJSONString());
|
|
|
|
- System.out.println(bbString);
|
|
|
|
- System.out.println(aaString);
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- } catch (CryptoException e) {
|
|
|
|
- // TODO Auto-generated catch block
|
|
|
|
- e.printStackTrace();
|
|
|
|
- }
|
|
|
|
try {
|
|
try {
|
|
String encodedString = Base64.getEncoder().encodeToString(jsonObject.toJSONString().getBytes());
|
|
String encodedString = Base64.getEncoder().encodeToString(jsonObject.toJSONString().getBytes());
|
|
|
|
|
|
@@ -141,31 +215,20 @@ public class DataService {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
/**
|
|
/**
|
|
- * 获取未出报告的检查列表
|
|
|
|
- *
|
|
|
|
- * @param instutionId
|
|
|
|
- * @param number
|
|
|
|
|
|
+ * 校验字符串
|
|
*/
|
|
*/
|
|
- public JSONArray getExamList(Integer number) {
|
|
|
|
- Map<String, String> map = new HashMap<String, String>();
|
|
|
|
- map.put("institution_id", PropKit.get("institution_id"));
|
|
|
|
- map.put("num", number.toString());
|
|
|
|
- String content = postWithParameters(GET_EXAM_URL, map);
|
|
|
|
- JSONObject jsonObject = JSON.parseObject(content);
|
|
|
|
- if (!jsonObject.getString("msg").equals("success")) {
|
|
|
|
- return null;
|
|
|
|
- }
|
|
|
|
- JSONArray jsonArray = JSON.parseArray(jsonObject.getString("data"));
|
|
|
|
- return jsonArray;
|
|
|
|
-
|
|
|
|
|
|
+ public String checkStr(String string) {
|
|
|
|
+ return string==null?"":string;
|
|
}
|
|
}
|
|
|
|
|
|
- public JSONArray getExamListConfirmed(Integer number) {
|
|
|
|
|
|
+ public JSONArray getExamList(Integer number) {
|
|
Map<String, String> map = new HashMap<String, String>();
|
|
Map<String, String> map = new HashMap<String, String>();
|
|
map.put("institution_id", PropKit.get("institution_id"));
|
|
map.put("institution_id", PropKit.get("institution_id"));
|
|
map.put("num", number.toString());
|
|
map.put("num", number.toString());
|
|
- String content = postWithParameters(GET_CONFIRM_EXAM_URL, map);
|
|
|
|
|
|
+ String content = postWithParameters(GET_EXAM_URL, map);
|
|
JSONObject jsonObject = JSON.parseObject(content);
|
|
JSONObject jsonObject = JSON.parseObject(content);
|
|
if (!jsonObject.getString("msg").equals("success")) {
|
|
if (!jsonObject.getString("msg").equals("success")) {
|
|
return null;
|
|
return null;
|
|
@@ -349,8 +412,8 @@ public class DataService {
|
|
// map.put("institution_id", "06300006");
|
|
// map.put("institution_id", "06300006");
|
|
// map.put("start", "2022-02-01");
|
|
// map.put("start", "2022-02-01");
|
|
// map.put("finish", "2022-03-01");
|
|
// map.put("finish", "2022-03-01");
|
|
- String content = postExamInfo(null);
|
|
|
|
- System.out.println(content);
|
|
|
|
|
|
+// String content = postExamInfo(null);
|
|
|
|
+// System.out.println(content);
|
|
|
|
|
|
|
|
|
|
|
|
|