فهرست منبع

病历详情,其他模块展示

wangsy 3 سال پیش
والد
کامیت
4d68be5d2e

+ 2 - 0
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -234,6 +234,8 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/console/export/badLevelPagePageExport").permitAll()
                 .antMatchers("/console/export/badLevelPageXYExport").permitAll()
                 .antMatchers("/qc/medNurse/getMedNursePage").permitAll()
+                .antMatchers("/qc/medRecordOther/getMedRecordOtherPage").permitAll()
+                .antMatchers("/qc/medRecordOther/getMedRecordContentOther").permitAll()
                 .antMatchers("/qc/behospitalInfo/exportQcresultByPerson").permitAll()
                 .antMatchers("/consoleByDept/beHosCountByDept").permitAll()
                 .antMatchers("/consoleByDept/casesEntryStatisticsByDept").permitAll()

+ 2 - 0
src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -286,6 +286,8 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/console/export/badLevelPagePageExport", request)
                 || matchers("/console/export/badLevelPageXYExport", request)
                 || matchers("/qc/medNurse/getMedNursePage", request)
+                || matchers("/qc/medRecordOther/getMedRecordOtherPage", request)
+                || matchers("/qc/medRecordOther/getMedRecordContentOther", request)
                 || matchers("/qc/behospitalInfo/exportQcresultByPerson", request)
                 || matchers("/consoleByDept/beHosCountByDept", request)
                 || matchers("/consoleByDept/casesEntryStatisticsByDept", request)

+ 40 - 0
src/main/java/com/diagbot/dto/MedRecordContentOtherDTO.java

@@ -0,0 +1,40 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author Wsy
+ * @since 2022-03-09
+ */
+@Getter
+@Setter
+public class MedRecordContentOtherDTO implements Serializable {
+
+    /**
+     * 病历ID
+     */
+    private String recId;
+
+    /**
+     * 文书内容
+     */
+    private String htmlText;
+
+    /**
+     * 创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 修改时间(如果时间是1970年则表示纪录未修改)
+     */
+    private Date gmtModified;
+}

+ 43 - 0
src/main/java/com/diagbot/dto/MedRecordOtherDTO.java

@@ -0,0 +1,43 @@
+package com.diagbot.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author Wsy
+ * @since 2022-03-09
+ */
+@Data
+public class MedRecordOtherDTO implements Serializable {
+
+    /**
+     * 文书ID
+     */
+    private String recId;
+
+    /**
+     * 医院ID
+     */
+    private Long hospitalId;
+
+    /**
+     * 住院病人ID
+     */
+    private String behospitalCode;
+
+    /**
+     * 病历日期
+     */
+    private Date recDate;
+
+    /**
+     * 病历标题
+     */
+    private String recTitle;
+}

+ 101 - 0
src/main/java/com/diagbot/facade/MedicalRecordOtherFacade.java

@@ -0,0 +1,101 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.dto.*;
+import com.diagbot.entity.MedicalRecord;
+import com.diagbot.entity.MedicalRecordContent;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.facade.data.AMedicalRecordContentFacade;
+import com.diagbot.service.impl.MedicalRecordServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.EncrypDES;
+import com.diagbot.util.SysUserUtils;
+import com.diagbot.vo.MedRecordContentOtherVO;
+import com.diagbot.vo.MedRecordOtherVO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: Wsy
+ * @time: 2022/3/9 11:39
+ */
+@Component
+public class MedicalRecordOtherFacade extends MedicalRecordServiceImpl {
+
+    @Autowired
+    private MedicalRecordFacade medicalRecordFacade;
+
+    @Autowired
+    private AMedicalRecordContentFacade AMedicalRecordContentFacade;
+
+    @Value("${encrypt.enable}")
+    Boolean encryptFlag;
+
+    /**
+     *
+     * @param medRecordOtherVO
+     * @return
+     */
+    public List<MedRecordOtherDTO> RecordOtherList(MedRecordOtherVO medRecordOtherVO) {
+        QueryWrapper<MedicalRecord> medicalRecordQueryWrapper = new QueryWrapper<>();
+        medicalRecordQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey());
+        medicalRecordQueryWrapper.eq("hospital_id", Long.valueOf(SysUserUtils.getCurrentHospitalID()));
+        medicalRecordQueryWrapper.eq("mode_id", 0);
+        if (medRecordOtherVO != null) {
+            medicalRecordQueryWrapper.eq("behospital_code", medRecordOtherVO.getBehospitalCode());
+        }
+
+        if (medRecordOtherVO.getRecTitle() != null && medRecordOtherVO != null) {
+            medicalRecordQueryWrapper.like("rec_title", medRecordOtherVO.getRecTitle());
+        }
+        if (medRecordOtherVO.getRecDateStart() != null && medRecordOtherVO != null) {
+            medicalRecordQueryWrapper.ge("rec_date", medRecordOtherVO.getRecDateStart());
+        }
+        if (medRecordOtherVO.getRecDateEnd() != null && medRecordOtherVO != null) {
+            medicalRecordQueryWrapper.le("rec_date", medRecordOtherVO.getRecDateEnd());
+        }
+        medicalRecordQueryWrapper.orderByDesc("rec_date");
+
+        List<MedicalRecord> medicalRecordList = medicalRecordFacade.list(medicalRecordQueryWrapper);
+        List<MedRecordOtherDTO> medRecordOtherDTOList = BeanUtil.listCopyTo(medicalRecordList, MedRecordOtherDTO.class);
+        return medRecordOtherDTOList;
+    }
+
+    /**
+     * 文书详情
+     */
+    public MedRecordContentOtherDTO getRecordContentOther(MedRecordContentOtherVO medRecordContentOtherVO) {
+        MedicalRecordContent medicalRecordContent = AMedicalRecordContentFacade.getOne(new QueryWrapper<MedicalRecordContent>()
+                .eq("hospital_id", Long.valueOf(SysUserUtils.getCurrentHospitalID()))
+                .eq("rec_id", medRecordContentOtherVO.getRecId())
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+        );
+        if (medicalRecordContent != null && medicalRecordContent.getHospitalId() == 35) {
+            medicalRecordContent.setHtmlText(medicalRecordContent.getXmlText());
+        }
+        MedRecordContentOtherDTO medRecordContentOtherDTO = new MedRecordContentOtherDTO();
+        BeanUtil.copyProperties(medicalRecordContent, medRecordContentOtherDTO);
+        // 解密数据
+        if (encryptFlag) {
+            try {
+                EncrypDES encrypDES = new EncrypDES();
+                if (StringUtils.isNotEmpty(medRecordContentOtherDTO.getHtmlText())) {
+                    medRecordContentOtherDTO.setHtmlText(encrypDES.decryptor(medRecordContentOtherDTO.getHtmlText()));
+                }
+            } catch (Exception e) {
+                medRecordContentOtherDTO.setHtmlText(null);
+                throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
+                        "解密错误!病历ID=【" + medRecordContentOtherDTO.getRecId() + "】");
+            }
+        }
+        return medRecordContentOtherDTO;
+    }
+
+}

+ 51 - 0
src/main/java/com/diagbot/vo/MedRecordContentOtherVO.java

@@ -0,0 +1,51 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @Description:
+ * @author: Wsy
+ * @time: 2022/03/09 14:59
+ */
+@Data
+public class MedRecordContentOtherVO {
+
+    /**
+     * 医院id
+     */
+    @ApiModelProperty(hidden = true)
+    private Long hospitalId;
+
+    /**
+     * 文书ID
+     */
+    private String recId;
+
+    /**
+     * 病历号
+     */
+    @ApiModelProperty(hidden = true)
+    private String behospitalCode;
+
+    /**
+     * 病历标题
+     */
+    @ApiModelProperty(hidden = true)
+    private String recTitle;
+
+    /**
+     * 创建开始时间
+     */
+    @ApiModelProperty(hidden = true)
+    private Date recDateStart;
+
+    /**
+     * 创建结束时间
+     */
+    @ApiModelProperty(hidden = true)
+    private Date recDateEnd;
+
+}

+ 47 - 0
src/main/java/com/diagbot/vo/MedRecordOtherVO.java

@@ -0,0 +1,47 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description:
+ * @author: Wsy
+ * @time: 2022/03/09 14:59
+ */
+@Data
+public class MedRecordOtherVO extends Page implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+    /**
+     * 医院id
+     */
+    @ApiModelProperty(hidden = true)
+    private Long hospitalId;
+
+    /**
+     * 病历号
+     */
+    @NotBlank(message = "请输入病历号")
+    private String behospitalCode;
+
+    /**
+     * 病历标题
+     */
+    private String recTitle;
+
+    /**
+     * 创建开始时间
+     */
+    private Date recDateStart;
+
+    /**
+     * 创建结束时间
+     */
+    private Date recDateEnd;
+
+}

+ 57 - 0
src/main/java/com/diagbot/web/MedRecordOtherController.java

@@ -0,0 +1,57 @@
+package com.diagbot.web;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.MedRecordContentOtherDTO;
+import com.diagbot.dto.MedRecordOtherDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.MedicalRecordOtherFacade;
+import com.diagbot.vo.MedRecordContentOtherVO;
+import com.diagbot.vo.MedRecordOtherVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.Valid;
+
+/**
+ * <p>
+ * 前端控制器
+ * </p>
+ *
+ * @author Wsy
+ * @since 2022-03-09
+ */
+@RestController
+@RequestMapping("/qc/medRecordOther")
+@Api(value = "病历详情其他信息API", tags = {"病历详情其他信息API"})
+public class MedRecordOtherController {
+    @Autowired
+    private MedicalRecordOtherFacade medicalRecordOtherFacade;
+
+    @ApiOperation(value = "病历详情其他信息总览",
+            notes = "behospitalCode:病人住院序号<br>" +
+                    "recTitle:病历标题<br>" +
+                    "recDateStart:创建开始时间<br>" +
+                    "recDateEnd:创建结束时间")
+    @PostMapping("/getMedRecordOtherPage")
+    @SysLogger("getMedRecordOtherPage")
+    public RespDTO<IPage<MedRecordOtherDTO>> getMedRecordOtherPage(@RequestBody @Valid MedRecordOtherVO medRecordOtherVO) {
+        return RespDTO.onSuc(medicalRecordOtherFacade.RecordOtherList(medRecordOtherVO));
+    }
+
+
+    @ApiOperation(value = "文书内容展示(HTML)",
+            notes = "recID:病历id<br>")
+    @PostMapping("/getMedRecordContentOther")
+    @SysLogger("getMedRecordContentOther")
+    public RespDTO<MedRecordContentOtherDTO> getMedRecordContentOther(@RequestBody MedRecordContentOtherVO medRecordContentOtherVO) {
+        return RespDTO.onSuc(medicalRecordOtherFacade.getRecordContentOther(medRecordContentOtherVO));
+    }
+
+}