You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
virtual-patient/virtual-patient-model/src/main/resources/mapper/DiagnosisPhysicalRecordMapp...

63 lines
3.4 KiB
XML

<?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.supervision.mapper.DiagnosisPhysicalRecordMapper">
<resultMap id="BaseResultMap" type="com.supervision.model.DiagnosisPhysicalRecord">
<id property="id" column="id" jdbcType="VARCHAR"/>
<result property="processId" column="process_id" jdbcType="VARCHAR"/>
<result property="toolId" column="tool_id" jdbcType="VARCHAR"/>
<result property="locationId" column="location_id" jdbcType="VARCHAR"/>
<result property="primaryId" column="primary_id" jdbcType="VARCHAR"/>
<result property="result" column="result" jdbcType="VARCHAR"/>
<result property="keyword" column="keyword" jdbcType="VARCHAR"/>
<result property="description" column="description" jdbcType="VARCHAR"/>
<result property="createUserId" column="create_user_id" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateUserId" column="update_user_id" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id
,process_id,tool_id,
location_id,primary_id,result,create_user_id,
keyword,description,
create_time,update_user_id,update_time
</sql>
2 years ago
<select id="queryPhysicalResultByProcessId"
resultType="com.supervision.vo.result.PhysicalRecordByResultDAO">
select (IF(t4.location_name IS NULL, t3.tool_name,
CONCAT_WS(' | ', t3.tool_name, t4.location_name))) AS toolLocationName,
t1.id as recordId,
t1.basis_confirm_flag as recordBasisConfirmFlag,
t1.basis_identification_flag as recordBasisIdentificationFlag,
t2.basis_confirm_flag as basisConfirm,
t2.basis_identification_flag as basisIdentification,
t3.id as toolId,
t4.id as locationId
2 years ago
from vp_diagnosis_physical_record t1
left join vp_disease_physical t2 on t1.physical_id = t2.id
left join vp_config_physical_tool t3 on t1.tool_id = t3.id
left join vp_config_physical_location t4 on t1.location_id = t4.id
2 years ago
where t1.process_id = #{processId}
</select>
2 years ago
<select id="queryAskPhysicalHistory" resultType="com.supervision.vo.ask.AskPhysicalHistoryResVO">
select t3.id as toolId,
t3.tool_name as toolName,
t3.type as type,
2 years ago
t4.location_name as locationName,
t4.id as locationId,
t1.id as id,
t1.result as result,
t1.create_time as createTime
from vp_diagnosis_physical_record t1
left join vp_config_physical_tool t3 on t1.tool_id = t3.id
left join vp_config_physical_location t4 on t1.location_id = t4.id
2 years ago
where t1.process_id = #{processId}
order by t1.create_time desc
</select>
</mapper>