Example #1
0
        private void Examination_Load(object sender, EventArgs e)
        {
            btnAddPrescription.Enabled = false;
            dtpAppointmentDate.MinDate = DateTime.Today;

            grpAddAppointment.Visible = false;
            doctorID = Homepage.userID;

            examinationController = new ExaminationController();
            var doctorList = examinationController.Examination(doctorID);

            cmbDiagnosis.DataSource    = doctorList;
            cmbDiagnosis.DisplayMember = "DiagnosisName";
            cmbDiagnosis.ValueMember   = "DiagnosisId";
            cmbDiagnosis.Text          = string.Empty;
            cmbDiagnosis.SelectedIndex = -1;

            hospitalController = new HospitalController();
            hospitals          = hospitalController.GetAll();

            cmbHospital.DataSource    = hospitals;
            cmbHospital.DisplayMember = "HospitalName";
            cmbHospital.ValueMember   = "HospitalId";

            cmbHospital.Text = string.Empty;

            cmbDoctor.SelectedIndex = -1;
            cmbPolyclinic.Items.Clear();
        }
Example #2
0
        private void LoadController()
        {
            // HospitalManagementController
            doctorStatisticsController    = new DoctorStatisticsController(doctorStatisticsService);
            inventoryStatisticsController = new InventoryStatisticsController(inventoryStatisticsService);
            roomStatisticsController      = new RoomStatisticsController(roomStatisticsService);
            hospitalController            = new HospitalController(hospitalService);
            medicineController            = new MedicineController(medicineService);
            roomController      = new RoomController(roomService);
            inventoryController = new InventoryController(inventoryService);

            // MedicalController
            appointmentController = new AppointmentController(appointmentService, appointmentRecommendationService);
            diseaseController     = new DiseaseController(diseaseService);

            // MiscController
            articleController        = new ArticleController(articleService);
            doctorFeedbackController = new DoctorFeedBackController(doctorFeedbackService);
            feedbackController       = new FeedbackController(feedbackService);
            locationController       = new LocationController(locationService);
            messageController        = new MessageController(messageService);
            notificationController   = new NotificationController(notificationService);

            // UsersController
            doctorController    = new DoctorController(doctorService, diagnosisService, therapyService, medicalRecordService);
            managerController   = new ManagerController(managerService);
            patientController   = new PatientController(patientService, medicalRecordService, therapyService, diagnosisService);
            secretaryController = new SecretaryController(secretaryService);
            userController      = new UserController(userService);
        }
Example #3
0
    /// <summary>
    /// Game objects initialization, if found
    /// </summary>
    private void InitGameObjectReferences()
    {
        GameObject weekGameObject = GameObject.FindGameObjectWithTag("WeekText");

        if (weekGameObject != null)
        {
            weekValue = weekGameObject.GetComponent <TextMeshProUGUI>();
        }
        GameObject moneyGameObject = GameObject.FindGameObjectWithTag("MoneyValue");

        moneyValue = moneyGameObject.GetComponent <TextMeshProUGUI>();

        GameObject effectListGameObject = GameObject.FindGameObjectWithTag("EffectList");

        if (effectListGameObject != null)
        {
            effectList = effectListGameObject.transform;
        }

        GameObject hospitalGameObject = GameObject.FindGameObjectWithTag("HospitalController");

        if (hospitalGameObject != null)
        {
            hospitalController = hospitalGameObject.GetComponent <HospitalController>();
        }

        GameObject moneyPanelGameObject = GameObject.FindGameObjectWithTag("MoneyPanel");

        if (moneyPanelGameObject != null)
        {
            hospitalHandler = moneyPanelGameObject.GetComponent <HospitalHandler>();
        }
    }
        public void Menu()
        {
            HospitalController hospitalController = new HospitalController();

            Console.WriteLine("************         Welcome To Hospital Management Application           **************!");
            Console.WriteLine("     1.   Hospital Admin Site ");
            Console.WriteLine("     2.   View Departments & Doctors ");
            Console.WriteLine("     3.   Doctor Handle ");
            Console.WriteLine("     4.   Exit ");
            Console.Write("Enter Choice : ");
            int choice = Convert.ToInt32(Console.ReadLine());

            switch (choice)
            {
            case 1:
                hospitalController.HospitalAdmin();
                break;

            case 2:
                hospitalController.ViewDepartment();
                break;

            case 3:
                hospitalController.DoctorHandle();
                break;

            case 4:
                System.Environment.Exit(0);
                break;

            default:
                Console.WriteLine("*********       Invalid Choice Enter !!!!! ");
                break;
            }
        }
 private void ResetHospitals()
 {
     GameObject[] ExistingHospitals = GameObject.FindGameObjectsWithTag("Hospital");
     foreach (GameObject hospital in ExistingHospitals)
     {
         HospitalController hospitalController = hospital.GetComponent <HospitalController>();
         hospitalController.ClearSoldiersCollected();
     }
 }
        public void GetAllHospitals()
        {
            //Arrange
            var hospitalRepoSub = Substitute.For <IHospitalRepo>();

            hospitalRepoSub.GetHospitals().Returns(new List <HospitalCentre>());
            var logger     = Substitute.For <ILogger <HospitalController> >();
            var controller = new HospitalController(hospitalRepoSub, logger);

            //Act
            List <HospitalCentre> hList = controller.Get();

            //Assert
            Assert.Empty(hList);
        }
Example #7
0
        private void MakeAppointment_Load(object sender, EventArgs e)
        {
            dtpAppointmentDate.MinDate = DateTime.Today;

            hospitalController = new HospitalController();
            hospitals          = hospitalController.GetAll();

            cmbHospital.DataSource    = hospitals;
            cmbHospital.DisplayMember = "HospitalName";
            cmbHospital.ValueMember   = "HospitalId";

            cmbHospital.Text = string.Empty;

            cmbDoctor.SelectedIndex = -1;
            cmbPolyclinic.Items.Clear();
            AllDepartments();
        }
    private void OnTriggerEnter(Collider collider)
    {
        if (collider.gameObject.tag.Equals("Soldier"))
        {
            if (SoldiersCollected < MaxSoldiers)
            {
                if (PickupSound != null)
                {
                    Vector3 soundLocation = new Vector3(gameObject.transform.position.x, gameObject.transform.position.y + 20.0f, gameObject.transform.position.z);
                    AudioSource.PlayClipAtPoint(PickupSound, soundLocation);
                }

                SoldiersCollected += 1;
                Destroy(collider.gameObject);
            }
        }
        else if (collider.gameObject.tag.Equals("Hospital"))
        {
            if (DropoffSound != null)
            {
                Vector3 soundLocation = new Vector3(0, gameObject.transform.position.y + 20.0f, 0);
                AudioSource.PlayClipAtPoint(DropoffSound, soundLocation);
            }

            HospitalController hospitalController = collider.gameObject.GetComponent <HospitalController>();
            if (hospitalController != null)
            {
                hospitalController.AddSoldiersCollected(SoldiersCollected);
            }
            SoldiersCollected = 0;
        }
        else if (collider.gameObject.tag.Equals("Rock"))
        {
            if (DeathSound != null)
            {
                Vector3 soundLocation = new Vector3(gameObject.transform.position.x, gameObject.transform.position.y + 20.0f, gameObject.transform.position.z);
                AudioSource.PlayClipAtPoint(DeathSound, soundLocation);
            }

            Destroy(gameObject);
        }
    }
        public void GetHospital()
        {
            // Arrange
            var mockRepository = new Mock <IHospitalRepository>();

            mockRepository.Setup(x => x.GetHospitalId(7))
            .Returns(new List <HospitalDTO>());


            var controller = new HospitalController(mockRepository.Object);

            // Act
            var actionResult  = controller.GetHospitalbyId(7);
            var contentResult = actionResult as ActionResult <HospitalDTO>;

            // Assert

            Assert.NotNull(contentResult);
            //Assert.Equal(List<HospitalDTO>,actionResult);
            //  Assert.Equal(2,contentResult)
        }
Example #10
0
 public HospitalControllerTest()
 {
     _seed       = Guid.NewGuid().ToString();
     _controller = MockController.CreateController <HospitalController>(_seed, "user");
 }
 public HospitalServiceTest()
 {
     _service    = new HospitalServiceFake();
     _controller = new HospitalController(_service);
 }
Example #12
0
 public HospitalDetailControllerTests()
 {
     _mockRepo   = new Mock <IHospitalRepository>();
     _controller = new HospitalController(_mockRepo.Object);
 }
 public HospitalControllerTest()
 {
     hospitalController = new HospitalController();
 }
        public App()
        {
            var medicationRepository           = new MedicationRepository(new Stream <Medication>(MEDICATION_FILE));
            var diagnosisRepository            = new DiagnosisRepository(new Stream <Diagnosis>(DIAGNOSIS_FILE));
            var allergenRepository             = new AllergensRepository(new Stream <Allergens>(ALLERGEN_FILE));
            var categoryRepository             = new MedicationCategoryRepository(new Stream <MedicationCategory>(CATEGORY_FILE));
            var symptomsRepository             = new SymptomsRepository(new Stream <Symptoms>(SYMPTOMS_FILE));
            var ingredientsRepository          = new MedicationIngredientRepository(new Stream <MedicationIngredient>(INGREDIENTS_FILE));
            var specializationRepository       = new SpecializationRepository(new Stream <Specialization>(SPECIALIZATION_FILE));
            var cityRepository                 = new CityRepository(new Stream <City>(CITY_FILE));
            var addressRepository              = new AddressRepository(new Stream <Address>(ADDRESS_FILE), cityRepository);
            var stateRepository                = new StateRepository(new Stream <State>(STATE_FILE));
            var hospitalRepository             = new HospitalRepository(new Stream <Hospital>(HOSPITAL_FILE));
            var departmentRepository           = new DepartmentRepository(hospitalRepository, new Stream <Department>(DEPARTMENT_FILE));
            var roomRepository                 = new RoomRepository(departmentRepository, new Stream <Room>(ROOM_FILE));
            var userRepository                 = new UserRepository(new Stream <RegisteredUser>(USER_FILE), cityRepository, addressRepository, departmentRepository, roomRepository);
            var renovationRepository           = new RenovationRepository(roomRepository, new Stream <Renovation>(RENOVATION_FILE));
            var medicalRecordRepository        = new MedicalRecordRepository(new Stream <MedicalRecord>(RECORD_FILE), diagnosisRepository, medicationRepository, userRepository);
            var bedRepository                  = new BedRepository(roomRepository, medicalRecordRepository, new Stream <Bed>(BED_FILE));
            var equipmentTypeRepository        = new EquipmentTypeRepository(new Stream <EquipmentType>(EQUIPMENT_TYPE_FILE));
            var equipmentRepository            = new HospitalEquipmentRepository(new Stream <HospitalEquipment>(EQUIPMENT_FILE));
            var treatmentsRepository           = new TreatmentRepository(medicationRepository, departmentRepository, new Stream <Treatment>(TREATMENTS_FILE));
            var examinationSurgeryRepository   = new ExaminationSurgeryRepository(treatmentsRepository, medicalRecordRepository, userRepository, new Stream <ExaminationSurgery>(EXAMINATION_SURGERY_FILE));
            var emergencyRequestRepository     = new EmergencyRequestRepository(medicalRecordRepository, new Stream <EmergencyRequest>(EMERGENCY_REQUEST_FILE));
            var vaccinesRepository             = new VaccinesRepository(new Stream <Vaccines>(VACCINES_FILE));
            var notificationRepository         = new NotificationRepository(userRepository, new Stream <Notification>(NOTIFICATION_FILE));
            var articleRepository              = new ArticleRepository(userRepository, new Stream <Article>(ARTICLE_FILE));
            var questionRepository             = new QuestionRepository(userRepository, new Stream <Question>(QUESTIONS_FILE));
            var doctorReviewsRepository        = new DoctorReviewRepository(userRepository, new Stream <DoctorReview>(DOCTOR_REVIEWS_FILE));
            var feedbackRepository             = new FeedbackRepository(userRepository, new Stream <Feedback>(FEEDBACK_FILE));
            var surveyRepository               = new SurveyRepository(userRepository, new Stream <Survey>(SURVEY_FILE));
            var appointmentsRepository         = new AppointmentRepository(userRepository, medicalRecordRepository, roomRepository, new Stream <Appointment>(APPOINTMENTS_FILE));
            var workDayRepository              = new WorkDayRepository(userRepository, new Stream <WorkDay>(WORK_DAY_FILE));
            var vacationRequestRepository      = new VacationRequestRepository(userRepository, new Stream <VacationRequest>(VACATION_REQUEST_FILE));
            var reportsRepository              = new ReportRepository(new Stream <Report>(REPORTS_FILE));
            var labTestTypeRepository          = new LabTestTypeRepository(new Stream <LabTestType>(LAB_TEST_TYPE_FILE));
            var validationMedicationRepository = new ValidationMedicationRepository(new Stream <ValidationMed>(VALIDATION_FILE), userRepository, medicationRepository);

            var equipmentTypeService        = new EquipmentTypeService(equipmentTypeRepository);
            var medicationService           = new MedicationService(medicationRepository, validationMedicationRepository);
            var diagnosisService            = new DiagnosisService(diagnosisRepository);
            var allergenService             = new AllergensService(allergenRepository);
            var categoryService             = new MedicationCategoryService(categoryRepository);
            var symptomsService             = new SymptomsService(symptomsRepository);
            var ingredientsService          = new MedicationIngredientService(ingredientsRepository);
            var specializationService       = new SpecializationService(specializationRepository);
            var cityService                 = new CityService(cityRepository);
            var stateService                = new StateService(stateRepository);
            var addressService              = new AddressService(addressRepository);
            var notificationService         = new NotificationService(notificationRepository, userRepository, medicalRecordRepository);
            var validationMedicationService = new ValidationMedicationService(validationMedicationRepository, notificationService);
            var hospitalService             = new HospitalService(hospitalRepository);
            var departmentService           = new DepartmentService(departmentRepository);
            var bedService                = new BedService(bedRepository);
            var medicalRecordService      = new MedicalRecordService(medicalRecordRepository);
            var treatmentService          = new TreatmentService(treatmentsRepository, notificationService);
            var examiantionSurgeryService = new ExaminationSurgeryService(examinationSurgeryRepository);
            var emergencyRequestService   = new EmergencyRequestService(emergencyRequestRepository, notificationService);
            var vaccinesService           = new VaccinesService(vaccinesRepository);
            var articleService            = new ArticleService(articleRepository);
            var questionService           = new QuestionService(questionRepository, notificationService);
            var doctorsReviewService      = new DoctorReviewService(doctorReviewsRepository);
            var feedbackService           = new FeedbackService(feedbackRepository);
            var surveyService             = new SurveyService(surveyRepository);
            var userService               = new UserService(userRepository, medicalRecordService);
            var workDayService            = new WorkDayService(workDayRepository, MAX_HOURS_PER_WEEK);
            var appointmentService        = new AppointmentService(appointmentsRepository, workDayService, notificationService, VALID_HOURS_FOR_SCHEDULING, APPOINTMENT_LENGTH_IN_MINUTES,
                                                                   SURGERY_LENGTH_IN_MINUTES, START_WORKING_HOURS, END_WORKING_HOURS);
            var vacationRequestService      = new VacationRequestService(vacationRequestRepository, notificationService, NUMBER_OF_ALLOWED_VACAY_REQUESTS);
            var reportsService              = new ReportService(reportsRepository, treatmentsRepository, medicationRepository, examinationSurgeryRepository, roomRepository);
            var labTestTypeService          = new LabTestTypeService(labTestTypeRepository);
            var roomService                 = new RoomService(roomRepository, appointmentsRepository);
            var hospitalEquipmentService    = new HospitalEquipmentService(equipmentRepository);
            var renovationService           = new RenovationService(renovationRepository, roomService, appointmentsRepository, hospitalEquipmentService, notificationService, RENOVATION_DAYS_RESTRICTION, RENOVATION_DAYS_RESTRICTION);
            var availableAppointmentService = new AvailableAppointmentService(appointmentsRepository, workDayService, VALID_HOURS_FOR_SCHEDULING,
                                                                              APPOINTMENT_LENGTH_IN_MINUTES, SURGERY_LENGTH_IN_MINUTES, START_WORKING_HOURS, END_WORKING_HOURS);

            equipmentTypeController        = new EquipmentTypeController(equipmentTypeService);
            medicationController           = new MedicationController(medicationService);
            userController                 = new UserController(userService);
            diagnosisController            = new DiagnosisController(diagnosisService);
            symptomsController             = new SymptomsController(symptomsService);
            categoryController             = new MedicationCategoryController(categoryService);
            allergensController            = new AllergensController(allergenService);
            vaccinesController             = new VaccinesController(vaccinesService);
            labTestTypeController          = new LabTestTypeController(labTestTypeService);
            medicationIngredientController = new MedicationIngredientController(ingredientsService);
            cityController                 = new CityController(cityService);
            specializationController       = new SpecializationController(specializationService);
            addressController              = new AddressController(addressService);
            stateController                = new StateController(stateService);
            departmentController           = new DepartmentController(departmentService);
            hospitalController             = new HospitalController(hospitalService);
            roomController                 = new RoomController(roomService);
            renovationController           = new RenovationController(renovationService);
            hospitalEquipmentController    = new HospitalEquipmentController(hospitalEquipmentService);
            medicalRecordController        = new MedicalRecordController(medicalRecordService);
            treatmentController            = new TreatmentController(treatmentService);
            examinationSurgeryController   = new ExaminationSurgeryController(examiantionSurgeryService);
            articleController              = new ArticleController(articleService);
            questionController             = new QuestionController(questionService);
            doctorReviewController         = new DoctorReviewController(doctorsReviewService);
            surveyController               = new SurveyController(surveyService);
            feedbackController             = new FeedbackController(feedbackService);
            workDayController              = new WorkDayController(workDayService);
            reportController               = new ReportController(reportsService);
            validationMedicationController = new ValidationMedicationController(validationMedicationService);
            vacationRequestController      = new VacationRequestController(vacationRequestService);
            bedController = new BedController(bedService);
            emergencyRequestController     = new EmergencyRequestController(emergencyRequestService);
            appointmentController          = new AppointmentController(appointmentService);
            notificationController         = new NotificationController(notificationService);
            availableAppointmentController = new AvailableAppointmentController(availableAppointmentService);

            validations = new Validations(UNDERAGE_RESTRICTION);
        }
Example #15
0
 static void Main(string[] args)
 {
     //Create master controller instance.
     HospitalController hospitalController = new HospitalController();
 }
Example #16
0
        /// <summary>
        /// Set the main controller.
        /// </summary>

        public static void SetController(HospitalController controller)
        {
            _hospitalController = controller;
        }