Exemplo n.º 1
0
        private void dgvRandevular_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                var _kabulId = dgvRandevular.CurrentRow.Cells[0].Value;
                _secilenHasta            = _hastaKabulService.GetHastaKabulById(Convert.ToInt32(_kabulId));
                txtAd.Text               = _secilenHasta.Hastalar.Ad + " " + _secilenHasta.Hastalar.Soyad;
                txtTCKimlikNo.Text       = _secilenHasta.Hastalar.TCKimlikNo;
                txtKlinikAdi.Text        = _secilenHasta.Personeller.Klinikler.KlinikAd;
                txtDoktorAdi.Text        = _secilenHasta.Personeller.Ad + " " + _secilenHasta.Personeller.Soyad;
                txtKanGrubu.Text         = _secilenHasta.Hastalar.KanGrubu;
                txtRandevuTarih.Text     = _secilenHasta.GelisTarihi.ToShortDateString();
                txtRandevuSaat.Text      = _secilenHasta.GelisTarihi.ToShortTimeString();
                txtSigortaKurumu.Text    = _secilenHasta.Hastalar.Kurumlar.KurumAd;
                txtIstenenTahliller.Text = _secilenHasta.IstenenTahliller;

                var sikayet = _hastaSikayetleriService.GetHastaSikayetleriByKabulId(_secilenHasta.KabulID);
                txtHastaSikayeti.Text = sikayet != null ? sikayet.Aciklama : "";
                var teshis = _teshisService.GetTeshisByKabulId(_secilenHasta.KabulID);
                txtTeshis.Text = teshis != null ? teshis.Teshis : "";

                ReceteListesiDoldur();
                HizmetleriDoldur();
                HastaHizmetHareketlerDoldur();
                TahlilleriDoldur();
            }
            catch (Exception)
            {
                // ignored
            }
        }
        private void dgvRandevular_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                var _kabulId = dgvRandevular.CurrentRow.Cells[0].Value;
                SecilenHasta          = _hastaKabulService.GetHastaKabulById(Convert.ToInt32(_kabulId));
                txtAd.Text            = SecilenHasta.Hastalar.Ad + " " + SecilenHasta.Hastalar.Soyad;
                txtTCKimlikNo.Text    = SecilenHasta.Hastalar.TCKimlikNo;
                txtKlinikAdi.Text     = SecilenHasta.Personeller.Klinikler.KlinikAd;
                txtDoktorAdi.Text     = SecilenHasta.Personeller.Ad + " " + SecilenHasta.Personeller.Soyad;
                txtKanGrubu.Text      = SecilenHasta.Hastalar.KanGrubu;
                txtRandevuTarih.Text  = SecilenHasta.GelisTarihi.ToShortDateString();
                txtRandevuSaat.Text   = SecilenHasta.GelisTarihi.ToShortTimeString();
                txtSigortaKurumu.Text = SecilenHasta.Hastalar.Kurumlar.KurumAd;
                try
                {
                    var sikayet = _hastaSikayetleriService.GetHastaSikayetleriByKabulId(SecilenHasta.KabulID);
                    txtHastaSikayeti.Text = sikayet.Aciklama;
                }
                catch (Exception)
                {
                    txtHastaSikayeti.Text = "";
                }

                //TahlilleriDoldur();
            }
            catch (Exception)
            {
                // ignored
            }
        }
        public async Task <IActionResult> Edit(int id, [Bind("Id,GelisTarihi,HastalarId,DoktorlarId")] HastaKabul hastaKabul)
        {
            if (id != hastaKabul.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(hastaKabul);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!HastaKabulExists(hastaKabul.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["DoktorlarId"] = new SelectList(_context.Doktorlar, "Id", "Ad", hastaKabul.DoktorlarId);
            ViewData["HastalarId"]  = new SelectList(_context.Hastalar, "Id", "Ad", hastaKabul.HastalarId);
            return(View(hastaKabul));
        }
Exemplo n.º 4
0
        private void btnHastaKabulKaydet_Click(object sender, EventArgs e)
        {
            if (SecilenHasta == null)
            {
                return;
            }
            var kabul = _randevuService.GetRandevuById(SecilenHasta.RandevuID);

            kabul.Geldimi = true;

            DateTime tarih  = TarihAyarla();
            var      model2 = new HastaKabul
            {
                HastaID         = SecilenHasta.HastaID,
                PersonelID      = SecilenHasta.PersonelID,
                GelisTarihi     = tarih,
                KlinikID        = (int)SecilenHasta.Personeller.KlinikID,
                TahlilYapildiMi = true
            };
            var result = _randevuService.Edit(kabul);

            result = _hastaKabulService.Create(model2);
            if (result.IsSucceed)
            {
                MessageBox.Show(result.SuccessMessage, "İşlem Gerçekleştirildi!", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show(string.Join("\n", result.ErrorMessage), "İşlem Gerçekleştirilemedi!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            Temizle();
            RandevuListele();
        }
Exemplo n.º 5
0
        private void frmMuayeneListesi_Load(object sender, EventArgs e)
        {
            tslblDoktorAdi.Text = Genel.PersonelAdi + " " + Genel.PersonelSoyadi;
            tslblKlinikAdi.Text = Genel.KlinikAdi;

            HastaKabul hk = new HastaKabul();

            hk.MuayeneListesiniGetir(Genel.PersonelID, lvMuayeneListesi);
        }
Exemplo n.º 6
0
        public FormTahlilYazdir(HastaKabul secilenHasta, string cbTahlillerSelectedValue)
        {
            var container = DependecyResolver.NinjectDependecyContainer.RegisterDependency(new StandardKernel());

            _hastaTahlilSonuclariRepository = container.Get <IHastaTahlilSonuclariRepository>();
            _secilenHasta             = secilenHasta;
            _cbTahlillerSelectedValue = cbTahlillerSelectedValue;
            InitializeComponent();
        }
Exemplo n.º 7
0
        public FormFatura(HastaKabul secilenHasta, double _genelToplam)
        {
            var container = DependecyResolver.NinjectDependecyContainer.RegisterDependency(new StandardKernel());

            _hastaHizmetHareketRepository = container.Get <IHastaHizmetHareketRepository>();
            _secilenHasta     = secilenHasta;
            this._genelToplam = _genelToplam;
            InitializeComponent();
        }
Exemplo n.º 8
0
        public FormReceteYazdir(HastaKabul secilenHasta, int receteId, Teshisler teshis)
        {
            var container = DependecyResolver.NinjectDependecyContainer.RegisterDependency(new StandardKernel());

            _receteDetayRepository = container.Get <IReceteDetayRepository>();
            _secilenHasta          = secilenHasta;
            _receteId = receteId;
            _teshis   = teshis;
            InitializeComponent();
        }
 private void dgvTahlilIstenenHastalar_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     try
     {
         var _kabulId = dgvTahlilIstenenHastalar.CurrentRow.Cells[0].Value;
         _secilenHasta       = _hastaKabulService.GetHastaKabulById(Convert.ToInt32(_kabulId));
         txtSeciliHasta.Text = _secilenHasta.Hastalar.Ad + " " + _secilenHasta.Hastalar.Soyad;
     }
     catch (Exception)
     {
         // ignored
     }
 }
Exemplo n.º 10
0
        public async Task <IActionResult> Create([Bind("Id,GelisTarihi,HastalarId,DoktorlarId")] HastaKabul hastaKabul)
        {
            if (ModelState.IsValid)
            {
                _context.Add(hastaKabul);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["DoktorlarId"] = new SelectList(_context.Doktorlar, "Id", "Ad", hastaKabul.DoktorlarId);
            ViewData["HastalarId"]  = new SelectList(_context.Hastalar, "Id", "Ad", hastaKabul.HastalarId);
            return(View(hastaKabul));
        }
Exemplo n.º 11
0
        public MessageResult Create(HastaKabul model)
        {
            var _validator          = new HastaKabulAddValidator();
            ValidationResult result = _validator.Validate(model);

            if (result.IsValid)
            {
                _hastaKabulRepository.Add(model);
            }
            var m = new MessageResult
            {
                ErrorMessage = result.Errors.Select(x => x.ErrorMessage).ToList(),
                IsSucceed    = result.IsValid
            };

            m.SuccessMessage = m.IsSucceed == true ? "Hastamızın Kabul İşlemi Başarıyla Sonuçlandırılmıştır." : "Hatalı bilgiler mevcut";
            return(m);
        }
Exemplo n.º 12
0
        public MessageResult Edit(HastaKabul model)
        {
            var _validator          = new HastaKabulUpdateValidator();
            ValidationResult result = _validator.Validate(model);

            if (result.IsValid)
            {
                _hastaKabulRepository.Update(model);
            }
            var m = new MessageResult
            {
                ErrorMessage = result.Errors.Select(x => x.ErrorMessage).ToList(),
                IsSucceed    = result.IsValid
            };

            m.SuccessMessage = m.IsSucceed == true ? "Kayıt Güncelleme İşlemi Başarılı." : "Hatalı bilgiler mevcut";
            return(m);
        }
Exemplo n.º 13
0
 private void dgvRandevular_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     _genelToplam = 0;
     try
     {
         var _kabulId = dgvHastaKabuller.CurrentRow.Cells[0].Value;
         _secilenHasta = _hastaKabulService.GetHastaKabulById(Convert.ToInt32(_kabulId));
         txtKurum.Text = _secilenHasta.Hastalar.Kurumlar.KurumAd;
         HastaHizmetHareketlerDoldur();
         _genelToplam        = (double)(_genelToplam - (_genelToplam * _secilenHasta.Hastalar.Kurumlar.Iskonto / 100));
         _genelToplam        = _genelToplam + (_genelToplam * Kdv);
         txtKDV.Text         = "%" + Kdv;
         txtGenelToplam.Text = ($"{_genelToplam:c}");
     }
     catch (Exception)
     {
         // ignored
     }
 }