版本更新

This commit is contained in:
Zhang.WH
2025-09-03 15:54:41 +08:00
parent 0b93d16b64
commit 8f82322d10
3290 changed files with 154339 additions and 23829 deletions

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.openhis.web.document.mapper.DocDefinitionAppMapper">
<!-- 患者信息分页查询-->
<select id="getDefinationList" parameterType="java.util.Map"
resultType="com.openhis.web.document.dto.DocDefinitionDto">
SELECT
dd.id,
dd.name,
dd.version,
dd.primary_menu_enum ,
dd.sub_menu ,
dd.bus_no ,
dd.vue_router ,
dd.hospital_id ,
dd.is_valid ,
dd.display_order ,
dd.use_range_enum ,
dd.doctor_permission_enum ,
dd.nursing_permission_enum ,
dd.medical_permission_enum ,
dd.pharmacist_permission_enum ,
ARRAY_AGG(ddo.organization_id) FILTER (WHERE ddo.organization_id IS NOT NULL) AS organization_Ids
FROM doc_definition dd
LEFT JOIN doc_definition_organization ddo
ON dd.id = ddo.definition_id -- 使用 definition_id 关联
WHERE dd.delete_flag = '0'
and dd.hospital_id = #{hospitalId}
<if test="useRanges != null and !useRanges.isEmpty()">
AND dd.use_range_enum IN
<foreach collection="useRanges" item="useRange" open="(" separator="," close=")">
#{useRange}
</foreach>
</if>
<if test="organizationId != null and organizationId != 0">
AND ddo.organization_id = #{organizationId} OR dd.use_range_enum = 1
</if>
<if test="name != null and !name.isEmpty()">
AND dd.name LIKE CONCAT('%',#{name},'%')
</if>
GROUP BY
dd.id, dd.primary_menu_enum ,
dd.sub_menu
</select>
</mapper>

View File

@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.openhis.web.document.mapper.DocRecordAppMapper">
<!-- 患者信息分页查询-->
<select id="getRecordPageList" parameterType="java.util.Map"
resultType="com.openhis.web.document.dto.DocRecordPatientDto">
SELECT t1.id,
t1.definition_id,
t1.definition_bus_no,
t1.content_json,
t1.status_enum,
t1.organization_id,
t1.encounter_id,
t1.patient_id,
t1.record_time,
t1.tenant_id,
t1.delete_flag,
t1.create_by,
t1.create_time,
t1.update_by,
t1.update_time,
t1.bus_no,
t1.patient_name,
t1.gender,
t1.age,
t1.id_card,
t1.phone,
t1.address,
t1.birth_date,
t1.reception_time,
t1.start_time,
t1.end_time,
t1.class_enum,
t1.primary_menu_enum,
t1.doc_name,
t1.tenant_id
FROM
(SELECT
p.bus_no,
p.name as patient_name,
p.gender_enum as gender,
null as age,
p.birth_date,
p.address,
p.phone,
p.id_card,
e.start_time,
e.end_time,
e.reception_time,
e.class_enum,
d.primary_menu_enum,
d.name as doc_name,
t.id,
t.definition_id,
t.definition_bus_no,
t.content_json,
t.status_enum,
t.organization_id,
t.encounter_id,
t.patient_id,
t.record_time,
t.tenant_id,
t.delete_flag,
t.create_by,
t.create_time,
t.update_by,
t.update_time,
t.tenant_id
FROM doc_record t
LEFT JOIN doc_definition d
on d.id=t.definition_id
LEFT JOIN adm_encounter e
on t.encounter_id =e.id
LEFT JOIN adm_patient p
on t.patient_id=p.id
WHERE t.delete_flag='0'
<if test="primaryMenuEnumList != null and !primaryMenuEnumList.isEmpty()">
AND t.primary_menu_enum IN
<foreach collection="primaryMenuEnumList" item="primaryMenuEnum" open="(" separator="," close=")">
#{primaryMenuEnum}
</foreach>
</if>
order by t.record_time desc
)t1
${ew.customSqlSegment}
</select>
</mapper>

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.openhis.web.document.mapper.DocStatisticsDefinitionAppMapper">
<!-- 患者信息分页查询-->
<select id="getDocStatisticsDefinitionPageList" parameterType="java.util.Map"
resultType="com.openhis.web.document.dto.DocStatisticsDefinitionDto">
</select>
<select id="getOptionList" parameterType="java.util.Map"
resultType="com.openhis.web.document.dto.OptionDto">
SELECT op.id as option_id,
op.option,
op.display_order,
d.id,
d.name,
d.type_enum,
d.code,
d.required,
d.remark,
d.is_statistics,
d.unit
from doc_statistics_definition_option op
RIGHT JOIN doc_statistics_definition d
on op.doc_statistics_definition_id = d.id
WHERE
d.delete_flag='0'
<if test="id!= null">
and d.id = #{id}
</if>
<if test="code!= null and code.isEmpty() == false">
and d.code = #{code}
</if>
<if test="name!= null">
and d.name = #{name}
</if>
</select>
</mapper>