Beispiel #1
0
        public ServiceResult GetSymptomLogs(string parentUUID = "")
        {
            if (CurrentUser == null)
            {
                return(ServiceResponse.Error("You must be logged in to access this function."));
            }

            List <dynamic> SymptomsLog;

            SymptomManager symptomManager = new SymptomManager(Globals.DBConnectionKey, this.GetAuthToken(Request));

            SymptomsLog = symptomManager.GetSymptomsLog(parentUUID, CurrentUser.AccountUUID).Cast <dynamic>().ToList();;

            DataFilter filter = this.GetFilter(Request);

            SymptomsLog = SymptomsLog.Filter(ref filter);
            return(ServiceResponse.OK("", SymptomsLog, filter.TotalRecordCount));
        }
Beispiel #2
0
        public ServiceResult GetSymptomsLogByDose(string doseUUID)
        {
            if (CurrentUser == null)
            {
                return(ServiceResponse.Error("You must be logged in to access this function."));
            }

            if (string.IsNullOrWhiteSpace(doseUUID))
            {
                return(ServiceResponse.Error("You must send a dose uuid."));
            }

            List <dynamic> SymptomsLog;

            SymptomManager symptomManager = new SymptomManager(Globals.DBConnectionKey, this.GetAuthToken(Request));

            SymptomsLog = symptomManager.GetSymptomsByDose(doseUUID, "", CurrentUser.AccountUUID).Cast <dynamic>().ToList();

            DataFilter filter = this.GetFilter(Request);

            SymptomsLog = SymptomsLog.Filter(ref filter);
            return(ServiceResponse.OK("", SymptomsLog, filter.TotalRecordCount));
        }