public SecretaryHospitalController() { hospitalService = new HospitalService(); roomService = new RoomService(); physicianService = new PhysicianAccountService(); patientAccountsService = new PatientAccountsService(); }
private static void DisplayHomeScreen() { Console.Clear(); Console.WriteLine("Welcome to RayCare!"); Console.WriteLine("Select one of the following options:"); Console.WriteLine("Enter 1 for Patient Registration"); Console.WriteLine("Enter 2 to Get the list of registered patients"); Console.WriteLine("Enter 3 to Get the list of scheduled consultants"); int userInput = -1; bool isUserInputValid = Int32.TryParse(Console.ReadLine(), out userInput); if (!isUserInputValid) { Console.WriteLine("Oops, try again please"); return; } switch (userInput) { case 1: HospitalService.ReadPatientInformationAndSchedule(); break; case 2: HospitalService.ShowRegisteredPatients(); break; case 3: HospitalService.ShowConsultations(); break; default: break; } }
public HomeController(NurseService nurseService, HospitalService hospitalService) { _nurseService = nurseService; _hospitalService = hospitalService; _prefixNurse = "nurse"; _prefixHospital = "hospital"; }
public PhysitianHospitalAccountsController(Physitian loggedPhysitian) { this.loggedPhysitian = loggedPhysitian; this.hospitalService = new HospitalService(); this.reportService = new ReportService(); this.patientAccountsService = new PatientAccountsService(); this.physitianScheduleService = new PhysitianScheduleService(loggedPhysitian); }
public void Test_AddPatient() { Patient patient = new Patient(); HospitalConfiguration hospitalConfiguration = HospitalConfiguration.GetInstance(); HospitalService.AddPatient(patient); Assert.AreEqual(hospitalConfiguration.Patients[0], patient); Assert.AreEqual(hospitalConfiguration.Patients.Count, 1); }
private static HospitalService _hospitalService; //Single instance of service class. #endregion #region Constructors /// <summary> /// Initialization of service class and associated view. /// </summary> public HospitalController() { //Create a new instance for the class of service //that has all the business rules. _hospitalService = new HospitalService(); //Modify the controller of the main hospital view HospitalView.SetController(this); //Display the Hospital View HospitalView.Display(); }
public ActionResult GetActiveHospitals(int pageNumber, int listType) { try { var records = HospitalService.QueryActiveHospitals(pageNumber, listType); return(Json(records, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(ex.Message, JsonRequestBehavior.AllowGet)); } }
/// <summary> /// 构造函数 /// </summary> /// <param name="service"></param> public PatientController(PatientService service, WeightService weightService, BloodPressureService bloodPressureService, BloodSugarService bloodSugarService, WaterService waterService, HandRingService handRingService, DialysisService dialysisService, HospitalService hospitalService, DoctorService doctorService) { _service = service; _weightService = weightService; _bloodPressureService = bloodPressureService; _bloodSugarService = bloodSugarService; _waterService = waterService; _handRingService = handRingService; _dialysisService = dialysisService; _hospitalService = hospitalService; _doctorService = doctorService; }
public ActionResult GetHospitalById(Guid hospitalId) { try { var record = HospitalService.QueryHospitalById(hospitalId); return(Json(record, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(ex.Message, JsonRequestBehavior.AllowGet)); } }
public ActionResult GetHospitalsByName(string searchText) { try { var records = HospitalService.QueryHospitalsByName(searchText); return(Json(records, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(ex.Message, JsonRequestBehavior.AllowGet)); } }
public async Task AllHospitals_ShouldReturnCorectData() { MapperInitializer.InitializeMapper(); var context = ApplicationDbContextInMemoryFactory.InitializeContext(); var seeder = new Seeder(); await seeder.SeedHospitals(context); var hospitalService = new HospitalService(context); var actualResult = hospitalService.AllHospitals().Result; var expectedResult = context.Hospitals; Assert.True(actualResult.Count() == expectedResult.Count()); Assert.IsAssignableFrom <IEnumerable <HospitalServiceModel> >(actualResult); }
public ActionResult AddFuneralBoughtItem(List <KeyValue> funeralBoughtItem) { try { funeralBoughtItem.Add(new KeyValue() { Key = "Id", Value = Guid.NewGuid().ToString() }); var returnObject = FuneralBoughtItemService.InsertFuneralBoughtItem(funeralBoughtItem); if (returnObject.State == "success") { var newFuneralBoughtItem = HospitalService.QueryHospitalById(Guid.Parse(returnObject.Id)); return(Json(new { state = "success", funeralBoughtItem = newFuneralBoughtItem }, JsonRequestBehavior.AllowGet)); } return(Json(new { state = "error", hospital = "" }, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(ex.Message, JsonRequestBehavior.AllowGet)); } }
public ActionResult AddHospital(List <KeyValue> hospital) { try { hospital.Add(new KeyValue() { Key = "Id", Value = Guid.NewGuid().ToString() }); var returnObject = HospitalService.InsertHospital(hospital); if (returnObject.State != "success") { return(Json(new { state = "error", hospital = "" }, JsonRequestBehavior.AllowGet)); } var newHospital = HospitalService.QueryHospitalById(Guid.Parse(returnObject.Id)); return(Json(new { state = "success", hospital = newHospital }, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(ex.Message, JsonRequestBehavior.AllowGet)); } }
private void LoadServices() { // HospitalManagementService doctorStatisticsService = new DoctorStatisticsService(doctorStatisticRepository); inventoryStatisticsService = new InventoryStatisticsService(inventoryStatisticRepository); roomStatisticsService = new RoomStatisticsService(roomStatisticRepository); hospitalService = new HospitalService(hospitalRepository); inventoryService = new InventoryService(inventoryRepository, inventoryItemRepository, medicineRepository); roomService = new RoomService(roomRepository, appointmentRepository); medicineService = new MedicineService(medicineRepository); // MedicineService diagnosisService = new DiagnosisService(diagnosisRepository); diseaseService = new DiseaseService(diseaseRepository); medicalRecordService = new MedicalRecordService(medicalRecordRepository); therapyService = new TherapyService(therapyRepository, medicalRecordService); // MiscService articleService = new ArticleService(articleRepository); doctorFeedbackService = new DoctorFeedbackService(doctorFeedbackRepository); feedbackService = new FeedbackService(feedbackRepository, questionRepository, userRepository); locationService = new LocationService(locationRepository); messageService = new MessageService(messageRepository); notificationService = new NotificationService(notificationRepository); appointmentNotificationSender = new AppointmentNotificationSender(notificationService); appointmentService = new AppointmentService(appointmentRepository, appointmentStrategy, appointmentNotificationSender); pharmacyApiKeyService = new PharmacyApiKeyService(pharmacyApiKeyRepository); // UsersService doctorService = new DoctorService(doctorRepository, userRepository, appointmentService); managerService = new ManagerService(managerRepository); patientService = new PatientService(patientRepository, medicalRecordRepository); secretaryService = new SecretaryService(secretaryRepository); userService = new UserService(userRepository); appointmentRecommendationService = new AppointmentRecommendationService(appointmentService, doctorService); }
public HospitalController(HospitalService hospitalService) { this.hospitalService = hospitalService; }
public DeleteHospitalPipeCommandHandler(HospitalService service) { _service = service; }
/// <summary> /// 构造函数 /// </summary> /// <param name="service"></param> public HospitalController(HospitalService service) { _service = service; }
public SearchHospitalResponse SearchHospital(SearchHospitalRequest request) { return(HospitalService.SearchHospital(request)); }
public GetHospitalResponse GetHospital(GetHospitalRequest request) { return(HospitalService.GetHospital(request)); }
public void DeleteHospital(DeleteHospitalRequest request) { HospitalService.DeleteHospital(request); }
public void UpdateHospital(UpdateHospitalRequest request) { HospitalService.UpdateHospital(request); }
public HospitalController() { hospitalService = new HospitalService(); }
public HospitaisController(HospitalService service) { _hospitalService = service; }
public PhysicianController() { specialitylist = new SpecialityService(); hospitalservice = new HospitalService(); }
public CreateHospitalPipeRequestHandler(HospitalService service) { _service = service; }
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); }
public EnfermeirosController(EnfermeiroService enfermeiroService, HospitalService hospitalService) { _enfermeiroService = enfermeiroService; _hospitalService = hospitalService; }
public AddHospitalResponse AddHospital(AddHospitalRequest request) { return(HospitalService.AddHospital(request)); }
/// <inheritdoc/> public string ToDelimitedString() { CultureInfo culture = CultureInfo.CurrentCulture; return(string.Format( culture, StringHelper.StringFormatSequence(0, 55, Configuration.FieldSeparator), Id, SetIdPv1.HasValue ? SetIdPv1.Value.ToString(culture) : null, PatientClass?.ToDelimitedString(), AssignedPatientLocation?.ToDelimitedString(), AdmissionType?.ToDelimitedString(), PreadmitNumber?.ToDelimitedString(), PriorPatientLocation?.ToDelimitedString(), AttendingDoctor != null ? string.Join(Configuration.FieldRepeatSeparator, AttendingDoctor.Select(x => x.ToDelimitedString())) : null, ReferringDoctor != null ? string.Join(Configuration.FieldRepeatSeparator, ReferringDoctor.Select(x => x.ToDelimitedString())) : null, ConsultingDoctor != null ? string.Join(Configuration.FieldRepeatSeparator, ConsultingDoctor.Select(x => x.ToDelimitedString())) : null, HospitalService?.ToDelimitedString(), TemporaryLocation?.ToDelimitedString(), PreadmitTestIndicator?.ToDelimitedString(), ReadmissionIndicator?.ToDelimitedString(), AdmitSource?.ToDelimitedString(), AmbulatoryStatus != null ? string.Join(Configuration.FieldRepeatSeparator, AmbulatoryStatus.Select(x => x.ToDelimitedString())) : null, VipIndicator?.ToDelimitedString(), AdmittingDoctor != null ? string.Join(Configuration.FieldRepeatSeparator, AdmittingDoctor.Select(x => x.ToDelimitedString())) : null, PatientType?.ToDelimitedString(), VisitNumber?.ToDelimitedString(), FinancialClass != null ? string.Join(Configuration.FieldRepeatSeparator, FinancialClass.Select(x => x.ToDelimitedString())) : null, ChargePriceIndicator?.ToDelimitedString(), CourtesyCode?.ToDelimitedString(), CreditRating?.ToDelimitedString(), ContractCode != null ? string.Join(Configuration.FieldRepeatSeparator, ContractCode.Select(x => x.ToDelimitedString())) : null, ContractEffectiveDate != null ? string.Join(Configuration.FieldRepeatSeparator, ContractEffectiveDate.Select(x => x.ToString(Consts.DateFormatPrecisionDay, culture))) : null, ContractAmount != null ? string.Join(Configuration.FieldRepeatSeparator, ContractAmount.Select(x => x.ToString(Consts.NumericFormat, culture))) : null, ContractPeriod != null ? string.Join(Configuration.FieldRepeatSeparator, ContractPeriod.Select(x => x.ToString(Consts.NumericFormat, culture))) : null, InterestCode?.ToDelimitedString(), TransferToBadDebtCode?.ToDelimitedString(), TransferToBadDebtDate.HasValue ? TransferToBadDebtDate.Value.ToString(Consts.DateFormatPrecisionDay, culture) : null, BadDebtAgencyCode?.ToDelimitedString(), BadDebtTransferAmount.HasValue ? BadDebtTransferAmount.Value.ToString(Consts.NumericFormat, culture) : null, BadDebtRecoveryAmount.HasValue ? BadDebtRecoveryAmount.Value.ToString(Consts.NumericFormat, culture) : null, DeleteAccountIndicator?.ToDelimitedString(), DeleteAccountDate.HasValue ? DeleteAccountDate.Value.ToString(Consts.DateFormatPrecisionDay, culture) : null, DischargeDisposition?.ToDelimitedString(), DischargedToLocation?.ToDelimitedString(), DietType?.ToDelimitedString(), ServicingFacility?.ToDelimitedString(), BedStatus?.ToDelimitedString(), AccountStatus?.ToDelimitedString(), PendingLocation?.ToDelimitedString(), PriorTemporaryLocation?.ToDelimitedString(), AdmitDateTime.HasValue ? AdmitDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, DischargeDateTime.HasValue ? DischargeDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, CurrentPatientBalance.HasValue ? CurrentPatientBalance.Value.ToString(Consts.NumericFormat, culture) : null, TotalCharges.HasValue ? TotalCharges.Value.ToString(Consts.NumericFormat, culture) : null, TotalAdjustments.HasValue ? TotalAdjustments.Value.ToString(Consts.NumericFormat, culture) : null, TotalPayments.HasValue ? TotalPayments.Value.ToString(Consts.NumericFormat, culture) : null, AlternateVisitId != null ? string.Join(Configuration.FieldRepeatSeparator, AlternateVisitId.Select(x => x.ToDelimitedString())) : null, VisitIndicator?.ToDelimitedString(), OtherHealthcareProvider?.ToDelimitedString(), ServiceEpisodeDescription, ServiceEpisodeIdentifier?.ToDelimitedString() ).TrimEnd(Configuration.FieldSeparator.ToCharArray())); }
/// <summary> /// 构造函数 /// </summary> /// <param name="service"></param> public SystemController(SystemService service, HospitalService hospitalService) { _service = service; _hospitalService = hospitalService; }