public IQueryable <Common.OriginOfReferral> GetOriginOfReferrals() { DataLayer.PatientsHandler dapat = new DataLayer.PatientsHandler(); return(dapat.GetOriginOfReferrals()); //2nd method which does the same thing //return new DataLayer.DAUsers().GetUsers(); }
/// <summary> /// Returns all users/ /// </summary> /// <returns>All users</returns> public IQueryable <Patient> GetPatients() { DataLayer.PatientsHandler dapatient = new DataLayer.PatientsHandler(); return(dapatient.GetPatients()); //2nd method which does the same thing //return new DataLayer.DAUsers().GetUsers(); }
public IQueryable <Common.RelativeAwareness> GetRelativeAwareness() { DataLayer.PatientsHandler dapat = new DataLayer.PatientsHandler(); return(dapat.GetRelativeAwareness()); //2nd method which does the same thing //return new DataLayer.DAUsers().GetUsers(); }
public IQueryable <Common.DiagnosisPatient> GetDiagnosis(Guid id) { DataLayer.PatientsHandler dapat = new DataLayer.PatientsHandler(); return(dapat.GetDiagnosis(id)); //2nd method which does the same thing //return new DataLayer.DAUsers().GetUsers(); }
public IQueryable <Common.FileStatus> GetFileStatuses() { DataLayer.PatientsHandler dapat = new DataLayer.PatientsHandler(); return(dapat.GetFileStatuses()); //2nd method which does the same thing //return new DataLayer.DAUsers().GetUsers(); }
public IQueryable <Common.DeceasedPlace> GetDeceasedPlaces() { DataLayer.PatientsHandler dapat = new DataLayer.PatientsHandler(); return(dapat.GetDeceasedPlaces()); //2nd method which does the same thing //return new DataLayer.DAUsers().GetUsers(); }
public IQueryable <Common.Accommodation> GetAccommodations() { DataLayer.PatientsHandler dapat = new DataLayer.PatientsHandler(); return(dapat.GetAccommodations()); //2nd method which does the same thing //return new DataLayer.DAUsers().GetUsers(); }
public void AddFamilySocial(Common.FamilySocial fs) { DataLayer.PatientsHandler dap = new DataLayer.PatientsHandler(); fs.FamilySocialId = Guid.NewGuid(); this.AddFamilySocialToDatabase(fs); }
public void AddKeyWorker(Common.PatientsEmployee employee) { Common.Patient pat = new Common.Patient(); DataLayer.PatientsHandler dap = new DataLayer.PatientsHandler(); employee.PatientDate = DateTime.Today; this.AddKeyWorkerToDatabase(employee); }
public IQueryable <Common.EquipmentType> GetEquipmentTypes() { DataLayer.PatientsHandler dapat = new DataLayer.PatientsHandler(); return(dapat.GetEquipmentTypes()); //2nd method which does the same thing //return new DataLayer.DAUsers().GetUsers(); }
/// <summary> /// Registers a new user. /// </summary> /// <param name="User">User to be added.</param> public void RegisterPatient(Common.Patient patient) { DataLayer.PatientsHandler dap = new DataLayer.PatientsHandler(); if (CheckRegister(patient)) { this.AddPatientToDatabase(patient); } }
public IQueryable <Common.Patient> GetPatients(int fileNumber, string govId, string name, string surname, Guid fileStatus, Guid KeyWorker) { DataLayer.PatientsHandler dapatient = new DataLayer.PatientsHandler(); return(dapatient.GetPatients(fileNumber, govId, name, surname, fileStatus, KeyWorker)); //2nd method which does the same thing //return new DataLayer.DAUsers().GetUsers(); }
public void AddIncome(string incomeItems, Guid fsId) { DataLayer.PatientsHandler dap = new DataLayer.PatientsHandler(); Common.PatientsIncome pi = new Common.PatientsIncome(); pi.IncomeIdFk = new Guid(incomeItems); pi.FamilySocialIdFk = fsId; pi.LogDate = DateTime.Now; this.AddPatientIncomeToDatabase(pi); }
public void AddDiagnosis(Common.DiagnosisPatient diagnosis) { Common.Patient pat = new Common.Patient(); DataLayer.PatientsHandler dap = new DataLayer.PatientsHandler(); diagnosis.DiagnosisId = Guid.NewGuid(); diagnosis.LogDate = DateTime.Today; this.AddDiagnosisToDatabase(diagnosis); pat = GetPatient(diagnosis.PatientId_fk); pat.Diagnosis_fk = diagnosis.DiagnosisId; this.UpdatePatient(pat); }
public void AddMedication(Common.Medication m) { DataLayer.PatientsHandler dap = new DataLayer.PatientsHandler(); m.MedicationId = Guid.NewGuid(); this.AddMedicationToDatabase(m); }
public void AddAllergiesSpiritual(Common.AllergiesSpiritual allSpi) { DataLayer.PatientsHandler dap = new DataLayer.PatientsHandler(); allSpi.AllergiesSpiritualId = Guid.NewGuid(); this.AddAllergiesSpiritualToDatabase(allSpi); }
public void AddIllnessesMedical(Common.IllnessesMedical im) { DataLayer.PatientsHandler dap = new DataLayer.PatientsHandler(); im.IllnessesMedicalId = Guid.NewGuid(); this.AddIllnessesMedicalToDatabase(im); }
public void AddNextOfKin(Common.NextOfKin nok) { DataLayer.PatientsHandler dap = new DataLayer.PatientsHandler(); nok.NextOfKinId = Guid.NewGuid(); this.AddNextOfKinToDatabase(nok); }
public void AddCaseConferance(Common.CaseConferance cc) { DataLayer.PatientsHandler dap = new DataLayer.PatientsHandler(); cc.CaseConferanceId = Guid.NewGuid(); this.AddCaseConferanceToDatabase(cc); }
public Common.Equipment GetEquipment(int id) { DataLayer.PatientsHandler dapatient = new DataLayer.PatientsHandler(); return(dapatient.GetEquipment(id)); }
public void AddDoctor(Common.Doctor doctor, string txtCon, string txtOnc, string txtFD, Guid?ddCon, Guid?ddFD, Guid?ddOnc) { DataLayer.PatientsHandler dap = new DataLayer.PatientsHandler(); BusinessLayer.UsersBL emp = new UsersBL(); int tempPId = (int)doctor.PatientId_FK; Common.Patient pat = new Common.Patient(); if (txtOnc != "" || ddOnc != null) { if (txtOnc != "") { Common.Doctor d = new Common.Doctor(); d.PatientId_FK = tempPId; d.DoctorType_FK = emp.GetDoctorType("Oncologist").DoctorTypeId; d.DoctorName = txtOnc; d.DoctorDate = DateTime.Today; d.DoctorID = Guid.NewGuid(); this.AddDoctorToDatabase(d); pat = GetPatient((int)d.PatientId_FK); pat.Oncologist_fk = d.DoctorID; this.UpdatePatient(pat); } else { Common.Doctor d = new Common.Doctor(); d.PatientId_FK = tempPId; d.DoctorType_FK = emp.GetDoctorType("Oncologist").DoctorTypeId; d.DEmployeeId_FK = ddOnc; d.DoctorDate = DateTime.Today; d.DoctorID = Guid.NewGuid(); this.AddDoctorToDatabase(d); pat = GetPatient((int)d.PatientId_FK); pat.Oncologist_fk = d.DoctorID; this.UpdatePatient(pat); } } if (txtCon != "" || ddCon != null) { if (txtCon != "") { Common.Doctor d = new Common.Doctor(); d.PatientId_FK = tempPId; d.DoctorType_FK = emp.GetDoctorType("Consultant").DoctorTypeId; d.DoctorName = txtCon; d.DoctorDate = DateTime.Today; d.DoctorID = Guid.NewGuid(); this.AddDoctorToDatabase(d); pat = GetPatient((int)d.PatientId_FK); pat.Consultant_fk = d.DoctorID; this.UpdatePatient(pat); } else { Common.Doctor d = new Common.Doctor(); d.PatientId_FK = tempPId; d.DoctorType_FK = emp.GetDoctorType("Consultant").DoctorTypeId; d.DEmployeeId_FK = ddCon; d.DoctorDate = DateTime.Today; d.DoctorID = Guid.NewGuid(); this.AddDoctorToDatabase(d); pat = GetPatient((int)d.PatientId_FK); pat.Consultant_fk = d.DoctorID; this.UpdatePatient(pat); } } if (txtFD != "" || ddFD != null) { if (txtFD != "") { Common.Doctor d = new Common.Doctor(); d.PatientId_FK = tempPId; d.DoctorType_FK = emp.GetDoctorType("FamilyDoctor").DoctorTypeId; d.DoctorName = txtFD; d.DoctorDate = DateTime.Today; d.DoctorID = Guid.NewGuid(); this.AddDoctorToDatabase(d); pat = GetPatient((int)d.PatientId_FK); pat.FamilyDoctor_fk = d.DoctorID; this.UpdatePatient(pat); } else { Common.Doctor d = new Common.Doctor(); d.PatientId_FK = tempPId; d.DoctorType_FK = emp.GetDoctorType("FamilyDoctor").DoctorTypeId; d.DEmployeeId_FK = ddFD; d.DoctorDate = DateTime.Today; d.DoctorID = Guid.NewGuid(); this.AddDoctorToDatabase(d); pat = GetPatient((int)d.PatientId_FK); pat.FamilyDoctor_fk = d.DoctorID; this.UpdatePatient(pat); } } }
public Common.NextOfKin GetNextOfKin(int id) { DataLayer.PatientsHandler dapatient = new DataLayer.PatientsHandler(); return(dapatient.GetNextOfKin(id)); }
public Common.IllnessesMedical GetIllnessesMedical(int id) { DataLayer.PatientsHandler dapatient = new DataLayer.PatientsHandler(); return(dapatient.GetIllnessesMedical(id)); }
public Common.AllergiesSpiritual GetAllergiesSpiritual(int id) { DataLayer.PatientsHandler dapatient = new DataLayer.PatientsHandler(); return(dapatient.GetAllergiesSpiritual(id)); }
public Common.Medication GetMedication(int id) { DataLayer.PatientsHandler dapatient = new DataLayer.PatientsHandler(); return(dapatient.GetMedication(id)); }
public Common.FamilySocial GetFamilySocial(int id) { DataLayer.PatientsHandler dapatient = new DataLayer.PatientsHandler(); return(dapatient.GetFamilySocial(id)); }
public void AddEquipment(Common.Equipment e) { DataLayer.PatientsHandler dap = new DataLayer.PatientsHandler(); e.EquipmentId = Guid.NewGuid(); this.AddEquipmentToDatabase(e); }
/// <summary> /// Registers a new user. /// </summary> /// <param name="User">User to be added.</param> public void RegisterPerson(Common.Person Person, string street, string property, Guid?ddLocality, Guid?ddStreet) { if (Person.IdCardNumber != null) { if (CheckRegister(Person.IdCardNumber)) { if (Person.Gender_fk == "None") { Person.Gender_fk = null; } Person.PersonID = Guid.NewGuid(); DataLayer.PatientsHandler dap = new DataLayer.PatientsHandler(); if (property == "") { this.AddPersonToDatabase(Person); } else { if (street == "") { Common.Property p = new Common.Property(); p.PropertyName = property; p.Street_fk = ddStreet; p.PropertyId = Guid.NewGuid(); dap.AddProperty(p); Person.Property_fk = p.PropertyId; this.AddPersonToDatabase(Person); } else { Common.Street s = new Common.Street(); s.StreetName = street; s.Locality_fk = ddLocality; s.StreetId = Guid.NewGuid(); dap.AddStreet(s); Common.Property p = new Common.Property(); p.PropertyName = property; p.Street_fk = s.StreetId; p.PropertyId = Guid.NewGuid(); dap.AddProperty(p); Person.Property_fk = p.PropertyId; this.AddPersonToDatabase(Person); } } } } else { if (Person.Gender_fk == "None") { Person.Gender_fk = null; } Person.PersonID = Guid.NewGuid(); DataLayer.PatientsHandler dap = new DataLayer.PatientsHandler(); if (property == "") { this.AddPersonToDatabase(Person); } else { if (street == "") { Common.Property p = new Common.Property(); p.PropertyName = property; p.Street_fk = ddStreet; p.PropertyId = Guid.NewGuid(); dap.AddProperty(p); Person.Property_fk = p.PropertyId; this.AddPersonToDatabase(Person); } else { Common.Street s = new Common.Street(); s.StreetName = street; s.Locality_fk = ddLocality; s.StreetId = Guid.NewGuid(); dap.AddStreet(s); Common.Property p = new Common.Property(); p.PropertyName = property; p.Street_fk = s.StreetId; p.PropertyId = Guid.NewGuid(); dap.AddProperty(p); Person.Property_fk = p.PropertyId; this.AddPersonToDatabase(Person); } } } }
public Common.CaseConferance GetCaseConferance(int id) { DataLayer.PatientsHandler dapatient = new DataLayer.PatientsHandler(); return(dapatient.GetCaseConferance(id)); }