public IActionResult AddExamination(ScheduleExaminationDTO examinationDTO)
        {
            var patientJmbg = HttpContext.User.FindFirst("Jmbg").Value;

            examinationDTO.PatientJmbg = patientJmbg;

            return(RequestAdapter.SendRequestWithBody(_serviceSettings.ScheduleServiceUrl, "/api/examination", examinationDTO));
        }
示例#2
0
        public ActionResult AddFeedback(AddFeedbackDTO feedbackDTO)
        {
            if (!feedbackDTO.IsAnonymous)
            {
                feedbackDTO.CommentatorJmbg = HttpContext.User.FindFirst("Jmbg").Value;
            }

            return(RequestAdapter.SendRequestWithBody(_serviceSettings.FeedbackAndSurveyServiceUrl, "/api/feedback", feedbackDTO));
        }
示例#3
0
        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));
        }
示例#4
0
        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));
 }
示例#8
0
 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));
        }
示例#11
0
 public ActionResult AddFloorChangeEvent(FloorChangeEventDTO floorChangeEventDTO)
 {
     return(RequestAdapter.SendRequestWithBody(_serviceSettings.EventSourcingServiceUrl, "/api/map/floorChange", floorChangeEventDTO));
 }
示例#12
0
 public ActionResult AddBuildingSelectionEvent(BuildingSelectionEventDTO buildingSelectionEventDTO)
 {
     return(RequestAdapter.SendRequestWithBody(_serviceSettings.EventSourcingServiceUrl, "/api/map/buildingSelection", buildingSelectionEventDTO));
 }
示例#13
0
 public ActionResult AddRoomSelectionEvent(RoomSelectionEventDTO roomSelectionEventDTO)
 {
     return(RequestAdapter.SendRequestWithBody(_serviceSettings.EventSourcingServiceUrl, "/api/map/roomSelection", roomSelectionEventDTO));
 }