|
@@ -12,6 +12,7 @@
|
|
<result column="PATIENT_ID" jdbcType="VARCHAR" property="patientId"/>
|
|
<result column="PATIENT_ID" jdbcType="VARCHAR" property="patientId"/>
|
|
<result column="REC_NAME" jdbcType="VARCHAR" property="patientName"/>
|
|
<result column="REC_NAME" jdbcType="VARCHAR" property="patientName"/>
|
|
<result column="REC_GENDER" jdbcType="VARCHAR" property="patientGender"/>
|
|
<result column="REC_GENDER" jdbcType="VARCHAR" property="patientGender"/>
|
|
|
|
+ <result column="REC_AGE" jdbcType="VARCHAR" property="patientAge"/>
|
|
<result column="PRE_TIME" jdbcType="VARCHAR" property="preTime"/>
|
|
<result column="PRE_TIME" jdbcType="VARCHAR" property="preTime"/>
|
|
<result column="PRE_ID" jdbcType="VARCHAR" property="preId"/>
|
|
<result column="PRE_ID" jdbcType="VARCHAR" property="preId"/>
|
|
<result column="PRE_NO" jdbcType="VARCHAR" property="preNo"/>
|
|
<result column="PRE_NO" jdbcType="VARCHAR" property="preNo"/>
|
|
@@ -25,6 +26,7 @@
|
|
<result column="PRE_ORIGIN" jdbcType="VARCHAR" property="preOrigin"/>
|
|
<result column="PRE_ORIGIN" jdbcType="VARCHAR" property="preOrigin"/>
|
|
<result column="PRE_TYPE" jdbcType="VARCHAR" property="preType"/>
|
|
<result column="PRE_TYPE" jdbcType="VARCHAR" property="preType"/>
|
|
<result column="PRE_MAT_TYPE" jdbcType="VARCHAR" property="preMatType"/>
|
|
<result column="PRE_MAT_TYPE" jdbcType="VARCHAR" property="preMatType"/>
|
|
|
|
+ <result column="STORE_NAME" jdbcType="VARCHAR" property="storeName"/>
|
|
<result column="REC_TRE_TYPE" jdbcType="VARCHAR" property="recTreType"/>
|
|
<result column="REC_TRE_TYPE" jdbcType="VARCHAR" property="recTreType"/>
|
|
<result column="preDescription" jdbcType="VARCHAR" property="preDescription"/>
|
|
<result column="preDescription" jdbcType="VARCHAR" property="preDescription"/>
|
|
<result column="preNum" jdbcType="INTEGER" property="preNum"/>
|
|
<result column="preNum" jdbcType="INTEGER" property="preNum"/>
|
|
@@ -58,7 +60,8 @@
|
|
p.PRE_DOCTORNAME,
|
|
p.PRE_DOCTORNAME,
|
|
r.PATIENT_ID,
|
|
r.PATIENT_ID,
|
|
r.REC_NAME,
|
|
r.REC_NAME,
|
|
- r.REC_GENDER,
|
|
|
|
|
|
+ case r.REC_GENDER when 'F' then '女' when 'M' then '男' end REC_GENDER,
|
|
|
|
+ concat(r.REC_AGE1, r.REC_AGEUNIT1, r.REC_AGE2, r.REC_AGEUNIT2) REC_AGE,
|
|
date_format(p.PRE_TIME, '%Y-%m-%d %H:%i:%s') PRE_TIME,
|
|
date_format(p.PRE_TIME, '%Y-%m-%d %H:%i:%s') PRE_TIME,
|
|
p.PRE_ID,
|
|
p.PRE_ID,
|
|
p.PRE_NO,
|
|
p.PRE_NO,
|
|
@@ -69,9 +72,28 @@
|
|
r.THE_NAMES,
|
|
r.THE_NAMES,
|
|
r.WESTERN_DISEASE_ID,
|
|
r.WESTERN_DISEASE_ID,
|
|
r.WESTERN_DISEASE,
|
|
r.WESTERN_DISEASE,
|
|
- p.PRE_ORIGIN,
|
|
|
|
- p.PRE_TYPE,
|
|
|
|
- r.REC_TRE_TYPE,
|
|
|
|
|
|
+ case p.PRE_ORIGIN
|
|
|
|
+ when '0' then '自拟方'
|
|
|
|
+ when '1' then '智能辩证'
|
|
|
|
+ when '2' then '智能推方'
|
|
|
|
+ when '3' then '方剂搜索'
|
|
|
|
+ when '4' then '协定方'
|
|
|
|
+ when '5' then '专家经验共享'
|
|
|
|
+ when '7' then '名家验案'
|
|
|
|
+ when '9' then '国医大师'
|
|
|
|
+ when '10' then '配方'
|
|
|
|
+ when '11' then '传承经方'
|
|
|
|
+ end PRE_ORIGIN,
|
|
|
|
+ case p.PRE_TYPE
|
|
|
|
+ when '1' then '内服中药方'
|
|
|
|
+ when '2' then '外用中药方'
|
|
|
|
+ when '3' then '中成药方'
|
|
|
|
+ when '4' then '适宜技术方'
|
|
|
|
+ when '5' then '制剂'
|
|
|
|
+ end PRE_TYPE,
|
|
|
|
+<!-- p.PRE_MAT_TYPE,-->
|
|
|
|
+ (select DISPLAY_NAME from t_display d where d.STORE_ID = p.STORE_ID limit 1) STORE_NAME,
|
|
|
|
+ case r.REC_TRE_TYPE when '1' then '门诊' when '2' then '住院' end REC_TRE_TYPE,
|
|
p.PRE_DESCRIPTION,
|
|
p.PRE_DESCRIPTION,
|
|
p.PRE_NUM,
|
|
p.PRE_NUM,
|
|
p.MAT_TOL_MONEY,
|
|
p.MAT_TOL_MONEY,
|
|
@@ -137,7 +159,7 @@
|
|
and p.PRE_ORIGIN = #{preOrigin}
|
|
and p.PRE_ORIGIN = #{preOrigin}
|
|
</if>
|
|
</if>
|
|
<if test="preType != null and preType != ''">
|
|
<if test="preType != null and preType != ''">
|
|
- and p.PRE_TYPE = #{preType}
|
|
|
|
|
|
+ and locate(p.PRE_TYPE, #{preType}) > 0
|
|
</if>
|
|
</if>
|
|
<if test="recTreType != null and recTreType != ''">
|
|
<if test="recTreType != null and recTreType != ''">
|
|
and r.REC_TRE_TYPE = #{recTreType}
|
|
and r.REC_TRE_TYPE = #{recTreType}
|
|
@@ -165,8 +187,8 @@
|
|
</if>
|
|
</if>
|
|
<if test="mats != null and mats != ''">
|
|
<if test="mats != null and mats != ''">
|
|
and (i.YPMC_HIS like CONCAT('%', #{mats}, '%')
|
|
and (i.YPMC_HIS like CONCAT('%', #{mats}, '%')
|
|
- or concat(0+CAST(i.MAT_DOSE AS CHAR), i.BZDW_HIS) = #{mats}
|
|
|
|
- or i.YFMC_HIS = #{mats}
|
|
|
|
|
|
+ or concat(0+CAST(i.MAT_DOSE AS CHAR), i.BZDW_HIS) = #{mats}
|
|
|
|
+ or i.YFMC_HIS = #{mats}
|
|
)
|
|
)
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|