title: How to get an element in FHIR API?
body: <p>I tried to get the element like Identifier, Location, Period, ... But not working. How can I get it?
  My code follow:</p>
  <pre><code>    static void Main(string[] args)
      {
          //The fhir server end point address      
          string ServiceRootUrl = &quot;http://stu3.test.pyrohealth.net/fhir&quot;;
          //Create a client to send to the server at a given endpoint.
          var FhirClient = new Hl7.Fhir.Rest.FhirClient(ServiceRootUrl);
          // increase timeouts since the server might be powered down
          FhirClient.Timeout = (60 * 1000);
  
          Console.WriteLine(&quot;Press any key to send to server: &quot; + ServiceRootUrl);
          Console.WriteLine();
          Console.ReadKey();
          try
          {
              //Attempt to send the resource to the server endpoint
              Hl7.Fhir.Model.Bundle ReturnedSearchBundle = FhirClient.Search&lt;Hl7.Fhir.Model.Patient&gt;(new string[] { &quot;status=planned&quot; });
              Console.WriteLine(string.Format(&quot;Found: {0} Fhirman patients.&quot;, ReturnedSearchBundle.Total.ToString()));
              Console.WriteLine(&quot;Their logical IDs are:&quot;);
              foreach (var Entry in ReturnedSearchBundle.Entry)
              {
                  Console.WriteLine(&quot;ID: &quot; + Entry.Resource.Id);
                  Console.WriteLine(&quot;ID2: &quot; + Entry.Identifier);
              }
              Console.WriteLine();
          }
          catch (Hl7.Fhir.Rest.FhirOperationException FhirOpExec)
          {
              //Process any Fhir Errors returned as OperationOutcome resource
              Console.WriteLine();
              Console.WriteLine(&quot;An error message: &quot; + FhirOpExec.Message);
              Console.WriteLine();
              string xml = Hl7.Fhir.Serialization.FhirSerializer.SerializeResourceToXml(FhirOpExec.Outcome);
              XDocument xDoc = XDocument.Parse(xml);
              Console.WriteLine(xDoc.ToString());
          }
          catch (Exception GeneralException)
          {
              Console.WriteLine();
              Console.WriteLine(&quot;An error message: &quot; + GeneralException.Message);
              Console.WriteLine();
          }
          Console.WriteLine(&quot;Press any key to end.&quot;);
          Console.ReadKey();
      }
  </code></pre>
  <p>The result is System.Collections.Generic.List`1[Hl7.Fhir.Model.Identifier]</p>