select t1.id, t1.type, t1.question_id, t1.name, t1.score, t1.display, if (t2.id is null, 0, 1) as choose , if(t2.type = 3, null, t2.answer) as answer
from t_ht_question_option t1 left join t_ht_patient_score t2 on t1.id = t2.option_id and (t2.id is null or t2.patient_report_id = #{patientReportId,jdbcType=BIGINT})
select t1.id, t1.type, t1.question_id, t1.name, t1.score, t1.display, case when t1.type = 'hidden' then 0 when t2.id is null then 0 else 1 end as choose , if(t2.type = 3, null, t2.answer) as answer
from t_ht_question_option t1 left join t_ht_patient_score t2 on t1.id = t2.option_id and (t2.id is null or (t2.patient_report_id = #{patientReportId,jdbcType=BIGINT} and t2.is_del = 0))
where t1.question_id = #{questionId,jdbcType=BIGINT}