public bool CheckDoctorDetailByID(string ID) { DoctorDetail t = null; using (AppointmentSchedulerEntities3 conf = new AppointmentSchedulerEntities3()) { var conflist = conf.DoctorDetails; try { t = (from n in conflist where n.DoctorName == ID select n).First(); } catch (Exception e) { Console.WriteLine(e); // throw; } if (t == null) { return(false); } else { return(true); } } }
public async Task <IActionResult> PutDoctorDetail(int id, DoctorDetail doctorDetail) { if (id != doctorDetail.DoctorDetailId) { return(BadRequest()); } _context.Entry(doctorDetail).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DoctorDetailExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public DoctorDetail QueryDoctorDetail(string testDate, string cardId) { DoctorDetail model = null; string sql = @"SELECT t.*,h.testdate as LASTTESTDATE FROM HDIS_DOC_DETAIL t left join (select * from (select * from hdis_doc_detail t where cardid='{1}' and testdate<'{0}' order by testdate desc) where rownum=1) h on t.CARDID = h.CARDID WHERE t.cardid='{1}' and t.TESTDATE ='{0}'"; sql = string.Format(sql, testDate, cardId); try { if (this.ExecSQLQuery(sql) < 0) { return(model); } if (this.Reader.Read()) { model = ReaderToModel(); } return(model); } catch (Exception ex) { return(model); } finally { this.oracleDb.CloseReader(); this.oracleDb.CloseDB(); } }
protected void grdGridView_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "EditData") { hdnOperationType.Value = "Update"; int Id = Convert.ToInt32(e.CommandArgument); hdnIDPK.Value = Id.ToString(); DoctorBAO BAO = new DoctorBAO(); DoctorDetail obj = BAO.GetDoctorDetailsById(Id); if (obj != null) { txtDoctorName.Text = obj.DoctorName; txtContactnumber.Text = obj.ContactNumber; txtDoctorAddress.Text = obj.DoctorAddress; txtJoiningDate.Text = obj.JoiningDate; txtLeavingDate.Text = obj.LeavingDate; txtEducation.Text = obj.Education; txtPassword.Text = obj.Password; txtEmail.Text = obj.Email; txtSpecialization.Text = obj.Specialization; txtExperience.Text = obj.Experience; } pnlAddForm.Visible = true; pnlGrid.Visible = false; } if (e.CommandName == "DeleteData") { int id = Convert.ToInt32(e.CommandArgument); DoctorBAO BAO = new DoctorBAO(); BAO.DeleteDoctorDetail(id); FillGridView(); } }
public async Task <ActionResult <DoctorDetail> > PostDoctorDetail(DoctorDetail doctorDetail) { _context.DoctorDetails.Add(doctorDetail); await _context.SaveChangesAsync(); return(CreatedAtAction("GetDoctorDetail", new { id = doctorDetail.DoctorId }, doctorDetail)); }
/// <summary> /// 实体与数据库对应 /// </summary> /// <returns></returns> private DoctorDetail ReaderToModel() { DoctorDetail model = new DoctorDetail(); model.CARDID = Reader["CARDID"].ToString(); model.TESTDATE = Reader["TESTDATE"].ToString(); model.SEQID = Reader["SEQID"].ToString(); model.DIALYSISTIMES = Reader["DIALYSISTIMES"].ToString(); model.PATIENTID = Reader["PATIENTID"].ToString(); model.PATIENTTYPE = Reader["PATIENTTYPE"].ToString(); model.PATIENTNAME = Reader["PATIENTNAME"].ToString(); model.PATIENTSEX = Reader["PATIENTSEX"].ToString(); model.PATIENTAGE = Reader["PATIENTAGE"].ToString(); model.SPRESSURE = Reader["SPRESSURE"].ToString(); model.DPRESSURE = Reader["DPRESSURE"].ToString(); model.PULSE = Reader["PULSE"].ToString(); model.BREATHING = Reader["BREATHING"].ToString(); model.TEMPERATURE = Reader["TEMPERATURE"].ToString(); model.DRYWEIGHT = Reader["DRYWEIGHT"].ToString(); model.FRONTWEIGHT = Reader["FRONTWEIGHT"].ToString(); model.INCREASEWEIGHT = Reader["INCREASEWEIGHT"].ToString(); model.AFTERWEIGHT = Reader["AFTERWEIGHT"].ToString(); model.FACTSFILTRATIONQUANTITY = Reader["FACTSFILTRATIONQUANTITY"].ToString(); model.MEASUREMENTID = Reader["MEASUREMENTID"].ToString(); model.MEASUREMENTNAME = Reader["MEASUREMENTNAME"].ToString(); model.MEASUREMENTTIME = DateTime.Parse(Reader["MEASUREMENTTIME"].ToString()); model.RECORDID = Reader["RECORDID"].ToString(); model.RECORDNAME = Reader["RECORDNAME"].ToString(); model.RECORDTIME = DateTime.Parse(Reader["RECORDTIME"].ToString()); model.DIALYSISMODE = Reader["DIALYSISMODE"].ToString(); model.DIALYZER = Reader["DIALYZER"].ToString(); model.TREATMENTDURATION = Reader["TREATMENTDURATION"].ToString(); model.BLOODFOLW = Reader["BLOODFOLW"].ToString(); model.TARGETWEIGHT = Reader["TARGETWEIGHT"].ToString(); model.FILTRATIONQUANTITY = Reader["FILTRATIONQUANTITY"].ToString(); model.CHANGEQUANTITY = Reader["CHANGEQUANTITY"].ToString(); model.MACHINETYPE = Reader["MACHINETYPE"].ToString(); model.VASCULARACCESS = Reader["VASCULARACCESS"].ToString(); model.DIALYSATETYPE = Reader["DIALYSATETYPE"].ToString(); model.FOLW = Reader["FOLW"].ToString(); model.NA = Reader["NA"].ToString(); model.CA = Reader["CA"].ToString(); model.HCO2 = Reader["HCO2"].ToString(); model.ANTICOAGULANT = Reader["ANTICOAGULANT"].ToString(); model.FRIST = Reader["FRIST"].ToString(); model.FRISTUNIT = Reader["FRISTUNIT"].ToString(); model.SECOND = Reader["SECOND"].ToString(); model.SECONDUNIT = Reader["SECONDUNIT"].ToString(); model.MEMO = Reader["MEMO"].ToString(); model.Summary = Reader["Summary"].ToString(); model.STATE = Reader["STATE"].ToString(); model.LASTTESTDATE = Reader["LASTTESTDATE"].ToString(); model.DANCHAOHOUR = Reader["DANCHAOHOUR"].ToString(); model.DANCHAOML = Reader["DANCHAOML"].ToString(); model.TOTAL = Reader["TOTAL"].ToString(); model.TOTALUNIT = Reader["TOTALUNIT"].ToString(); return(model); }
public Guid?GetInHouse(string name) { try { return(DoctorDetail.GetInHouse(name)); } catch (Exception ex) { throw ex; } }
public List <DoctorDetailModel> AdvanceSearch(string searchText) { try { DoctorDetail entity = new DoctorDetail(); return(entity.AdvanceSearch(searchText)); } catch (Exception ex) { throw ex; } }
public bool Create(DoctorDetailModel model) { try { DoctorDetail entity = new DoctorDetail(); return(entity.Create(model)); } catch (Exception ex) { throw ex; } }
public List <DoctorDetailModel> Get() { try { DoctorDetail entity = new DoctorDetail(); return(entity.Get()); } catch (Exception ex) { throw ex; } }
public DoctorDetailModel GetByName(string name) { try { DoctorDetail entity = new DoctorDetail(); return(entity.GetByName(name)); } catch (Exception ex) { throw ex; } }
public DoctorDetailModel GetByParentId(Guid id) { try { DoctorDetail entity = new DoctorDetail(); return(entity.GetByParentId(id)); } catch (Exception ex) { throw ex; } }
public List <DoctorDetailModel> GetByType(bool isInHouse = false) { try { DoctorDetail entity = new DoctorDetail(); return(entity.GetByType(isInHouse)); } catch (Exception ex) { throw ex; } }
public DoctorDetail getDoctorDetailByID(string ID) { DoctorDetail t = new DoctorDetail(); using (AppointmentSchedulerEntities3 conf = new AppointmentSchedulerEntities3()) { var conflist = conf.DoctorDetails; t = (from n in conflist where n.DoctorName == ID select n).First(); return(t); } }
public async Task <DoctorDetail> GetDoctorDetail(int drdetailID) { DoctorDetail dr = context.DoctorDetail.SingleOrDefault(d => d.DoctorID.Equals(drdetailID)); if (dr != null) { return(dr); } else { return(null); } }
public ActionResult DoctorName() { IEnumerable <Doctor_Tbl> doctor_Tbls = _unitOfWork.GetRepositoryInstance <Doctor_Tbl>().GetAllRecords(); IEnumerable <Patient_Tbl> patient_Tbls = _unitOfWork.GetRepositoryInstance <Patient_Tbl>().GetAllRecords(); var docName = from d in doctor_Tbls join p in patient_Tbls on d.DoctorID equals p.PatientID into DoctorDetail from p in DoctorDetail.ToList() select new ViewModel { Patient = p, doctor = d }; ViewBag.value = docName; return(View(docName)); }
public HttpResponseMessage GetDoctorDetails([FromUri] Guid ID) { TransactionalInformation transaction = new TransactionalInformation(); DoctorDetailApiModel doctoApiModel = new DoctorDetailApiModel(); DoctorDetail doctor_detail = docDataService.GetDoctorDetails(ID, connectionString, SessionToken, out transaction); doctoApiModel.doctor = doctor_detail; if (transaction.ReturnStatus) { return(Request.CreateResponse <DoctorDetailApiModel>(HttpStatusCode.OK, doctoApiModel)); } return(Request.CreateResponse(HttpStatusCode.BadRequest, transaction)); }
public async Task <ActionResult <DoctorDetail> > GetDoctor(long id) { var doctor = await _context .Doctors .Include(f => f.Patients) .FirstOrDefaultAsync(f => f.Id == id); if (doctor == null) { return(NotFound()); } return(DoctorDetail.FromDoctor(doctor)); }
public async Task <DoctorDetail> GetDoctor(int id) { DoctorDetail docDetail = await _context.Doctors.Where(x => x.Id == id).Select(x => new DoctorDetail { Id = x.Id, Name = x.Name, Gender = x.Gender, MedicalSchool = x.MedicalSchool.Name, Languages = x.DoctorLanguages.Select(l => l.Language.Name), Specialties = x.DoctorSpecialties.Select(s => s.Specialty.Name), PatientRatings = x.PatientRatings, Average = x.PatientRatings.Select(r => r.Rating).Average() }).SingleOrDefaultAsync(); return(docDetail); }
public static Guid SaveDoctor(AddDoctorViewModel vm) { using (var db = new DataClassesDataContext()) { var record = new DoctorDetail() { Id = vm.Id, DName = vm.Name, DAddress = vm.Address, PhoneNumber = vm.PhoneNumber }; db.DoctorDetails.InsertOnSubmit(record); db.SubmitChanges(); return(record.Id); } }
public bool addDoctor(DoctorViewModel d) { using (AppointmentSchedulerEntities3 conf = new AppointmentSchedulerEntities3()) { DoctorDetail e = new DoctorDetail(); e.DoctorID = Guid.NewGuid().ToString(); e.DoctorName = d.DoctorName; e.Specaility = d.Specaility.ToString(); if (d.isAvailable == true) { e.IsAvailable = "yes"; } else { e.IsAvailable = "no"; } conf.DoctorDetails.Add(e); conf.SaveChanges(); return(true); } }
public async Task <DoctorDetail> PutDoctorDetails(DoctorDetail doctorDetail) { DoctorDetail model = context.DoctorDetail.SingleOrDefault(s => s.DoctorID.Equals(doctorDetail.DoctorID)); if (model != null) { model.DrQualification = doctorDetail.DrQualification; model.Specialist = doctorDetail.Specialist; model.DrDescription = doctorDetail.DrDescription; model.DrPosition = doctorDetail.DrPosition; model.DrExperiences = doctorDetail.DrExperiences; model.DrImage = doctorDetail.DrExperiences; model.DrLock = doctorDetail.DrLock; context.SaveChanges(); return(doctorDetail); } else { return(null); } }
protected void btnSave_Click(object sender, EventArgs e) { DoctorDetail Doctor = new DoctorDetail(); Doctor.DoctorName = txtDoctorName.Text; Doctor.DoctorAddress = txtDoctorAddress.Text; Doctor.ContactNumber = txtContactnumber.Text; Doctor.Email = txtEmail.Text; Doctor.Education = txtEducation.Text; Doctor.Specialization = txtSpecialization.Text; Doctor.Experience = txtExperience.Text; Doctor.IsActive = 1; Doctor.JoiningDate = txtJoiningDate.Text; Doctor.LeavingDate = txtLeavingDate.Text; Doctor.Password = txtPassword.Text; Doctor.CreatedBy = "Vasanthi"; Doctor.ModifiedBy = "System"; if (hdnOperationType.Value == "Update") { Doctor.PK_Doctor = Convert.ToInt32(hdnIDPK.Value); } DoctorBAO BAO = new DoctorBAO(); BAO.SaveDoctorDetail(Doctor); lblMessage.Text = "Save Successfully"; ClearForm(); FillGridView(); pnlGrid.Visible = true; pnlAddForm.Visible = false; }
public async Task <DoctorDetail> PutDoctorDetails(DoctorDetail doctorDetail) { return(await idoc.PutDoctorDetails(doctorDetail)); }
protected void btnogin_Click(object sender, EventArgs e) { if (ddlUserType.SelectedValue == "Doctor") { //txtUserName.Text //txtPassword.Text DoctorBAO obj = new DoctorBAO(); DoctorDetail Doctor = obj.GetDoctorDetailByEmail(txtUserName.Text); if (Doctor != null) { if (Doctor.Password == txtPassword.Text) { UserLogin user = new UserLogin(); user.UserName = Doctor.Email; user.FullName = Doctor.DoctorName; user.Id = Doctor.PK_Doctor; user.Password = Doctor.Password; user.TypeOfUser = UserType.DoctorUser; Session["UserObject"] = user; Session["UserName"] = user.UserName; Session["HospitalId"] = Doctor.FK_HospitalId; Response.Redirect("~/Doctor/DoctorHome.aspx"); } else { Page.ClientScript.RegisterStartupScript(Page.GetType(), "Message", "alert('Invalid User name password')", true); } } else { Page.ClientScript.RegisterStartupScript(Page.GetType(), "Message", "alert('Invalid User name password')", true); } } else if (ddlUserType.SelectedValue == "Reception") { ReceptionBAO obj = new ReceptionBAO(); ReceptionDetail reception = obj.GetReceptionByEmail(txtUserName.Text); if (reception != null) { if (reception.Password == txtPassword.Text) { UserLogin user = new UserLogin(); user.UserName = reception.Email; user.FullName = reception.FullName; user.Id = reception.PK_Reception; user.Password = reception.Password; user.TypeOfUser = UserType.ReceptionUser; Session["UserObject"] = user; Session["UserName"] = user.UserName; Session["HospitalId"] = reception.FK_HospitalId; Response.Redirect("~/Reception/ReceptionHome.aspx"); } else { Page.ClientScript.RegisterStartupScript(Page.GetType(), "Message", "alert('Invalid User name password')", true); } } else { Page.ClientScript.RegisterStartupScript(Page.GetType(), "Message", "alert('Invalid User name password')", true); } } else if (ddlUserType.SelectedValue == "HospitalAdmin") { //Need to implement Login check from DB for Hospital Admin ApplicationAdminBAO obj = new ApplicationAdminBAO(); HospitalDetail h = obj.GetHospitalDetailsByAdminEmail(txtUserName.Text); if (h != null) { if (h.Password == txtPassword.Text) { UserLogin user = new UserLogin(); user.UserName = h.AdminEmail; user.FullName = h.HospitalAdminName; user.Id = h.PK_HospitalId; user.Password = h.Password; user.TypeOfUser = UserType.HospitalAdmin; Session["HospitalId"] = h.PK_HospitalId; Session["UserObject"] = user; Session["UserName"] = user.UserName; Response.Redirect("~/HospitalAdminPages/HospitalHome.aspx"); } else { Page.ClientScript.RegisterStartupScript(Page.GetType(), "Message", "alert('Invalid User name password')", true); } } else { Page.ClientScript.RegisterStartupScript(Page.GetType(), "Message", "alert('Invalid User name password')", true); } } }
public async Task <DoctorDetail> PostDoctorDetails(DoctorDetail doctorDetail) { context.DoctorDetail.Add(doctorDetail); context.SaveChanges(); return(doctorDetail); }