public IActionResult AddExamination(ScheduleExaminationDTO examinationDTO) { var patientJmbg = HttpContext.User.FindFirst("Jmbg").Value; examinationDTO.PatientJmbg = patientJmbg; return(RequestAdapter.SendRequestWithBody(_serviceSettings.ScheduleServiceUrl, "/api/examination", examinationDTO)); }
public ActionResult AddFeedback(AddFeedbackDTO feedbackDTO) { if (!feedbackDTO.IsAnonymous) { feedbackDTO.CommentatorJmbg = HttpContext.User.FindFirst("Jmbg").Value; } return(RequestAdapter.SendRequestWithBody(_serviceSettings.FeedbackAndSurveyServiceUrl, "/api/feedback", feedbackDTO)); }
public IActionResult BasicSearchAppointments(BasicSearchDTO parameters) { var patientJmbg = HttpContext.User.FindFirst("Jmbg").Value; parameters.PatientJmbg = patientJmbg; parameters.EarliestDateTime = InitializeEarliestTime(parameters.EarliestDateTime); parameters.LatestDateTime = InitializeLatestTime(parameters.LatestDateTime); return(RequestAdapter.SendRequestWithBody(_serviceSettings.ScheduleServiceUrl, "/api/examination/search-free/basic", parameters)); }
public IActionResult Authenticate([FromBody] UserInfoDTO userInfoDTO) { var contentResult = RequestAdapter.SendRequestWithBody(_serviceSettings.UserServiceUrl, "/api/user", userInfoDTO); try { UserDTO userDTO = JsonConvert.DeserializeObject <UserDTO>(contentResult.Content); if (userDTO.CanLogIn) { var token = GenerateJWT(userDTO.Email, userDTO.Jmbg, userDTO.Type); return(Ok(token)); } } catch (Exception) { } if ((int)contentResult.StatusCode == 500) { return(Problem("An internal error occured.")); } else { return(Unauthorized("Credentials not valid.")); } }
public ActionResult AdvanceSearchTherapies(TherapySearchDTO therapySearchDTO) { var patientJmbg = HttpContext.User.FindFirst("Jmbg").Value; return(RequestAdapter.SendRequestWithBody(_serviceSettings.PatientServiceUrl, "/api/patient/" + patientJmbg + "/therapy/search", therapySearchDTO)); }
public IActionResult AddEndEvent(AddEndSchedulingEventDTO endSchedulingEventDTO) { return(RequestAdapter.SendRequestWithBody(_serviceSettings.EventSourcingServiceUrl, "/api/patientSchedulingEvent/end", endSchedulingEventDTO)); }
public IActionResult AddStepEvent(AddStepSchedulingEventDTO stepSchedulingEventDTO) { return(RequestAdapter.SendRequestWithBody(_serviceSettings.EventSourcingServiceUrl, "/api/patientSchedulingEvent/step", stepSchedulingEventDTO)); }
public ActionResult AddPatientGuestAccount(GuestPatientDTO guestPatientDTO) { return(RequestAdapter.SendRequestWithBody(_serviceSettings.PatientServiceUrl, "/api/patient", guestPatientDTO)); }
public ActionResult AddSurvey(SurveyDTO surveyDTO) { var patientJmbg = HttpContext.User.FindFirst("Jmbg").Value; return(RequestAdapter.SendRequestWithBody(_serviceSettings.FeedbackAndSurveyServiceUrl, "/api/survey/patient/" + patientJmbg + "/permission/" + surveyDTO.ExaminationId, surveyDTO)); }
public ActionResult AdvanceSearchExaminations(ExaminationSearchDTO examinationSearchDTO) { var patientJmbg = HttpContext.User.FindFirst("Jmbg").Value; return(RequestAdapter.SendRequestWithBody(_serviceSettings.PatientServiceUrl, "/api/patient/" + patientJmbg + "/examination/search", examinationSearchDTO)); }
public ActionResult AddFloorChangeEvent(FloorChangeEventDTO floorChangeEventDTO) { return(RequestAdapter.SendRequestWithBody(_serviceSettings.EventSourcingServiceUrl, "/api/map/floorChange", floorChangeEventDTO)); }
public ActionResult AddBuildingSelectionEvent(BuildingSelectionEventDTO buildingSelectionEventDTO) { return(RequestAdapter.SendRequestWithBody(_serviceSettings.EventSourcingServiceUrl, "/api/map/buildingSelection", buildingSelectionEventDTO)); }
public ActionResult AddRoomSelectionEvent(RoomSelectionEventDTO roomSelectionEventDTO) { return(RequestAdapter.SendRequestWithBody(_serviceSettings.EventSourcingServiceUrl, "/api/map/roomSelection", roomSelectionEventDTO)); }