public List <CBCPhieuKhamBenhModel> getTKNhanVienBacSiReport(DateTime ngay, int caTrucID) { var i = 1; var caTruc = (from ct in tc.getDSCaTruc() where ct.IDCaTruc == caTrucID select new { ThoiGianBD = ct.ThoiGianBD, ThoiGianKT = ct.ThoiGianKT, TenCaTruc = ct.TenCaTruc }).FirstOrDefault(); if (caTruc != null) { var tuNgay = ngay + caTruc.ThoiGianBD; var denNgay = ngay + caTruc.ThoiGianKT; var lstBCPhieuKB = (from a in tc.getDSPhieuKhamBenh().AsEnumerable() where a.NgayLap >= tuNgay && a.NgayLap <= denNgay && a.NhanVienLapID == Common.nhanVienID select new CBCPhieuKhamBenhModel { STT = i++, MaPhieuKB = a.MaPhieuKB, TenBenhNhan = a.PhieuDKKham.BenhNhan.HoTen, TenNhanVien = a.NhanVien.HoTen, ChanDoan = a.ChanDoan, NgayLap = ngay, CaTruc = caTruc.TenCaTruc }).ToList(); return(lstBCPhieuKB); } return(new List <CBCPhieuKhamBenhModel>()); }
public List <PhieuDKKham> getDSPDKKChuaKham() { var dsChuaKham = (from a in tc.getDSPhieuDKKham() where !tc.getDSPhieuKhamBenh().Any(x => x.PhieuDKKID == a.IDPhieuDKK) select a).ToList(); return(dsChuaKham); }
public int FSoBenhNhanHoanTat(int idPhongKham, DateTime dt) { int kq = 0; foreach (PhieuKhamBenh a in tc.getDSPhieuKhamBenh().Where(x => x.NgayLap.Value.Date == dt.Date)) { foreach (CTDKPhongKham b in a.PhieuDKKham.CTDKPhongKham) { if (b.PhongKhamID == idPhongKham) { kq++; } } } return(kq); }
public List <PhieuKhamBenh> getDSPhieuKhamBenh() { return(tc.getDSPhieuKhamBenh().ToList()); }