Merge branch 'master' of https://codeup.aliyun.com/61c0318acd8b75daa5a125f7/medical/openhis
# Conflicts: # openhis-server/openhis-common/src/main/java/com/openhis/common/constant/PromptMsgConstant.java # openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/IChargeItemService.java
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
T3.extra_details,
|
||||
T3.contact,
|
||||
T3.appointment_required_flag,
|
||||
T3.definition_id,
|
||||
T3.charge_name,
|
||||
T3.price
|
||||
FROM
|
||||
@@ -37,12 +38,14 @@
|
||||
T1.extra_details,
|
||||
T1.contact,
|
||||
T1.appointment_required_flag,
|
||||
T2.id AS definition_id,
|
||||
T2.charge_name,
|
||||
T2.price
|
||||
FROM
|
||||
adm_healthcare_service AS T1
|
||||
LEFT JOIN adm_charge_item_definition AS T2 ON T2.instance_id = T1.ID
|
||||
AND T2.instance_table = #{tableName}
|
||||
WHERE T1.delete_flag = '0'
|
||||
ORDER BY
|
||||
T1.create_time DESC
|
||||
) AS T3
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
<?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.outpatientservice.mapper.OutpatientRegistrationAppMapper">
|
||||
|
||||
<select id="getPractitionerMetadataPage" resultType="com.openhis.web.outpatientservice.dto.PractitionerMetadata">
|
||||
SELECT T3.tenant_id,
|
||||
T3.ID,
|
||||
T3.NAME,
|
||||
T3.gender_enum,
|
||||
T3.py_str,
|
||||
T3.wb_str
|
||||
FROM (
|
||||
SELECT T1.tenant_id,
|
||||
T1.ID,
|
||||
T1.NAME,
|
||||
T1.gender_enum,
|
||||
T1.py_str,
|
||||
T1.wb_str
|
||||
FROM adm_practitioner AS T1
|
||||
WHERE T1.delete_flag = '0'
|
||||
AND EXISTS(SELECT 1
|
||||
FROM adm_practitioner_role AS T2
|
||||
WHERE T2.practitioner_id = T1.ID
|
||||
AND T2.location_id = #{locationId}
|
||||
AND T2.ROLE_code = #{RoleCode})
|
||||
) AS T3
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<select id="getNumByPatientIdAndOrganizationId" resultType="Integer">
|
||||
SELECT COUNT
|
||||
(1)
|
||||
FROM adm_encounter
|
||||
WHERE delete_flag = '0'
|
||||
AND patient_id = #{patientId}
|
||||
AND service_type_id = #{serviceTypeId}
|
||||
AND create_time > CURRENT_DATE
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -139,13 +139,14 @@
|
||||
|
||||
<!-- 如果传入phone参数,且不为空 -->
|
||||
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.phone != null and OutpatientRecordSearchParam.phone != ''">
|
||||
AND pt.phone LIKE CONCAT('%',#{phone}, '%')
|
||||
AND pt.phone LIKE CONCAT('%',#{OutpatientRecordSearchParam.phone}, '%')
|
||||
</if>
|
||||
|
||||
<!-- 时间筛选 -->
|
||||
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.startTime != null and OutpatientRecordSearchParam.endTime != null">
|
||||
AND e.start_time BETWEEN #{OutpatientRecordSearchParam.startTime} AND
|
||||
#{OutpatientRecordSearchParam.endTime}
|
||||
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.beginTime != null and OutpatientRecordSearchParam.endTime != null">
|
||||
AND e.start_time BETWEEN
|
||||
TO_TIMESTAMP(#{OutpatientRecordSearchParam.beginTime} || ' 00:00:00', 'YYYY-MM-DD HH24:MI:SS') AND
|
||||
TO_TIMESTAMP(#{OutpatientRecordSearchParam.endTime} || ' 23:59:59', 'YYYY-MM-DD HH24:MI:SS')
|
||||
</if>
|
||||
|
||||
<!-- 如果传入doctorName参数,且不为空 -->
|
||||
@@ -184,13 +185,14 @@
|
||||
|
||||
<!-- 如果传入phone参数,且不为空 -->
|
||||
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.phone != null and OutpatientRecordSearchParam.phone != ''">
|
||||
AND pt.phone LIKE CONCAT('%',#{phone}, '%')
|
||||
AND pt.phone LIKE CONCAT('%',#{OutpatientRecordSearchParam.phone}, '%')
|
||||
</if>
|
||||
|
||||
<!-- 时间筛选 -->
|
||||
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.startTime != null and OutpatientRecordSearchParam.endTime != null">
|
||||
AND e.start_time BETWEEN #{OutpatientRecordSearchParam.startTime} AND
|
||||
#{OutpatientRecordSearchParam.endTime}
|
||||
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.beginTime != null and OutpatientRecordSearchParam.endTime != null">
|
||||
AND e.start_time BETWEEN
|
||||
TO_TIMESTAMP(#{OutpatientRecordSearchParam.beginTime} || ' 00:00:00', 'YYYY-MM-DD HH24:MI:SS') AND
|
||||
TO_TIMESTAMP(#{OutpatientRecordSearchParam.endTime} || ' 23:59:59', 'YYYY-MM-DD HH24:MI:SS')
|
||||
</if>
|
||||
|
||||
<!-- 如果传入doctorName参数,且不为空 -->
|
||||
|
||||
Reference in New Issue
Block a user