提交merge1.3
This commit is contained in:
@@ -31,6 +31,9 @@
|
||||
<result property="prescriptionNo" column="prescription_no"/>
|
||||
<result property="groupId" column="group_id"/>
|
||||
<result property="sortNumber" column="sort_number"/>
|
||||
<result property="chrgitmLv" column="chrgitm_lv"/>
|
||||
<result property="chineseHerbsDoseQuantity" column="chinese_herbs_dose_quantity"/>
|
||||
<result property="basicFlag" column="basic_flag"/>
|
||||
</collection>
|
||||
</resultMap>
|
||||
<resultMap id="TreatmentPrintInfoMap" type="com.openhis.web.common.dto.AdvicePrintInfoDto">
|
||||
@@ -265,7 +268,7 @@
|
||||
</choose>
|
||||
<choose>
|
||||
<when test="objLocationId != null and objLocationId != ''">
|
||||
AND T1.location_id IN (#{orgLocationId}, #{objLocationId})
|
||||
AND T1.location_id IN (#{orgLocationId})
|
||||
</when>
|
||||
<otherwise>
|
||||
AND T1.location_id = #{orgLocationId}
|
||||
@@ -332,6 +335,7 @@
|
||||
|
||||
<select id="selectPrescriptionPrintInfo" resultMap="PrescriptionPrintInfoMap">
|
||||
SELECT ae.yb_class_enum AS encounter_yb_class,
|
||||
<<<<<<< HEAD
|
||||
mmr.prescription_no ,
|
||||
fc.contract_name ,
|
||||
ap."name" AS patient_name,
|
||||
@@ -358,6 +362,39 @@
|
||||
mmr.dose_unit_code,
|
||||
mmr.sort_number,
|
||||
mmr.group_id
|
||||
=======
|
||||
mmr.prescription_no ,
|
||||
fc.contract_name ,
|
||||
ap."name" AS patient_name,
|
||||
ap.gender_enum ,
|
||||
ap.birth_date ,
|
||||
ae.bus_no AS encounter_no,
|
||||
ao."name" AS department_name,
|
||||
ccd."name" AS condition_name,
|
||||
ap.phone ,
|
||||
mmr.req_authored_time AS req_time,
|
||||
ap2."name" AS doctor_name,
|
||||
ap3."name" AS dispense_doctor_name,
|
||||
ap4."name" AS charge_doctor_name,
|
||||
ap5."name" AS preparer_doctor_name,
|
||||
mmd2."name" AS item_name,
|
||||
mm.total_volume ,
|
||||
mmr.dose ,
|
||||
mmr.method_code ,
|
||||
aci.unit_price ,
|
||||
aci.total_price ,
|
||||
mmr.quantity,
|
||||
mmr.rate_code ,
|
||||
mmr.unit_code ,
|
||||
mmr.dose_unit_code,
|
||||
mmr.sort_number,
|
||||
mmr.group_id,
|
||||
mmd2.chrgitm_lv,
|
||||
mmr.chinese_herbs_dose_quantity,
|
||||
ap.address,
|
||||
ae.patient_id,
|
||||
mmd2.basic_flag
|
||||
>>>>>>> v1.3
|
||||
FROM med_medication_request mmr
|
||||
LEFT JOIN med_medication_dispense mmd
|
||||
ON mmd.med_req_id = mmr.id
|
||||
@@ -413,6 +450,7 @@
|
||||
</select>
|
||||
<select id="selectTreatmentPrintInfo" resultMap="TreatmentPrintInfoMap">
|
||||
SELECT ae.yb_class_enum AS encounter_yb_class,
|
||||
<<<<<<< HEAD
|
||||
fc.contract_name ,
|
||||
ap."name" AS patient_name,
|
||||
ap.gender_enum ,
|
||||
@@ -453,6 +491,51 @@
|
||||
LEFT JOIN adm_practitioner ap2
|
||||
ON ap2.id = wdr.requester_id
|
||||
AND ap2.delete_flag = '0'
|
||||
=======
|
||||
fc.contract_name ,
|
||||
ap."name" AS patient_name,
|
||||
ap.gender_enum ,
|
||||
ap.birth_date ,
|
||||
ae.bus_no AS encounter_no,
|
||||
ao."name" AS department_name,
|
||||
ap.phone ,
|
||||
ae.reception_time AS req_time,
|
||||
ap2."name" AS doctor_name,
|
||||
aci.unit_price ,
|
||||
aci.total_price,
|
||||
wdr.quantity ,
|
||||
wdr.unit_code ,
|
||||
add2."name" AS item_name,
|
||||
ap.address,
|
||||
ae.patient_id,
|
||||
add2.chrgitm_lv
|
||||
FROM wor_device_request wdr
|
||||
LEFT JOIN adm_device_definition add2
|
||||
ON wdr.device_def_id = add2.id
|
||||
AND add2.delete_flag = '0'
|
||||
LEFT JOIN adm_charge_item aci
|
||||
ON aci.service_id = wdr.id
|
||||
AND aci.delete_flag = '0'
|
||||
LEFT JOIN adm_encounter ae
|
||||
ON wdr.encounter_id = ae.id
|
||||
AND ae.delete_flag = '0'
|
||||
LEFT JOIN adm_patient ap
|
||||
ON ae.patient_id = ap.id
|
||||
AND ap.delete_flag = '0'
|
||||
LEFT JOIN adm_organization ao
|
||||
ON ao.id = ae.organization_id
|
||||
AND ao.delete_flag = '0'
|
||||
LEFT JOIN adm_account aa
|
||||
ON ae.id = aa.encounter_id
|
||||
AND aa.encounter_flag = 1
|
||||
AND aa.delete_flag = '0'
|
||||
LEFT JOIN fin_contract fc
|
||||
ON aa.contract_no = fc.bus_no
|
||||
AND fc.delete_flag = '0'
|
||||
LEFT JOIN adm_practitioner ap2
|
||||
ON ap2.id = wdr.requester_id
|
||||
AND ap2.delete_flag = '0'
|
||||
>>>>>>> v1.3
|
||||
WHERE wdr.delete_flag = '0'
|
||||
AND wdr.id IN
|
||||
<foreach collection="requestIds" item="requestId" separator="," open="(" close=")">
|
||||
@@ -460,6 +543,7 @@
|
||||
</foreach>
|
||||
UNION
|
||||
SELECT ae.yb_class_enum AS encounter_yb_class,
|
||||
<<<<<<< HEAD
|
||||
fc.contract_name ,
|
||||
ap."name" AS patient_name,
|
||||
ap.gender_enum ,
|
||||
@@ -500,6 +584,51 @@
|
||||
LEFT JOIN adm_practitioner ap2
|
||||
ON ap2.id = wsr.requester_id
|
||||
AND ap2.delete_flag = '0'
|
||||
=======
|
||||
fc.contract_name ,
|
||||
ap."name" AS patient_name,
|
||||
ap.gender_enum ,
|
||||
ap.birth_date ,
|
||||
ae.bus_no AS encounter_no,
|
||||
ao."name" AS department_name,
|
||||
ap.phone ,
|
||||
ae.reception_time AS req_time,
|
||||
ap2."name" AS doctor_name,
|
||||
aci.unit_price ,
|
||||
aci.total_price,
|
||||
wsr.quantity ,
|
||||
wsr.unit_code ,
|
||||
wad."name" AS item_name,
|
||||
ap.address,
|
||||
ae.patient_id,
|
||||
wad.chrgitm_lv
|
||||
FROM wor_service_request wsr
|
||||
LEFT JOIN wor_activity_definition wad
|
||||
ON wsr.activity_id = wad.id
|
||||
AND wad.delete_flag = '0'
|
||||
LEFT JOIN adm_charge_item aci
|
||||
ON aci.service_id = wsr.id
|
||||
AND aci.delete_flag = '0'
|
||||
LEFT JOIN adm_encounter ae
|
||||
ON wsr.encounter_id = ae.id
|
||||
AND ae.delete_flag = '0'
|
||||
LEFT JOIN adm_patient ap
|
||||
ON ae.patient_id = ap.id
|
||||
AND ap.delete_flag = '0'
|
||||
LEFT JOIN adm_organization ao
|
||||
ON ao.id = ae.organization_id
|
||||
AND ao.delete_flag = '0'
|
||||
LEFT JOIN adm_account aa
|
||||
ON ae.id = aa.encounter_id
|
||||
AND aa.encounter_flag = 1
|
||||
AND aa.delete_flag = '0'
|
||||
LEFT JOIN fin_contract fc
|
||||
ON aa.contract_no = fc.bus_no
|
||||
AND fc.delete_flag = '0'
|
||||
LEFT JOIN adm_practitioner ap2
|
||||
ON ap2.id = wsr.requester_id
|
||||
AND ap2.delete_flag = '0'
|
||||
>>>>>>> v1.3
|
||||
WHERE wsr.delete_flag = '0'
|
||||
AND wsr.id IN
|
||||
<foreach collection="requestIds" item="requestId" separator="," open="(" close=")">
|
||||
@@ -522,4 +651,72 @@
|
||||
AND status_enum = #{statusEnum}
|
||||
</select>
|
||||
|
||||
<select id="getPractitionerSignature" resultType="string">
|
||||
SELECT signature
|
||||
FROM adm_practitioner
|
||||
WHERE id = #{practitionerId}
|
||||
</select>
|
||||
|
||||
<select id="getActivityDefinition" resultType="com.openhis.web.common.dto.ActivityDefinitionDto">
|
||||
SELECT ID AS
|
||||
activity_definition_id,
|
||||
NAME AS activity_definition_name
|
||||
FROM wor_activity_definition
|
||||
WHERE delete_flag = '0'
|
||||
AND status_enum = #{statusEnum}
|
||||
</select>
|
||||
<select id="selectMedicineInventoryDetail"
|
||||
resultType="com.openhis.web.pharmacymanage.dto.InventoryDetailDto">
|
||||
SELECT wii.expiration_date ,
|
||||
wii.location_id ,
|
||||
wii.item_id ,
|
||||
wii.lot_number AS inventory_lot_number,
|
||||
wii.unit_code AS inventory_unit_code,
|
||||
wii.quantity AS inventory_quantity,
|
||||
mmd.part_percent ,
|
||||
mmd.unit_code AS max_unit_code
|
||||
FROM wor_inventory_item wii
|
||||
LEFT JOIN med_medication_definition mmd
|
||||
ON wii.item_id = mmd.id
|
||||
AND mmd.delete_flag = '0'
|
||||
WHERE wii.delete_flag = '0'
|
||||
AND wii.item_id IN
|
||||
<foreach item="itemId" collection="medicationIdList" index="index"
|
||||
separator="," close=")" open="(">
|
||||
#{itemId}
|
||||
</foreach>
|
||||
AND wii.location_id IN
|
||||
<foreach item="locationId" collection="locationIdList" index="index"
|
||||
separator="," close=")" open="(">
|
||||
#{locationId}
|
||||
</foreach>
|
||||
AND wii.inventory_status_enum = #{active}
|
||||
</select>
|
||||
<select id="selectDeviceInventoryDetail"
|
||||
resultType="com.openhis.web.pharmacymanage.dto.InventoryDetailDto">
|
||||
SELECT wii.expiration_date ,
|
||||
wii.location_id ,
|
||||
wii.item_id ,
|
||||
wii.lot_number AS inventory_lot_number,
|
||||
wii.unit_code AS inventory_unit_code,
|
||||
wii.quantity AS inventory_quantity,
|
||||
add2.part_percent ,
|
||||
add2.unit_code AS max_unit_code
|
||||
FROM wor_inventory_item wii
|
||||
LEFT JOIN adm_device_definition add2
|
||||
ON wii.item_id = add2.id
|
||||
AND add2.delete_flag = '0'
|
||||
WHERE wii.delete_flag = '0'
|
||||
AND wii.item_id IN
|
||||
<foreach item="itemId" collection="deviceIdList" index="index"
|
||||
separator="," close=")" open="(">
|
||||
#{itemId}
|
||||
</foreach>
|
||||
AND wii.location_id IN
|
||||
<foreach item="locationId" collection="locationIdList" index="index"
|
||||
separator="," close=")" open="(">
|
||||
#{locationId}
|
||||
</foreach>
|
||||
AND wii.inventory_status_enum = #{active}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user