/** * Returns the URL for this extension. * <p> * Note that before HAPI 0.9 this method returned a {@link StringDt} but as of * HAPI 0.9 this method returns a plain string. This was changed because it does not make sense to use a StringDt here * since the URL itself can not contain extensions and it was therefore misleading. * </p> */ @Override public String getUrl() { return myUrl != null ? myUrl.getValue() : null; }
/** * Sets the value for <b>path</b> () * * <p> * <b>Definition:</b> * The path identifies the element and is expressed as a \".\"-separated list of ancestor elements, beginning with the name of the resource or extension * </p> */ public ElementDefinitionDt setPath( String theString) { myPath = new StringDt(theString); return this; }
/** * {@inheritDoc} */ @Override public void setValueAsQueryToken(FhirContext theContext, String theParamName, String theQualifier, String theValue) { setValue(theValue); }
public TokenCriterion(String theParamName, List<BaseIdentifierDt> theValue) { myName=theParamName; StringBuilder b = new StringBuilder(); for (BaseIdentifierDt next : theValue) { if (next.getSystemElement().isEmpty() && next.getValueElement().isEmpty()) { continue; } if (b.length() > 0) { b.append(','); } b.append(toValue(next.getSystemElement().getValueAsString(), next.getValueElement().getValue())); } myValue = b.toString(); }
name.addFamily().setValue("Shmoe"); StringDt given = name.addGiven(); given.setValue("Joe"); ExtensionDt ext2 = new ExtensionDt(false, "http://examples.com#moreext", new StringDt("Hello")); given.addUndeclaredExtension(ext2);
if (!allOptional) { query = rest.addQuery(); query.getDocumentation().setValue(searchMethodBinding.getDescription()); query.addUndeclaredExtension(false, ExtensionConstants.QUERY_RETURN_TYPE, new CodeDt(resourceName)); for (String nextInclude : searchMethodBinding.getIncludes()) { query.addUndeclaredExtension(false, ExtensionConstants.QUERY_ALLOWED_INCLUDE, new StringDt(nextInclude));
@Override public void addRootPropertiesToBundle(String theAuthor, String theServerBase, String theCompleteUrl, Integer theTotalResults, BundleTypeEnum theBundleType, IPrimitiveType<Date> theLastUpdated) { if (myBundle.getAuthorName().isEmpty()) { myBundle.getAuthorName().setValue(theAuthor); } if (theLastUpdated != null && myBundle.getUpdated().isEmpty() && isNotBlank(theLastUpdated.getValueAsString())) { myBundle.getUpdated().setValueAsString(theLastUpdated.getValueAsString()); } if (myBundle.getBundleId().isEmpty()) { myBundle.getBundleId().setValue(UUID.randomUUID().toString()); } if (myBundle.getLinkBase().isEmpty()) { myBundle.getLinkBase().setValue(theServerBase); } if (myBundle.getLinkSelf().isEmpty()) { myBundle.getLinkSelf().setValue(theCompleteUrl); } if (theBundleType != null && myBundle.getType().isEmpty()) { myBundle.getType().setValueAsString(theBundleType.getCode()); } if (myBundle.getTotalResults().isEmpty() && theTotalResults != null) { myBundle.getTotalResults().setValue(theTotalResults); } }
@Override public String getValueAsQueryToken(FhirContext theContext) { StringBuilder b= new StringBuilder(); if (getComparatorElement() != null) { b.append(getComparatorElement().getValue()); } if (!getValueElement().isEmpty()) { b.append(getValueElement().getValueAsString()); } b.append('|'); if (!getSystemElement().isEmpty()) { b.append(getSystemElement().getValueAsString()); } b.append('|'); if (!getUnitsElement().isEmpty()) { b.append(getUnitsElement().getValueAsString()); } return b.toString(); }
/** * {@inheritDoc} */ @Override public String getValueAsQueryToken(FhirContext theContext) { UriDt system = getSystemElement(); StringDt value = getValueElement(); if (system.getValueAsString() != null) { return ParameterUtil.escape(StringUtils.defaultString(system.getValueAsString())) + '|' + ParameterUtil.escape(value.getValueAsString()); } return ParameterUtil.escape(value.getValueAsString()); }
private void extractTokensFromCoding(List<String> theSystems, List<String> theCodes, ResourceTable theEntity, Set<BaseResourceIndexedSearchParam> theListToPopulate, RuntimeSearchParam theParameterDef, CodingDt nextCoding) { if (nextCoding != null && !nextCoding.isEmpty()) { String nextSystem = nextCoding.getSystemElement().getValueAsString(); String nextCode = nextCoding.getCodeElement().getValue(); if (isNotBlank(nextSystem) || isNotBlank(nextCode)) { theSystems.add(nextSystem); theCodes.add(nextCode); } if (!nextCoding.getDisplayElement().isEmpty()) { addStringParam(theEntity, theListToPopulate, theParameterDef, nextCoding.getDisplayElement().getValue()); } } }
item.getTextElement().addUndeclaredExtension(extension); extension.addUndeclaredExtension(new ExtensionDt(false, "cont", new StringDt("hola"))); name.addFamily().setValue("Shmoe"); given.setValue("Joe"); ExtensionDt givenExt = new ExtensionDt(false, "http://examples.com#moreext", new StringDt("Hello")); given.addUndeclaredExtension(givenExt);
@Override public String getValueAsQueryToken(FhirContext theContext) { StringBuilder b= new StringBuilder(); if (getComparatorElement() != null) { b.append(getComparatorElement().getValue()); } if (!getValueElement().isEmpty()) { b.append(getValueElement().getValueAsString()); } b.append('|'); if (!getSystemElement().isEmpty()) { b.append(getSystemElement().getValueAsString()); } b.append('|'); if (!getUnitsElement().isEmpty()) { b.append(getUnitsElement().getValueAsString()); } return b.toString(); }
BaseQuantityDt param = (BaseQuantityDt) theParam; systemValue = param.getSystemElement().getValueAsString(); unitsValue = param.getUnitsElement().getValueAsString(); cmpValue = ParamPrefixEnum.forValue(param.getComparatorElement().getValueAsString()); valueValue = param.getValueElement().getValue();
/** * Returns the value of this string, or <code>null</code> */ @Override public String toString() { return getValue(); }
/** * Sets the value for <b>name</b> () * * <p> * <b>Definition:</b> * The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element * </p> */ public ElementDefinitionDt setName( String theString) { myName = new StringDt(theString); return this; }
String value = nextValue.getValueElement().getValue(); if (isNotBlank(value)) { systems.add(system); codes.add(nextValue.getValueElement().getValue()); } else if (nextObject instanceof BoundCodeDt) { BoundCodeDt<?> obj = (BoundCodeDt<?>) nextObject; } else if (nextObject instanceof CodeableConceptDt) { CodeableConceptDt nextCC = (CodeableConceptDt) nextObject; if (!nextCC.getTextElement().isEmpty()) { addStringParam(theEntity, retVal, nextSpDef, nextCC.getTextElement().getValue());
public void namesHard() { // START SNIPPET: namesHard Patient patient = new Patient(); HumanNameDt name = patient.addName(); StringDt family = name.addFamily(); family.setValue("Smith"); StringDt firstName = name.addGiven(); firstName.setValue("Rob"); StringDt secondName = name.addGiven(); secondName.setValue("Bruce"); // END SNIPPET: namesHard }
@Override public Map<String, String> getDetail() { if(myPatient != null){ List<IdentifierDt> ids = myPatient.getIdentifier(); if(ids != null && !ids.isEmpty()){ Map<String, String> detailMap = new HashMap<String, String>(); for(IdentifierDt id: ids){ String key = id.getSystem().getValueAsString(); String value = id.getValue().getValueAsString(); detailMap.put(key, value); } return detailMap; } } return null; }
/** * {@inheritDoc} */ @Override public String getValueAsQueryToken(FhirContext theContext) { return getValue(); }
/** * Sets the value for <b>nameReference</b> () * * <p> * <b>Definition:</b> * Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element * </p> */ public ElementDefinitionDt setNameReference( String theString) { myNameReference = new StringDt(theString); return this; }