Merge branch 'develop' of https://gitea.gentronhealth.com/wangyizhe/his into develop
This commit is contained in:
@@ -374,11 +374,11 @@ public class DoctorStationLabApplyServiceImpl implements IDoctorStationInspectio
|
||||
|
||||
// 查询检验申请单列表
|
||||
log.debug("查询申请单数据前");
|
||||
List<InspectionLabApply> list = doctorStationLabApplyMapper.getInspectionApplyListPage(encounterId);
|
||||
List<DoctorStationLabApplyDto> list = doctorStationLabApplyMapper.getInspectionApplyListPage(encounterId);
|
||||
log.debug("查询申请单数据后");
|
||||
|
||||
// 使用 PageInfo 包装查询结果
|
||||
PageInfo<InspectionLabApply> pageInfo = new PageInfo<>(list);
|
||||
PageInfo<DoctorStationLabApplyDto> pageInfo = new PageInfo<>(list);
|
||||
|
||||
// 构建返回结果
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
|
||||
@@ -17,6 +17,10 @@ import java.util.List;
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DoctorStationLabApplyDto {
|
||||
/**
|
||||
* 申请单ID(数据库自增主键)
|
||||
*/
|
||||
private Long applicationId;
|
||||
/**
|
||||
* 申请单编号
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.openhis.web.doctorstation.mapper;
|
||||
|
||||
import com.openhis.lab.domain.InspectionLabApply;
|
||||
import com.openhis.web.doctorstation.dto.DoctorStationLabApplyDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@@ -23,5 +23,5 @@ public interface DoctorStationLabApplyMapper {
|
||||
* @param encounterId 就诊 ID
|
||||
* @return 检验申请单列表
|
||||
*/
|
||||
List<InspectionLabApply> getInspectionApplyListPage(@Param("encounterId") Long encounterId);
|
||||
List<DoctorStationLabApplyDto> getInspectionApplyListPage(@Param("encounterId") Long encounterId);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<!-- 根据申请单号查询检验申请单(返回完整字段) -->
|
||||
<select id="getInspectionApplyByApplyNo" resultType="com.openhis.web.doctorstation.dto.DoctorStationLabApplyDto">
|
||||
SELECT
|
||||
id AS applicationId,
|
||||
apply_no AS applyNo,
|
||||
patient_id AS patientId,
|
||||
patient_name AS patientName,
|
||||
@@ -40,20 +41,17 @@
|
||||
</select>
|
||||
|
||||
<!-- 分页查询检验申请单列表(根据就诊ID查询,按申请时间降序)
|
||||
encounterId: 就诊ID作为查询条件查出患者id(patient_id)再以患者id对申请单进行查询
|
||||
对申请单表(lab_apply)、申请单明细表(lab_apply_item)和就诊表(adm_encounter)进行联合查询(申请单号,检验项目,申请医生,申请单优先级码,申请单状态,金额)-->
|
||||
直接查询申请单表,不关联明细表,避免重复记录-->
|
||||
<select id="getInspectionApplyListPage" resultType="com.openhis.web.doctorstation.dto.DoctorStationLabApplyDto">
|
||||
SELECT t1.apply_no AS applyNo,
|
||||
t1.inspection_item AS inspectionItem,
|
||||
SELECT t1.id AS applicationId,
|
||||
t1.apply_no AS applyNo,
|
||||
t1.inspection_item AS itemName,
|
||||
t1.apply_doc_name AS applyDocName,
|
||||
t1.priority_code AS priorityCode,
|
||||
t2.item_name AS itemName,
|
||||
t1.apply_status AS applyStatus,
|
||||
t2.item_amount AS itemAmount
|
||||
t1.apply_remark AS applyRemark
|
||||
FROM lab_apply AS t1
|
||||
INNER JOIN adm_encounter AS t3 ON t1.patient_id::bigint = t3.patient_id
|
||||
LEFT JOIN lab_apply_item AS t2
|
||||
ON t1.apply_no = t2.apply_no
|
||||
WHERE t1.delete_flag = '0'
|
||||
AND t3.id = #{encounterId}
|
||||
ORDER BY t1.apply_time DESC
|
||||
|
||||
Reference in New Issue
Block a user