docs: @Override
  	public Set<BaseResourceIndexedSearchParam> extractSearchParamTokens(ResourceTable theEntity, IBaseResource theResource) {
  		HashSet<BaseResourceIndexedSearchParam> retVal = new HashSet<BaseResourceIndexedSearchParam>();
  
  		String useSystem = null;
  		if (theResource instanceof CodeSystem) {
  			CodeSystem cs = (CodeSystem) theResource;
  			useSystem = cs.getUrl();
  		}
  
  		Collection<RuntimeSearchParam> searchParams = getSearchParams(theResource);
  		for (RuntimeSearchParam nextSpDef : searchParams) {
  			if (nextSpDef.getParamType() != RestSearchParameterTypeEnum.TOKEN) {
  				continue;
  			}
  
  			String nextPath = nextSpDef.getPath();
  			if (isBlank(nextPath)) {
  				continue;
  			}
  
  			boolean multiType = false;
  			if (nextPath.endsWith("[x]")) {
  				multiType = true;
  			}
  
  			List<String> systems = new ArrayList<>();
  			List<String> codes = new ArrayList<>();
  
  			// String needContactPointSystem = null;
  			// if (nextPath.contains(".where(system='phone')")) {
  			// nextPath = nextPath.replace(".where(system='phone')", "");
  			// needContactPointSystem = "phone";
  			// }
  			// if (nextPath.contains(".where(system='email')")) {
  			// nextPath = nextPath.replace(".where(system='email')", "");
  			// needContactPointSystem = "email";
  			// }
  
  			for (Object nextObject : extractValues(nextPath, theResource)) {
  
  				if (nextObject == null) {
  					continue;
  				}
  
  				// Patient:language
  				if (nextObject instanceof PatientCommunicationComponent) {
  					PatientCommunicationComponent nextValue = (PatientCommunicationComponent) nextObject;
  					nextObject = nextValue.getLanguage();
  				}
  
  				if (nextObject instanceof Identifier) {
  					Identifier nextValue = (Identifier) nextObject;
  					if (nextValue.isEmpty()) {
  						continue;
  					}
  					String system = StringUtils.defaultIfBlank(nextValue.getSystemElement().getValueAsString(), null);
  					String value = nextValue.getValueElement().getValue();
  					if (isNotBlank(value)) {
  						systems.add(system);
  						codes.add(value);
  					}
  
  					if (isNotBlank(nextValue.getType().getText())) {
  						addStringParam(theEntity, retVal, nextSpDef, nextValue.getType().getText());
  					}
  
  				} else if (nextObject instanceof ContactPoint) {
  					ContactPoint nextValue = (ContactPoint) nextObject;
  					if (nextValue.isEmpty()) {
  						continue;
  					}
  					systems.add(nextValue.getSystemElement().getValueAsString());
  					codes.add(nextValue.getValueElement().getValue());
  				} else if (nextObject instanceof Enumeration<?>) {
  					Enumeration<?> obj = (Enumeration<?>) nextObject;
  					String system = extractSystem(obj);
  					String code = obj.getValueAsString();
  					if (isNotBlank(code)) {
  						systems.add(system);
  						codes.add(code);
  					}
  				} else if (nextObject instanceof IPrimitiveType<?>) {
  					IPrimitiveType<?> nextValue = (IPrimitiveType<?>) nextObject;
  					if (nextValue.isEmpty()) {
  						continue;
  					}
  					if ("CodeSystem.concept.code".equals(nextPath)) {
  						systems.add(useSystem);
  					} else {
  						systems.add(null);
  					}
  					codes.add(nextValue.getValueAsString());
  				} else if (nextObject instanceof Coding) {
  					Coding nextValue = (Coding) nextObject;
  					extractTokensFromCoding(systems, codes, theEntity, retVal, nextSpDef, nextValue);
  				} else if (nextObject instanceof CodeableConcept) {
  					CodeableConcept nextCC = (CodeableConcept) nextObject;
  					if (!nextCC.getTextElement().isEmpty()) {
  						addStringParam(theEntity, retVal, nextSpDef, nextCC.getTextElement().getValue());
  					}
  
  					extractTokensFromCodeableConcept(systems, codes, nextCC, theEntity, retVal, nextSpDef);
  				} else if (nextObject instanceof CapabilityStatementRestSecurityComponent) {
  					// Conformance.security search param points to something kind of useless right now - This should probably
  					// be fixed.
  					CapabilityStatementRestSecurityComponent sec = (CapabilityStatementRestSecurityComponent) nextObject;
  					for (CodeableConcept nextCC : sec.getService()) {
  						extractTokensFromCodeableConcept(systems, codes, nextCC, theEntity, retVal, nextSpDef);
  					}
  				} else if (nextObject instanceof LocationPositionComponent) {
  					ourLog.warn("Position search not currently supported, not indexing location");
  					continue;
  				} else {
  					if (!multiType) {
  						throw new ConfigurationException("Search param " + nextSpDef.getName() + " is of unexpected datatype: " + nextObject.getClass());
  					} else {
  						continue;
  					}
  				}
  			}
  
  			assert systems.size() == codes.size() : "Systems contains " + systems + ", codes contains: " + codes;
  
  			Set<Pair<String, String>> haveValues = new HashSet<Pair<String, String>>();
  			for (int i = 0; i < systems.size(); i++) {
  				String system = systems.get(i);
  				String code = codes.get(i);
  				if (isBlank(system) && isBlank(code)) {
  					continue;
  				}
  
  				if (system != null && system.length() > ResourceIndexedSearchParamToken.MAX_LENGTH) {
  					system = system.substring(0, ResourceIndexedSearchParamToken.MAX_LENGTH);
  				}
  				if (code != null && code.length() > ResourceIndexedSearchParamToken.MAX_LENGTH) {
  					code = code.substring(0, ResourceIndexedSearchParamToken.MAX_LENGTH);
  				}
  
  				Pair<String, String> nextPair = Pair.of(system, code);
  				if (haveValues.contains(nextPair)) {
  					continue;
  				}
  				haveValues.add(nextPair);
  
  				ResourceIndexedSearchParamToken nextEntity;
  				nextEntity = new ResourceIndexedSearchParamToken(nextSpDef.getName(), system, code);
  				nextEntity.setResource(theEntity);
  				retVal.add(nextEntity);
  
  			}
  
  		}
  
  		return retVal;
  	}