Exemple #1
0
        public IEnumerable <Patient> Get()
        {
            PatientRepo           pr      = new PatientRepo(_pc, Logger);
            IEnumerable <Patient> records = pr.getPatients(Request.Query["source"], Request.Query["record"]);

            return(records);
        }
Exemple #2
0
        public IActionResult Get(string source, string mrn)
        {
            Logger.LogInformation("Get():" + source + "/" + mrn);

            if (string.IsNullOrEmpty(source) || string.IsNullOrEmpty(mrn))
            {
                return(NotFound());
            }

            PatientRepo pr = new PatientRepo(_pc, Logger);

            IEnumerable <Patient> records = pr.getPatients(source, mrn);

            if (records.Count() > 0)
            {
                return(Ok(records.First()));
            }

            return(NotFound());
        }