public async Task <List <Store_WardDTO> > SingleListWard([FromBody] Store_WardFilterDTO Store_WardFilterDTO)
        {
            if (!ModelState.IsValid)
            {
                throw new BindException(ModelState);
            }

            WardFilter WardFilter = new WardFilter();

            WardFilter.Skip       = 0;
            WardFilter.Take       = 20;
            WardFilter.OrderBy    = WardOrder.Id;
            WardFilter.OrderType  = OrderType.ASC;
            WardFilter.Selects    = WardSelect.ALL;
            WardFilter.Id         = Store_WardFilterDTO.Id;
            WardFilter.Code       = Store_WardFilterDTO.Code;
            WardFilter.Name       = Store_WardFilterDTO.Name;
            WardFilter.Priority   = Store_WardFilterDTO.Priority;
            WardFilter.DistrictId = Store_WardFilterDTO.DistrictId;
            WardFilter.StatusId   = Store_WardFilterDTO.StatusId;

            List <Ward> Wards = await WardService.List(WardFilter);

            List <Store_WardDTO> Store_WardDTOs = Wards
                                                  .Select(x => new Store_WardDTO(x)).ToList();

            return(Store_WardDTOs);
        }
 public AddPatientView(PatientListViewModel patientListViewModel,
                       PatientService patientService,
                       DiagnosisService diagnosisService,
                       PersonService personService,
                       EmployeeService employeeService,
                       WardService wardService,
                       BedService bedService,
                       PhysicianService physicianService,
                       VitalRecordService vitalRecordService,
                       ConditionService conditionService)
 {
     _toAddPatient = new AddPatientViewModel(patientListViewModel,
                                             patientService,
                                             personService,
                                             diagnosisService,
                                             physicianService,
                                             employeeService,
                                             wardService,
                                             bedService,
                                             vitalRecordService,
                                             conditionService);
     DataContext = _toAddPatient;
     InitializeComponent();
     InsuranceCheckBox.IsChecked = true;
 }
        public AddStaffViewModel(StaffListViewModel staffListViewModel,
                                 EmployeeService employeeService,
                                 WardService wardService,
                                 WorkUnitService workUnitService,
                                 SpecialtyService specialtyService,
                                 JobClassService jobClassService,
                                 EmployeeSpecialtyService employeeSpecialtyService,
                                 WardEmployeeService wardEmployeeService,
                                 UnitEmployeeService unitEmployeeService)
        {
            _staffListViewModel       = staffListViewModel;
            _employeeService          = employeeService;
            _wardService              = wardService;
            _workUnitService          = workUnitService;
            _employeeSpecialtyService = employeeSpecialtyService;
            _specialtyService         = specialtyService;
            _wardEmployeeService      = wardEmployeeService;
            _unitEmployeeService      = unitEmployeeService;
            _jobClassService          = jobClassService;

            Specialties = new ObservableCollection <Specialty>(_specialtyService.GetSpecialties());
            Wards       = new ObservableCollection <Ward>(_wardService.GetWards());
            JobClasses  = new ObservableCollection <JobClass>(_jobClassService.GetJobClasses());
            WorkUnits   = new ObservableCollection <WorkUnit>(_workUnitService.GetWorkUnits());
        }
 public EditPatientView(CombinedPatientViewModel originalModel,
                        CombinedPatientViewModel patientModel,
                        PatientService patientService,
                        PersonService personService,
                        WardService wardService,
                        BedService bedService,
                        VisitService visitService,
                        TreatmentService treatmentService,
                        ProcedureService procedureService,
                        PhysicianService physicianService,
                        DiagnosisService diagnosisService,
                        ConditionService conditionService,
                        VitalRecordService vitalRecordService,
                        EmployeeService nurseService,
                        OrderServiceLayer orderServiceLayer,
                        OrderServiceService orderServiceService,
                        PatientOrderService patientOrderService,
                        OrderItemService orderItemService)
 {
     InitializeComponent();
     InfoTab.Content = new PatientInfoView(originalModel, patientModel, patientService, personService, wardService,
                                           bedService, visitService);
     TreatmentTab.Content = new TreatmentView(treatmentService, originalModel.PatientModel.PersonId, procedureService, physicianService);
     DiagnosisTab.Content = new DiagnosisView(diagnosisService, originalModel.PatientModel.PersonId,
                                              conditionService, physicianService);
     VitalRecordTab.Content =
         new VitalRecordView(vitalRecordService, originalModel.PatientModel.PersonId, nurseService);
     OrderTab.Content = new OrderView(orderServiceLayer, originalModel.PatientModel.PersonId, orderServiceService,
                                      physicianService);
     PatientOrderTab.Content = new PatientOrderView(patientOrderService, originalModel.PatientModel.PersonId, orderItemService);
 }
        public void AddWardTest()
        {
            var serv = new WardService(new MVCHContext());

            serv.AddWard(new Ward
            {
                Name       = "Ward 1",
                FacilityId = "FAC-000001"
            });
            serv.AddWard(new Ward
            {
                Name       = "Ward 2",
                FacilityId = "FAC-000001"
            });
            serv.AddWard(new Ward
            {
                Name       = "Ward 1",
                FacilityId = "FAC-000002"
            });
            serv.AddWard(new Ward
            {
                Name       = "Ward 1",
                FacilityId = "FAC-000003"
            });
            serv.AddWard(new Ward
            {
                Name       = "Ward 1",
                FacilityId = "FAC-000004"
            });
            serv.AddWard(new Ward
            {
                Name       = "Ward 1",
                FacilityId = "FAC-000005"
            });
            serv.AddWard(new Ward
            {
                Name       = "Ward 1",
                FacilityId = "FAC-000006"
            });
            serv.AddWard(new Ward
            {
                Name       = "Ward 1",
                FacilityId = "FAC-000007"
            });
            serv.AddWard(new Ward
            {
                Name       = "Ward 1",
                FacilityId = "FAC-000008"
            });
            serv.AddWard(new Ward
            {
                Name       = "Ward 1",
                FacilityId = "FAC-000009"
            });
            serv.AddWard(new Ward
            {
                Name       = "Ward 1",
                FacilityId = "FAC-000010"
            });
        }
 public AddressController(ProvinceServiceImpl provinceService, DistrictServiceImpl districtService
                          , WardServiceImpl wardService, AddressServiceImpl addressService)
 {
     _provinceService = provinceService;
     _districtService = districtService;
     _wardService     = wardService;
     _addressService  = addressService;
 }
        public WardListViewModel(WardService wardService)
        {
            _wardService = wardService;

            WardList = new ObservableCollection <WardViewModel>(_wardService
                                                                .GetWards()
                                                                .Select(c => new WardViewModel(c)));
        }
 public WardView()
 {
     InitializeComponent();
     _wardService         = new WardService(new MVCHContext());
     _wardListViewModel   = new WardListViewModel(_wardService);
     _physicianService    = new PhysicianService(new MVCHContext());
     _facilityService     = new FacilityService(new MVCHContext());
     _employeeService     = new EmployeeService(new MVCHContext());
     _wardEmployeeService = new WardEmployeeService(new MVCHContext());
     DataContext          = _wardListViewModel;
 }
Beispiel #9
0
        public async Task <IHttpActionResult> GetWards()
        {
            var ward = await WardService.GetWards();

            if (ward.Count > 0)
            {
                return(Ok(ward));
            }
            else
            {
                return(BadRequest("No Wards Found!"));
            }
        }
Beispiel #10
0
        public async Task <IHttpActionResult> GetWardDoc(WardModel ward)
        {
            var wards = await WardService.GetDocByWardID(ward);

            if (wards.Count > 0)
            {
                return(Ok(wards));
            }
            else
            {
                return(BadRequest("No Doctor Available!"));
            }
        }
Beispiel #11
0
 public NurseView()
 {
     InitializeComponent();
     _employeeService          = new EmployeeService(new MVCHContext());
     _nurseListViewModel       = new NurseListViewModel(_employeeService);
     _specialtyService         = new SpecialtyService(new MVCHContext());
     _employeeSpecialtyService = new EmployeeSpecialtyService(new MVCHContext());
     _wardService         = new WardService(new MVCHContext());
     _workUnitService     = new WorkUnitService(new MVCHContext());
     _wardEmployeeService = new WardEmployeeService(new MVCHContext());
     _unitEmployeeService = new UnitEmployeeService(new MVCHContext());
     _jobClassService     = new JobClassService(new MVCHContext());
     DataContext          = _nurseListViewModel;
 }
 public AddWardView(WardListViewModel wardListViewModel,
                    WardService wardService,
                    FacilityService facilityService,
                    EmployeeService employeeService,
                    WardEmployeeService wardEmployeeService)
 {
     _toAddWard = new AddWardViewModel(wardListViewModel,
                                       wardService,
                                       facilityService,
                                       employeeService,
                                       wardEmployeeService);
     DataContext = _toAddWard;
     InitializeComponent();
 }
        public AddWardViewModel(WardListViewModel wardListViewModel,
                                WardService wardService,
                                FacilityService facilityService,
                                EmployeeService employeeService,
                                WardEmployeeService wardEmployeeService)
        {
            _wardListViewModel   = wardListViewModel;
            _wardService         = wardService;
            _facilityService     = facilityService;
            _wardEmployeeService = wardEmployeeService;


            Employees  = new ObservableCollection <Employee>(_employeeService.GetEmployees());
            Facilities = new ObservableCollection <Facility>(_facilityService.GetFacilities());
        }
Beispiel #14
0
        public async Task <IHttpActionResult> UpdateWard(WardModel ward)
        {
            if (ward == null)
            {
                return(BadRequest("Please provide valid inputs!"));
            }

            if (await WardService.UpdateWard(ward))
            {
                return(Ok("Ward Udpated Successfully!"));
            }
            else
            {
                return(BadRequest("Failed to Update Ward!"));
            }
        }
 public UsersController(UserService userService,
                        ShoppingCartService shoppingCartService,
                        IBackgroundTaskQueue queueService,
                        ProvinceService provinceService,
                        DistrictService districtService,
                        WardService wardService,
                        OrderService orderService,
                        IWebHostEnvironment hostEnvironment)
 {
     _userService         = userService;
     _shoppingCartService = shoppingCartService;
     _queueService        = queueService;
     _districtService     = districtService;
     _provinceService     = provinceService;
     _wardService         = wardService;
     _orderService        = orderService;
     _hostEnvironment     = hostEnvironment;
 }
Beispiel #16
0
        public AddPatientViewModel(PatientListViewModel patientListViewModel,
                                   PatientService patientService,
                                   PersonService personService,
                                   DiagnosisService diagnosisService,
                                   PhysicianService physicianService,
                                   EmployeeService employeeService,
                                   WardService wardService,
                                   BedService bedService,
                                   VitalRecordService vitalRecordService,
                                   ConditionService conditionService)
        {
            _patientListViewModel = patientListViewModel;
            _patientService       = patientService;
            _personService        = personService;
            _diagnosisService     = diagnosisService;
            _physicianService     = physicianService;
            _employeeService      = employeeService;
            _wardService          = wardService;
            _bedService           = bedService;
            _vitalRecordService   = vitalRecordService;
            _conditionService     = conditionService;

            ContactPersons = new ObservableCollection <Person>(_personService.GetPersons()
                                                               .Where(c => c.Discriminator == "Person"));

            SubscriberPersons = new ObservableCollection <Person>(_personService.GetPersons()
                                                                  .Where(c => c.Discriminator == "Person"));

            Nurses = new ObservableCollection <Nurse>(_employeeService.GetNurses());

            Physicians = new ObservableCollection <Physician>(_physicianService.GetPhysicians());

            Wards = new ObservableCollection <Ward>(_wardService.GetWards()
                                                    .Include(c => c.FacilityLink));

            Beds = new ObservableCollection <Bed>(_bedService.GetBeds()
                                                  .Include(c => c.WorkUnitLink));

            Conditions                   = new ObservableCollection <Condition>(_conditionService.GetConditions());
            PatientModel.BirthDate       = DateTime.Now;
            PatientModel.DateOfContact   = DateTime.Now;
            InpatientModel.DateAdmitted  = DateTime.Now;
            InpatientModel.DischargeDate = DateTime.Now;
        }
 public AddTechnicianView(TechnicianListViewModel technicianListViewModel,
                          EmployeeService employeeService,
                          WardService wardService,
                          WorkUnitService workUnitService,
                          SpecialtyService specialtyService,
                          EmployeeSpecialtyService employeeSpecialtyService,
                          WardEmployeeService wardEmployeeService,
                          UnitEmployeeService unitEmployeeService)
 {
     _toAddTechnician = new AddTechnicianViewModel(technicianListViewModel,
                                                   employeeService,
                                                   wardService,
                                                   workUnitService,
                                                   specialtyService,
                                                   employeeSpecialtyService,
                                                   wardEmployeeService,
                                                   unitEmployeeService);
     DataContext = _toAddTechnician;
     InitializeComponent();
 }
Beispiel #18
0
 public AddTechnicianViewModel(TechnicianListViewModel technicianListViewModel,
                               EmployeeService employeeService,
                               WardService wardService,
                               WorkUnitService workUnitService,
                               SpecialtyService specialtyService,
                               EmployeeSpecialtyService employeeSpecialtyService,
                               WardEmployeeService wardEmployeeService,
                               UnitEmployeeService unitEmployeeService)
 {
     _technicianListViewModel  = technicianListViewModel;
     _employeeService          = employeeService;
     _wardService              = wardService;
     _workUnitService          = workUnitService;
     _employeeSpecialtyService = employeeSpecialtyService;
     _specialtyService         = specialtyService;
     _wardEmployeeService      = wardEmployeeService;
     _unitEmployeeService      = unitEmployeeService;
     Specialties = new ObservableCollection <Specialty>(_specialtyService.GetSpecialties());
     Wards       = new ObservableCollection <Ward>(_wardService.GetWards());
     WorkUnits   = new ObservableCollection <WorkUnit>(_workUnitService.GetWorkUnits());
 }
Beispiel #19
0
 public PatientInfoView(CombinedPatientViewModel originalModel,
                        CombinedPatientViewModel editPatient,
                        PatientService patientService,
                        PersonService personService,
                        WardService wardService,
                        BedService bedService,
                        VisitService visitService)
 {
     InitializeComponent();
     _originalModel  = originalModel;
     _editPatient    = editPatient;
     _patientService = patientService;
     _personService  = personService;
     _wardService    = wardService;
     _bedService     = bedService;
     _visitService   = visitService;
     _toEditPatient  = new EditPatientViewModel(_originalModel, _editPatient, _patientService, _personService, _wardService, _bedService, _visitService);
     DataContext     = _toEditPatient;
     MakeAllEditableFieldsReadOnly();
     SetupWindow();
 }
 public AddStaffView(StaffListViewModel staffListViewModel,
                     EmployeeService employeeService,
                     WardService wardService,
                     WorkUnitService workUnitService,
                     SpecialtyService specialtyService,
                     JobClassService jobClassService,
                     EmployeeSpecialtyService employeeSpecialtyService,
                     WardEmployeeService wardEmployeeService,
                     UnitEmployeeService unitEmployeeService)
 {
     _toAddStaff = new AddStaffViewModel(staffListViewModel,
                                         employeeService,
                                         wardService,
                                         workUnitService,
                                         specialtyService,
                                         jobClassService,
                                         employeeSpecialtyService,
                                         wardEmployeeService,
                                         unitEmployeeService);
     DataContext = _toAddStaff;
     InitializeComponent();
 }
Beispiel #21
0
 public PatientView()
 {
     _patientService       = new PatientService(new MVCHContext());
     _patientListViewModel = new PatientListViewModel(_patientService);
     _diagnosisService     = new DiagnosisService(new MVCHContext());
     _personService        = new PersonService(new MVCHContext());
     _employeeService      = new EmployeeService(new MVCHContext());
     _wardService          = new WardService(new MVCHContext());
     _bedService           = new BedService(new MVCHContext());
     _physicianService     = new PhysicianService(new MVCHContext());
     _vitalRecordService   = new VitalRecordService(new MVCHContext());
     _conditionService     = new ConditionService(new MVCHContext());
     _visitService         = new VisitService(new MVCHContext());
     _treatmentService     = new TreatmentService(new MVCHContext());
     _procedureService     = new ProcedureService(new MVCHContext());
     _orderServiceLayer    = new OrderServiceLayer(new MVCHContext());
     _orderServiceService  = new OrderServiceService(new MVCHContext());
     _patientOrderService  = new PatientOrderService(new MVCHContext());
     _orderItemService     = new OrderItemService(new MVCHContext());
     DataContext           = _patientListViewModel;
     InitializeComponent();
 }
        public AddNurseView(NurseListViewModel nurseListViewModel,
                            EmployeeService employeeService,
                            WardService wardService,
                            WorkUnitService workUnitService,
                            SpecialtyService specialtyService,
                            EmployeeSpecialtyService employeeSpecialtyService,
                            WardEmployeeService wardEmployeeService,
                            UnitEmployeeService unitEmployeeService)
        {
            _toAddNurse = new AddNurseViewModel(nurseListViewModel,
                                                employeeService,
                                                wardService,
                                                workUnitService,
                                                specialtyService,
                                                employeeSpecialtyService,
                                                wardEmployeeService,
                                                unitEmployeeService);
            DataContext = _toAddNurse;
            InitializeComponent();

            //default
            RnSelectButton.IsChecked = true;
        }
 public WardsController(WardService wardService)
 {
     _wardService = wardService;
 }
        public EditPatientViewModel(CombinedPatientViewModel originalModel,
                                    CombinedPatientViewModel duplicateModel,
                                    PatientService patientService,
                                    PersonService personService,
                                    WardService wardService,
                                    BedService bedService,
                                    VisitService visitService)
        {
            AssociatedPatientModel  = duplicateModel;
            _originalModel          = originalModel;
            OriginalPatientModel    = _originalModel.PatientModel;
            OriginalInpatientModel  = _originalModel.InpatientModel;
            OriginalOutpatientModel = _originalModel.OutpatientModel;
            _patientService         = patientService;
            _personService          = personService;
            _wardService            = wardService;
            _bedService             = bedService;
            _visitService           = visitService;
            ContactPersons          = new ObservableCollection <Person>(_personService.GetPersons()
                                                                        .Where(c => c.Discriminator == "Person").ToList());
            SubscriberPersons = new ObservableCollection <Person>(_personService.GetPersons()
                                                                  .Where(c => c.Discriminator == "Person").ToList());
            Wards = new ObservableCollection <Ward>(_wardService.GetWards()
                                                    .Include(c => c.FacilityLink));
            Beds = new ObservableCollection <Bed>(_bedService.GetBeds()
                                                  .Include(c => c.WorkUnitLink));
            if (!AssociatedPatientModel.IsOutpatient)
            {
                if (AssociatedPatientModel.InpatientModel.BedId != null)
                {
                    SelectedBed = Beds.First(c => c.BedId == AssociatedPatientModel.InpatientModel.BedId);
                    OriginalBed = SelectedBed;
                }
                if (AssociatedPatientModel.InpatientModel.ContactPersonId != null)
                {
                    SelectedContactPerson = ContactPersons.First(c =>
                                                                 c.PersonId == AssociatedPatientModel.InpatientModel.ContactPersonId);
                    OriginalContact = SelectedContactPerson;
                }
                if (AssociatedPatientModel.InpatientModel.SubscriberPersonId != null)
                {
                    SelectedSubscriber = SubscriberPersons.First(c =>
                                                                 c.PersonId == AssociatedPatientModel.InpatientModel.SubscriberPersonId);
                    OriginalSubscriber = SelectedSubscriber;
                }
                SelectedWard   = Wards.First(c => c.WardId == AssociatedPatientModel.InpatientModel.WardId);
                OriginalWard   = SelectedWard;
                PatientModel   = AssociatedPatientModel.PatientModel;
                InpatientModel = AssociatedPatientModel.InpatientModel;
            }
            else
            {
                if (AssociatedPatientModel.OutpatientModel.ContactPersonId != null)
                {
                    SelectedContactPerson = ContactPersons.First(c =>
                                                                 c.PersonId == AssociatedPatientModel.OutpatientModel.ContactPersonId);
                    OriginalContact = SelectedContactPerson;
                }

                if (AssociatedPatientModel.OutpatientModel.SubscriberPersonId != null)
                {
                    SelectedSubscriber = SubscriberPersons.First(c =>
                                                                 c.PersonId == AssociatedPatientModel.OutpatientModel.SubscriberPersonId);
                    OriginalSubscriber = SelectedSubscriber;
                }

                Visits = new ObservableCollection <Visit>(_visitService.GetVisits()
                                                          .Where(c => c.OutpatientId == AssociatedPatientModel.OutpatientModel.PersonId));
                PatientModel    = AssociatedPatientModel.PatientModel;
                OutpatientModel = AssociatedPatientModel.OutpatientModel;
            }
        }
Beispiel #25
0
 public AddressController(CityService city, DistrictService district, WardService ward)
 {
     _cityService     = city;
     _wardService     = ward;
     _districtService = district;
 }