|
@@ -51,10 +51,15 @@ public class HL7ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impl
|
|
|
PV1 pv1 = oruR01.getPATIENT_RESULT().getPATIENT().getVISIT().getPV1();
|
|
|
PID pid = oruR01.getPATIENT_RESULT().getPATIENT().getPID();
|
|
|
String cardId = pv1.getVisitNumber().getID().getValue(); //推送过来的数据就诊卡号
|
|
|
- String wnPatId = pid.getPatientID().getID().getValue(); //卫宁患者ID
|
|
|
- String inspectionDeptName = orc.getOrderingFacilityName(0).getOrganizationName().getValue();//送检科室
|
|
|
+ String patCode = pid.getPatientIdentifierList(0).getID().getValue(); //患者标识符
|
|
|
+ String inspectionDeptName = oruR01.getPATIENT_RESULT().getPATIENT().getVISIT().getPV1().getAssignedPatientLocation().getRoom().getValue();//就诊科室
|
|
|
+ //保存患者在院的报告
|
|
|
+ String patClass = pv1.getPatientClass().getValue(); //患者类别 O:门诊、I、住院
|
|
|
+ if ("O".equals(patClass)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
//根据卫宁患者标识符查询患者是否存在
|
|
|
- Patient entity = patientService.findPatientByWnPatId(wnPatId);
|
|
|
+ Patient entity = patientService.findPatientByWnPatCode(patCode);
|
|
|
if (entity != null){
|
|
|
Long patId = entity.getId();//患者ID
|
|
|
//根据患者id和送检科室查询是否本次就诊的报告
|