Browse Source

修改保存信息

recovery
wang1007152140 4 years ago
parent
commit
a4381887d6
  1. 1
      tcm/src/main/java/com/ccsens/tcm/api/PatientController.java
  2. 8
      tcm/src/main/java/com/ccsens/tcm/bean/dto/PatientDto.java
  3. 5
      tcm/src/main/java/com/ccsens/tcm/service/PatientService.java
  4. 2
      tcm/src/main/resources/mapper_dao/PatientDao.xml

1
tcm/src/main/java/com/ccsens/tcm/api/PatientController.java

@ -51,6 +51,7 @@ public class PatientController {
return JsonResponse.newInstance().ok(selPatientList);
}
@MustLogin
@ApiOperation(value = "保存患者病例信息", notes = "w:提交患者的相关病例信息")
@RequestMapping(value = "/saveCaseMes", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})

8
tcm/src/main/java/com/ccsens/tcm/bean/dto/PatientDto.java

@ -55,6 +55,10 @@ public class PatientDto {
private Long patientId;
@ApiModelProperty("患者病情记录")
List<saveCaseMesSig> list;
@NotNull
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@ApiModelProperty("诊断时间")
private Date timeSlot=new Date(System.currentTimeMillis());
}
@Data
@ApiModel("患者的某个病例信息")
@ -65,10 +69,6 @@ public class PatientDto {
private Long testQuestionsId;
@ApiModelProperty("内容")
private String contents;
@NotNull
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@ApiModelProperty("诊断时间")
private Date timeSlot=new Date(System.currentTimeMillis());
}
@Data
@ApiModel("查询的患者基本信息")

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

@ -113,6 +113,7 @@ public class PatientService implements IPatientService {
PatientRecord patientRecord=new PatientRecord();
BeanUtils.copyProperties(param.getList().get(i),patientRecord);
patientRecord.setPatientId(param.getPatientId());
patientRecord.setTimeSlot(param.getTimeSlot());
if(param.getList().get(i).getPatientRecordId()!=null){
//患者记录表的id
patientRecord.setId(param.getList().get(i).getPatientRecordId());
@ -125,7 +126,7 @@ public class PatientService implements IPatientService {
//需要记录三次的
//算出时间差
int cha=timeDifference(patientRecord.getTimeSlot(),onsetTime);
int cha=timeDifference(param.getTimeSlot(),onsetTime);
if(cha<one){
//记录的one之前的
patientRecord.setCollectTime(oneFront);
@ -139,7 +140,7 @@ public class PatientService implements IPatientService {
}else if(inpatient.getCollectionNum()==2){
//试题需要记录两次的
int cha=timeDifference(patientRecord.getTimeSlot(),onsetTime);
int cha=timeDifference(param.getTimeSlot(),onsetTime);
if(cha<three){
patientRecord.setCollectTime(threeFront);
}else {

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

@ -156,7 +156,7 @@
</select>
<select id="countAnalysis" resultType="com.ccsens.tcm.bean.vo.StatisticVo$SelGroupList">
<if test="testQuestionsId!=null and testQuestionsId!=0">
select if(locate('其他',tpr.contents),'其他',tpr.contents) as content,count(*) as nums from t_patient_information tpi left join t_patient_record tpr on tpi.id=tpr.patient_id and tpr.rec_status=0
select if(locate('其他',tpr.contents),'其他',tpr.contents) as content,count(DISTINCT 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
where tpi.rec_status=0
<if test="testQuestionsId!=null and testQuestionsId!=0">
and tpr.test_questions_id=#{testQuestionsId}

Loading…
Cancel
Save