fix: 健康管理系统,统计分析修改。
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
<result property="contentUnit" column="content_unit" />
|
||||
<result property="personName" column="person_name" />
|
||||
<result property="healthRecordName" column="health_record_name" />
|
||||
<result property="useDays" column="useDays" />
|
||||
|
||||
</resultMap>
|
||||
<select id="selectMarRecordList" parameterType="HealthMarRecordDto" resultMap="HealthMarRecordResult">
|
||||
@@ -37,7 +38,17 @@
|
||||
hmr.person_id ,
|
||||
hp."name" as person_name,
|
||||
hmr.health_record_id as health_record_id,
|
||||
hr."name" as health_record_name
|
||||
hr."name" as health_record_name,
|
||||
(
|
||||
select
|
||||
count(distinct to_char(t.dosing_time, 'yyyy-MM-dd'))
|
||||
from
|
||||
health_mar_record t
|
||||
where
|
||||
t.person_id = hmr.person_id
|
||||
and t.health_record_id = hmr.health_record_id
|
||||
and t.medicine_id = hmr.medicine_id
|
||||
) as useDays
|
||||
from
|
||||
health_mar_record hmr
|
||||
left join health_medicine_basic hmb on
|
||||
|
||||
Reference in New Issue
Block a user