/** * Gets the value(s) for <b>method</b> (Technique used to perform collection). * creating it if it does * not exist. Will not return <code>null</code>. * * <p> * <b>Definition:</b> * A coded value specifying the technique that is used to perform the procedure * </p> */ public BoundCodeableConceptDt<SpecimenCollectionMethodEnum> getMethodElement() { if (myMethod == null) { myMethod = new BoundCodeableConceptDt<SpecimenCollectionMethodEnum>(SpecimenCollectionMethodEnum.VALUESET_BINDER); } return myMethod; }
/** * Constructor */ public BoundCodeableConceptDt(IValueSetEnumBinder<T> theBinder, Collection<T> theValues) { myBinder = theBinder; setValueAsEnum(theValues); }
/** * Sets the {@link #getCoding()} to contain a coding with the code and * system defined by the given enumerated type, AND clearing any existing * codings first. If theValue is null, existing codings are cleared and no * codings are added. * * @param theValue * The value to add, or <code>null</code> */ public void setValueAsEnum(T theValue) { getCoding().clear(); if (theValue == null) { return; } getCoding().add(new CodingDt(myBinder.toSystemString(theValue), myBinder.toCodeString(theValue))); }
@Override public Map<String, String> getDetail() { Map<String, String> details = new HashMap<String, String>(); details.put("startDate", myEncounter.getPeriod().getStart().getValueAsString()); details.put("endDate", myEncounter.getPeriod().getEnd().getValueAsString()); details.put("service", myEncounter.getServiceProvider().getDisplay().getValue()); details.put("type", myEncounter.getTypeFirstRep().getText().getValue()); details.put("status", myEncounter.getStatus().getValueAsString()); details.put("subject", myEncounter.getSubject().getReference().getValue()); return details; }
/** * Sets the {@link #getCoding()} to contain a coding with the code and * system defined by the given enumerated types, AND clearing any existing * codings first. If theValue is null, existing codings are cleared and no * codings are added. * * @param theValues * The values to add, or <code>null</code> */ public void setValueAsEnum(Collection<T> theValues) { getCoding().clear(); if (theValues != null) { for (T next : theValues) { getCoding().add(new CodingDt(myBinder.toSystemString(next), myBinder.toCodeString(next))); } } }
@Override public String getDescription() { if(myEncounter != null){ String type = myEncounter.getTypeFirstRep().getText().getValue(); String status = myEncounter.getStatus().getValueAsString(); String startDate = myEncounter.getPeriod().getStart().getValueAsString(); String endDate = myEncounter.getPeriod().getEnd().getValueAsString(); return "Encounter: " + type + ": " + status +", "+ startDate + " - " + endDate; } return null; }
/** * Gets the value(s) for <b>gender</b> (Gender for administrative purposes). * creating it if it does * not exist. Will not return <code>null</code>. * * <p> * <b>Definition:</b> * Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes. * </p> */ public BoundCodeableConceptDt<AdministrativeGenderCodesEnum> getGenderElement() { if (myGender == null) { myGender = new BoundCodeableConceptDt<AdministrativeGenderCodesEnum>(AdministrativeGenderCodesEnum.VALUESET_BINDER); } return myGender; }
/** * Constructor */ public BoundCodeableConceptDt(IValueSetEnumBinder<T> theBinder, T theValue) { myBinder = theBinder; setValueAsEnum(theValue); }
/** * Loops through the {@link #getCoding() codings} in this codeable concept * and returns the first bound enumerated type that matches. <b>Use * caution</b> using this method, see the return description for more * information. * * @return Returns the bound enumerated type, or <code>null</code> if none * are found. Note that a null return value doesn't neccesarily * imply that this Codeable Concept has no codes, only that it has * no codes that match the enum. */ public Set<T> getValueAsEnum() { Set<T> retVal = new HashSet<T>(); for (CodingDt next : getCoding()) { if (next == null) { continue; } T nextT = myBinder.fromCodeString(defaultString(next.getCode().getValue()), defaultString(next.getSystem().getValueAsString())); if (nextT != null) { retVal.add(nextT); } else { // TODO: throw special exception type? } } return retVal; }
/** * Gets the value(s) for <b>type</b> (Indicates the type of function performed at the location). * creating it if it does * not exist. Will not return <code>null</code>. * * <p> * <b>Definition:</b> * Indicates the type of function performed at the location * </p> */ public BoundCodeableConceptDt<LocationTypeEnum> getType() { if (myType == null) { myType = new BoundCodeableConceptDt<LocationTypeEnum>(LocationTypeEnum.VALUESET_BINDER); } return myType; }
/** * Sets the value(s) for <b>route</b> (How vaccine entered body) * * <p> * <b>Definition:</b> * The path by which the vaccine product is taken into the body. * </p> */ public Immunization setRoute(ImmunizationRouteCodesEnum theValue) { getRoute().setValueAsEnum(theValue); return this; }
/** * Gets the value(s) for <b>type</b> (Indicates the type of function performed at the location). * creating it if it does * not exist. Will not return <code>null</code>. * * <p> * <b>Definition:</b> * Indicates the type of function performed at the location * </p> */ public BoundCodeableConceptDt<LocationTypeEnum> getTypeElement() { if (myType == null) { myType = new BoundCodeableConceptDt<LocationTypeEnum>(LocationTypeEnum.VALUESET_BINDER); } return myType; }
/** * Sets the value(s) for <b>gender</b> (Gender for administrative purposes) * * <p> * <b>Definition:</b> * Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes. * </p> */ public Patient setGender(AdministrativeGenderCodesEnum theValue) { getGender().setValueAsEnum(theValue); return this; }
/** * Gets the value(s) for <b>name</b> (Name/code for a predefined list of questions). * creating it if it does * not exist. Will not return <code>null</code>. * * <p> * <b>Definition:</b> * Structured name for a predefined list of questions this questionnaire is responding to * </p> */ public BoundCodeableConceptDt<QuestionnaireNameEnum> getNameElement() { if (myName == null) { myName = new BoundCodeableConceptDt<QuestionnaireNameEnum>(QuestionnaireNameEnum.VALUESET_BINDER); } return myName; }
/** * Sets the value(s) for <b>name</b> (Code or name of the section on a questionnaire) * * <p> * <b>Definition:</b> * Structured name for a section of a predefined list of questions this questionnaire is responding to. * </p> */ public Group setName(QuestionnaireGroupNameEnum theValue) { getName().setValueAsEnum(theValue); return this; }
/** * Gets the value(s) for <b>name</b> (Code or name of the section on a questionnaire). * creating it if it does * not exist. Will not return <code>null</code>. * * <p> * <b>Definition:</b> * Structured name for a section of a predefined list of questions this questionnaire is responding to. * </p> */ public BoundCodeableConceptDt<QuestionnaireGroupNameEnum> getName() { if (myName == null) { myName = new BoundCodeableConceptDt<QuestionnaireGroupNameEnum>(QuestionnaireGroupNameEnum.VALUESET_BINDER); } return myName; }
/** * Sets the value(s) for <b>method</b> (Technique used to perform collection) * * <p> * <b>Definition:</b> * A coded value specifying the technique that is used to perform the procedure * </p> */ public Collection setMethod(SpecimenCollectionMethodEnum theValue) { getMethod().setValueAsEnum(theValue); return this; }
/** * Gets the value(s) for <b>admitSource</b> (From where patient was admitted (physician referral, transfer)). * creating it if it does * not exist. Will not return <code>null</code>. * * <p> * <b>Definition:</b> * * </p> */ public BoundCodeableConceptDt<AdmitSourceEnum> getAdmitSourceElement() { if (myAdmitSource == null) { myAdmitSource = new BoundCodeableConceptDt<AdmitSourceEnum>(AdmitSourceEnum.VALUESET_BINDER); } return myAdmitSource; }
/** * Sets the value(s) for <b>name</b> (Name/code for a predefined list of questions) * * <p> * <b>Definition:</b> * Structured name for a predefined list of questions this questionnaire is responding to * </p> */ public Questionnaire setName(QuestionnaireNameEnum theValue) { getName().setValueAsEnum(theValue); return this; }
/** * Gets the value(s) for <b>forecastStatus</b> (Vaccine administration status). * creating it if it does * not exist. Will not return <code>null</code>. * * <p> * <b>Definition:</b> * Vaccine administration status * </p> */ public BoundCodeableConceptDt<ImmunizationRecommendationStatusCodesEnum> getForecastStatusElement() { if (myForecastStatus == null) { myForecastStatus = new BoundCodeableConceptDt<ImmunizationRecommendationStatusCodesEnum>(ImmunizationRecommendationStatusCodesEnum.VALUESET_BINDER); } return myForecastStatus; }