예제 #1
0
        public void should_Read_EmrVersion()
        {
            var emr = _reader.ReadEmr(new Endpoints(_baseUrl)).Result;

            Assert.NotNull(emr);
            Console.WriteLine(emr.VersionName);
        }
예제 #2
0
        public async Task <IActionResult> ReadEmr([FromBody] Endpoints endpoints)
        {
            if (null == endpoints)
            {
                return(BadRequest());
            }
            try
            {
                var emr = await _manager.ReadEmr(endpoints);

                if (null == emr)
                {
                    return(NotFound());
                }

                return(Ok(emr));
            }
            catch (Exception e)
            {
                //Log.Debug($"{e}");
                return(StatusCode(500, $"{e.Message}"));
            }
        }