public RepositoryManager() { CharacterRepository = new CharacterRepository(); ActionRepository = new ActionRepository(); AttributeRepository = new AttributeRepository(); ShadowCharacterRepository = new ShadowCharacterRepository(); DrugRepository = new DrugRepository(); GearEnchantMaterialRepository = new GearEnchantMaterialRepository(); GearRepository = new GearRepository(); GearPieceRepository = new GearPieceRepository(); GearRecipeRepository = new GearRecipeRepository(); CharacterEffectRepository = new CharacterEffectRepository(); LevelMasterRepository = new LevelMasterRepository(); SoulRepository = new SoulRepository(); StoryStageRepository = new StoryStageRepository(); StoryEpisodeRepository = new StoryEpisodeRepository(); ExchangeCashGiftRepository = new ExchangeCashGiftRepository(); RaidTicketRepository = new RaidTicketRepository(); PlayerCharacterRepository = new PlayerCharacterRepository(); PlayerStatusRepository = new PlayerStatusRepository(); PlayerStoryChapterRepository = new PlayerStoryChapterRepository(); PlayerStoryEpisodeRepository = new PlayerStoryEpisodeRepository(); PlayerStoryStageRepository = new PlayerStoryStageRepository(); PlayerArenaRepository = new PlayerArenaRepository(); PlayerSoulRepository = new PlayerSoulRepository(); PlayerDrugRepository = new PlayerDrugRepository(); PlayerGearEnchantMaterialRepository = new PlayerGearEnchantMaterialRepository(); PlayerGearPieceRepository = new PlayerGearPieceRepository(); PlayerGearRepository = new PlayerGearRepository(); PlayerSoulRepository = new PlayerSoulRepository(); PlayerExchangeCashGiftRepository = new PlayerExchangeCashGiftRepository(); PlayerRaidTicketRepository = new PlayerRaidTicketRepository(); InventoryRepository = new InventoryRepository(); CharacterEvolutionTypeRepository = new CharacterEvolutionTypeRepository(); }
public bool EditDrug(Drug drug) { Drug ret = DrugRepository.GetInstance().Update(drug); if (ret != null) { return(true); } else { return(false); } }
public bool DisableDrugUse(Drug drug) { drug.InUse = false; Drug ret = DrugRepository.GetInstance().Update(drug); if (ret != null) { return(true); } else { return(false); } }
public App() { var doctorRepository = new DoctorRepository(); var drugRepository = new DrugRepository(); var managerRepository = new ManagerRepository(); var medicalExamRepository = new MedicalExamRepository(); var medicalRecordRepository = new MedicalRecordRepository(); var medicalSupplyRepository = new MedicalSupplyRepository(); var notificationRepository = new NotificationRepository(); var patientRepository = new PatientRepository(); var reportRepository = new ReportRepository(); var resourceRepository = new ResourceRepository(); var roomRepository = new RoomRepository(); var secretaryRepository = new SecretaryRepository(); var textContentRepository = new TextContentRepository(); var renovationRepository = new RenovationRepository(); var guestUserRepository = new GuestUserRepository(); var notificationService = new NotificationService(notificationRepository); var doctorService = new DoctorService(doctorRepository, notificationService); var doctorReviewService = new DoctorReviewService(medicalExamRepository); var drugService = new DrugService(drugRepository, doctorService); var employeeService = new EmployeeService(managerRepository, doctorService, secretaryRepository); var guestUserService = new GuestUserService(guestUserRepository); var medicalExamService = new MedicalExamService(medicalExamRepository); var medicalSupplyService = new MedicalSupplyService(medicalSupplyRepository); var patientService = new PatientService(patientRepository); var reportService = new ReportService(reportRepository, managerRepository); var resourceService = new ResourceService(resourceRepository); var roomService = new RoomService(roomRepository, renovationRepository, medicalExamService, patientService, resourceService); var userService = new UserService(employeeService, patientService); var textContentService = new TextContentService(textContentRepository); TextContentController = new TextContentController(textContentService); NotificationController = new NotificationController(notificationService); DoctorController = new DoctorController(doctorService); DoctorReviewController = new DoctorReviewController(doctorReviewService); DrugController = new DrugController(drugService); EmployeeController = new EmployeeController(employeeService); GuestUserController = new GuestUserController(guestUserService); MedicalExamController = new MedicalExamController(medicalExamService); MedicalSupplyController = new MedicalSupplyController(medicalSupplyService); PatientController = new PatientController(patientService); ReportController = new ReportController(reportService); ResourceController = new ResourceController(resourceService); RoomController = new RoomController(roomService); UserController = new UserController(userService); }
public Prescription Read(uint id) { List <string[]> data = Persistence.ReadEntryByPrimaryKey(path, id.ToString()); if (data.Count == 1) { uint presID = uint.Parse(data[0][0]); uint drugID = uint.Parse(data[0][1]); Drug d = DrugRepository.GetInstance().Read(drugID); uint num = uint.Parse(data[0][2]); string usage = data[0][3]; Prescription ret = new Prescription(num, usage, d); ret.SetId(presID); return(ret); } return(null); }
public List <Drug> SearchDrugs(string query) { List <Drug> list = DrugRepository.GetInstance().GetAll(); if (query.Equals("")) { return(list); } List <Drug> ret = new List <Drug>(); foreach (Drug d in list) { if (d.InUse && d.Name.Contains(query)) { ret.Add(d); } } return(ret); }
public Examination AppendExamination(Examination examination, MedicalRecord medicalRecord) { foreach (Prescription p in examination.Prescription) { DrugStateChange oldState = p.drug.drugStateChange; DrugStateChange newState = new DrugStateChange(DateTime.Now, oldState.TotalNumber - (int)p.Number, oldState.Threshold, oldState.DrugId); DrugStateChangeRepository.GetInstance().Create(newState); p.drug.drugStateChange = newState; DrugRepository.GetInstance().Update(p.drug); PrescriptionRepository.GetInstance().Create(p); } foreach (Referral r in examination.Referral) { ReferralRepository.GetInstance().Create(r); } examination = ExaminationRepository.GetInstance().Create(examination); medicalRecord.AddExamination(examination); MedicalRecordRepository.GetInstance().Update(medicalRecord); return(examination); }
public void Setup() { obj = new DrugRepository(); }
public DrugService(DrugRepository drugRepository1, DoctorService doctorService) { this._drugRepository = drugRepository1; this._doctorService = doctorService; }
public Drug AddDrug(Drug drug) { return(DrugRepository.GetInstance().Create(drug)); }
public List <Drug> GetAllDrugs() { return(DrugRepository.GetInstance().GetAll()); }
public IList<PresciberDrugInfo> GetDrugInfo() { string connectionString = ConfigurationManager.ConnectionStrings["FDARems"].ConnectionString; long profileId = Systems.Security.GetCurrentProfile().ID.Value; IDrugRepository drugRepo = new DrugRepository(connectionString); IComplianceRepository complianceRepo = new ComplianceRepository(connectionString); IComplianceService complianceSvc = new ComplianceService(drugRepo, complianceRepo); var eocs = complianceSvc.GetEocsStatus(profileId, DrugListType.MyDrugs); return (from eoc in eocs select new PresciberDrugInfo { DrugID = eoc.Key.Id, DrugName = eoc.Key.GenericName, DateAdded = DateTime.Now, DrugEocs = eoc.Value.Count, UserEocs = eoc.Value.Count(x => x.CompletedAt != null) }).ToList(); }
public DrugService(DrugRepository repository) { _drugRepository = repository; }