Example #1
0
        public async Task <IActionResult> MainSearch([FromBody] MainSearchRequest request)
        {
            var patients = await this.Patients.GetSome(20);

            var patientDetails = patients.Select(x => new PatientDetail
            {
            })
                                 .ToList();

            var result = new MainSearchResponse();

            return(this.Ok(result));
        }
Example #2
0
        public async Task <IActionResult> MainSearch([FromBody] MainSearchRequest request)
        {
            if (request?.SearchString == null)
            {
                return(this.Ok(new MainSearchResponse()));
            }

            var patients = await this.PatientsDetail.Search(request.SearchString);

            if (patients == null)
            {
                return(this.Ok(new MainSearchResponse()));
            }

            var result = new MainSearchResponse
            {
                Patients = (IList <PatientDetail>)patients
            };

            return(this.Ok(result));
        }