|
@@ -5,65 +5,69 @@
|
|
|
<mapper namespace="com.fs.his.mapper.FsPrescribeDataScrmMapper">
|
|
<mapper namespace="com.fs.his.mapper.FsPrescribeDataScrmMapper">
|
|
|
|
|
|
|
|
<resultMap type="com.fs.his.domain.FsPrescribeDataScrm" id="FsPrescribeDataScrmResult">
|
|
<resultMap type="com.fs.his.domain.FsPrescribeDataScrm" id="FsPrescribeDataScrmResult">
|
|
|
- <id property="prescribeId" column="prescribe_id" />
|
|
|
|
|
- <result property="prescribeType" column="prescribe_type" />
|
|
|
|
|
- <result property="inquiryOrderId" column="inquiry_order_id" />
|
|
|
|
|
- <result property="orderCode" column="order_code" />
|
|
|
|
|
- <result property="storeOrderId" column="store_order_id" />
|
|
|
|
|
- <result property="userId" column="user_id" />
|
|
|
|
|
- <result property="patientId" column="patient_id" />
|
|
|
|
|
- <result property="prescribeCode" column="prescribe_code" />
|
|
|
|
|
- <result property="patientDescs" column="patient_descs" />
|
|
|
|
|
- <result property="nowIllness" column="now_illness" />
|
|
|
|
|
- <result property="historyIllness" column="history_illness" />
|
|
|
|
|
- <result property="patientAge" column="patient_age" />
|
|
|
|
|
- <result property="patientName" column="patient_name" />
|
|
|
|
|
- <result property="weight" column="weight" />
|
|
|
|
|
- <result property="isHistoryAllergic" column="is_history_allergic" />
|
|
|
|
|
- <result property="historyAllergic" column="history_allergic" />
|
|
|
|
|
- <result property="liverUnusual" column="liver_unusual" />
|
|
|
|
|
- <result property="renalUnusual" column="renal_unusual" />
|
|
|
|
|
- <result property="isLactation" column="is_lactation" />
|
|
|
|
|
- <result property="patientTel" column="patient_tel" />
|
|
|
|
|
- <result property="patientGender" column="patient_gender" />
|
|
|
|
|
- <result property="recordPic" column="record_pic" />
|
|
|
|
|
- <result property="prescribeImgUrl" column="prescribe_img_url" />
|
|
|
|
|
- <result property="prescribeImgStoreUrl" column="prescribe_img_store_url"/>
|
|
|
|
|
- <result property="auditReason" column="audit_reason" />
|
|
|
|
|
- <result property="diagnose" column="diagnose" />
|
|
|
|
|
- <result property="doctorId" column="doctor_id" />
|
|
|
|
|
- <result property="drugDoctorId" column="drug_doctor_id" />
|
|
|
|
|
- <result property="createTime" column="create_time" />
|
|
|
|
|
- <result property="status" column="status" />
|
|
|
|
|
- <result property="auditTime" column="audit_time" />
|
|
|
|
|
- <result property="usageJson" column="usage_json" />
|
|
|
|
|
- <result property="remark" column="remark" />
|
|
|
|
|
- <result property="storeId" column="store_id" />
|
|
|
|
|
- <result property="prescribeDoctorId" column="prescribe_doctor_id" />
|
|
|
|
|
- <result property="doctorSignUrl" column="doctor_sign_url" />
|
|
|
|
|
- <result property="prescribeDoctorSignUrl" column="prescribe_doctor_sign_url"/>
|
|
|
|
|
- <result property="drugDoctorSignUrl" column="drug_doctor_sign_url" />
|
|
|
|
|
- <result property="patientBirthday" column="patient_birthday" />
|
|
|
|
|
- <result property="recipeType" column="recipe_type" />
|
|
|
|
|
- <result property="prescribeCodeUrl" column="prescribe_code_url" />
|
|
|
|
|
- <result property="cycle" column="cycle" />
|
|
|
|
|
- <result property="icdCode" column="icd_code" />
|
|
|
|
|
- <result property="source" column="source" />
|
|
|
|
|
- <result property="doctorConfirm" column="doctor_confirm" />
|
|
|
|
|
- <result property="startOperateTime" column="start_operate_time" />
|
|
|
|
|
- <result property="endOperateTime" column="end_operate_time" />
|
|
|
|
|
- <result property="operateSecond" column="operate_second" />
|
|
|
|
|
- <result property="thirdPartyUserId" column="third_party_user_id" />
|
|
|
|
|
- <result property="isSendToThirdParty" column="is_send_to_third_party" />
|
|
|
|
|
- <result property="handwriteCollectionId" column="handwrite_collection_id"/>
|
|
|
|
|
- <result property="companyCustomerId" column="company_customer_id" />
|
|
|
|
|
- <result property="createBy" column="create_by" />
|
|
|
|
|
- <result property="updateBy" column="update_by" />
|
|
|
|
|
- <result property="updateTime" column="update_time" />
|
|
|
|
|
|
|
+ <id property="prescribeId" column="prescribe_id" />
|
|
|
|
|
+ <result property="prescribeType" column="prescribe_type" />
|
|
|
|
|
+ <result property="inquiryOrderId" column="inquiry_order_id" />
|
|
|
|
|
+ <result property="orderCode" column="order_code" />
|
|
|
|
|
+ <result property="storeOrderId" column="store_order_id" />
|
|
|
|
|
+ <result property="userId" column="user_id" />
|
|
|
|
|
+ <result property="patientId" column="patient_id" />
|
|
|
|
|
+ <result property="prescribeCode" column="prescribe_code" />
|
|
|
|
|
+ <result property="patientDescs" column="patient_descs" />
|
|
|
|
|
+ <result property="nowIllness" column="now_illness" />
|
|
|
|
|
+ <result property="historyIllness" column="history_illness" />
|
|
|
|
|
+ <result property="patientAge" column="patient_age" />
|
|
|
|
|
+ <result property="patientName" column="patient_name" />
|
|
|
|
|
+ <result property="weight" column="weight" />
|
|
|
|
|
+ <result property="isHistoryAllergic" column="is_history_allergic" />
|
|
|
|
|
+ <result property="historyAllergic" column="history_allergic" />
|
|
|
|
|
+ <result property="liverUnusual" column="liver_unusual" />
|
|
|
|
|
+ <result property="renalUnusual" column="renal_unusual" />
|
|
|
|
|
+ <result property="isLactation" column="is_lactation" />
|
|
|
|
|
+ <result property="patientTel" column="patient_tel" />
|
|
|
|
|
+ <result property="patientGender" column="patient_gender" />
|
|
|
|
|
+ <result property="recordPic" column="record_pic" />
|
|
|
|
|
+ <result property="prescribeImgUrl" column="prescribe_img_url" />
|
|
|
|
|
+ <result property="prescribeImgStoreUrl" column="prescribe_img_store_url" />
|
|
|
|
|
+ <result property="auditReason" column="audit_reason" />
|
|
|
|
|
+ <result property="diagnose" column="diagnose" />
|
|
|
|
|
+ <result property="doctorId" column="doctor_id" />
|
|
|
|
|
+ <result property="drugDoctorId" column="drug_doctor_id" />
|
|
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
|
|
+ <result property="status" column="status" />
|
|
|
|
|
+ <result property="auditTime" column="audit_time" />
|
|
|
|
|
+ <result property="usageJson" column="usage_json" />
|
|
|
|
|
+ <result property="remark" column="remark" />
|
|
|
|
|
+ <result property="storeId" column="store_id" />
|
|
|
|
|
+ <result property="prescribeDoctorId" column="prescribe_doctor_id" />
|
|
|
|
|
+ <result property="doctorSignUrl" column="doctor_sign_url" />
|
|
|
|
|
+ <result property="prescribeDoctorSignUrl" column="prescribe_doctor_sign_url" />
|
|
|
|
|
+ <result property="drugDoctorSignUrl" column="drug_doctor_sign_url" />
|
|
|
|
|
+ <result property="patientBirthday" column="patient_birthday" />
|
|
|
|
|
+ <result property="recipeType" column="recipe_type" />
|
|
|
|
|
+ <result property="prescribeCodeUrl" column="prescribe_code_url" />
|
|
|
|
|
+ <result property="cycle" column="cycle" />
|
|
|
|
|
+ <result property="icdCode" column="icd_code" />
|
|
|
|
|
+ <result property="source" column="source" />
|
|
|
|
|
+ <result property="doctorConfirm" column="doctor_confirm" />
|
|
|
|
|
+ <result property="startOperateTime" column="start_operate_time" />
|
|
|
|
|
+ <result property="endOperateTime" column="end_operate_time" />
|
|
|
|
|
+ <result property="operateSecond" column="operate_second" />
|
|
|
|
|
+ <result property="thirdPartyUserId" column="third_party_user_id" />
|
|
|
|
|
+ <result property="isSendToThirdParty" column="is_send_to_third_party" />
|
|
|
|
|
+ <result property="handwriteCollectionId" column="handwrite_collection_id" />
|
|
|
|
|
+ <result property="companyCustomerId" column="company_customer_id" />
|
|
|
|
|
+ <result property="foodAndExerciseGuidance" column="food_and_exercise_guidance" />
|
|
|
|
|
+ <result property="healingAreaJson" column="healing_area_json" />
|
|
|
|
|
+ <result property="noteTaboos" column="note_taboos" />
|
|
|
|
|
+ <result property="facialDiagnosis" column="facial_diagnosis" />
|
|
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="selectFsPrescribeDataScrmVo">
|
|
<sql id="selectFsPrescribeDataScrmVo">
|
|
|
- select prescribe_id, prescribe_type, inquiry_order_id,order_code, store_order_id, user_id, patient_id,
|
|
|
|
|
|
|
+ select prescribe_id, prescribe_type, inquiry_order_id, order_code, store_order_id, user_id, patient_id,
|
|
|
prescribe_code, patient_descs, now_illness, history_illness, patient_age, patient_name,
|
|
prescribe_code, patient_descs, now_illness, history_illness, patient_age, patient_name,
|
|
|
weight, is_history_allergic, history_allergic, liver_unusual, renal_unusual, is_lactation,
|
|
weight, is_history_allergic, history_allergic, liver_unusual, renal_unusual, is_lactation,
|
|
|
patient_tel, patient_gender, record_pic, prescribe_img_url, prescribe_img_store_url,
|
|
patient_tel, patient_gender, record_pic, prescribe_img_url, prescribe_img_store_url,
|
|
@@ -72,7 +76,8 @@
|
|
|
prescribe_doctor_sign_url, drug_doctor_sign_url, patient_birthday, recipe_type,
|
|
prescribe_doctor_sign_url, drug_doctor_sign_url, patient_birthday, recipe_type,
|
|
|
prescribe_code_url, cycle, icd_code, source, doctor_confirm, start_operate_time,
|
|
prescribe_code_url, cycle, icd_code, source, doctor_confirm, start_operate_time,
|
|
|
end_operate_time, operate_second, third_party_user_id, is_send_to_third_party,
|
|
end_operate_time, operate_second, third_party_user_id, is_send_to_third_party,
|
|
|
- handwrite_collection_id, company_customer_id
|
|
|
|
|
|
|
+ handwrite_collection_id, company_customer_id,
|
|
|
|
|
+ food_and_exercise_guidance, healing_area_json, note_taboos, facial_diagnosis
|
|
|
from fs_prescribe_data_scrm
|
|
from fs_prescribe_data_scrm
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
@@ -104,6 +109,18 @@
|
|
|
<if test="doctorConfirm != null"> and doctor_confirm = #{doctorConfirm}</if>
|
|
<if test="doctorConfirm != null"> and doctor_confirm = #{doctorConfirm}</if>
|
|
|
<if test="isSendToThirdParty != null"> and is_send_to_third_party = #{isSendToThirdParty}</if>
|
|
<if test="isSendToThirdParty != null"> and is_send_to_third_party = #{isSendToThirdParty}</if>
|
|
|
<if test="companyCustomerId != null"> and company_customer_id = #{companyCustomerId}</if>
|
|
<if test="companyCustomerId != null"> and company_customer_id = #{companyCustomerId}</if>
|
|
|
|
|
+ <if test="foodAndExerciseGuidance != null and foodAndExerciseGuidance != ''">
|
|
|
|
|
+ and food_and_exercise_guidance like concat('%', #{foodAndExerciseGuidance}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="healingAreaJson != null and healingAreaJson != ''">
|
|
|
|
|
+ and healing_area_json like concat('%', #{healingAreaJson}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="noteTaboos != null and noteTaboos != ''">
|
|
|
|
|
+ and note_taboos like concat('%', #{noteTaboos}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="facialDiagnosis != null and facialDiagnosis != ''">
|
|
|
|
|
+ and facial_diagnosis like concat('%', #{facialDiagnosis}, '%')
|
|
|
|
|
+ </if>
|
|
|
<!-- 按时间范围查询 -->
|
|
<!-- 按时间范围查询 -->
|
|
|
<if test="params != null and beginTime != null and beginTime != ''">
|
|
<if test="params != null and beginTime != null and beginTime != ''">
|
|
|
and create_time >= #{params.beginCreateTime}
|
|
and create_time >= #{params.beginCreateTime}
|
|
@@ -130,12 +147,11 @@
|
|
|
order by create_time desc
|
|
order by create_time desc
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
<select id="pendingStorePrescribeList" resultType="com.fs.qw.vo.FsPrescribeDataScrmVO">
|
|
<select id="pendingStorePrescribeList" resultType="com.fs.qw.vo.FsPrescribeDataScrmVO">
|
|
|
select pds.* from fs_prescribe_data_scrm pds
|
|
select pds.* from fs_prescribe_data_scrm pds
|
|
|
left join fs_company_customer fcc on pds.prescribe_id = fcc.prescribe_id
|
|
left join fs_company_customer fcc on pds.prescribe_id = fcc.prescribe_id
|
|
|
<where>
|
|
<where>
|
|
|
- pds.drug_doctor_id = #{drugDoctorId} and doctor_confirm = 1 <!--必须是医生开方通过的才能进入待药师审核 -->
|
|
|
|
|
|
|
+ pds.drug_doctor_id = #{drugDoctorId} and doctor_confirm = 1
|
|
|
<if test="orderCode != null"> and order_code = #{orderCode}</if>
|
|
<if test="orderCode != null"> and order_code = #{orderCode}</if>
|
|
|
<if test="prescribeCode != null and prescribeCode != ''"> and prescribe_code = #{prescribeCode}</if>
|
|
<if test="prescribeCode != null and prescribeCode != ''"> and prescribe_code = #{prescribeCode}</if>
|
|
|
<if test="patientName != null and patientName != ''"> and patient_name like concat('%', #{patientName}, '%')</if>
|
|
<if test="patientName != null and patientName != ''"> and patient_name like concat('%', #{patientName}, '%')</if>
|
|
@@ -143,6 +159,7 @@
|
|
|
</where>
|
|
</where>
|
|
|
order by create_time desc
|
|
order by create_time desc
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+
|
|
|
<select id="selectFsPrescribeDataScrmImgVOByPrescribeId"
|
|
<select id="selectFsPrescribeDataScrmImgVOByPrescribeId"
|
|
|
resultType="com.fs.his.vo.FsPrescribeDataScrmImgVO">
|
|
resultType="com.fs.his.vo.FsPrescribeDataScrmImgVO">
|
|
|
select fpds.*,
|
|
select fpds.*,
|
|
@@ -157,6 +174,7 @@
|
|
|
left join fs_doctor doctor on fpds.doctor_id = doctor.doctor_id
|
|
left join fs_doctor doctor on fpds.doctor_id = doctor.doctor_id
|
|
|
left join fs_doctor drug_fd on fpds.drug_doctor_id = drug_fd.doctor_id
|
|
left join fs_doctor drug_fd on fpds.drug_doctor_id = drug_fd.doctor_id
|
|
|
left join fs_patient fp on fpds.patient_id = fp.patient_id
|
|
left join fs_patient fp on fpds.patient_id = fp.patient_id
|
|
|
|
|
+ where fpds.prescribe_id = #{prescribeId}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<insert id="insertFsPrescribeDataScrm" parameterType="FsPrescribeDataScrm" useGeneratedKeys="true" keyProperty="prescribeId">
|
|
<insert id="insertFsPrescribeDataScrm" parameterType="FsPrescribeDataScrm" useGeneratedKeys="true" keyProperty="prescribeId">
|
|
@@ -213,6 +231,10 @@
|
|
|
<if test="isSendToThirdParty != null">is_send_to_third_party,</if>
|
|
<if test="isSendToThirdParty != null">is_send_to_third_party,</if>
|
|
|
<if test="handwriteCollectionId != null">handwrite_collection_id,</if>
|
|
<if test="handwriteCollectionId != null">handwrite_collection_id,</if>
|
|
|
<if test="companyCustomerId != null">company_customer_id,</if>
|
|
<if test="companyCustomerId != null">company_customer_id,</if>
|
|
|
|
|
+ <if test="foodAndExerciseGuidance != null">food_and_exercise_guidance,</if>
|
|
|
|
|
+ <if test="healingAreaJson != null">healing_area_json,</if>
|
|
|
|
|
+ <if test="noteTaboos != null">note_taboos,</if>
|
|
|
|
|
+ <if test="facialDiagnosis != null">facial_diagnosis,</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="prescribeType != null">#{prescribeType},</if>
|
|
<if test="prescribeType != null">#{prescribeType},</if>
|
|
@@ -266,6 +288,10 @@
|
|
|
<if test="isSendToThirdParty != null">#{isSendToThirdParty},</if>
|
|
<if test="isSendToThirdParty != null">#{isSendToThirdParty},</if>
|
|
|
<if test="handwriteCollectionId != null">#{handwriteCollectionId},</if>
|
|
<if test="handwriteCollectionId != null">#{handwriteCollectionId},</if>
|
|
|
<if test="companyCustomerId != null">#{companyCustomerId},</if>
|
|
<if test="companyCustomerId != null">#{companyCustomerId},</if>
|
|
|
|
|
+ <if test="foodAndExerciseGuidance != null">#{foodAndExerciseGuidance},</if>
|
|
|
|
|
+ <if test="healingAreaJson != null">#{healingAreaJson},</if>
|
|
|
|
|
+ <if test="noteTaboos != null">#{noteTaboos},</if>
|
|
|
|
|
+ <if test="facialDiagnosis != null">#{facialDiagnosis},</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
@@ -323,6 +349,10 @@
|
|
|
<if test="isSendToThirdParty != null">is_send_to_third_party = #{isSendToThirdParty},</if>
|
|
<if test="isSendToThirdParty != null">is_send_to_third_party = #{isSendToThirdParty},</if>
|
|
|
<if test="handwriteCollectionId != null">handwrite_collection_id = #{handwriteCollectionId},</if>
|
|
<if test="handwriteCollectionId != null">handwrite_collection_id = #{handwriteCollectionId},</if>
|
|
|
<if test="companyCustomerId != null">company_customer_id = #{companyCustomerId},</if>
|
|
<if test="companyCustomerId != null">company_customer_id = #{companyCustomerId},</if>
|
|
|
|
|
+ <if test="foodAndExerciseGuidance != null">food_and_exercise_guidance = #{foodAndExerciseGuidance},</if>
|
|
|
|
|
+ <if test="healingAreaJson != null">healing_area_json = #{healingAreaJson},</if>
|
|
|
|
|
+ <if test="noteTaboos != null">note_taboos = #{noteTaboos},</if>
|
|
|
|
|
+ <if test="facialDiagnosis != null">facial_diagnosis = #{facialDiagnosis},</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
where prescribe_id = #{prescribeId}
|
|
where prescribe_id = #{prescribeId}
|
|
|
</update>
|
|
</update>
|