Exemplo n.º 1
0
 @Override
 public void validate() {
   super.validate();
   ActiveParticipant user = getRequestingActiveParticipants();
   if (user == null) {
     throw new IllegalStateException("No Requesting User");
   }
   ParticipantObject patient = null;
   for (ParticipantObject po : participantObjects) {
     if (ParticipantObject.TypeCodeRole.PATIENT == po.getParticipantObjectTypeCodeRole()) {
       if (patient != null) {
         throw new IllegalStateException("Multiple Patient identification");
       }
       patient = po;
     }
   }
   if (patient == null) {
     throw new IllegalStateException("No Patient identification");
   }
 }
Exemplo n.º 2
0
 public ParticipantObject addPatient(String id, String name) {
   return addParticipantObject(ParticipantObject.createPatient(id, name));
 }