You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MeasureEvaluator employs a private constructor requiring the use of a static method (compile(FhirContext fhirContext, Bundle bundle)) to create a new instance. That is fine, but the compile method actually evaluates the measure with hardcoded parameters and ignores the result. I am confused with this functionality and am skeptical of its usefulness. Shouldn't the compile method simply return a new instance of the MeasureEvaluator based on the passed in FhirContext and Bundle?
The text was updated successfully, but these errors were encountered:
I'm going to lean on @smailliwcs a bit to explain this... But, I believe we do that with hard-coded parameters once to initiate things. We evaluate against a hard-coded single-patient bundle for the measure and fhir context to initiate the compilation, which we don't have direct access to. Without it, the first call to evaluate() takes extra time because it's doing that compilation step. For metrics and monitoring, we want to get that out of the way when the service launches asap.
Exactly. Otherwise the first calls to evaluate (can be multiple due to concurrent requests) take longer than they would with a warm cache.
Historically, there was another reason to do this "precompilation" step: a thread-safety issue in ensureSupplementalDataElementSearchParameter could cause exceptions to be thrown on n - 1 threads (out of n concurrent evaluations). But I don't think that's a problem with our current setup (in-process evaluation using InMemoryFhirRepository).
The MeasureEvaluator employs a private constructor requiring the use of a static method (
compile(FhirContext fhirContext, Bundle bundle)
) to create a new instance. That is fine, but the compile method actually evaluates the measure with hardcoded parameters and ignores the result. I am confused with this functionality and am skeptical of its usefulness. Shouldn't the compile method simply return a new instance of the MeasureEvaluator based on the passed in FhirContext and Bundle?The text was updated successfully, but these errors were encountered: