コード例 #1
0
ファイル: MPIController.cs プロジェクト: hotncoldpi/MPI
        public IEnumerable <Patient> Get()
        {
            PatientRepo           pr      = new PatientRepo(_pc, Logger);
            IEnumerable <Patient> records = pr.getPatients(Request.Query["source"], Request.Query["record"]);

            return(records);
        }
コード例 #2
0
ファイル: MPIController.cs プロジェクト: hotncoldpi/MPI
        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());
        }