// GET api/values/5 public PathfinderVideoUI Get(string patientId, string startTime, string endTime) { if (patientId != null && startTime != null && endTime != null) { var pve = new PathfinderVideos(patientId, startTime, endTime, GetStorConnStr()); if (pve == null || pve.Videos.Count == 0) { return(null); } PathfinderVideoUI pathfinderVideoUI = new PathfinderVideoUI(pve.Videos[0]); var pathfinderEvents = new PathFinderEvents(patientId, pathfinderVideoUI.StartTime.ToString("yyyyMMddHHmmss"), pathfinderVideoUI.EndTime.ToString("yyyyMMddHHmmss"), null, null, GetStorConnStr()); foreach (var pe in pathfinderEvents.Events) { pathfinderVideoUI.Events.Add(new PathfinderEventUI(pe, pathfinderVideoUI.StartTime)); } //ToDo: Get the URL and Token for video from Media Services return(pathfinderVideoUI); } throw new Exception("Invalid Query Options"); }
// GET api/values public IEnumerable <PathfinderEvent> Get(string PatientId, string StartDate, string EndDate, string Skill, string Target) { if (Skill != null && Target != null) { var pve = new PathFinderEvents(PatientId, StartDate, EndDate, Skill, Target, GetStorConnStr()); return(pve.Events); } else { if (Skill != null) { var pve = new PathFinderEvents(PatientId, StartDate, EndDate, Skill, GetStorConnStr()); return(pve.Events); } else { var pve = new PathFinderEvents(PatientId, StartDate, EndDate, GetStorConnStr()); return(pve.Events); } } //invalid query throw new Exception("Invalid Query Options"); }