Skip to main content

BirthPlace

The SDK supports this FHIR R4 extension for the Patient resource.

URL Definition

using FhirUkCore.Uris;

String extensionUrl = UkCoreUris.ExtensionBirthPlace;

HasBirthPlace

To test whether the extension has been applied to a Patient resource, the HasBirthPlace method can be used.
This returns a boolean.

using Hl7.Fhir.Model;

Boolean existsBirthSex = pat.HasBirthPlace();

SetBirthPlace

To set the birthplace for a Patient, the SetBirthPlace method can be used.
This accepts an Address datatype.

using Hl7.Fhir.Model;

Patient pat = new Patient();

Address birthCountry = new Address() { Country = "Scotland" };
pat.SetBirthPlace(birthCountry);

GetBirthPlace

To retrieve the birthplace from a Patient resource, the GetBirthPlace method can be used.
This will return a null if no data is available.

using Hl7.Fhir.Model;

Address place = pat.GetBirthPlace();