{"action":"created","issue":{"url":"https://api.github.com/repos/ewoutkramer/fhir-net-api/issues/130","labels_url":"https://api.github.com/repos/ewoutkramer/fhir-net-api/issues/130/labels{/name}","comments_url":"https://api.github.com/repos/ewoutkramer/fhir-net-api/issues/130/comments","events_url":"https://api.github.com/repos/ewoutkramer/fhir-net-api/issues/130/events","html_url":"https://github.com/ewoutkramer/fhir-net-api/issues/130","id":117656425,"number":130,"title":"Unable to get practitioner details via search","user":{"login":"taramoskam","id":11821049,"avatar_url":"https://avatars.githubusercontent.com/u/11821049?v=3","gravatar_id":"","url":"https://api.github.com/users/taramoskam","html_url":"https://github.com/taramoskam","followers_url":"https://api.github.com/users/taramoskam/followers","following_url":"https://api.github.com/users/taramoskam/following{/other_user}","gists_url":"https://api.github.com/users/taramoskam/gists{/gist_id}","starred_url":"https://api.github.com/users/taramoskam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taramoskam/subscriptions","organizations_url":"https://api.github.com/users/taramoskam/orgs","repos_url":"https://api.github.com/users/taramoskam/repos","events_url":"https://api.github.com/users/taramoskam/events{/privacy}","received_events_url":"https://api.github.com/users/taramoskam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-18T19:01:26Z","updated_at":"2015-11-18T19:07:28Z","closed_at":null,"body":"I'm trying to access a practitioner's details via UHN's DSTU2 server.\r\nI have downloaded the NuGet package for DSTU2.\r\n\r\nThe code is as follows in an ASP.NET MVC application.\r\n\r\nvar client = new FhirClient(\"http://fhirtest.uhn.ca/baseDstu2\");\r\nBundle results;\r\n\r\nresults = client.Search<Practitioner>(new string[] { \"_id=22529\"});\r\n//this does return a bundle with the practitioner I am searching for\r\n\r\nforeach (var entry in results.Entry)\r\n{\r\n          //here I am unable to access the practitioners address/birthdate, etc.\r\n          var address = entry.Resource..... (there is no option to choose address/gender/birthdate)\r\n}\r\n\r\nWhen I open the returned object, I can see the address/birthdate but I can not access it, as once resource is opened, the next drop down is [Hl7.Fhir.Model.Practitioner] which I can not get into with any of the available commands.\r\n\r\nPlease assist :)"},"comment":{"url":"https://api.github.com/repos/ewoutkramer/fhir-net-api/issues/comments/157824820","html_url":"https://github.com/ewoutkramer/fhir-net-api/issues/130#issuecomment-157824820","issue_url":"https://api.github.com/repos/ewoutkramer/fhir-net-api/issues/130","id":157824820,"user":{"login":"ewoutkramer","id":2276305,"avatar_url":"https://avatars.githubusercontent.com/u/2276305?v=3","gravatar_id":"","url":"https://api.github.com/users/ewoutkramer","html_url":"https://github.com/ewoutkramer","followers_url":"https://api.github.com/users/ewoutkramer/followers","following_url":"https://api.github.com/users/ewoutkramer/following{/other_user}","gists_url":"https://api.github.com/users/ewoutkramer/gists{/gist_id}","starred_url":"https://api.github.com/users/ewoutkramer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewoutkramer/subscriptions","organizations_url":"https://api.github.com/users/ewoutkramer/orgs","repos_url":"https://api.github.com/users/ewoutkramer/repos","events_url":"https://api.github.com/users/ewoutkramer/events{/privacy}","received_events_url":"https://api.github.com/users/ewoutkramer/received_events","type":"User","site_admin":false},"created_at":"2015-11-18T19:07:28Z","updated_at":"2015-11-18T19:07:28Z","body":"Ø  var address = entry.Resource..... (there is no option to choose address/gender/birthdate)\r\n\r\nThe problem is that entry.Resource is of type Resource, so, you won’t have access to all the specific properties, unless you cast entry.Resource to the actual type, so\r\n\r\nVar address = ((Patient)(entry.Resource)).Address;\r\n\r\nThat should work….\r\n\r\n   Ewout\r\n\r\n\r\n\r\nFrom: taramoskam [mailto:notifications@github.com]\r\nSent: woensdag 18 november 2015 20:01\r\nTo: ewoutkramer/fhir-net-api <fhir-net-api@noreply.github.com>\r\nSubject: [fhir-net-api] Unable to get practitioner details via search (#130)\r\n\r\n\r\nI'm trying to access a practitioner's details via UHN's DSTU2 server.\r\nI have downloaded the NuGet package for DSTU2.\r\n\r\nThe code is as follows in an ASP.NET MVC application.\r\n\r\nvar client = new FhirClient(\"http://fhirtest.uhn.ca/baseDstu2\");\r\nBundle results;\r\n\r\nresults = client.Search(new string[] { \"_id=22529\"});\r\n//this does return a bundle with the practitioner I am searching for\r\n\r\nforeach (var entry in results.Entry)\r\n{\r\n//here I am unable to access the practitioners address/birthdate, etc.\r\nvar address = entry.Resource..... (there is no option to choose address/gender/birthdate)\r\n}\r\n\r\nWhen I open the returned object, I can see the address/birthdate but I can not access it, as once resource is opened, the next drop down is [Hl7.Fhir.Model.Practitioner] which I can not get into with any of the available commands.\r\n\r\nPlease assist :)\r\n\r\n—\r\nReply to this email directly or view it on GitHub<https://github.com/ewoutkramer/fhir-net-api/issues/130>.\r\n"}}