This commit is contained in:
James Agnew 2019-11-03 14:37:14 -05:00
parent d937889878
commit c3c67966fd
1 changed files with 7 additions and 2 deletions

View File

@ -51,6 +51,7 @@ public class SearchParamExtractorDstu3 extends BaseSearchParamExtractor implemen
@VisibleForTesting @VisibleForTesting
public SearchParamExtractorDstu3(ModelConfig theModelConfig, FhirContext theCtx, IValidationSupport theValidationSupport, ISearchParamRegistry theSearchParamRegistry) { public SearchParamExtractorDstu3(ModelConfig theModelConfig, FhirContext theCtx, IValidationSupport theValidationSupport, ISearchParamRegistry theSearchParamRegistry) {
super(theCtx, theSearchParamRegistry); super(theCtx, theSearchParamRegistry);
initFhirPathEngine(theValidationSupport);
start(); start();
} }
@ -74,9 +75,13 @@ public class SearchParamExtractorDstu3 extends BaseSearchParamExtractor implemen
super.start(); super.start();
if (myFhirPathEngine == null) { if (myFhirPathEngine == null) {
IValidationSupport support = myApplicationContext.getBean(IValidationSupport.class); IValidationSupport support = myApplicationContext.getBean(IValidationSupport.class);
IWorkerContext worker = new HapiWorkerContext(getContext(), support); initFhirPathEngine(support);
myFhirPathEngine = new FHIRPathEngine(worker);
} }
} }
public void initFhirPathEngine(IValidationSupport theSupport) {
IWorkerContext worker = new HapiWorkerContext(getContext(), theSupport);
myFhirPathEngine = new FHIRPathEngine(worker);
}
} }