فهرست منبع

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

LAPTOP-KB9HII50\70708 2 سال پیش
والد
کامیت
8cc8eb3ddf
16فایلهای تغییر یافته به همراه313 افزوده شده و 251 حذف شده
  1. 3 1
      business/base-service/src/main/java/com/yihu/jw/hospital/httplog/service/BaseOperateLogService.java
  2. 19 9
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
  3. 111 170
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/HcyyEntranceService.java
  4. 52 0
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/YkyyEntranceService.java
  5. 1 1
      common/common-entity/src/main/java/com/yihu/jw/entity/IntegerIdentityEntity.java
  6. 39 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/endpoint/EnvelopRestEndpoint.java
  7. 1 1
      server/svr-authentication/src/main/java/com/yihu/jw/security/service/HcyyService.java
  8. 1 1
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/device/PatientDeviceService.java
  9. 1 1
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/sign/ArchiveService.java
  10. 1 0
      svr/svr-cloud-device/src/main/java/com/yihu/jw/care/service/DeviceService.java
  11. 1 1
      svr/svr-cloud-job/src/main/java/com/yihu/jw/care/job/device/DeviceLostAssociationJob.java
  12. 17 15
      svr/svr-cloud-job/src/main/java/com/yihu/jw/care/util/DeviceLostMessageUtil.java
  13. 9 0
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java
  14. 20 48
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/HcyyPrescriptionCotroller.java
  15. 9 3
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java
  16. 28 0
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/YkyyPrescriptionEndpoint.java

+ 3 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/httplog/service/BaseOperateLogService.java

@ -73,7 +73,9 @@ public class BaseOperateLogService extends BaseJpaService<BaseOperateLogDO, Base
            if (doctorMappingDO!=null){
                baseOperateLogDO.setOperator(doctorMappingDO.getMappingCode());
            }*/
            jdbcSqlServer.insertZsSqlserver(baseOperateLogDO);
            if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
                jdbcSqlServer.insertZsSqlserver(baseOperateLogDO);
            }
        }catch (Exception e){
            e.printStackTrace();
        }

+ 19 - 9
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -74,10 +74,7 @@ import com.yihu.jw.hospital.mapping.service.PatientMappingService;
import com.yihu.jw.hospital.message.dao.BaseBannerDoctorDao;
import com.yihu.jw.hospital.message.service.SystemMessageService;
import com.yihu.jw.hospital.prescription.dao.*;
import com.yihu.jw.hospital.prescription.service.entrance.EntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.TnyyEntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.XzzxEntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.YkyyEntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.*;
import com.yihu.jw.hospital.prescription.service.useragent.BaseUserAgent;
import com.yihu.jw.hospital.ykyy.service.YkyyService;
import com.yihu.jw.order.BusinessOrderService;
@ -337,6 +334,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    private WlyyNatPatientFamilyMemberDao natPatientFamilyMemberDao;
    @Autowired
    private PrescriptionLogDao prescriptionLogDao;
    @Autowired
    private HcyyEntranceService hcyyEntranceService;
    public static String entranceUrl = "http://172.16.100.240:10023/xzzx/";
    public static String entranceHealthCareUrl = "http://127.0.0.1:10023/healthCare/";
@ -799,6 +799,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                                vo.setWlyyPrescriptionEmrDO(listEmr.get(0));
                            }
                        }
                    }else if (wxId.equalsIgnoreCase("xm_hcyy_wx")) {
                        WlyyPrescriptionEmrDO wlyyPrescriptionEmrDO1 = prescriptionEmrDao.findEmrByPrescriptionId(vo.getId());
                        if (wlyyPrescriptionEmrDO1 != null) {
                            vo.setWlyyPrescriptionEmrDO(wlyyPrescriptionEmrDO1);
                        } else {
                            List<WlyyPrescriptionEmrDO> listEmr = hcyyPrescriptionService.selectHistoryEmr(hisPatient,"");
                            if (null!=listEmr&&listEmr.size()>0){
                                vo.setWlyyPrescriptionEmrDO(listEmr.get(0));
                            }
                        }
                    }else {
                        WlyyPrescriptionEmrDO wlyyPrescriptionEmrDO1 = prescriptionEmrDao.findEmrByPrescriptionId(vo.getId());
                        if (wlyyPrescriptionEmrDO1 != null) {
@ -9709,7 +9719,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @param prescriptionId
     * @return
     */
    public WlyyPrescriptionCheckDO saveCheck(String operate, String operateName, String reason, Integer status, String prescriptionId, String wxId) {
    public WlyyPrescriptionCheckDO saveCheck(String operate, String operateName, String reason, Integer status, String prescriptionId, String wxId,String ip) {
        WlyyPrescriptionCheckDO prescriptionCheckDO = new WlyyPrescriptionCheckDO();
        prescriptionCheckDO.setCreateTime(new Date());
        prescriptionCheckDO.setOperate(operate);
@ -9970,17 +9980,17 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        }
                    }
                    logger.info("进入处方签名");
                  /*  //处方签名
                    String baseSign=xzyyPrescriptionService.SOF_SignDataWithExtraInfo(wlyyPrescriptionDO);*/
                    //电子病例签名
                    String baseSign=hcyyEntranceService.initiateDataSign(wlyyPrescriptionDO.getId(),2,ip);
                    //同步电子病历
                    WlyyPrescriptionEmrDO prescriptionEmrDO = prescriptionEmrDao.findEmrByPrescriptionId(prescriptionId);
                    try {
                        if (prescriptionEmrDO != null) {
                            logger.info("电子病历同步");
                            hcyyPrescriptionService.saveEmrToEntrance(prescriptionId,null);
                            hcyyPrescriptionService.saveEmrToEntrance(prescriptionId,baseSign);
                            logger.info("电子病历同步");
                            logger.info("电子病历签名");
                           /* xzyyPrescriptionService.SOF_SignDataWithExtraInfoEmr(wlyyPrescriptionDO);*/
                            hcyyEntranceService.initiateDataSign(wlyyPrescriptionDO.getId(),1,ip);
                        }
                    }catch (Exception e){
                        e.printStackTrace();

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 111 - 170
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/HcyyEntranceService.java


+ 52 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/YkyyEntranceService.java

@ -313,6 +313,58 @@ public class YkyyEntranceService {
        return new JSONArray();
    }
    /**
     * 获取检验报告列表
     *
     * @param patient
     * @param startDate
     * @param endDate
     * @return
     * @throws Exception
     */
    public JSONArray getSampleByYZ(String patient,String startDate,String endDate) throws Exception {
        JSONObject object = new JSONObject();
        BasePatientDO patientDO = basePatientDao.findById(patient);
        if (patientDO==null){
            throw new Exception("患者信息为空!");
        }
        object.put("idCard",patientDO.getIdcard());
        object.put("startDate",startDate);
        object.put("endDate",endDate);
        String requestUrl = "http://110.80.17.187:8081/api/getSampleByYZ";
        String response = httpClientUtil.postBody(requestUrl,object);
        if (response!=null){
            JSONObject resJson = JSONObject.parseObject(response);
            if (resJson.getString("status").equalsIgnoreCase("200")){
                JSONArray array = resJson.getJSONArray("payload");
                return array;
            }
        }
        return null;
    }
    /**
     * 获取检验报告详情
     *
     * @param reportNo
     * @return
     * @throws Exception
     */
    public JSONObject getSampleDetailByYZ(String reportNo) throws Exception {
        JSONObject object = new JSONObject();
        object.put("reportNo",reportNo);
        String requestUrl = "http://110.80.17.187:8081/api/getSampleDetailByYZ";
        String response = httpClientUtil.postBody(requestUrl,object);
        if (response!=null){
            JSONObject resJson = JSONObject.parseObject(response);
            if (resJson.getString("status").equalsIgnoreCase("200")){
                JSONObject jsonObject = resJson.getJSONObject("payload");
                return jsonObject;
            }
        }
        return null;
    }
    /**
     * 检查信息明细
     * @param REPORT_ID

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/IntegerIdentityEntity.java

@ -25,7 +25,7 @@ public abstract class IntegerIdentityEntity implements Serializable {
//==========mysql 环境 id策略 end======================================================
//==========Oracle 环境id策略 =========================================================
//   @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="id_generated")
/*   @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="id_generated")*/
//==========Oracle 环境id策略 =========================================================
    public Integer getId() {
        return id;

+ 39 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/endpoint/EnvelopRestEndpoint.java

@ -18,6 +18,8 @@ import javax.servlet.http.HttpServletResponse;
import java.beans.PropertyDescriptor;
import java.io.IOException;
import java.lang.reflect.Method;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.text.SimpleDateFormat;
import java.util.*;
@ -593,4 +595,41 @@ public abstract class EnvelopRestEndpoint extends Exception {
            return PageEnvelop.getError("系统繁忙,请稍后再试",-10000);
        }
    }
    /**
     * 获取用户真实IP地址,不使用request.getRemoteAddr();的原因是有可能用户使用了代理软件方式避免真实IP地址。
     * 可是,如果通过了多级反向代理的话,X-Forwarded-For的值并不止一个,而是一串IP值,究竟哪个才是真正的用户端的真实IP呢?
     * 答案是取X-Forwarded-For中第一个非unknown的有效IP字符串
     * @param request
     * @return
     */
    public String getIpAddress(HttpServletRequest request) {
        String ip = request.getHeader("x-forwarded-for");
        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
            ip = request.getHeader("Proxy-Client-IP");
        }
        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
            ip = request.getHeader("WL-Proxy-Client-IP");
        }
        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
            ip = request.getHeader("HTTP_CLIENT_IP");
        }
        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
            ip = request.getHeader("HTTP_X_FORWARDED_FOR");
        }
        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
            ip = request.getRemoteAddr();
            if("127.0.0.1".equals(ip)||"0:0:0:0:0:0:0:1".equals(ip)){
                //根据网卡取本机配置的IP
                InetAddress inet=null;
                try {
                    inet = InetAddress.getLocalHost();
                } catch (UnknownHostException e) {
                    e.printStackTrace();
                }
                ip= inet.getHostAddress();
            }
        }
        return ip;
    }
}

+ 1 - 1
server/svr-authentication/src/main/java/com/yihu/jw/security/service/HcyyService.java

@ -197,7 +197,7 @@ public class HcyyService {
            jsonObject.put("data",data.toJSONString());
            jsonObject.put("businessSerialNo",businessSerialNo);
            data.put("accessMode","1");*/
            String jsonObject ="{\\\"token\\\": \\\""+token+"\\\", \\\"data\\\": \\\"{\\\\\\\"clientId\\\\\\\": \\\\\\\""+clientId+"\\\\\\\",\\\\\\\"userType\\\\\\\": \\\\\\\"1\\\\\\\"}\\\",\\\"businessSerialNo\\\": \\\"" + businessSerialNo + "\\\",\\\"accessMode\\\": \\\"1\\\"}";
            String jsonObject ="{\\\"token\\\": \\\""+token+"\\\", \\\"data\\\": \\\"{\\\\\\\"clientId\\\\\\\": \\\\\\\""+clientId+"\\\\\\\",\\\\\\\"userType\\\\\\\": \\\\\\\"1\\\\\\\",\\\\\\\"accessMode\\\\\\\": \\\\\\\"1\\\\\\\"}\\\",\\\"businessSerialNo\\\": \\\"" + businessSerialNo + "\\\",\\\"accessMode\\\": \\\"1\\\"}";
            String result = null;
            result = XMCA_DCS_UnifiedInterface("获取登录小程序码接口","authorize/wxacode",jsonObject);
            JSONObject rs = new JSONObject();

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/device/PatientDeviceService.java

@ -1165,7 +1165,7 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa
     */
    public JSONObject getSleepReport(String patient,String deviceSn,String day){
        JSONObject result = new JSONObject();
        String sql = " select * from base_sleep_device where 1=1 ";
        String sql = " select * from base_sleep_device where del=1 ";
        if (StringUtils.isNotBlank(patient)){
            sql +=" and patient='"+patient+"'";
        }

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/sign/ArchiveService.java

@ -284,7 +284,7 @@ public class ArchiveService extends BaseJpaService<ArchiveDO, ArchiveDao> {
//            filter += " and m.org_code='"+hospital+"'   ";
//        }
        if(StringUtils.isNotBlank(name)){
            filter += " and p.name like '%"+name+"%'";
            filter += " and (p.name like '%"+name+"%' or p.idcard = '"+name+"')";
        }
//        filter+= " and m.del = '1' and sr.`status`=1 ) ";
        if (StringUtils.isNotBlank(filterMyPatient)){//

+ 1 - 0
svr/svr-cloud-device/src/main/java/com/yihu/jw/care/service/DeviceService.java

@ -1117,6 +1117,7 @@ public class DeviceService {
                    report.setEfficiency(efficiency);
                    report.setScore(score);
                    report.setDeepPer(deepPer);
                    report.setDel(1);
                    sleepDeviceReportDao.save(report);
                }
            }

+ 1 - 1
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/job/device/DeviceLostAssociationJob.java

@ -30,7 +30,7 @@ public class DeviceLostAssociationJob implements Job {
            patientDeviceService.selectAndUpdate();
            logger.info("DeviceLostAssociationJob end");
        } catch (Exception e) {
            logger.info(e.getMessage());
            logger.info("DeviceLostAssociationJob --ERROR MSG:"+e.getMessage());
            e.printStackTrace();
        }
    }

+ 17 - 15
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/util/DeviceLostMessageUtil.java

@ -104,21 +104,22 @@ public class DeviceLostMessageUtil {
                            break;
                    }
                    BasePatientDO patientDO = patientDao.findById(deviceDO.getUser());
                    SystemMessageDO messageDO = new SystemMessageDO();
                    messageDO.setTitle("设备离线通知");
                    messageDO.setType("43");
                    messageDO.setIsRead("0");
                    messageDO.setSender(deviceDO.getUser());
                    messageDO.setSenderName(patientDO.getName());
                    messageDO.setRelationCode(id);
                    messageDO.setReceiver(docTmp.get("id").toString());
                    messageDO.setReceiverName(docTmp.get("name").toString());
                    messageDO.setOver("1");
                    messageDO.setData(deviceName+"离线");
                    messageDO.setDel("1");
                    messageDO.setCreateTime(new Date());
                    messageDO.setSenderPhoto(patientDO.getPhoto());
                    messageDOS.add(messageDO);
                    if (patientDO!=null){
                        SystemMessageDO messageDO = new SystemMessageDO();
                        messageDO.setTitle("设备离线通知");
                        messageDO.setType("43");
                        messageDO.setIsRead("0");
                        messageDO.setSender(deviceDO.getUser());
                        messageDO.setSenderName(patientDO.getName());
                        messageDO.setRelationCode(id);
                        messageDO.setReceiver(docTmp.get("id").toString());
                        messageDO.setReceiverName(docTmp.get("name").toString());
                        messageDO.setOver("1");
                        messageDO.setData(deviceName+"离线");
                        messageDO.setDel("1");
                        messageDO.setCreateTime(new Date());
                        messageDO.setSenderPhoto(patientDO.getPhoto());
                        messageDOS.add(messageDO);
//                    if ("family3".equals(docTmp.get("user").toString())){//设备离线推送给家属
//                        if(null!=docTmp.get("openid")&& StringUtils.isNotBlank(docTmp.get("openid").toString())){
//                            String first = patientDO.getName()+" "+deviceName+"设备疑似离线";
@ -130,6 +131,7 @@ public class DeviceLostMessageUtil {
//                        }
//                    }
                    }
                }
            }
        }

+ 9 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java

@ -2811,4 +2811,13 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
    public ObjEnvelop getChargeDict()throws Exception{
        return ObjEnvelop.getSuccess("ok",hcyyEntranceService.getChargeDict());
    }
    @GetMapping(value = "/initiateDataSign")
    @ApiOperation(value = "数据签名", notes = "数据签名")
    public ObjEnvelop initiateDataSign(@ApiParam(name = "prescriptionId", value = "处方id", required = false)
                                           @RequestParam(value = "prescriptionId",required = false)String prescriptionId,
                                       @ApiParam(name = "flag", value = "1处方签名、2病例签名", required = false)
                                       @RequestParam(value = "flag",required = false)Integer flag,HttpServletRequest request)throws Exception{
        return ObjEnvelop.getSuccess("ok",hcyyEntranceService.initiateDataSign(prescriptionId, flag,getIpAddress(request)));
    }
}

+ 20 - 48
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/HcyyPrescriptionCotroller.java

@ -6,6 +6,7 @@ import com.yihu.jw.entity.hospital.prescription.*;
import com.yihu.jw.hospital.prescription.dao.PrescriptionDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionDiagnosisDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionInfoDao;
import com.yihu.jw.hospital.prescription.service.HcyyPrescriptionService;
import com.yihu.jw.hospital.prescription.service.entrance.HcyyEntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.XzzxEntranceService;
import com.yihu.jw.im.service.ImService;
@ -45,6 +46,9 @@ public class HcyyPrescriptionCotroller extends EnvelopRestEndpoint {
    private PrescriptionInfoDao prescriptionInfoDao;
    @Autowired
    private ImService imService;
    @Autowired
    private HcyyPrescriptionService hcyyPrescriptionService;
    @GetMapping(value = "/getDeptInfo")
    @ApiOperation(value = "获取部门信息", notes = "获取部门信息")
@ -572,67 +576,35 @@ public class HcyyPrescriptionCotroller extends EnvelopRestEndpoint {
    /**
     * 查询历史就诊病历
     * @param patientId 病人id(必填)
     * @param eventNo 住院号
     * @param eventNo 病人住院号
     * @return
     * @throws Exception
     */
    @GetMapping(value = "/selectEmrInfo")
    @GetMapping(value = "/findHistoryEmr")
    @ApiOperation(value = "查询历史就诊病历", notes = "查询历史就诊病历")
    public ObjEnvelop findHistoryEmr (@ApiParam(name = "patientId", value = "病人id", required = false)
                                      @RequestParam(value = "patientId",required = false)String patientId,
                                      @ApiParam(name = "eventNo", value = "住院号", required = false)
                                      @RequestParam(value = "eventNo",required = false)String eventNo)throws Exception{
        return ObjEnvelop.getSuccess("ok",hcyyEntranceService.SelectEmrInfo(patientId,eventNo));
    }
    /**
     * 查询历次就诊门诊病历文书
     * @param patientId 病人id(必填)
     * @param eventNo 住院号
     * @return
     * @throws Exception
     */
    @GetMapping(value = "/selectEmrDispRecord")
    @ApiOperation(value = "查询历次就诊门诊病历文书", notes = "查询历次就诊门诊病历文书")
    public ObjEnvelop SelectEmrDispRecord (@ApiParam(name = "templateId", value = "模板id", required = false)
                                               @RequestParam(value = "templateId",required = false)String templateId,
                                        @ApiParam(name = "patientId", value = "病人id", required = false)
                                      @RequestParam(value = "patientId",required = false)String patientId,
                                      @ApiParam(name = "eventNo", value = "住院号", required = false)
                                      @RequestParam(value = "eventNo",required = false)String eventNo)throws Exception{
        return ObjEnvelop.getSuccess("ok",hcyyEntranceService.SelectEmrDispRecord(templateId,patientId,eventNo));
    public ObjEnvelop findHistoryEmr(@ApiParam(name = "patientId", value = "病人id", required = false)
                                     @RequestParam(value = "patientId",required = false)String patientId,
                                     @ApiParam(name = "eventNo", value = "病人住院号", required = false)
                                     @RequestParam(value = "eventNo",required = false)String eventNo)throws Exception{
        return ObjEnvelop.getSuccess("ok",hcyyPrescriptionService.selectHistoryEmr(patientId,eventNo));
    }
    /**
     * 查询病历文书列表
     * 查询历史就诊病历
     * @param patientId 病人id(必填)
     * @param eventNo 住院号
     * @param eventNo 病人住院号
     * @return
     * @throws Exception
     */
    @GetMapping(value = "/selectEmrList")
    @ApiOperation(value = "查询病历文书列表", notes = "查询病历文书列表")
    public ObjEnvelop SelectEmrList(@ApiParam(name = "patientId", value = "病人id", required = false)
    @GetMapping(value = "/findHistoryEmrRecord")
    @ApiOperation(value = "查询历史就诊病历", notes = "查询历史就诊病历")
    public ObjEnvelop findHistoryEmrRecord(@ApiParam(name = "templateId", value = "模板id", required = false)
                                           @RequestParam(value = "templateId",required = false)String templateId,
                                           @ApiParam(name = "patientId", value = "病人id", required = false)
                                           @RequestParam(value = "patientId",required = false)String patientId,
                                           @ApiParam(name = "eventNo", value = "住院号", required = false)
                                           @ApiParam(name = "eventNo", value = "病人住院号", required = false)
                                           @RequestParam(value = "eventNo",required = false)String eventNo)throws Exception{
        return ObjEnvelop.getSuccess("ok",hcyyEntranceService.GetEMRList(patientId,eventNo));
    }
    /**
     * 查询病历文书html信息
     * @param bstrEmrID 文书id号
     *
     * @return
     * @throws Exception
     */
    @GetMapping(value = "/browseSingleEMR")
    @ApiOperation(value = "查询病历文书html信息", notes = "查询病历文书html信息")
    public ObjEnvelop BrowseSingleEMR(@ApiParam(name = "bstrEmrID", value = "文书id号", required = false)
                                    @RequestParam(value = "bstrEmrID",required = false)String bstrEmrID)throws Exception{
        return ObjEnvelop.getSuccess("ok",hcyyEntranceService.BrowseSingleEMR(bstrEmrID));
        return ObjEnvelop.getSuccess("ok",hcyyPrescriptionService.selectHistoryEmrRecord(templateId,patientId,eventNo));
    }
    /**
     * 合理用药审核
     * @param patient 病人id

+ 9 - 3
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -2397,10 +2397,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            @ApiParam(name = "status", value = "0未审核1审核退回2审核通过", required = true)
            @RequestParam(required = true) Integer status,
            @ApiParam(name = "prescriptionId", value = "prescriptionId", required = true)
            @RequestParam(required = true) String prescriptionId) throws Exception {
            @RequestParam(required = true) String prescriptionId,HttpServletRequest request) throws Exception {
        WlyyPrescriptionCheckDO wlyyPrescriptionCheckDO = prescriptionService.saveCheck(operate, operateName, reason, status, prescriptionId, wxId);
        WlyyPrescriptionCheckDO wlyyPrescriptionCheckDO = prescriptionService.saveCheck(operate, operateName, reason, status, prescriptionId, wxId,getIpAddress(request));
        try {
            WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionService.findPrescriptionDo(prescriptionId);
            WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findOne(wlyyPrescriptionDO.getOutpatientId());
            if (status == 1) {
@ -2664,6 +2666,8 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            String doctorId = getUID();
            if (wxId.equalsIgnoreCase("xm_xzzx_wx")) {
                return ObjEnvelop.getSuccess("ok", xzzxEntranceService.selectHistoryEmrFromEntrance(patient, null));
            } else if (wxId.equalsIgnoreCase("xm_xzzx_wx")) {
                return ObjEnvelop.getSuccess("ok", hcyyPrescriptionService.selectHistoryEmrFromEntrance(patient, null));
            } else {
                return ObjEnvelop.getSuccess("ok", prescriptionService.outpatient(patient, doctorId));
            }
@ -2696,7 +2700,9 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
        try {
            if (wxId.equalsIgnoreCase("xm_xzzx_wx")) {
                return ObjEnvelop.getSuccess("ok", xzzxEntranceService.selectBrowseSingleEMR(opid));
            } else {
            }else if (wxId.equalsIgnoreCase("xm_hcyy_wx")) {
                return ObjEnvelop.getSuccess("ok", hcyyPrescriptionService.selectBrowseSingleEMR(opid));
            }  else {
                return ObjEnvelop.getSuccess("ok", prescriptionService.getPatInfoDataXml(opid, recSn));
            }
        } catch (Exception e) {

+ 28 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/YkyyPrescriptionEndpoint.java

@ -95,6 +95,34 @@ public class YkyyPrescriptionEndpoint extends EnvelopRestEndpoint {
        }
    }
    @GetMapping(value = "vlisReportMasterlistNew")
    @ApiOperation(value = "检验信息列表新接口")
    public ListEnvelop vlisReportMasterlistNew(@ApiParam(name = "patient", value = "居民id")
                                            @RequestParam(value = "patient",required = true) String patient,
                                            @ApiParam(name = "startTime", value = "开始时间")
                                            @RequestParam(value = "startTime",required = false) String startTime,
                                            @ApiParam(name = "endTime", value = "结束时间")
                                            @RequestParam(value = "endTime",required = false) String endTime) throws Exception{
        try {
            return success(ykyyEntranceService.getSampleByYZ(patient,startTime,endTime));
        }catch (Exception e) {
            return failedListEnvelopException(e);
        }
    }
    @GetMapping(value = "vlisReportMasterDetailNew")
    @ApiOperation(value = "检验信息明细新接口")
    public ObjEnvelop vlisReportMasterDetailNew(@ApiParam(name = "reportNo", value = "报告id")
                                             @RequestParam(value = "reportNo",required = true) String reportNo)throws Exception{
        try {
            return success(ykyyEntranceService.getSampleDetailByYZ(reportNo));
        }catch (Exception e) {
            return failedObjEnvelopException(e);
        }
    }
    @GetMapping(value = "vpacsReportDetail")
    @ApiOperation(value = "检查信息明细")
    public ObjEnvelop vpacsReportDetail(@ApiParam(name = "reportId", value = "报告id")