11 changed files with 358 additions and 5 deletions
@ -1,5 +1,5 @@ |
|||
spring: |
|||
profiles: |
|||
active: test |
|||
include: util-test,common |
|||
active: dev |
|||
include: util-dev,common |
|||
|
|||
|
@ -0,0 +1,38 @@ |
|||
package com.ccsens.tcm.api; |
|||
|
|||
import com.ccsens.cloudutil.annotation.MustLogin; |
|||
import com.ccsens.tcm.bean.dto.ConRecDto; |
|||
import com.ccsens.tcm.bean.vo.ConRecVo; |
|||
import com.ccsens.tcm.service.IPatientService; |
|||
import com.ccsens.util.JsonResponse; |
|||
import com.ccsens.util.bean.dto.QueryDto; |
|||
import com.github.pagehelper.PageInfo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import io.swagger.annotations.ApiParam; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestMethod; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* @author wang |
|||
*/ |
|||
@Api(tags = "会议记录相关接口") |
|||
@RestController |
|||
@RequestMapping("/conferenceRecords") |
|||
@Slf4j |
|||
public class ConferenceRecordsController { |
|||
private IPatientService patientService; |
|||
// @MustLogin
|
|||
@ApiOperation(value = "查询会议记录", notes = "w:根据会议记录查询条件查询会议记录") |
|||
@RequestMapping(value = "/selConRec", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<PageInfo<ConRecVo.SelConRecVo>> selConRec(@ApiParam @Validated @RequestBody QueryDto<ConRecDto.SelConRecDto> params) { |
|||
log.info("查询会议记录相关信息:{}",params); |
|||
PageInfo<ConRecVo.SelConRecVo> selConRecVoPageInfo= patientService.selConRec(params.getParam(),0L); |
|||
log.info("查询会议记录基本信息成功"); |
|||
return JsonResponse.newInstance().ok(selConRecVoPageInfo); |
|||
} |
|||
} |
@ -0,0 +1,42 @@ |
|||
package com.ccsens.tcm.bean.dto; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Max; |
|||
import javax.validation.constraints.Min; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author wang |
|||
*/ |
|||
@Data |
|||
public class ConRecDto { |
|||
@Data |
|||
@ApiModel("查询会议记录搜索条件") |
|||
public static class SelConRecDto { |
|||
@ApiModelProperty("会议id") |
|||
private Long id; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("包含在某时间之后的会议记录") |
|||
private Date startTime; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("包含在某时间之前的会议记录") |
|||
private Date endTime; |
|||
@ApiModelProperty("包含某地点的会议记录") |
|||
private String place=""; |
|||
@ApiModelProperty("包含某主持人的会议记录") |
|||
private String host=""; |
|||
@ApiModelProperty("包含某研讨内容的会议记录") |
|||
private String discussionContent=""; |
|||
@Min(1) |
|||
@ApiModelProperty("当前页") |
|||
private Integer pageNum=1; |
|||
@Min(1) |
|||
@Max(20) |
|||
@ApiModelProperty("每页数量") |
|||
private Integer pageSize=10; |
|||
} |
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.ccsens.tcm.bean.vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author wang |
|||
*/ |
|||
@Data |
|||
public class ConRecVo { |
|||
@Data |
|||
@ApiModel("查询会议记录搜索条件") |
|||
public static class SelConRecVo { |
|||
@ApiModelProperty("会议记录id") |
|||
private Long id; |
|||
@ApiModelProperty("会议开始时间") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private Date startTime; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("会议结束时间") |
|||
private Date endTime; |
|||
@ApiModelProperty("会议地点") |
|||
private String place; |
|||
@ApiModelProperty("主持人") |
|||
private String host; |
|||
@ApiModelProperty("参会人") |
|||
private String participants; |
|||
@ApiModelProperty("研讨内容") |
|||
private String discussionContent; |
|||
@ApiModelProperty("会议纪要") |
|||
private String meetingMinutes; |
|||
} |
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.ccsens.tcm.bean.vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wang |
|||
*/ |
|||
@Data |
|||
public class PatientVo { |
|||
@Data |
|||
@ApiModel("经过搜索条件查询的患者基本信息") |
|||
public static class SelPatient { |
|||
@ApiModelProperty("患者id") |
|||
private Long id; |
|||
@ApiModelProperty("住院号") |
|||
private String hospitalization; |
|||
@ApiModelProperty("对照组id") |
|||
private Integer inpatientId; |
|||
@ApiModelProperty("录入状态:0:新建 1:数据搜集中 2数据搜集完成 3数据搜集超时 4:废弃") |
|||
private Byte inputStatus; |
|||
@ApiModelProperty("医院id") |
|||
private Integer hospitalId; |
|||
} |
|||
@Data |
|||
@ApiModel("经过搜索条件查询的患者集合") |
|||
public static class SelPatientList{ |
|||
@ApiModelProperty("患者相关信息") |
|||
private List<SelPatient> selPatients; |
|||
} |
|||
} |
@ -0,0 +1,19 @@ |
|||
package com.ccsens.tcm.persist.dao; |
|||
|
|||
import com.ccsens.tcm.bean.dto.ConRecDto; |
|||
import com.ccsens.tcm.bean.dto.PatientDto; |
|||
import com.ccsens.tcm.bean.vo.ConRecVo; |
|||
import com.ccsens.tcm.bean.vo.PatientVo; |
|||
import org.springframework.stereotype.Repository; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wang |
|||
*/ |
|||
@Repository |
|||
public interface PatientDao { |
|||
List<ConRecVo.SelConRecVo> selConRec(ConRecDto.SelConRecDto param); |
|||
|
|||
List<PatientVo.SelPatient> selPatientMesList(PatientDto.SelPatlenConditionList param); |
|||
} |
@ -0,0 +1,84 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.tcm.persist.dao.PatientDao"> |
|||
|
|||
<select id="selConRec" resultType="com.ccsens.tcm.bean.vo.ConRecVo$SelConRecVo"> |
|||
SELECT |
|||
tcr.id, |
|||
tcr.start_time AS startTime, |
|||
tcr.end_time AS endTime, |
|||
place, |
|||
`host`, |
|||
participants, |
|||
tcr.discussion_content AS discussionContent, |
|||
tcr.meeting_minutes AS meetingMinutes |
|||
FROM |
|||
t_conference_records tcr |
|||
WHERE |
|||
tcr.rec_status=0 |
|||
<if test="id != null"> |
|||
and id = #{param.id} |
|||
</if> |
|||
<if test="id == null"> |
|||
<if test="startTime != null "> |
|||
and tcr.start_time > #{param.startTime} |
|||
</if> |
|||
<if test="endTime != null "> |
|||
and tcr.end_time < #{param.endTime} |
|||
</if> |
|||
<if test="place != null and place != ''"> |
|||
and tcr.place like concat('%',#{place, jdbcType=VARCHAR},'%') |
|||
</if> |
|||
<if test="host != null and host != ''"> |
|||
and tcr.host like concat('%',#{host, jdbcType=VARCHAR},'%') |
|||
</if> |
|||
<if test="discussionContent != null and discussionContent != ''"> |
|||
and tcr.discussion_content like concat('%',#{discussionContent},'%') |
|||
</if> |
|||
</if> |
|||
</select> |
|||
<select id="selPatientMesList" resultType="com.ccsens.tcm.bean.vo.PatientVo$SelPatient"> |
|||
SELECT |
|||
id, |
|||
hospitalization, |
|||
tpi.inpatient_id AS inpatientId, |
|||
tpi.input_status AS inputStatus, |
|||
tpi.hospital_id AS hospitalId |
|||
FROM |
|||
t_patient_information tpi |
|||
WHERE |
|||
tpi.rec_status = 0 |
|||
AND tpi.id IN ( |
|||
SELECT DISTINCT |
|||
( t.patient_id ) |
|||
FROM |
|||
( |
|||
<trim suffixOverrides="INTERSECT"> |
|||
<foreach collection="conditionList" item="item"> |
|||
SELECT |
|||
tpr.patient_id |
|||
FROM |
|||
t_patient_record tpr |
|||
WHERE |
|||
tpr.rec_status = 0 |
|||
AND tpr.test_questions_id = #{item.testQuestionsId} |
|||
AND tpr.contents LIKE concat('%',#{item.contents},'%') |
|||
INTERSECT |
|||
</foreach> |
|||
<foreach collection="conditionListDate" item="item1"> |
|||
SELECT |
|||
tpr.patient_id |
|||
FROM |
|||
t_patient_record tpr |
|||
WHERE |
|||
tpr.rec_status = 0 |
|||
AND tpr.test_questions_id = #{item1.testQuestionsId} |
|||
AND tpr.contents > #{item1.startTime} |
|||
AND tpr.contents < #{item1.endTime} |
|||
INTERSECT |
|||
</foreach> |
|||
</trim> |
|||
) t |
|||
) |
|||
</select> |
|||
</mapper> |
Loading…
Reference in new issue