public ActionResult GetTestGroups()
        {
            var testResponseModel = new TestResponseModel();

            var testGroups = testsService.GetTestGroups().ToList();
            List <TestGroupDto> testGroupDtos = new List <TestGroupDto>();

            testGroups.ForEach(testGroup => testGroupDtos.Add((new TestGroupDto()).GetTestGroupDto(testGroup)));

            testResponseModel.TestGroups = testGroupDtos;

            if (testGroupDtos != null)
            {
                return(Ok(GetResponse(ResponseType.OBJECT, ResponseStatusCode.SUCCESS, testResponseModel)));
            }
            else
            {
                return(Ok(GetResponse(ResponseType.FAIL, ResponseStatusCode.FAIL, GetError(ErrorCodes.dataNotFound, "No test groups found", "Please add a test group"))));
            }
        }
        public ActionResult GetPatients()
        {
            var responseModel = new PatientResponseModel();

            responseModel.PatientDetails    = GetPatientDtos();
            responseModel.TestGroups        = testService.GetTestGroups().ToList();
            responseModel.TestTitles        = testService.GetTestTitles().ToList();
            responseModel.Initials          = otherService.GetInitials().ToList();
            responseModel.Genders           = otherService.GetGenders().ToList();
            responseModel.RegistrationTypes = otherService.GetReferredByTypes().ToList();
            responseModel.HdlRegistrations  = dhlRegistrationService.GetDhlRegistrations().HdlRegistrations;
            responseModel.FieldOptions      = maintenanceService.GetFieldOptions().FieldOptions;

            if (responseModel != null)
            {
                return(Ok(GetResponse(ResponseType.OBJECT, ResponseStatusCode.SUCCESS, responseModel)));
            }
            else
            {
                return(Ok(GetResponse(ResponseType.FAIL, ResponseStatusCode.FAIL, GetError(ErrorCodes.dataNotFound, "No patients found", "Please register a patient"))));
            }
        }