/** * Gets the first repetition for <b>type</b> (), * creating it if it does not already exist. * * <p> * <b>Definition:</b> * Role of participant in encounter * </p> */ public BoundCodeableConceptDt<ParticipantTypeEnum> getTypeFirstRep() { if (getType().size() == 0) { addType(); } return getType().get(0); }
public static boolean removeType(Participant participant, CodingDt participationType) { CodeableConceptDt cpt; boolean found = false; while ((cpt = findType(participant, participationType)) != null) { participant.getType().remove(cpt); found = true; } return found; }
/** * Add a value for <b>type</b> () * * <p> * <b>Definition:</b> * Role of participant in encounter * </p> */ public BoundCodeableConceptDt<ParticipantTypeEnum> addType() { BoundCodeableConceptDt<ParticipantTypeEnum> retVal = new BoundCodeableConceptDt<ParticipantTypeEnum>(ParticipantTypeEnum.VALUESET_BINDER); getType().add(retVal); return retVal; }
/** * Add a value for <b>type</b> () using an enumerated type. This * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory * or contain the desirable codes. If you wish to use codes other than those which are built-in, * you may also use the {@link #addType()} method. * * <p> * <b>Definition:</b> * Role of participant in encounter * </p> */ public BoundCodeableConceptDt<ParticipantTypeEnum> addType(ParticipantTypeEnum theValue) { BoundCodeableConceptDt<ParticipantTypeEnum> retVal = new BoundCodeableConceptDt<ParticipantTypeEnum>(ParticipantTypeEnum.VALUESET_BINDER, theValue); getType().add(retVal); return retVal; }
private static CodeableConceptDt findType(Participant participant, CodingDt participationType) { if (participant != null) { for (CodeableConceptDt tp : participant.getType()) { for (CodingDt coding : tp.getCoding()) { if (coding.getSystem().equals(participationType.getSystem()) && coding.getCode().equals(participationType.getCode())) { return tp; } } } } return null; }
/** * Sets the value(s), and clears any existing value(s) for <b>type</b> () * * <p> * <b>Definition:</b> * Role of participant in encounter * </p> */ public Participant setType(ParticipantTypeEnum theValue) { getType().clear(); addType(theValue); return this; }