/// <summary> /// To get patient Allergies with the help of global Patient object /// </summary> public void getPatientAllergies() { try { SearchParams searchParams = new SearchParams(); searchParams.Add("patient", Generalinformation.Id); searchParams.Add("_count", "20"); Bundle bd = _fc.Search <AllergyIntolerance>(searchParams); bool isCountOver = false; while (!isCountOver) { if (bd.NextLink == null) { isCountOver = true; } foreach (Bundle.EntryComponent et in bd.Entry) { if (et.Resource.ResourceType == ResourceType.AllergyIntolerance) { Allergies.Add((AllergyIntolerance)et.Resource); } } bd = _fc.Continue(bd); } } catch (FhirOperationException foe) { isExceptionEncountered = true; ExceptionIssues = foe.Outcome.Issue; } catch (Exception ex) { isExceptionEncountered = true; OperationOutcome.IssueComponent ic = new OperationOutcome.IssueComponent(); ic.Diagnostics = ex.Message; ExceptionIssues.Add(ic); } }
public CardViewModel(DataSet data, uint id) { Id = id; PacientId = (uint)data.Tables[0].Rows[0]["id"]; Name1 = (string)data.Tables[0].Rows[0]["name1"]; Name2 = (string)data.Tables[0].Rows[0]["name2"]; Name3 = (string)data.Tables[0].Rows[0]["name3"]; for (int i = 0; i < data.Tables[1].Rows.Count; i++) { Allergies.Add(new Allergy(data.Tables[1].Rows[i])); } for (int i = 0; i < data.Tables[2].Rows.Count; i++) { Vaccinations.Add(new Vaccination(data.Tables[2].Rows[i])); } for (int i = 0; i < data.Tables[3].Rows.Count; i++) { Examinations.Add(new Examination(data.Tables[3].Rows[i])); } for (int i = 0; i < data.Tables[4].Rows.Count; i++) { Diagnoses.Add(new Diagnose(data.Tables[4].Rows[i])); } }