Tabnine Logo
SearchParamExtractorDstu2
Code IndexAdd Tabnine to your IDE (free)

How to use
SearchParamExtractorDstu2
in
ca.uhn.fhir.jpa.searchparam.extractor

Best Java code snippets using ca.uhn.fhir.jpa.searchparam.extractor.SearchParamExtractorDstu2 (Showing top 13 results out of 315)

origin: jamesagnew/hapi-fhir

@Bean(autowire = Autowire.BY_TYPE)
public SearchParamExtractorDstu2 searchParamExtractor() {
  return new SearchParamExtractorDstu2();
}
origin: jamesagnew/hapi-fhir

private void extractTokensFromCodeableConcept(List<String> theSystems, List<String> theCodes, CodeableConceptDt theCodeableConcept, ResourceTable theEntity, Set<BaseResourceIndexedSearchParam> theListToPopulate, RuntimeSearchParam theParameterDef) {
  for (CodingDt nextCoding : theCodeableConcept.getCoding()) {
    extractTokensFromCoding(theSystems, theCodes, theEntity, theListToPopulate, theParameterDef, nextCoding);
  }
}
origin: jamesagnew/hapi-fhir

private void addSearchTerm(ResourceTable theEntity, Set<ResourceIndexedSearchParamString> retVal, String resourceName, String searchTerm) {
  if (isBlank(searchTerm)) {
    return;
  }
  if (searchTerm.length() > ResourceIndexedSearchParamString.MAX_LENGTH) {
    searchTerm = searchTerm.substring(0, ResourceIndexedSearchParamString.MAX_LENGTH);
  }
  ResourceIndexedSearchParamString nextEntity = new ResourceIndexedSearchParamString(getModelConfig(), resourceName, StringNormalizer.normalizeString(searchTerm), searchTerm);
  nextEntity.setResource(theEntity);
  retVal.add(nextEntity);
}
origin: jamesagnew/hapi-fhir

Collection<RuntimeSearchParam> searchParams = getSearchParams(theResource);
for (RuntimeSearchParam nextSpDef : searchParams) {
  if (nextSpDef.getParamType() != RestSearchParameterTypeEnum.TOKEN) {
  for (Object nextObject : extractValues(nextPath, theResource)) {
        addStringParam(theEntity, retVal, nextSpDef, nextValue.getType().getText());
    } else if (nextObject instanceof BoundCodeDt) {
      BoundCodeDt<?> obj = (BoundCodeDt<?>) nextObject;
      String system = extractSystem(obj);
      String code = obj.getValue();
      if (isNotBlank(code)) {
    } else if (nextObject instanceof CodingDt) {
      CodingDt nextValue = (CodingDt) nextObject;
      extractTokensFromCoding(systems, codes, theEntity, retVal, nextSpDef, nextValue);
    } else if (nextObject instanceof CodeableConceptDt) {
      CodeableConceptDt nextCC = (CodeableConceptDt) nextObject;
      if (!nextCC.getTextElement().isEmpty()) {
        addStringParam(theEntity, retVal, nextSpDef, nextCC.getTextElement().getValue());
      extractTokensFromCodeableConcept(systems, codes, nextCC, theEntity, retVal, nextSpDef);
    } else if (nextObject instanceof RestSecurity) {
        extractTokensFromCodeableConcept(systems, codes, nextCC, theEntity, retVal, nextSpDef);
origin: jamesagnew/hapi-fhir

String resourceName = getContext().getResourceDefinition(theResource).getName();
Collection<RuntimeSearchParam> searchParams = getSearchParams(theResource);
for (RuntimeSearchParam nextSpDef : searchParams) {
  if (nextSpDef.getParamType() != RestSearchParameterTypeEnum.STRING) {
      Questionnaire q = (Questionnaire) theResource;
      String title = q.getGroup().getTitle();
      addSearchTerm(theEntity, retVal, nextSpName, title);
  for (Object nextObject : extractValues(nextPath, theResource)) {
    if (nextObject == null || ((IDatatype) nextObject).isEmpty()) {
      continue;
      IPrimitiveDatatype<?> nextValue = (IPrimitiveDatatype<?>) nextObject;
      String searchTerm = nextValue.getValueAsString();
      addSearchTerm(theEntity, retVal, nextSpName, searchTerm);
    } else {
      if (nextObject instanceof BaseHumanNameDt) {
        allNames.addAll(nextHumanName.getGiven());
        for (StringDt nextName : allNames) {
          addSearchTerm(theEntity, retVal, nextSpName, nextName.getValue());
        allNames.add(nextAddress.getPostalCodeElement());
        for (StringDt nextName : allNames) {
          addSearchTerm(theEntity, retVal, nextSpName, nextName.getValue());
          addSearchTerm(theEntity, retVal, nextSpName, nextContact.getValue());
origin: jamesagnew/hapi-fhir

HashSet<ResourceIndexedSearchParamUri> retVal = new HashSet<ResourceIndexedSearchParamUri>();
Collection<RuntimeSearchParam> searchParams = getSearchParams(theResource);
for (RuntimeSearchParam nextSpDef : searchParams) {
  if (nextSpDef.getParamType() != RestSearchParameterTypeEnum.URI) {
  for (Object nextObject : extractValues(nextPath, theResource)) {
    if (nextObject == null || ((IDatatype) nextObject).isEmpty()) {
      continue;
origin: jamesagnew/hapi-fhir

@Override
protected List<Object> extractValues(String thePaths, IBaseResource theResource) {
  List<Object> values = new ArrayList<>();
  String[] nextPathsSplit = SPLIT.split(thePaths);
  FhirTerser t = getContext().newTerser();
  for (String nextPath : nextPathsSplit) {
    String nextPathTrimmed = nextPath.trim();
    List<Object> allValues;
    try {
      allValues = t.getValues(theResource, nextPathTrimmed);
    } catch (Exception e) {
      String msg = getContext().getLocalizer().getMessage(BaseSearchParamExtractor.class, "failedToExtractPaths", nextPath, e.toString());
      throw new InternalErrorException(msg, e);
    }
    for (Object next : allValues) {
      if (next instanceof IBaseExtension) {
        IBaseDatatype value = ((IBaseExtension) next).getValue();
        if (value != null) {
          values.add(value);
        }
      } else {
        values.add(next);
      }
    }
  }
  return values;
}
origin: jamesagnew/hapi-fhir

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());
    }
  }
}
origin: jamesagnew/hapi-fhir

HashSet<ResourceIndexedSearchParamQuantity> retVal = new HashSet<ResourceIndexedSearchParamQuantity>();
Collection<RuntimeSearchParam> searchParams = getSearchParams(theResource);
for (RuntimeSearchParam nextSpDef : searchParams) {
  if (nextSpDef.getParamType() != RestSearchParameterTypeEnum.QUANTITY) {
  for (Object nextObject : extractValues(nextPath, theResource)) {
    if (nextObject == null || ((IDatatype) nextObject).isEmpty()) {
      continue;
origin: jamesagnew/hapi-fhir

HashSet<ResourceIndexedSearchParamDate> retVal = new HashSet<>();
Collection<RuntimeSearchParam> searchParams = getSearchParams(theResource);
for (RuntimeSearchParam nextSpDef : searchParams) {
  if (nextSpDef.getParamType() != RestSearchParameterTypeEnum.DATE) {
  for (Object nextObject : extractValues(nextPath, theResource)) {
    if (nextObject == null) {
      continue;
origin: jamesagnew/hapi-fhir

private void addStringParam(ResourceTable theEntity, Set<BaseResourceIndexedSearchParam> retVal, RuntimeSearchParam nextSpDef, String value) {
  if (value.length() > ResourceIndexedSearchParamString.MAX_LENGTH) {
    value = value.substring(0, ResourceIndexedSearchParamString.MAX_LENGTH);
  }
  ResourceIndexedSearchParamString nextEntity = new ResourceIndexedSearchParamString(getModelConfig(), nextSpDef.getName(), StringNormalizer.normalizeString(value), value);
  nextEntity.setResource(theEntity);
  retVal.add(nextEntity);
}
origin: ca.uhn.hapi.fhir/hapi-fhir-jpaserver-base

@Bean(autowire = Autowire.BY_TYPE)
public SearchParamExtractorDstu2 searchParamExtractor() {
  return new SearchParamExtractorDstu2();
}
origin: jamesagnew/hapi-fhir

HashSet<ResourceIndexedSearchParamNumber> retVal = new HashSet<ResourceIndexedSearchParamNumber>();
Collection<RuntimeSearchParam> searchParams = getSearchParams(theResource);
for (RuntimeSearchParam nextSpDef : searchParams) {
  if (nextSpDef.getParamType() != RestSearchParameterTypeEnum.NUMBER) {
  for (Object nextObject : extractValues(nextPath, theResource)) {
    if (nextObject == null || ((IDatatype) nextObject).isEmpty()) {
      continue;
ca.uhn.fhir.jpa.searchparam.extractorSearchParamExtractorDstu2

Most used methods

  • <init>
  • addSearchTerm
  • addStringParam
  • extractSystem
  • extractTokensFromCodeableConcept
  • extractTokensFromCoding
  • extractValues
  • getContext
  • getModelConfig
  • getSearchParams

Popular in Java

  • Making http requests using okhttp
  • getContentResolver (Context)
  • scheduleAtFixedRate (Timer)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now