|
@@ -49,21 +49,24 @@ public class InspectionsService {
|
|
|
}
|
|
|
healthCardService.reportHisData(param.getPatientId(), "0101082", null ,null);
|
|
|
String firstHead = "<message><PATIENT_TYPE>0</PATIENT_TYPE><PTNT_NO>" + param.getPatientId() + "</PTNT_NO>";
|
|
|
- String[] sendHeads = new String[]{firstHead, null, null, null};
|
|
|
+ List<String> sendHeads = new ArrayList<>();
|
|
|
+ sendHeads.add(firstHead);
|
|
|
RestTemplate restTemplate = new RestTemplate();
|
|
|
String url = hrgApiUrl + "/getParentIdByPatientId?patientId=" + param.getPatientId();
|
|
|
HrgCommonResponse response = restTemplate.getForObject(url, HrgCommonResponse.class);
|
|
|
if (null != response && response.getCode() == 0) {
|
|
|
List<Map<String, String>> list = CastUtil.cast(response.getData());
|
|
|
- sendHeads[1] = "<message><PATIENT_TYPE>0</PATIENT_TYPE><PTNT_NO>" + list.get(0).get("parentPatientId") + "</PTNT_NO>";
|
|
|
+ sendHeads.add("<message><PATIENT_TYPE>0</PATIENT_TYPE><PTNT_NO>" + list.get(0).get("parentPatientId") + "</PTNT_NO>");
|
|
|
}
|
|
|
final String tjNo = dao.selectTjNo(param.getPatientId());
|
|
|
- final String inpatientNo = dao.selectInpatientNo(param.getPatientId());
|
|
|
if (StringUtil.notBlank(tjNo)) {
|
|
|
- sendHeads[2] = "<message><PTNT_NO>" + tjNo + "</PTNT_NO>";
|
|
|
+ sendHeads.add("<message><PTNT_NO>" + tjNo + "</PTNT_NO>");
|
|
|
}
|
|
|
- if (StringUtil.notBlank(inpatientNo)) {
|
|
|
- sendHeads[3] = "<message><PATIENT_TYPE>1</PATIENT_TYPE><PTNT_NO>" + inpatientNo + "</PTNT_NO>";
|
|
|
+ final List<String> inpatientNos = dao.selectInpatientNo(param.getPatientId());
|
|
|
+ if (!inpatientNos.isEmpty()) {
|
|
|
+ for (String inpatientNo : inpatientNos) {
|
|
|
+ sendHeads.add("<message><PATIENT_TYPE>1</PATIENT_TYPE><PTNT_NO>" + inpatientNo + "</PTNT_NO>");
|
|
|
+ }
|
|
|
}
|
|
|
String sendEnd = "<START_TIME>" + param.getStart() + "</START_TIME><END_TIME>" + param.getEnd() + "</END_TIME></message>";
|
|
|
List<ExamIndexResult> list = new ArrayList<>();
|