Skip to content

Commit

Permalink
Remove duplicate knowledge repository instance in the workflow library (
Browse files Browse the repository at this point in the history
#2629)

* Refactor FhirOperator

* Change back to require
  • Loading branch information
jingtang10 authored Jul 24, 2024
1 parent 5589179 commit 3cc52bd
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,23 @@ internal constructor(
}

private var dataRepo = FhirEngineRepository(fhirContext, fhirEngine)
private var contentRepo = KnowledgeRepository(fhirContext, knowledgeManager)
private var terminologyRepo = KnowledgeRepository(fhirContext, knowledgeManager)
private var knowledgeRepo = KnowledgeRepository(fhirContext, knowledgeManager)

// The knowledge manager is used for both content and terminology.
private val repository =
ProxyRepository(
/* data = */ dataRepo,
/* content = */ knowledgeRepo,
/* terminology = */ knowledgeRepo,
)

private val repository = ProxyRepository(dataRepo, contentRepo, terminologyRepo)
private val evaluationSettings: EvaluationSettings = EvaluationSettings.getDefault()

private val measureEvaluationOptions =
MeasureEvaluationOptions().apply { evaluationSettings = this@FhirOperator.evaluationSettings }

private val libraryProcessor = LibraryEngine(repository, evaluationSettings)

private val measureProcessor = R4MeasureProcessor(repository, measureEvaluationOptions)
private val planDefinitionProcessor = PlanDefinitionProcessor(repository, evaluationSettings)
private val measureProcessor = R4MeasureProcessor(repository, measureEvaluationOptions)

/**
* The function evaluates a FHIR library against the database.
Expand Down

0 comments on commit 3cc52bd

Please sign in to comment.