|
@@ -24,9 +24,24 @@
|
|
|
</resultMap>
|
|
|
|
|
|
<select id="getAllMedicalInfo" resultType="com.diagbot.dto.MedicalDTO">
|
|
|
- SELECT * FROM medical
|
|
|
- WHERE is_deleted = "N"
|
|
|
- ORDER BY concept_id
|
|
|
+ SELECT
|
|
|
+ id,
|
|
|
+ is_deleted,
|
|
|
+ gmt_created,
|
|
|
+ gmt_modified,
|
|
|
+ creator,
|
|
|
+ modifier,
|
|
|
+ name,
|
|
|
+ b.synonymous,
|
|
|
+ type,
|
|
|
+ remark,
|
|
|
+ a.concept_id,
|
|
|
+ a.is_concept
|
|
|
+ FROM library_info a,
|
|
|
+ (SELECT concept_id, GROUP_CONCAT(name separator ', ') as synonymous FROM library_info
|
|
|
+ WHERE is_concept is NULL AND concept_id IS NOT NULL AND is_deleted = "N"
|
|
|
+ GROUP BY concept_id ORDER BY concept_id) b
|
|
|
+ WHERE a.concept_id = b.concept_id AND a.is_deleted = "N" AND a.is_concept = 1
|
|
|
</select>
|
|
|
|
|
|
<select id="getTypeId" parameterType="com.diagbot.vo.TypeVo" resultType="com.diagbot.dto.TypeDTO">
|