.addAddressLine("Medway")
.addAddressLine("Kent")
.setPostcode("ME5 FL5")
.setAddressUse(AddressType.PhysicalVisit.code));
template.addTelephoneNumber(new Telecom()
.setTelecom("tel:01634772367")
.setTelecomType(TelecomUseType.HomeAddress.code));
template.addTelephoneNumber(new Telecom()
.setTelecom("mailto:mark.smith@emailfree.co.uk")
.setTelecomType(TelecomUseType.HomeAddress.code));
template.addTelephoneNumber(new Telecom()
.setTelecom("tel:01634451628")
.setTelecomType(TelecomUseType.EmergencyContact.code));
// Patient
template.addPatientName(new PersonName()
.setTitle("Mr")
.setGivenName("Mark")
.setFamilyName("Smith"));
template.setSex(Sex._1);
template.setBirthTime(new DateValue("19490101"));
// Language
LanguageCommunication language = new LanguageCommunication();
language.setLanguage(HumanLanguage._en.code);
language.setMode(LanguageAbilityMode._ESP);
language.setProficiencyLevel(LanguageAbilityProficiency._G);
language.setPreferenceIndNullFlavour(NullFlavour.NotAsked.code);
template.addLanguages(language);
// Organisation - Registered GP:
template.setRegisteredGPOrgId(new OrgID()
.setID("V396F")
.setType(OrgIDType.ODSOrgID.code));
template.setRegisteredGPOrgName("Medway Medical Practice");
template.addRegisteredGPTelephone(new Telecom()
.setTelecom("tel:01634111222")
.setTelecomType(TelecomUseType.WorkPlace.code));
template.setRegisteredGPAddress(new Address()
.addAddressLine("Springer Street")
.addAddressLine("Medway")