Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a1b237af
authored
Dec 26, 2023
by
汪志阳
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix:呼吸心率分数计算
parent
e95e9b55
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderBreatheAnalysisServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderBreatheAnalysisServiceImpl.java
View file @
a1b237af
...
@@ -102,7 +102,7 @@ public class PlatElderBreatheAnalysisServiceImpl extends ServiceImpl<PlatElderBr
...
@@ -102,7 +102,7 @@ public class PlatElderBreatheAnalysisServiceImpl extends ServiceImpl<PlatElderBr
LocalDateTime
yesStart
=
LocalDateTimeUtils
.
getDayStart
(
yesDate
);
LocalDateTime
yesStart
=
LocalDateTimeUtils
.
getDayStart
(
yesDate
);
LocalDateTime
yesEnd
=
LocalDateTimeUtils
.
getDayEnd
(
yesDate
);
LocalDateTime
yesEnd
=
LocalDateTimeUtils
.
getDayEnd
(
yesDate
);
List
<
PlatElder
>
elderList
=
platElderService
.
list
(
new
QueryWrapper
<
PlatElder
>().
lambda
()
List
<
PlatElder
>
elderList
=
platElderService
.
list
(
new
QueryWrapper
<
PlatElder
>().
lambda
()
.
isNotNull
(
PlatElder:
:
getBedId
));
.
isNotNull
(
PlatElder:
:
getBedId
)
.
eq
(
PlatElder:
:
getId
,
"1739220917604581380"
)
);
List
<
PlatElderBreatheAnalysis
>
result
=
new
ArrayList
<>();
List
<
PlatElderBreatheAnalysis
>
result
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isEmpty
(
elderList
))
{
if
(
CollectionUtils
.
isEmpty
(
elderList
))
{
return
result
;
return
result
;
...
@@ -309,28 +309,28 @@ public class PlatElderBreatheAnalysisServiceImpl extends ServiceImpl<PlatElderBr
...
@@ -309,28 +309,28 @@ public class PlatElderBreatheAnalysisServiceImpl extends ServiceImpl<PlatElderBr
// 呼吸暂停
// 呼吸暂停
int
apneaTime
=
Integer
.
parseInt
(
saasDiseaseModel
.
getApneaTime
());
int
apneaTime
=
Integer
.
parseInt
(
saasDiseaseModel
.
getApneaTime
());
int
apneaThreshold
=
Integer
.
parseInt
(
saasDiseaseModel
.
getApneaThreshold
());
int
apneaThreshold
=
Integer
.
parseInt
(
saasDiseaseModel
.
getApneaThreshold
());
BigDecimal
apneaRate
=
new
BigDecimal
(
apneaT
ime
).
divide
(
new
BigDecimal
(
apneaThreshold
),
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
apneaRate
=
new
BigDecimal
(
apneaT
hreshold
).
divide
(
new
BigDecimal
(
apneaTime
),
2
,
RoundingMode
.
HALF_UP
);
// 呼吸过速
// 呼吸过速
int
tachypneaTime
=
Integer
.
parseInt
(
saasDiseaseModel
.
getTachypneaTime
());
int
tachypneaTime
=
Integer
.
parseInt
(
saasDiseaseModel
.
getTachypneaTime
());
int
tachypneaThreshold
=
Integer
.
parseInt
(
saasDiseaseModel
.
getTachypneaThreshold
());
int
tachypneaThreshold
=
Integer
.
parseInt
(
saasDiseaseModel
.
getTachypneaThreshold
());
BigDecimal
tachypneaRate
=
new
BigDecimal
(
tachypneaT
ime
).
divide
(
new
BigDecimal
(
tachypneaThreshold
),
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
tachypneaRate
=
new
BigDecimal
(
tachypneaT
hreshold
).
divide
(
new
BigDecimal
(
tachypneaTime
),
2
,
RoundingMode
.
HALF_UP
);
// 呼吸过缓
// 呼吸过缓
int
bradypneaTime
=
Integer
.
parseInt
(
saasDiseaseModel
.
getBradypneaTime
());
int
bradypneaTime
=
Integer
.
parseInt
(
saasDiseaseModel
.
getBradypneaTime
());
int
bradypneaThreshold
=
Integer
.
parseInt
(
saasDiseaseModel
.
getBradypneaThreshold
());
int
bradypneaThreshold
=
Integer
.
parseInt
(
saasDiseaseModel
.
getBradypneaThreshold
());
BigDecimal
bradypneaRate
=
new
BigDecimal
(
bradypneaT
ime
).
divide
(
new
BigDecimal
(
bradypneaThreshold
),
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
bradypneaRate
=
new
BigDecimal
(
bradypneaT
hreshold
).
divide
(
new
BigDecimal
(
bradypneaTime
),
2
,
RoundingMode
.
HALF_UP
);
// 心率过缓
// 心率过缓
int
bradycardiaTime
=
Integer
.
parseInt
(
saasDiseaseModel
.
getBradycardiaTime
());
int
bradycardiaTime
=
Integer
.
parseInt
(
saasDiseaseModel
.
getBradycardiaTime
());
int
bradycardiaThreshold
=
Integer
.
parseInt
(
saasDiseaseModel
.
getBradycardiaThreshold
());
int
bradycardiaThreshold
=
Integer
.
parseInt
(
saasDiseaseModel
.
getBradycardiaThreshold
());
BigDecimal
bradycardiaRate
=
new
BigDecimal
(
bradycardiaT
ime
).
divide
(
new
BigDecimal
(
bradycardiaThreshold
),
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
bradycardiaRate
=
new
BigDecimal
(
bradycardiaT
hreshold
).
divide
(
new
BigDecimal
(
bradycardiaTime
),
2
,
RoundingMode
.
HALF_UP
);
// 心率过速
// 心率过速
int
tachycardiaTime
=
Integer
.
parseInt
(
saasDiseaseModel
.
getTachycardiaTime
());
int
tachycardiaTime
=
Integer
.
parseInt
(
saasDiseaseModel
.
getTachycardiaTime
());
int
tachycardiaComparison
=
Integer
.
parseInt
(
saasDiseaseModel
.
getTachycardiaThreshold
());
int
tachycardiaComparison
=
Integer
.
parseInt
(
saasDiseaseModel
.
getTachycardiaThreshold
());
BigDecimal
tachycardiaRate
=
new
BigDecimal
(
tachycardia
Time
).
divide
(
new
BigDecimal
(
tachycardiaComparison
),
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
tachycardiaRate
=
new
BigDecimal
(
tachycardia
Comparison
).
divide
(
new
BigDecimal
(
tachycardiaTime
),
2
,
RoundingMode
.
HALF_UP
);
// 呼吸疾病报告
// 呼吸疾病报告
int
brStopCount
=
0
;
int
brStopCount
=
0
;
...
@@ -366,11 +366,11 @@ public class PlatElderBreatheAnalysisServiceImpl extends ServiceImpl<PlatElderBr
...
@@ -366,11 +366,11 @@ public class PlatElderBreatheAnalysisServiceImpl extends ServiceImpl<PlatElderBr
}
}
// 判断是否满足配置的呼吸心率异常类型
// 判断是否满足配置的呼吸心率异常类型
BigDecimal
dayBrStopRate
=
brStopCount
==
0
?
BigDecimal
.
ZERO
:
new
BigDecimal
(
timeHourRange
).
divide
(
new
BigDecimal
(
brStopCount
),
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
dayBrStopRate
=
brStopCount
==
0
?
BigDecimal
.
ZERO
:
new
BigDecimal
(
brStopCount
).
divide
(
new
BigDecimal
(
timeHourRange
),
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
dayBrSlowRate
=
brSlowCount
==
0
?
BigDecimal
.
ZERO
:
new
BigDecimal
(
timeHourRange
).
divide
(
new
BigDecimal
(
brSlowCount
),
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
dayBrSlowRate
=
brSlowCount
==
0
?
BigDecimal
.
ZERO
:
new
BigDecimal
(
brSlowCount
).
divide
(
new
BigDecimal
(
timeHourRange
),
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
dayBrFastRate
=
brFastCount
==
0
?
BigDecimal
.
ZERO
:
new
BigDecimal
(
timeHourRange
).
divide
(
new
BigDecimal
(
brFastCount
),
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
dayBrFastRate
=
brFastCount
==
0
?
BigDecimal
.
ZERO
:
new
BigDecimal
(
brFastCount
).
divide
(
new
BigDecimal
(
timeHourRange
),
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
dayHrFastRate
=
hrFastCount
==
0
?
BigDecimal
.
ZERO
:
new
BigDecimal
(
timeHourRange
).
divide
(
new
BigDecimal
(
hrFastCount
),
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
dayHrFastRate
=
hrFastCount
==
0
?
BigDecimal
.
ZERO
:
new
BigDecimal
(
hrFastCount
).
divide
(
new
BigDecimal
(
timeHourRange
),
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
dayHrSlowRate
=
hrSlowCount
==
0
?
BigDecimal
.
ZERO
:
new
BigDecimal
(
timeHourRange
).
divide
(
new
BigDecimal
(
hrSlowCount
),
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
dayHrSlowRate
=
hrSlowCount
==
0
?
BigDecimal
.
ZERO
:
new
BigDecimal
(
hrSlowCount
).
divide
(
new
BigDecimal
(
timeHourRange
),
2
,
RoundingMode
.
HALF_UP
);
boolean
brStopFlag
=
false
;
boolean
brStopFlag
=
false
;
boolean
brFastFlag
=
false
;
boolean
brFastFlag
=
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment