Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        /// <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();
        }
Esempio n. 3
0
        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();
        }
Esempio n. 4
0
        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();
        }
Esempio n. 5
0
        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();
        }
Esempio n. 6
0
        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();
        }
Esempio n. 7
0
        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();
        }
Esempio n. 8
0
        public void AddFamilySocial(Common.FamilySocial fs)
        {
            DataLayer.PatientsHandler dap = new DataLayer.PatientsHandler();

            fs.FamilySocialId = Guid.NewGuid();

            this.AddFamilySocialToDatabase(fs);
        }
Esempio n. 9
0
        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);
        }
Esempio n. 10
0
        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();
        }
Esempio n. 11
0
        /// <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);
            }
        }
Esempio n. 12
0
        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();
        }
Esempio n. 13
0
        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);
        }
Esempio n. 14
0
        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);
        }
Esempio n. 15
0
 public void AddMedication(Common.Medication m)
 {
     DataLayer.PatientsHandler dap = new DataLayer.PatientsHandler();
     m.MedicationId = Guid.NewGuid();
     this.AddMedicationToDatabase(m);
 }
Esempio n. 16
0
 public void AddAllergiesSpiritual(Common.AllergiesSpiritual allSpi)
 {
     DataLayer.PatientsHandler dap = new DataLayer.PatientsHandler();
     allSpi.AllergiesSpiritualId = Guid.NewGuid();
     this.AddAllergiesSpiritualToDatabase(allSpi);
 }
Esempio n. 17
0
 public void AddIllnessesMedical(Common.IllnessesMedical im)
 {
     DataLayer.PatientsHandler dap = new DataLayer.PatientsHandler();
     im.IllnessesMedicalId = Guid.NewGuid();
     this.AddIllnessesMedicalToDatabase(im);
 }
Esempio n. 18
0
 public void AddNextOfKin(Common.NextOfKin nok)
 {
     DataLayer.PatientsHandler dap = new DataLayer.PatientsHandler();
     nok.NextOfKinId = Guid.NewGuid();
     this.AddNextOfKinToDatabase(nok);
 }
Esempio n. 19
0
 public void AddCaseConferance(Common.CaseConferance cc)
 {
     DataLayer.PatientsHandler dap = new DataLayer.PatientsHandler();
     cc.CaseConferanceId = Guid.NewGuid();
     this.AddCaseConferanceToDatabase(cc);
 }
Esempio n. 20
0
 public Common.Equipment GetEquipment(int id)
 {
     DataLayer.PatientsHandler dapatient = new DataLayer.PatientsHandler();
     return(dapatient.GetEquipment(id));
 }
Esempio n. 21
0
        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);
                }
            }
        }
Esempio n. 22
0
 public Common.NextOfKin GetNextOfKin(int id)
 {
     DataLayer.PatientsHandler dapatient = new DataLayer.PatientsHandler();
     return(dapatient.GetNextOfKin(id));
 }
Esempio n. 23
0
 public Common.IllnessesMedical GetIllnessesMedical(int id)
 {
     DataLayer.PatientsHandler dapatient = new DataLayer.PatientsHandler();
     return(dapatient.GetIllnessesMedical(id));
 }
Esempio n. 24
0
 public Common.AllergiesSpiritual GetAllergiesSpiritual(int id)
 {
     DataLayer.PatientsHandler dapatient = new DataLayer.PatientsHandler();
     return(dapatient.GetAllergiesSpiritual(id));
 }
Esempio n. 25
0
 public Common.Medication GetMedication(int id)
 {
     DataLayer.PatientsHandler dapatient = new DataLayer.PatientsHandler();
     return(dapatient.GetMedication(id));
 }
Esempio n. 26
0
 public Common.FamilySocial GetFamilySocial(int id)
 {
     DataLayer.PatientsHandler dapatient = new DataLayer.PatientsHandler();
     return(dapatient.GetFamilySocial(id));
 }
Esempio n. 27
0
 public void AddEquipment(Common.Equipment e)
 {
     DataLayer.PatientsHandler dap = new DataLayer.PatientsHandler();
     e.EquipmentId = Guid.NewGuid();
     this.AddEquipmentToDatabase(e);
 }
Esempio n. 28
0
        /// <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);
                    }
                }
            }
        }
Esempio n. 29
0
 public Common.CaseConferance GetCaseConferance(int id)
 {
     DataLayer.PatientsHandler dapatient = new DataLayer.PatientsHandler();
     return(dapatient.GetCaseConferance(id));
 }