Browse Source

Merge branch 'pt' of dd.tall.wiki:ccsens_wiki/ccsenscloud into pt

recovery
zy_Java 4 years ago
parent
commit
58d34360c5
  1. 18
      tcm/src/main/java/com/ccsens/tcm/api/StatisticalAnalysisController.java
  2. 2
      tcm/src/main/java/com/ccsens/tcm/bean/vo/PatientVo.java
  3. 6
      tcm/src/main/java/com/ccsens/tcm/bean/vo/StatisticVo.java
  4. 2
      tcm/src/main/java/com/ccsens/tcm/persist/dao/PatientDao.java
  5. 2
      tcm/src/main/java/com/ccsens/tcm/service/IPatientService.java
  6. 5
      tcm/src/main/java/com/ccsens/tcm/service/PatientService.java
  7. 29
      tcm/src/main/resources/mapper_dao/PatientDao.xml

18
tcm/src/main/java/com/ccsens/tcm/api/StatisticalAnalysisController.java

@ -90,13 +90,13 @@ public class StatisticalAnalysisController {
log.info("临近任务统计:{}",params);
return JsonResponse.newInstance().ok(recentAnalysisVOPageInfo);
}
// @MustLogin
// @ApiOperation(value = "进行中患者进度", notes = "1007:")
// @RequestMapping(value = "/selPatientProgress", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
// public JsonResponse<PageInfo<StatisticVo.PatientProgressVo>> selPatientProgress(@ApiParam @Validated @RequestBody QueryDto<StatisticDto.RecentAnalysisDto> params){
// log.info("进行中患者进度:{}",params);
// PageInfo<StatisticVo.RecentAnalysisVO> recentAnalysisVOPageInfo=patientService.selPatientProgress(params.getParam());
// log.info("进行中患者进度:{}",params);
// return JsonResponse.newInstance().ok(recentAnalysisVOPageInfo);
// }
@MustLogin
@ApiOperation(value = "进行中患者进度", notes = "1007:")
@RequestMapping(value = "/selPatientProgress", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<StatisticVo.PatientProgressVo>> selPatientProgress(@ApiParam @Validated @RequestBody QueryDto params){
log.info("进行中患者进度:{}",params);
List<StatisticVo.PatientProgressVo> recentAnalysisVOPageInfo=patientService.selPatientProgress(params.getUserId());
log.info("进行中患者进度:{}",params);
return JsonResponse.newInstance().ok(recentAnalysisVOPageInfo);
}
}

2
tcm/src/main/java/com/ccsens/tcm/bean/vo/PatientVo.java

@ -29,6 +29,8 @@ public class PatientVo {
private Long hospitalId;
@ApiModelProperty("对照组名称")
private String name;
@ApiModelProperty("医院名称")
private String hosName;
@ApiModelProperty("搜集次数")
private Integer collectionNum;
}

6
tcm/src/main/java/com/ccsens/tcm/bean/vo/StatisticVo.java

@ -108,9 +108,11 @@ public class StatisticVo {
@Data
@ApiModel("患者进度返回参数")
public static class PatientProgressVo{
@ApiModelProperty("患者姓名")
private String name;
@ApiModelProperty("患者住院号")
private String hospitalization;
@ApiModelProperty("患者id")
private Long id;
@ApiModelProperty("采集时间")
private List<Integer> collectTime;
}
}

2
tcm/src/main/java/com/ccsens/tcm/persist/dao/PatientDao.java

@ -64,4 +64,6 @@ public interface PatientDao {
List<BiologicalSamplesVo.SelBiologNums> selAllYBS();
List<StatisticVo.RecentAnalysisVO> adjacentTasks(StatisticDto.RecentAnalysisDto param,Long userId);
List<StatisticVo.PatientProgressVo> selPatientProgress(Long userId);
}

2
tcm/src/main/java/com/ccsens/tcm/service/IPatientService.java

@ -65,4 +65,6 @@ public interface IPatientService {
List<BiologicalSamplesVo.SelBiologNums> selAllYBS();
PageInfo<StatisticVo.RecentAnalysisVO> adjacentTasks(StatisticDto.RecentAnalysisDto param,Long userId);
List<StatisticVo.PatientProgressVo> selPatientProgress(Long userId);
}

5
tcm/src/main/java/com/ccsens/tcm/service/PatientService.java

@ -385,5 +385,10 @@ public class PatientService implements IPatientService {
return new PageInfo<>(recentAnalysisVOS);
}
@Override
public List<StatisticVo.PatientProgressVo> selPatientProgress(Long userId) {
return patientDao.selPatientProgress(userId);
}
}

29
tcm/src/main/resources/mapper_dao/PatientDao.xml

@ -44,10 +44,12 @@
tpi.inpatient_id AS inpatientId,
tpi.input_status AS inputStatus,
tpi.hospital_id AS hospitalId,
th.name as hosName,
ti.name,
ti.collection_num as collectionNum
FROM
t_patient_information tpi left join t_inpatient ti on ti.rec_status=0 and ti.id=tpi.inpatient_id
left join t_hospital th on th.rec_status=0 and th.id=tpi.hospital_id
WHERE
tpi.rec_status = 0
<if test="hospitalId!=null and hospitalId !=0 ">
@ -77,6 +79,7 @@
t_patient_record tpr
WHERE
tpr.rec_status = 0
and tpr.contents_type = 0
AND tpr.test_questions_id = #{item.testQuestionsId}
<if test="item.contents!=null and item.contents!=''">
AND tpr.contents LIKE concat('%',#{item.contents},'%')
@ -92,6 +95,7 @@
t_patient_record tpr
WHERE
tpr.rec_status = 0
and tpr.contents_type = 0
AND tpr.test_questions_id = #{item1.testQuestionsId}
<if test="item1.startTime!=null and item1.startTime!=''">
AND tpr.contents &gt; #{item1.startTime}
@ -158,7 +162,10 @@
<select id="countAnalysis" resultType="com.ccsens.tcm.bean.vo.StatisticVo$SelGroupList">
<if test="testQuestionsId!=null and testQuestionsId!=0">
select if( tpr.contents_type =1,'其他',tpr.contents) as content,count(distinct tpr.patient_id) as nums from t_patient_information tpi left join t_patient_record tpr on tpi.id=tpr.patient_id and tpr.rec_status=0 and tpr.contents_type != 2
select tpr.contents as content,
count(distinct tpr.patient_id) as nums
from t_patient_information tpi
left join t_patient_record tpr on tpi.id=tpr.patient_id and tpr.rec_status=0 and tpr.contents_type =0
where tpi.rec_status=0
<if test="testQuestionsId!=null and testQuestionsId!=0">
@ -210,7 +217,7 @@
WHERE
tpr.rec_status = 0
AND tpr.test_questions_id = #{item.testQuestionsId}
and tpr.contents_type != 2
and tpr.contents_type =0
<if test="item.contents!=null and item.contents!=''">
AND tpr.contents LIKE concat('%',#{item.contents},'%')
</if>
@ -226,7 +233,7 @@
WHERE
tpr.rec_status = 0
AND tpr.test_questions_id = #{item1.testQuestionsId}
and tpr.contents_type != 2
and tpr.contents_type = 0
<if test="item1.startTime!=null and item1.startTime!=''">
AND tpr.contents &gt; #{item1.startTime}
</if>
@ -393,4 +400,20 @@
)
and tpr.user_id=#{userId}
</select>
<resultMap id="selPatientProgress1" type="com.ccsens.tcm.bean.vo.StatisticVo$PatientProgressVo">
<id property="id" column="id" />
<result property="hospitalization" column="hospitalization" />
<collection property="collectTime" ofType="java.lang.Integer">
<result column="collectTime"/>
</collection>
</resultMap>
<select id="selPatientProgress" resultMap="selPatientProgress1">
select tpi.id,tpi.hospitalization,tpr.collect_time collectTime
from t_patient_record tpr
left join t_patient_information tpi on tpi.rec_status=0 and tpi.id=tpr.patient_id
where tpr.rec_status=0
and tpr.user_id=#{userId}
and tpr.created_at &gt; DATE_SUB(now(), INTERVAL 1 YEAR)
group by tpr.patient_id,tpr.collect_time
</select>
</mapper>
Loading…
Cancel
Save