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

            try
            {
                FHIRService fHIRService = new FHIRService();

                JObject jObj = await fHIRService.GetPractitioner();

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

                //          var id = jObj["entry"][0]["resource"]["id"];
                var entry = jObj["entry"];
                var count = entry.Count();

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


            return(json);
        }
Beispiel #2
0
        public async Task <string> GetPractioner()
        {
            FHIRService fHIRService = new FHIRService();
            string      json        = JsonConvert.SerializeObject(await fHIRService.GetPractitioner());

            return(json);
        }