public async Task <string> RemoveSlots() { string json = "<b>Slots with the following ID(s) are deleted: </b>"; try { FHIRService fHIRService = new FHIRService(); JObject jObj = await fHIRService.GetSlots(); 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.DeleteSlot(apptID)); json = json + " </br> " + apptID; } } catch (Exception ex) { } return(json); }
public async Task <Object> GetSlots() { FHIRService fHIRService = new FHIRService(); string json = JsonConvert.SerializeObject(await fHIRService.GetSlots()); return(json); }