template.setEncompassingEncounter(createEncounter());
return template;
}
public static PatientUniversal createPatient() {
PatientUniversal template = new PatientUniversal();
template.addPatientID(new PatientID()
.setPatientID("K12345")
.setAssigningOrganisation("V396A:Medway PCT")
.setPatientIDType(PatientIDType.LocalID.code));
template.addPatientID(new PatientID()
.setPatientID("993254128")
.setPatientIDType(PatientIDType.UnverifiedNHSNumber.code));
template.addAddress(new Address()
.addAddressLine("17, County Court")
.addAddressLine("Woodtown")
.addAddressLine("Medway")
.setPostcode("ME5 FS3")
.setAddressUse(AddressType.Home.code));
template.addAddress(new Address()
.addAddressLine("Hightown Retirement Home")
.addAddressLine("2, Brancaster Road")
.addAddressLine("Medway")
.addAddressLine("Kent")
.setPostcode("ME5 FL5")
.setAddressUse(AddressType.PhysicalVisit.code));
template.addTelephoneNumber(new Telecom()
.setTelecom("tel:01634775667")
.setTelecomType(TelecomUseType.HomeAddress.code));
template.addTelephoneNumber(new Telecom()
.setTelecom("tel:01634451628")
.setTelecomType(TelecomUseType.VacationHome.code));
template.addTelephoneNumber(new Telecom()
.setTelecom("mailto:mark.smith@emailfree.co.uk")
.setTelecomType(TelecomUseType.HomeAddress.code));
template.addPatientName(new PersonName()
.setTitle("Mr")
.setGivenName("Mark")
.setFamilyName("Smith"));
template.setSex(Sex._Male);
template.setBirthTime(new DateValue("19490101"));
// Language
LanguageCommunication language = new LanguageCommunication();
language.setLanguage(HumanLanguage._en.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")
.setPostcode("ME5 5TY")
.setAddressUse(AddressType.WorkPlace.code));
return template;