Skip to content

Create a MeasureEvaluationRequest data class for evaluation parameters and update call sites.#989

Open
JPercival wants to merge 3 commits intomainfrom
measure-request
Open

Create a MeasureEvaluationRequest data class for evaluation parameters and update call sites.#989
JPercival wants to merge 3 commits intomainfrom
measure-request

Conversation

@JPercival
Copy link
Copy Markdown
Contributor

No description provided.

…at transport boundary (#measure-request)

MeasureEvaluationRequest is a new version-agnostic record in the common
package that captures all caller-supplied operation parameters for a
$evaluate-measure invocation — periodStart, periodEnd, reportType,
subjectId, practitioner, lastReceivedOn, productLine, and reporter.

It is a sibling to MeasureEnvironment: that record owns infrastructure
inputs (endpoints, additionalData); this one owns domain parameters.
Together they describe the complete context of a measure evaluation.

Changes:
- New record MeasureEvaluationRequest in measure.common
- R4MeasureEvaluatorSingle: evaluate(MeasureReference, request, Parameters)
- R4MeasureEvaluatorMultiple: evaluate(List<MeasureReference>, request, Parameters)
- Dstu3MeasureEvaluatorSingle: evaluateMeasure(IdType, request, Parameters)
- R4MultiMeasureService: both @OverRide evaluate() methods, plus the
  @VisibleForTesting evaluateSingleMeasureCaptureDef / evaluateWithDefs
  and the private evaluateToListOfList now all carry MeasureEvaluationRequest
- Dstu3MeasureService: receives MeasureEvaluationRequest, calls the new
  ZonedDateTime overload on Dstu3MeasureProcessor
- Dstu3MeasureProcessor: new public evaluateMeasure(IdType, ZonedDateTime,
  ZonedDateTime, ...) that delegates to a shared Interval-based core,
  avoiding any String round-trip
- MeasureProcessorTimeUtils.buildMeasurementPeriod(ZonedDateTime,ZonedDateTime)
  promoted from private to public so the Dstu3 path can use it
- HAPI R4 MeasureOperationsProvider: builds MeasureEvaluationRequest from
  parsed period dates and operation params, passes to service
- HAPI DSTU3 MeasureOperationsProvider: now injects StringTimePeriodHandler
  (already in the Spring context via CrBaseConfig) to parse period strings;
  builds MeasureEvaluationRequest before calling service
- CrDstu3Config: wires StringTimePeriodHandler into dstu3MeasureOperationsProvider
- R4CareGapsBundleBuilder: updated to use MeasureEvaluationRequest
- Test utilities Measure.java and MultiMeasure.java: updated accordingly

All measure tests pass.
Enables cqf.kotlin-conventions on cqf-fhir-cr (adds the Kotlin JVM
plugin; existing .java files compile unchanged).

The class itself is a direct translation of the Java record into a
Kotlin data class with default-null parameters. The @get:JvmName
annotations on each property expose the accessors under their plain
names (e.g. periodStart()) rather than the default JavaBeans prefix
form (getPeriodStart()), keeping the call site identical to a Java
record so every existing Java caller compiles without modification.
@github-actions
Copy link
Copy Markdown

Formatting check succeeded!

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
46.6% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant