template.addRelatedPerson(new RelatedPersonDetails().setParticipant(rp6));
return template;
}
public static PrognosisAwareness createPrognosisAwareness() {
PrognosisAwareness template = new PrognosisAwareness();
template.setID("369FBB7A-2A86-11E2-B118-84C76088709B");
template.setEffectiveTime(new DateValue("201209111400+0000"));
template.setPrognosisAwareness(new CodedValue(PrognosisAwarenessSnCT._751941000000100, "#a6"));
// Main informal carer
PatientRelationshipParticipantRole carer = new PatientRelationshipParticipantRole();
carer.setPersonRole(JobRoleName._NR1980);
carer.setAddress(new Address().setNullFlavour(NullFlavour.NI.code));
// Note: The DMS specifies that if the person's ID is not known, an "NA" null flavour should
// be used. In the example XML however, a null flavour of "NI" is used, which is why we need
// to explicitly set that here.
carer.addID(new PersonID().setNullFlavour(NullFlavour.NI.code));
carer.addTelephoneNumber(new Telecom("tel:014722823451"));
carer.addTelephoneNumber(new Telecom("tel:07831191333"));
carer.setPersonName(new PersonName()
.setTitle("Mrs")
.setGivenName("Emily")
.setFamilyName("Smith"));
template.setMainInformalCarer(carer);
return template;
}