package com.ruoyi.web.work.service.impl;


import java.time.LocalDateTime;
import java.util.Collections;
import java.util.List;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.web.work.domain.*;
import com.ruoyi.web.work.domain.dto.PatientCardDto;
import com.ruoyi.web.work.mapper.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.work.service.IVisitService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @author lsw
 * @date 2024-07-23
 */
@Service
public class VisitServiceImpl extends ServiceImpl<VisitMapper, Visit> implements IVisitService {
    @Autowired
    private VisitMapper visitMapper;


    @Override
    public List<Visit> selectList(Visit visit) {
        return visitMapper.selectList(visit);
    }

    @Override
    public List<PatientCardDto> getPatientCardByNameOrDepartmentOrPhysician(String patientName, String departmentName, String physician) {
        return visitMapper.getPatientCardByNameOrDepartmentOrPhysician(patientName, departmentName, physician);
    }


    @Override
    public List<PatientCardDto> getAllDepartment() {
        return visitMapper.getAllDepartment();
    }

    @Override
    public List<Visit> getVisitByTime(String beginTime, String endTime, Long patId) {
        return visitMapper.getVisitByTime(beginTime,endTime,patId);
    }

    @Override
    public List<Visit> getVisitByPatId(String patId,String startTime,String endTime) {
        return visitMapper.selectVisitsByPatId(patId,startTime,endTime);
    }
}
