template.setId("8371D2F1-123F-4A14-A1AC-C6C8023103CF");
template.setClassCode(HL7ActType.Procedure.code);
template.setEventCode(new CodedValue("73761001", "colonoscopy", "2.16.840.1.113883.2.1.3.2.4.15"));
template.setEffectiveTime(
new DateRange(new DateValue("201105192000+01"),
new DateValue("201105192045+01")));
PersonWithOrganizationUniversal person = new PersonWithOrganizationUniversal();
person.addPersonId(new PersonID().setNullFlavour(NullFlavour.NI.code));
person.setPersonName(new PersonName("Joe Bloggs"));