template.setID("EF0C2E84-2A89-11E2-A57D-D9CB6088709B");
PatientRelationshipParticipantRole rp = new PatientRelationshipParticipantRole();
rp.setPersonRole(JobRoleName._NR1980);
rp.setAddress(new Address().setNullFlavour(NullFlavour.NI.code));
rp.addTelephoneNumber(new Telecom("tel:014722823451"));
rp.addTelephoneNumber(new Telecom("tel:07831191333"));
rp.setPersonName(new PersonName()
.setTitle("Mrs")
.setGivenName("Emily")
.setFamilyName("Smith"));
template.addRelatedPerson(new RelatedPersonDetails().setParticipant(rp));
PatientRelationshipParticipantRole rp2 = new PatientRelationshipParticipantRole();
rp2.setPersonRole(JobRoleName._NR1990);
rp2.setAssociatedJobRole(JobRoleName._NR2040);
rp2.setAddress(new Address().setNullFlavour(NullFlavour.NI.code));
rp2.addTelephoneNumber(new Telecom("tel:07833825701"));
rp2.setPersonName(new PersonName()
.setTitle("Ms")
.setGivenName("Niral")
.setFamilyName("Singh"));
template.addRelatedPerson(new RelatedPersonDetails().setParticipant(rp2));
PatientRelationshipParticipantRole rp3 = new PatientRelationshipParticipantRole();
rp3.setPersonRole(JobRoleName._NR2000);
rp3.setAddress(new Address().setNullFlavour(NullFlavour.NI.code));
rp3.addTelephoneNumber(new Telecom("tel:07822761939"));
rp3.setPersonName(new PersonName()
.setTitle("Ms")
.setGivenName("Gemma")
.setFamilyName("Hopkins"));
template.addRelatedPerson(new RelatedPersonDetails().setParticipant(rp3));
PatientRelationshipParticipantRole rp4 = new PatientRelationshipParticipantRole();
rp4.setPersonRole(JobRoleName._NR2010);
rp4.setAddress(new Address().setNullFlavour(NullFlavour.NI.code));
rp4.addTelephoneNumber(new Telecom("tel:07871715735"));
rp4.setPersonName(new PersonName()
.setTitle("Mr")
.setGivenName("Alan")
.setFamilyName("Smith"));
template.addRelatedPerson(new RelatedPersonDetails().setParticipant(rp4));
PatientRelationshipParticipantRole rp5 = new PatientRelationshipParticipantRole();
rp5.addID(new PersonID()
.setID("110")
.setAssigningOrganisation("TAN01:NORTH EAST LINCOLNSHIRE CARE TRUST")
.setType(PersonIDType.LocalPersonID.code));
rp5.setPersonRole(JobRoleName._NR2020);
rp5.setAssociatedJobRole(JobRoleName._NR2050);
rp5.setAddress(new Address()
.addAddressLine("St James Hospital")
.addAddressLine("Potter Street")
.addAddressLine("Grimsby")
.setPostcode("DN3 6AA")
.setAddressUse(AddressType.WorkPlace.code));
rp5.addTelephoneNumber(new Telecom("tel:07334345612"));
rp5.setPersonName(new PersonName()
.setTitle("Mrs")
.setGivenName("Isabella")
.setFamilyName("Hopkins"));
rp5.setOrgId(new OrgID()
.setID("V356F")
.setType(OrgIDType.ODSOrgID.code));
rp5.setOrgDescription("St James Hospital");
template.addRelatedPerson(new RelatedPersonDetails().setParticipant(rp5));
PatientRelationshipParticipantRole rp6 = new PatientRelationshipParticipantRole();
rp6.addID(new PersonID()
.setID("112")
.setAssigningOrganisation("TAN01:NORTH EAST LINCOLNSHIRE CARE TRUST")
.setType(PersonIDType.LocalPersonID.code));
rp6.setPersonRole(JobRoleName._NR2030);
rp6.setAssociatedJobRole(JobRoleName._NR0260);
rp6.setAddress(new Address()
.addAddressLine("Freshney Green PCC")
.addAddressLine("Carlton Court")
.addAddressLine("Martin Road")
.addAddressLine("Grimsby")
.setPostcode("DN34 4GB")
.setAddressUse(AddressType.WorkPlace.code));
rp6.addTelephoneNumber(new Telecom("tel:07621846951"));
rp6.setPersonName(new PersonName()
.setTitle("Dr")
.setGivenName("John")
.setFamilyName("Manning"));
rp6.setOrgId(new OrgID()