--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/92586b43-1a02-4695-a313-4ec1584d9824n%40googlegroups.com.
Patient newPatient = new Patient();
// Define the extension
Extension birthplace = new Extension();
// Define the Address
Address address = new Address();
address.setCountry("Chile");
// Set the Address to the extension
birthplace.setUrl("http://hl7.org/fhir/StructureDefinition/patient-birthPlace");
birthplace.setValue(address);
// Add the birthdate
newPatient.setBirthDateElement(new DateType("2015-11-18"));
// Set the extension to the birthdate Element
newPatient.getBirthDateElement().addExtension(birthplace);
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/A81E5B83-134E-4854-BF25-3050D06DAE88%40gmail.com.
patient.getBirthDateElement().addExtension("http://example.com/fhir/StructureDefinition/date-type", new StringType("A"));
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/d7611413-165e-4420-8697-f09401594d13n%40googlegroups.com.