| | |
| | | where id = #{id} and del_flag=0 |
| | | </select> |
| | | |
| | | <select id="selectPatArchiveByPatnos" resultMap="PatArchiveResult"> |
| | | SELECT id, patientno |
| | | FROM pat_archive |
| | | WHERE patientno IN |
| | | <foreach item="patno" collection="patnos" open="(" separator="," close=")"> |
| | | #{patno} |
| | | </foreach> |
| | | </select> |
| | | |
| | | <insert id="insertPatArchiveSingle" parameterType="com.smartor.domain.PatArchive" useGeneratedKeys="true" |
| | | keyProperty="id"> |
| | | insert into pat_archive |
| | |
| | | </trim> |
| | | </insert> |
| | | |
| | | <insert id="insertPatArchive"> |
| | | <insert id="insertPatArchive" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into |
| | | pat_archive(name,viptype,sex,idcardno,birthdate,place_of_residence,age,age2,sourcefrom,archivetime,archiveby,telcode,relativetelcode,idcardtype,orgid,openid,dduserid,update_by,update_time |
| | | ,create_by,create_time,isupload,upload_time,pattype,nation,birthplace,native_place,patientno,patid_his,sd_flag,age_unit,age_unit2,notrequired_flag,notrequiredreason,care_facilities,case_path, |
| | |
| | | <if test="endtime != null"> |
| | | AND d.endtime = #{endtime} |
| | | </if> |
| | | <if test="drname != null and drname != ''"> |
| | | AND d.drname LIKE concat('%',#{drname}, '%') |
| | | </if> |
| | | <if test="drcode != null"> |
| | | AND d.drcode = #{drcode} |
| | | </if> |
| | | <if test="cry != null and cry == 0 ">and d.endtime is null</if> |
| | | <if test="cry != null and cry == 1 ">and d.endtime is not null</if> |
| | | <if test="visitno != null and visitno != ''"> |
| | |
| | | <if test="drname != null and drname != ''"> |
| | | AND d.drname LIKE concat('%',#{drname}, '%') |
| | | </if> |
| | | <if test="drcode != null"> |
| | | AND d.drcode = #{drcode} |
| | | </if> |
| | | <if test="pids != null"> |
| | | AND a.id NOT IN |
| | | <foreach collection="pids" item="pid" open="(" separator="," close=")"> |