Beispiel #1
0
        public async Task <string> RemoveSchedules()
        {
            string json = "<b>Schedules with the following ID(s) are deleted: </b>";

            try
            {
                FHIRService fHIRService = new FHIRService();

                JObject jObj = await fHIRService.GetSchedules();



                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.DeleteSchedule(apptID));
                    json = json + " </br> " + apptID;
                }
            }
            catch (Exception ex)
            {
            }


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



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

            return(json);
        }