예제 #1
0
        public async Task <string> RemovePatients()
        {
            string json = "<b>Patients with the following ID(s) are deleted: </b>";

            try
            {
                FHIRService fHIRService = new FHIRService();

                JObject jObj = await fHIRService.GetPatients();

                List <Appointment> ApptList = new List <Appointment>();

                var entry = jObj["entry"];
                var count = entry.Count();

                for (int i = 0; i < count; i++)
                {
                    string apptID = (string)entry[i]["resource"]["id"];
                    JsonConvert.SerializeObject(await fHIRService.DeletePatient(apptID));
                    json = json + " </br> " + apptID;
                }
            }
            catch (Exception ex)
            {
            }


            return(json);
        }
예제 #2
0
        public async Task <Object> GetPatients()
        {
            FHIRService fHIRService = new FHIRService();



            string json = JsonConvert.SerializeObject(await fHIRService.GetPatients());

            return(json);
        }