BabyPatientExtendEarBirth.xml 20.7 KB
   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.lyms.platform.permission.dao.master.BabyPatientExtendEarBirthMapper">

<resultMap id="BabyPatientExtendEarBirthResultMap"
type="com.lyms.platform.permission.model.BabyPatientExtendEarBirth">
<id column="id" property="id" jdbcType="VARCHAR"/>
<result column="fetu_number" property="fetuNumber" jdbcType="INTEGER"/>
<result column="product_number" property="productNumber" jdbcType="INTEGER"/>
<result column="birth_weight" property="birthWeight" jdbcType="DOUBLE"/>
<result column="tire_number" property="tireNumber" jdbcType="VARCHAR"/>
<result column="parturition_type" property="parturitionType" jdbcType="VARCHAR"/>
<result column="birth_defect_type" property="birthDefectType" jdbcType="INTEGER"/>
<result column="birth_defect_desc" property="birthDefectDesc" jdbcType="VARCHAR"/>
<result column="fetu_embarras_type" property="fetuEmbarrasType" jdbcType="INTEGER"/>
<result column="apgar_score_one" property="apgarScoreOne" jdbcType="DOUBLE"/>
<result column="apgar_score_five" property="apgarScoreFive" jdbcType="DOUBLE"/>
<result column="apgar_score_ten" property="apgarScoreTen" jdbcType="DOUBLE"/>
<result column="birth_injury_type" property="birthInjuryType" jdbcType="INTEGER"/>
<result column="birth_injury_position" property="birthInjuryPosition" jdbcType="VARCHAR"/>
<result column="amniotic_fluid_type" property="amnioticFluidType" jdbcType="INTEGER"/>
<result column="abnormal_parturition_type" property="abnormalParturitionType" jdbcType="INTEGER"/>
<result column="abnormal_parturition_position" property="abnormalParturitionPosition" jdbcType="VARCHAR"/>
<result column="deformity_type" property="deformityType" jdbcType="INTEGER"/>
<result column="deformity_position" property="deformityPosition" jdbcType="VARCHAR"/>
<result column="birth_infection_type" property="birthInfectionType" jdbcType="INTEGER"/>
<result column="birth_infection_cause" property="birthInfectionCause" jdbcType="VARCHAR"/>
<result column="birth_course_disease" property="birthCourseDisease" jdbcType="VARCHAR"/>
<result column="birth_ill_type" property="birthIllType" jdbcType="INTEGER"/>
<result column="birth_ill_cause" property="birthIllCause" jdbcType="VARCHAR"/>
<result column="birth_ill_disease" property="birthIllDisease" jdbcType="VARCHAR"/>
<result column="head_trauma_history" property="headTraumaHistory" jdbcType="INTEGER"/>
<result column="head_trauma_desc" property="headTraumaDesc" jdbcType="VARCHAR"/>
<result column="ear_poison_type" property="earPoisonType" jdbcType="INTEGER"/>
<result column="ear_poison_map" property="earPoisonMap" jdbcType="VARCHAR"/>
<result column="tympanitis_type" property="tympanitisType" jdbcType="INTEGER"/>
<result column="tympanitis_desc" property="tympanitisDesc" jdbcType="VARCHAR"/>
<result column="nicu_type" property="nicuType" jdbcType="INTEGER"/>
<result column="nicu_cause" property="nicuCause" jdbcType="VARCHAR"/>
<result column="nicu_continued_date" property="nicuContinuedDate" jdbcType="VARCHAR"/>
<result column="respirator_type" property="respiratorType" jdbcType="INTEGER"/>
<result column="respirator_continued_date" property="respiratorContinuedDate" jdbcType="VARCHAR"/>
<result column="respirator_continued_date_unit" property="respiratorContinuedDateUnit" jdbcType="VARCHAR"/>
<result column="outside_response" property="outsideResponse" jdbcType="INTEGER"/>
<result column="baby_patient_id" property="babyPatientId" jdbcType="VARCHAR"/>
<result column="baby_ear_id" property="babyEarId" jdbcType="VARCHAR" />
<result column="apgar_unknown" property="apgarUnknown" jdbcType="INTEGER" />
</resultMap>


<insert id="addBabyPatientExtendEarBirth"
parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarBirth">
insert into baby_patient_extend_ear_birth (id,fetu_number,product_number,birth_weight,tire_number,parturition_type,birth_defect_type,birth_defect_desc,fetu_embarras_type,apgar_score_one,apgar_score_five,apgar_score_ten,birth_injury_type,birth_injury_position,amniotic_fluid_type,abnormal_parturition_type,abnormal_parturition_position,deformity_type,deformity_position,birth_infection_type,birth_infection_cause,birth_course_disease,birth_ill_type,birth_ill_cause,birth_ill_disease,head_trauma_history,head_trauma_desc,ear_poison_type,ear_poison_map,tympanitis_type,tympanitis_desc,nicu_type,nicu_cause,nicu_continued_date,respirator_type,respirator_continued_date,respirator_continued_date_unit,outside_response,baby_patient_id,baby_ear_id,apgar_unknown) values (#{id},#{fetuNumber},#{productNumber},#{birthWeight},#{tireNumber},#{parturitionType},#{birthDefectType},#{birthDefectDesc},#{fetuEmbarrasType},#{apgarScoreOne},#{apgarScoreFive},#{apgarScoreTen},#{birthInjuryType},#{birthInjuryPosition},#{amnioticFluidType},#{abnormalParturitionType},#{abnormalParturitionPosition},#{deformityType},#{deformityPosition},#{birthInfectionType},#{birthInfectionCause},#{birthCourseDisease},#{birthIllType},#{birthIllCause},#{birthIllDisease},#{headTraumaHistory},#{headTraumaDesc},#{earPoisonType},#{earPoisonMap},#{tympanitisType},#{tympanitisDesc},#{nicuType},#{nicuCause},#{nicuContinuedDate},#{respiratorType},#{respiratorContinuedDate},#{respiratorContinuedDateUnit},#{outsideResponse},#{babyPatientId},#{babyEarId},#{apgarUnknown})
</insert>


<update id="updateBabyPatientExtendEarBirth"
parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarBirth">
update baby_patient_extend_ear_birth
<set>
<if test="fetuNumber != null">
fetu_number = #{fetuNumber,jdbcType=INTEGER},
</if>
<if test="productNumber != null">
product_number = #{productNumber,jdbcType=INTEGER},
</if>
<if test="birthWeight != null">
birth_weight = #{birthWeight,jdbcType=DOUBLE},
</if>
<if test="parturitionType != null and parturitionType != ''">
parturition_type = #{parturitionType,jdbcType=VARCHAR},
</if>
<if test="tireNumber != null and tireNumber != ''">
tire_number = #{tireNumber,jdbcType=VARCHAR},
</if>
<if test="birthDefectType != null">
birth_defect_type = #{birthDefectType,jdbcType=INTEGER},
</if>
<if test="birthDefectDesc != null and birthDefectDesc != ''">
birth_defect_desc = #{birthDefectDesc,jdbcType=VARCHAR},
</if>
<if test="fetuEmbarrasType != null">
fetu_embarras_type = #{fetuEmbarrasType,jdbcType=INTEGER},
</if>
<if test="apgarScoreOne != null">
apgar_score_one = #{apgarScoreOne,jdbcType=DOUBLE},
</if>
<if test="apgarScoreFive != null">
apgar_score_five = #{apgarScoreFive,jdbcType=DOUBLE},
</if>
<if test="apgarScoreTen != null">
apgar_score_ten = #{apgarScoreTen,jdbcType=DOUBLE},
</if>
<if test="birthInjuryType != null">
birth_injury_type = #{birthInjuryType,jdbcType=INTEGER},
</if>
<if test="birthInjuryPosition != null and birthInjuryPosition != ''">
birth_injury_position = #{birthInjuryPosition,jdbcType=VARCHAR},
</if>
<if test="amnioticFluidType != null">
amniotic_fluid_type = #{amnioticFluidType,jdbcType=INTEGER},
</if>
<if test="abnormalParturitionType != null">
abnormal_parturition_type = #{abnormalParturitionType,jdbcType=INTEGER},
</if>
<if test="abnormalParturitionPosition != null and abnormalParturitionPosition != ''">
abnormal_parturition_position = #{abnormalParturitionPosition,jdbcType=VARCHAR},
</if>
<if test="deformityType != null">
deformity_type = #{deformityType,jdbcType=INTEGER},
</if>
<if test="deformityPosition != null and deformityPosition != ''">
deformity_position = #{deformityPosition,jdbcType=VARCHAR},
</if>
<if test="birthInfectionType != null">
birth_infection_type = #{birthInfectionType,jdbcType=INTEGER},
</if>
<if test="birthInfectionCause != null and birthInfectionCause != ''">
birth_infection_cause = #{birthInfectionCause,jdbcType=VARCHAR},
</if>
<if test="birthCourseDisease != null and birthCourseDisease != ''">
birth_course_disease = #{birthCourseDisease,jdbcType=VARCHAR},
</if>
<if test="birthIllType != null">
birth_ill_type = #{birthIllType,jdbcType=INTEGER},
</if>
<if test="birthIllCause != null and birthIllCause != ''">
birth_ill_cause = #{birthIllCause,jdbcType=VARCHAR},
</if>
<if test="birthIllDisease != null and birthIllDisease != ''">
birth_ill_disease = #{birthIllDisease,jdbcType=VARCHAR},
</if>
<if test="headTraumaHistory != null">
head_trauma_history = #{headTraumaHistory,jdbcType=INTEGER},
</if>
<if test="headTraumaDesc != null and headTraumaDesc != ''">
head_trauma_desc = #{headTraumaDesc,jdbcType=VARCHAR},
</if>
<if test="earPoisonType != null">
ear_poison_type = #{earPoisonType,jdbcType=INTEGER},
</if>
<if test="earPoisonMap != null and earPoisonMap != ''">
ear_poison_map = #{earPoisonMap,jdbcType=VARCHAR},
</if>
<if test="tympanitisType != null">
tympanitis_type = #{tympanitisType,jdbcType=INTEGER},
</if>
<if test="tympanitisDesc != null and tympanitisDesc != ''">
tympanitis_desc = #{tympanitisDesc,jdbcType=VARCHAR},
</if>
<if test="nicuType != null">
nicu_type = #{nicuType,jdbcType=INTEGER},
</if>
<if test="nicuCause != null and nicuCause != ''">
nicu_cause = #{nicuCause,jdbcType=VARCHAR},
</if>
<if test="nicuContinuedDate != null and nicuContinuedDate != ''">
nicu_continued_date = #{nicuContinuedDate,jdbcType=VARCHAR},
</if>
<if test="respiratorType != null">
respirator_type = #{respiratorType,jdbcType=INTEGER},
</if>
<if test="respiratorContinuedDate != null and respiratorContinuedDate != ''">
respirator_continued_date = #{respiratorContinuedDate,jdbcType=VARCHAR},
</if>
<if test="respiratorContinuedDateUnit != null and respiratorContinuedDateUnit != ''">
respirator_continued_date_unit = #{respiratorContinuedDateUnit,jdbcType=VARCHAR},
</if>
<if test="outsideResponse != null">
outside_response = #{outsideResponse,jdbcType=INTEGER},
</if>
<if test="babyPatientId != null and babyPatientId != ''">
baby_patient_id = #{babyPatientId,jdbcType=VARCHAR},
</if>
<if test="babyEarId != null and babyEarId != ''">
baby_ear_id = #{babyEarId,jdbcType=VARCHAR},
</if>
<if test="apgarUnknown != null">
apgar_unknown = #{apgarUnknown,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>


<delete id="deleteBabyPatientExtendEarBirth" parameterType="java.lang.String">
delete from baby_patient_extend_ear_birth where id = #{id,jdbcType=VARCHAR}
</delete>


<select id="getBabyPatientExtendEarBirth" resultMap="BabyPatientExtendEarBirthResultMap"
parameterType="java.lang.String">
select id,fetu_number,product_number,birth_weight,tire_number,parturition_type,birth_defect_type,birth_defect_desc,fetu_embarras_type,apgar_score_one,apgar_score_five,apgar_score_ten,birth_injury_type,birth_injury_position,amniotic_fluid_type,abnormal_parturition_type,abnormal_parturition_position,deformity_type,deformity_position,birth_infection_type,birth_infection_cause,birth_course_disease,birth_ill_type,birth_ill_cause,birth_ill_disease,head_trauma_history,head_trauma_desc,ear_poison_type,ear_poison_map,tympanitis_type,tympanitis_desc,nicu_type,nicu_cause,nicu_continued_date,respirator_type,respirator_continued_date,respirator_continued_date_unit,outside_response,baby_patient_id,baby_ear_id,apgar_unknown
from baby_patient_extend_ear_birth where id = #{id,jdbcType=VARCHAR}
</select>


<sql id="orderAndLimit">
<if test="sort != null and sort != '' ">
order by ${sort}
<if test="need != null">
limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER}
</if>
</if>
</sql>


<sql id="BabyPatientExtendEarBirthCondition">
<where>
1 = 1
<if test="id != null and id != ''">
and id = #{id,jdbcType=VARCHAR}
</if>
<if test="fetuNumber != null">
and fetu_number = #{fetuNumber,jdbcType=INTEGER}
</if>
<if test="productNumber != null">
and product_number = #{productNumber,jdbcType=INTEGER}
</if>
<if test="birthWeight != null">
and birth_weight = #{birthWeight,jdbcType=DOUBLE}
</if>
<if test="parturitionType != null and parturitionType != ''">
and parturition_type = #{parturitionType,jdbcType=VARCHAR}
</if>
<if test="tireNumber != null and tireNumber != ''">
and tire_number = #{tireNumber,jdbcType=VARCHAR}
</if>
<if test="birthDefectType != null">
and birth_defect_type = #{birthDefectType,jdbcType=INTEGER}
</if>
<if test="birthDefectDesc != null and birthDefectDesc != ''">
and birth_defect_desc = #{birthDefectDesc,jdbcType=VARCHAR}
</if>
<if test="fetuEmbarrasType != null">
and fetu_embarras_type = #{fetuEmbarrasType,jdbcType=INTEGER}
</if>
<if test="apgarScoreOne != null">
and apgar_score_one = #{apgarScoreOne,jdbcType=DOUBLE}
</if>
<if test="apgarScoreFive != null">
and apgar_score_five = #{apgarScoreFive,jdbcType=DOUBLE}
</if>
<if test="apgarScoreTen != null">
and apgar_score_ten = #{apgarScoreTen,jdbcType=DOUBLE}
</if>
<if test="birthInjuryType != null">
and birth_injury_type = #{birthInjuryType,jdbcType=INTEGER}
</if>
<if test="birthInjuryPosition != null and birthInjuryPosition != ''">
and birth_injury_position = #{birthInjuryPosition,jdbcType=VARCHAR}
</if>
<if test="amnioticFluidType != null">
and amniotic_fluid_type = #{amnioticFluidType,jdbcType=INTEGER}
</if>
<if test="abnormalParturitionType != null">
and abnormal_parturition_type = #{abnormalParturitionType,jdbcType=INTEGER}
</if>
<if test="abnormalParturitionPosition != null and abnormalParturitionPosition != ''">
and abnormal_parturition_position = #{abnormalParturitionPosition,jdbcType=VARCHAR}
</if>
<if test="deformityType != null">
and deformity_type = #{deformityType,jdbcType=INTEGER}
</if>
<if test="deformityPosition != null and deformityPosition != ''">
and deformity_position = #{deformityPosition,jdbcType=VARCHAR}
</if>
<if test="birthInfectionType != null">
and birth_infection_type = #{birthInfectionType,jdbcType=INTEGER}
</if>
<if test="birthInfectionCause != null and birthInfectionCause != ''">
and birth_infection_cause = #{birthInfectionCause,jdbcType=VARCHAR}
</if>
<if test="birthCourseDisease != null and birthCourseDisease != ''">
and birth_course_disease = #{birthCourseDisease,jdbcType=VARCHAR}
</if>
<if test="birthIllType != null">
and birth_ill_type = #{birthIllType,jdbcType=INTEGER}
</if>
<if test="birthIllCause != null and birthIllCause != ''">
and birth_ill_cause = #{birthIllCause,jdbcType=VARCHAR}
</if>
<if test="birthIllDisease != null and birthIllDisease != ''">
and birth_ill_disease = #{birthIllDisease,jdbcType=VARCHAR}
</if>
<if test="headTraumaHistory != null">
and head_trauma_history = #{headTraumaHistory,jdbcType=INTEGER}
</if>
<if test="headTraumaDesc != null and headTraumaDesc != ''">
and head_trauma_desc = #{headTraumaDesc,jdbcType=VARCHAR}
</if>
<if test="earPoisonType != null">
and ear_poison_type = #{earPoisonType,jdbcType=INTEGER}
</if>
<if test="earPoisonMap != null and earPoisonMap != ''">
and ear_poison_map = #{earPoisonMap,jdbcType=VARCHAR}
</if>
<if test="tympanitisType != null">
and tympanitis_type = #{tympanitisType,jdbcType=INTEGER}
</if>
<if test="tympanitisDesc != null and tympanitisDesc != ''">
and tympanitis_desc = #{tympanitisDesc,jdbcType=VARCHAR}
</if>
<if test="nicuType != null">
and nicu_type = #{nicuType,jdbcType=INTEGER}
</if>
<if test="nicuCause != null and nicuCause != ''">
and nicu_cause = #{nicuCause,jdbcType=VARCHAR}
</if>
<if test="nicuContinuedDate != null and nicuContinuedDate != ''">
and nicu_continued_date = #{nicuContinuedDate,jdbcType=VARCHAR}
</if>
<if test="respiratorType != null">
and respirator_type = #{respiratorType,jdbcType=INTEGER}
</if>
<if test="respiratorContinuedDate != null and respiratorContinuedDate != ''">
and respirator_continued_date = #{respiratorContinuedDate,jdbcType=VARCHAR}
</if>
<if test="respiratorContinuedDateUnit != null and respiratorContinuedDateUnit != ''">
and respirator_continued_date_unit = #{respiratorContinuedDateUnit,jdbcType=VARCHAR}
</if>
<if test="outsideResponse != null">
and outside_response = #{outsideResponse,jdbcType=INTEGER}
</if>
<if test="babyPatientId != null and babyPatientId != ''">
and baby_patient_id = #{babyPatientId,jdbcType=VARCHAR}
</if>
<if test="babyEarId != null and babyEarId != ''">
and baby_ear_id = #{babyEarId,jdbcType=VARCHAR}
</if>
</where>
</sql>


<select id="queryBabyPatientExtendEarBirth" resultMap="BabyPatientExtendEarBirthResultMap"
parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarBirthQuery">
select
id,fetu_number,product_number,birth_weight,tire_number,parturition_type,birth_defect_type,birth_defect_desc,fetu_embarras_type,apgar_score_one,apgar_score_five,apgar_score_ten,birth_injury_type,birth_injury_position,amniotic_fluid_type,abnormal_parturition_type,abnormal_parturition_position,deformity_type,deformity_position,birth_infection_type,birth_infection_cause,birth_course_disease,birth_ill_type,birth_ill_cause,birth_ill_disease,head_trauma_history,head_trauma_desc,ear_poison_type,ear_poison_map,tympanitis_type,tympanitis_desc,nicu_type,nicu_cause,nicu_continued_date,respirator_type,respirator_continued_date,respirator_continued_date_unit,outside_response,baby_patient_id,baby_ear_id,apgar_unknown
from baby_patient_extend_ear_birth
<include refid="BabyPatientExtendEarBirthCondition"/>
<include refid="orderAndLimit"/>
</select>


<select id="queryBabyPatientExtendEarBirthCount" resultType="int"
parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarBirthQuery">
select count(1) from baby_patient_extend_ear_birth
<include refid="BabyPatientExtendEarBirthCondition"/>
</select>


</mapper>