|
|
@ -108,6 +108,7 @@ |
|
|
|
<result column="qremark" jdbcType="VARCHAR" property="remark" /> |
|
|
|
<result column="recordId" jdbcType="VARCHAR" property="recordId" /> |
|
|
|
<result column="answer" jdbcType="VARCHAR" property="answer" /> |
|
|
|
<result column="explains" jdbcType="VARCHAR" property="explains" /> |
|
|
|
<collection property="optionVos" ofType="com.ccsens.tcm.bean.vo.QuestionVo$PatientOption"> |
|
|
|
<id column="oid" jdbcType="BIGINT" property="id" /> |
|
|
|
<result column="osort" jdbcType="INTEGER" property="sort" /> |
|
|
@ -115,6 +116,7 @@ |
|
|
|
<result column="osubmit_value" jdbcType="VARCHAR" property="submitValue" /> |
|
|
|
<result column="oafter_operation" jdbcType="TINYINT" property="afterOperation" /> |
|
|
|
<result column="choose" jdbcType="TINYINT" property="choose" /> |
|
|
|
<result column="otherInformation" jdbcType="VARCHAR" property="otherInformation" /> |
|
|
|
</collection> |
|
|
|
</resultMap> |
|
|
|
|
|
|
@ -136,7 +138,12 @@ |
|
|
|
r.patient_id, |
|
|
|
r.id as recordId, |
|
|
|
if(r.collect_time is null, 0,r.collect_time) as collect_time, |
|
|
|
if(LEFT(r.contents,3) = '其他:',SUBSTRING(r.contents,4),r.contents) as answer |
|
|
|
r.contents as answer, |
|
|
|
if(r.contents_type = 2,r.contents,null) as explains, |
|
|
|
|
|
|
|
if(r.contents_type = 1 and SUBSTRING_INDEX(r.contents,':',1) = o.submit_value, |
|
|
|
SUBSTRING(r.contents,char_length(o.submit_value)+1),null |
|
|
|
) as otherInformation |
|
|
|
FROM |
|
|
|
t_question q |
|
|
|
LEFT JOIN t_question_option o on q.id = o.question_id and o.rec_status = 0 |
|
|
@ -159,6 +166,7 @@ |
|
|
|
<result column="qremark" jdbcType="VARCHAR" property="remark" /> |
|
|
|
<result column="recordId" jdbcType="VARCHAR" property="recordId" /> |
|
|
|
<result column="answer" jdbcType="VARCHAR" property="answer" /> |
|
|
|
<result column="explains" jdbcType="VARCHAR" property="explains" /> |
|
|
|
<collection property="optionVos" ofType="com.ccsens.tcm.bean.vo.QuestionVo$PatientOption"> |
|
|
|
<id column="oid" jdbcType="BIGINT" property="id" /> |
|
|
|
<result column="osort" jdbcType="INTEGER" property="sort" /> |
|
|
@ -166,6 +174,7 @@ |
|
|
|
<result column="osubmit_value" jdbcType="VARCHAR" property="submitValue" /> |
|
|
|
<result column="oafter_operation" jdbcType="TINYINT" property="afterOperation" /> |
|
|
|
<result column="choose" jdbcType="TINYINT" property="choose" /> |
|
|
|
<result column="otherInformation" jdbcType="VARCHAR" property="otherInformation" /> |
|
|
|
</collection> |
|
|
|
</resultMap> |
|
|
|
|
|
|
@ -185,7 +194,12 @@ |
|
|
|
if(q.type > 2 and q.type < 13 and q.type != 6,if(o.submit_value = r.contents,true,false),null) as choose, |
|
|
|
r.patient_id, |
|
|
|
r.id as recordId, |
|
|
|
if(LEFT(r.contents,3) = '其他:',SUBSTRING(r.contents,4),r.contents) as answer |
|
|
|
r.contents as answer, |
|
|
|
if(r.contents_type = 2,r.contents,null) as explains, |
|
|
|
|
|
|
|
if(r.contents_type = 1 and SUBSTRING_INDEX(r.contents,':',1) = o.submit_value, |
|
|
|
SUBSTRING(r.contents,char_length(o.submit_value)+1),null |
|
|
|
) as otherInformation |
|
|
|
FROM |
|
|
|
t_question q |
|
|
|
LEFT JOIN t_question_option o on q.id = o.question_id and o.rec_status = 0 |
|
|
|