@ -32,6 +32,8 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource ;
import javax.annotation.Resource ;
import java.text.ParseException ;
import java.text.ParseException ;
import java.text.SimpleDateFormat ;
import java.text.SimpleDateFormat ;
import java.util.ArrayList ;
import java.util.Arrays ;
import java.util.Date ;
import java.util.Date ;
import java.util.List ;
import java.util.List ;
@ -84,6 +86,8 @@ public class PatientService implements IPatientService {
PatientInformation patientInformation = patientInformationMapper . selectByPrimaryKey ( param . getPatientId ( ) ) ;
PatientInformation patientInformation = patientInformationMapper . selectByPrimaryKey ( param . getPatientId ( ) ) ;
onsetTime = patientInformation . getCreatedAt ( ) ;
onsetTime = patientInformation . getCreatedAt ( ) ;
}
}
//先查一下需要搜集多少次
//试题只需要记录3次的 9 和30 算分界限 <9 =0 ;<30 =14 ; >30 =90 记录2次的 270 算分界线 <270 算180 ,>270 算365
//试题只需要记录3次的 9 和30 算分界限 <9 =0 ;<30 =14 ; >30 =90 记录2次的 270 算分界线 <270 算180 ,>270 算365
int one = 9 ;
int one = 9 ;
int two = 30 ;
int two = 30 ;
@ -93,17 +97,16 @@ public class PatientService implements IPatientService {
int three = 270 ;
int three = 270 ;
int threeFront = 180 ;
int threeFront = 180 ;
int threeAfter = 365 ;
int threeAfter = 365 ;
//试题只需要记录2次的
if ( param . getList ( ) . size ( ) > 0 ) {
if ( param . getList ( ) . size ( ) > 0 ) {
for ( int i = 0 ; i < param . getList ( ) . size ( ) ; i + + ) {
for ( int i = 0 ; i < param . getList ( ) . size ( ) ; i + + ) {
//先查询试题id,查看需要记录的次数
//先查询试题id,查看试题 需要记录的次数
ReportCode reportCode = reportCodeMapper . selectByPrimaryKey ( param . getList ( ) . get ( i ) . getTestQuestionsId ( ) ) ;
ReportCode reportCode = reportCodeMapper . selectByPrimaryKey ( param . getList ( ) . get ( i ) . getTestQuestionsId ( ) ) ;
PatientRecord patientRecord = new PatientRecord ( ) ;
PatientRecord patientRecord = new PatientRecord ( ) ;
BeanUtils . copyProperties ( param . getList ( ) . get ( i ) , patientRecord ) ;
BeanUtils . copyProperties ( param . getList ( ) . get ( i ) , patientRecord ) ;
patientRecord . setPatientId ( param . getPatientId ( ) ) ;
patientRecord . setPatientId ( param . getPatientId ( ) ) ;
patientRecord . setId ( param . getList ( ) . get ( i ) . getPatientRecordId ( ) ) ;
if ( param . getList ( ) . get ( i ) . getPatientRecordId ( ) ! = null ) {
if ( param . getList ( ) . get ( i ) . getPatientRecordId ( ) ! = null ) {
//患者记录表的id
//患者记录表的id
patientRecord . setId ( param . getList ( ) . get ( i ) . getPatientRecordId ( ) ) ;
patientRecord . setId ( param . getList ( ) . get ( i ) . getPatientRecordId ( ) ) ;
@ -214,6 +217,20 @@ public class PatientService implements IPatientService {
return selCountS ;
return selCountS ;
}
}
@Override
public List < StatisticVo . SelGroupNum > countAnalysis ( StatisticDto . SelBinLCount param , Long userId ) {
List < StatisticVo . SelGroupNum > selGroupNumsList = new ArrayList < StatisticVo . SelGroupNum > ( ) ;
if ( param . getInpatientId ( ) ! = null & & param . getInpatientId ( ) . length > 0 )
return selGroupNumsList ;
for ( int i = 0 ; i < param . getInpatientId ( ) . length ; i + + ) {
StatisticVo . SelGroupNum selGroupNum = new StatisticVo . SelGroupNum ( ) ;
StatisticVo . SelGroupList selGroupList = patientDao . countAnalysis ( param . getConditionList ( ) , param . getConditionListDate ( ) , param . getInpatientId ( ) [ i ] , param . getId ( ) ) ;
selGroupNum . setInpatientId ( param . getInpatientId ( ) [ i ] ) ;
selGroupNum . getList ( ) . add ( selGroupList ) ;
}
return selGroupNumsList ;
}
/ * *
/ * *
* 换算时间差 , 返回两个时间 之间差几天 , 要是小于1天 , 按照1的算 , 要是大于1的话 , 小于2的话 , 说的是秒啊 。 按照2的算 , 进一法啊
* 换算时间差 , 返回两个时间 之间差几天 , 要是小于1天 , 按照1的算 , 要是大于1的话 , 小于2的话 , 说的是秒啊 。 按照2的算 , 进一法啊
* @param bigDate 大时间
* @param bigDate 大时间