<?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.docus.server.message.mapper.TBasicMapper">
    <insert id="insertOrUpdateSubmitTime">
        insert into `docus_medicalrecord`.`t_basic_extend` (patient_id,doctor_submit_time) values (#{patientId},#{submitTime})
        ON DUPLICATE KEY UPDATE doctor_submit_time=#{submitTime}
    </insert>


    <select id="getPatientIdsByInpatientNoAndTimes" resultType="java.lang.String">
        SELECT patient_id
        FROM `docus_medicalrecord`.t_basic tb
        WHERE tb.inpatient_no=#{inpatientNo} and tb.admiss_times=#{admissTimes}
    </select>
</mapper>
