@Override
	protected List<Object> extractValues(String thePaths, IBaseResource theResource) {
		FHIRPathEngine fp = new FHIRPathEngine(myWorkerContext);

		List<Object> values = new ArrayList<>();
		String[] nextPathsSplit = SPLIT.split(thePaths);
		for (String nextPath : nextPathsSplit) {
			List<Base> allValues;
			try {
				allValues = fp.evaluate((Base) theResource, trim(nextPath));
			} catch (FHIRException e) {
				String msg = getContext().getLocalizer().getMessage(BaseSearchParamExtractor.class, "failedToExtractPaths", nextPath, e.toString());
				throw new InternalErrorException(msg, e);
			}
			if (allValues.isEmpty() == false) {
				values.addAll(allValues);
			}
		}

		for (int i = 0; i < values.size(); i++) {
			Object nextObject = values.get(i);
			if (nextObject instanceof Extension) {
				Extension nextExtension = (Extension) nextObject;
				nextObject = nextExtension.getValue();
				values.set(i, nextObject);
			}
		}

		return values;
	}
@ Override protected List < Object > extractValues ( String thePaths , IBaseResource theResource ) { FHIRPathEngine fp = new FHIRPathEngine ( myWorkerContext ) ; List < Object > values = new ArrayList < > ( ) ; String [ ] nextPathsSplit = SPLIT . split ( thePaths ) ; for ( String nextPath : nextPathsSplit ) { List < Base > allValues ; try { allValues = fp . evaluate ( ( Base ) theResource , trim ( nextPath ) ) ; } catch ( FHIRException e ) { String msg = getContext ( ) . getLocalizer ( ) . getMessage ( BaseSearchParamExtractor . class , "failedToExtractPaths" , nextPath , e . toString ( ) ) ; throw new InternalErrorException ( msg , e ) ; } if ( allValues . isEmpty ( ) == false ) { values . addAll ( allValues ) ; } } for ( int i = 0 ; i < values . size ( ) ; i ++ ) { Object nextObject = values . get ( i ) ; if ( nextObject instanceof Extension ) { Extension nextExtension = ( Extension ) nextObject ; nextObject = nextExtension . getValue ( ) ; values . set ( i , nextObject ) ; } } return values ; }
Override parent because we're using FHIRPath here