public PatientDetailViewModel(DialogService dialogService,
                               PatientDataService patientDataService)
 {
     DeleteCommand       = new CustomCommand(Delete, CanDelete);
     UpdateCommand       = new CustomCommand(Update, CanUpdate);
     _dialogService      = dialogService;
     _patientDataService = patientDataService;
     Messenger.Default.Register <PatientViewModel>(this, SetSelectedPatient);
 }
        static ViewModelLocator()
        {
            var dialogService      = new DialogService();
            var patientDataService = new PatientDataService();

            MainWindowViewModel        = new MainWindowViewModel(dialogService, patientDataService);
            PatientDetailViewViewModel = new PatientDetailViewViewModel(patientDataService);
            NewPatientViewModel        = new NewPatientViewModel(dialogService, patientDataService);
        }
Example #3
0
        public void WhenInteractionsCalledReturnFentanylRizInteractions()
        {
            var meds = new IGetFhirMedications.Model()
            {
                Requests = new List <MedicationConceptDTO>()
                {
                    UnitTestUtility.GetFentanylDTOasRequest(),
                UnitTestUtility.GetRizatriptanDTOasRequest(),
                }
            };

            PatientDataService.MedDTOs = meds;

            if (PatientDataService.MedDTOs.Requests.Count > 0)
            {
                var rxcuisResult = new GetRxCuiListAPI.Model()
                {
                    RxCuis = UnitTestUtility.GetRxCuisForFentanylandRiz()
                };

                PatientDataService.RxCuis = rxcuisResult;

                var drugResult = new IGetDrugInteractions.Model()
                {
                    Meds = Task.FromResult <string>(UnitTestUtility.GetInteractionsForFentanylandRiz())
                }
                ;

                PatientDataService.InterationsResponseString = drugResult;

                var parsedInteractions = PatientDataService.ParseInteractionsAsync(PatientDataService.InterationsResponseString.Meds.GetAwaiter().GetResult(), PatientDataService.MedDTOs.Requests).GetAwaiter().GetResult();

                var ints   = SystemUnderTest.Json(parsedInteractions.Interactions);
                var result = new Result <JsonResult>(ints);
            }
        }
Example #4
0
 public HospitalService()
 {
     _service = new PatientDataService();
 }
Example #5
0
 public PatientsController(ILogger <PatientsController> logger, PatientDataService patientService)
 {
     this._logger         = logger;
     this._patientService = patientService;
 }