Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
d71a0f3
Centralize ExpressionResult.getValue handling in CqlExpressionValue
lukedegruchy Apr 29, 2026
dfe96d7
Absorb CriteriaResult into CqlExpressionValue
lukedegruchy Apr 29, 2026
959226e
Merge remote-tracking branch 'origin/main' into ld-20260429-centraliz…
lukedegruchy Apr 29, 2026
9cf0957
Push CqlExpressionValue into observation-accumulator handling
lukedegruchy Apr 29, 2026
01e0ea3
Tidy CqlExpressionValue follow-ups across the wrapper-migration sites
lukedegruchy Apr 29, 2026
5d5ed27
Route remaining instanceof Iterable/Map sites through CqlExpressionValue
lukedegruchy Apr 30, 2026
d689331
Type collectQuantities on CqlExpressionValue
lukedegruchy Apr 30, 2026
a3ff630
Mark migration sites for typed PopulationDef.subjectResources
lukedegruchy Apr 30, 2026
cc3f77b
Type PopulationDef.subjectResources on CqlExpressionValue
lukedegruchy Apr 30, 2026
03e3ef9
Tighten null-safety on CqlExpressionValue iteration sites
lukedegruchy Apr 30, 2026
317a596
utility and cql compiling
barhodes Mar 31, 2026
9440f91
convert parameters to cql types
barhodes Mar 31, 2026
b79938f
Claude: resolve failures in LibraryEngineTests specifically.
lukedegruchy Mar 31, 2026
5d2ba9b
Ensure all cql module tests pass.
lukedegruchy Mar 31, 2026
81b0806
cr compiles
barhodes Mar 31, 2026
f8d60f8
fixing cr tests
barhodes Apr 1, 2026
f7b32c6
fixing measure tests
barhodes Apr 1, 2026
dbcf63c
fixes
barhodes Apr 1, 2026
3d873c4
fixes
barhodes Apr 1, 2026
eff622c
Fix cqf-fhir-benchmark build errors
antvaset Apr 2, 2026
b77b4c5
Fix helper method in Dstu3MeasureReportBuilder
antvaset Apr 2, 2026
a313e82
fix build errors
barhodes Apr 2, 2026
c14e990
spotless
barhodes Apr 2, 2026
55a0714
only convert FHIR objects
barhodes Apr 2, 2026
5649f27
more fixes
barhodes Apr 2, 2026
5c6ef38
cleanup and fixes
barhodes Apr 3, 2026
f47212a
fix cli tests
barhodes Apr 3, 2026
e63898d
fix
barhodes Apr 6, 2026
7c20747
remove fhir terser use from adapters
barhodes Apr 6, 2026
2acd20a
implement 'as' helper
barhodes Apr 7, 2026
c3b755e
cleanup and update to latest CQL changes
barhodes Apr 7, 2026
b7c50b9
add new test for dynamic resolution
barhodes Apr 7, 2026
e8fe99e
add test for FHIRPath join
barhodes Apr 13, 2026
a1c332d
cleanup
barhodes Apr 14, 2026
9c3fe1e
implementing latest changes
barhodes Apr 29, 2026
90cbbff
safe changes
barhodes Apr 29, 2026
9165e6c
utility and cql compiling
barhodes Mar 31, 2026
034eb14
fixing cr tests
barhodes Apr 1, 2026
0ab22c9
fixing measure tests
barhodes Apr 1, 2026
5034f28
wip
barhodes Apr 29, 2026
89d81f9
compiling but still broken
barhodes Apr 29, 2026
a92c581
fix tests
barhodes Apr 30, 2026
7b594e7
fix merge
barhodes Apr 30, 2026
75eaf2f
latest
barhodes Apr 30, 2026
2251ae0
Replace measure-observation Map with typed ObservationAccumulator
lukedegruchy May 1, 2026
e29bba8
Replace stratifier function-result Map with FunctionResultAccumulator
lukedegruchy May 1, 2026
5107648
Merge remote-tracking branch 'origin/main' into ld-20260429-centraliz…
lukedegruchy May 1, 2026
9893b65
Fix sonar.
lukedegruchy May 1, 2026
d1ee037
Fix sonar.
lukedegruchy May 1, 2026
42e0129
Merge remote-tracking branch 'origin/ld-20260429-centralized-expressi…
barhodes May 4, 2026
f953406
latest
barhodes May 4, 2026
2599e7d
tests compiling and spotless
barhodes May 4, 2026
e7a6b46
update to new v5 branch of CQL
barhodes May 4, 2026
7d63770
introduce wrapper for EvaluationResult
barhodes May 6, 2026
dae62da
Flip boolean logic in CqlExpressionValue to conform to logic on main …
lukedegruchy May 6, 2026
ebe0745
Fix stratifier validation to work with the new CQL classes.
lukedegruchy May 6, 2026
6e2d934
cleanup old todo
barhodes May 6, 2026
27aac70
Fix more stratifier test bugs.
lukedegruchy May 6, 2026
061b357
Add yet another instanceof/cast for CQL boolean.
lukedegruchy May 6, 2026
b66de70
fix commented out test classes
barhodes May 7, 2026
f7050cd
Fix assertions and error messages.
lukedegruchy May 7, 2026
983774b
spotless
barhodes May 7, 2026
f6882f3
fix tests
barhodes May 7, 2026
954c9a7
test fix attempt
barhodes May 7, 2026
e25468c
fix tests
barhodes May 7, 2026
df8f8d5
Partially fix supporting evidence tests.
lukedegruchy May 7, 2026
83e225a
fix tests
barhodes May 7, 2026
3580817
fix tests
barhodes May 7, 2026
4623972
Bump cql version
antvaset May 8, 2026
894286f
Handle the case when `codes` are `Code` objects
antvaset May 9, 2026
8242471
Merge branch 'main' into update-cql-4-7-0
barhodes May 12, 2026
398a755
merge main and update CQL to latest branch
barhodes May 13, 2026
32ef602
further cleanup
barhodes May 14, 2026
1c4a893
Merge branch 'main' into update-cql-4-7-0
barhodes May 14, 2026
333e974
Merge branch 'main' into update-cql-4-7-0
barhodes May 28, 2026
f38bbc5
mid-merge
barhodes Jun 1, 2026
5fb4086
Merge branch 'main' into update-cql-4-7-0
barhodes Jun 1, 2026
6aeae1e
measures are broken again
barhodes Jun 1, 2026
b057237
Merge origin/main into update-cql-4-7-0 (CDO-495)
lukedegruchy Jun 11, 2026
787aeba
Fix wrong StringUtils import in MeasureMultiSubjectEvaluator (CDO-495)
lukedegruchy Jun 12, 2026
4d8c1e7
Fix wrong StringUtils import in CqlFhirParametersConverter (CDO-495)
lukedegruchy Jun 12, 2026
01d186c
Declare commons-lang3 and commons-collections4 explicitly (CDO-495)
lukedegruchy Jun 12, 2026
cd57251
Declare guava and commons-io explicitly (CDO-495)
lukedegruchy Jun 12, 2026
fcb3592
Declare jakarta.xml.bind-api explicitly (CDO-495)
lukedegruchy Jun 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
import ca.uhn.fhir.context.FhirVersionEnum;
import org.hl7.fhir.instance.model.api.IBaseDatatype;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.opencds.cqf.cql.engine.model.ModelResolver;
import org.opencds.cqf.fhir.cql.LibraryEngine;
import org.opencds.cqf.fhir.cr.common.IInputParameterResolver;
import org.opencds.cqf.fhir.cr.library.evaluate.EvaluateRequest;
import org.opencds.cqf.fhir.cr.questionnaire.generate.GenerateRequest;
import org.opencds.cqf.fhir.cr.questionnaire.populate.PopulateRequest;
import org.opencds.cqf.fhir.cr.questionnaireresponse.extract.ExtractRequest;
import org.opencds.cqf.fhir.utility.Ids;
import org.opencds.cqf.fhir.utility.model.FhirModelResolverCache;
import org.opencds.cqf.fhir.utility.adapter.IAdapterFactory;
import org.opencds.cqf.fhir.utility.adapter.IPlanDefinitionAdapter;

public class RequestHelpers {
public static final String PATIENT_ID = "patientId";
Expand All @@ -26,19 +26,11 @@ public class RequestHelpers {

public static org.opencds.cqf.fhir.cr.plandefinition.apply.ApplyRequest newPDApplyRequestForVersion(
FhirVersionEnum fhirVersion, LibraryEngine libraryEngine) {
return newPDApplyRequestForVersion(fhirVersion, libraryEngine, null, null);
return newPDApplyRequestForVersion(fhirVersion, libraryEngine, null);
}

public static org.opencds.cqf.fhir.cr.plandefinition.apply.ApplyRequest newPDApplyRequestForVersion(
FhirVersionEnum fhirVersion, LibraryEngine libraryEngine, ModelResolver modelResolver) {
return newPDApplyRequestForVersion(fhirVersion, libraryEngine, modelResolver, null);
}

public static org.opencds.cqf.fhir.cr.plandefinition.apply.ApplyRequest newPDApplyRequestForVersion(
FhirVersionEnum fhirVersion,
LibraryEngine libraryEngine,
ModelResolver modelResolver,
IInputParameterResolver inputParameterResolver) {
FhirVersionEnum fhirVersion, LibraryEngine libraryEngine, IInputParameterResolver inputParameterResolver) {
var fhirContext = FhirContext.forCached(fhirVersion);
IBaseResource planDefinition = null;
try {
Expand All @@ -49,34 +41,18 @@ public static org.opencds.cqf.fhir.cr.plandefinition.apply.ApplyRequest newPDApp
} catch (Exception e) {
// Do nothing
}
return newPDApplyRequestForVersion(
fhirVersion, planDefinition, libraryEngine, modelResolver, inputParameterResolver);
return newPDApplyRequestForVersion(fhirVersion, planDefinition, libraryEngine, inputParameterResolver);
}

public static org.opencds.cqf.fhir.cr.plandefinition.apply.ApplyRequest newPDApplyRequestForVersion(
FhirVersionEnum fhirVersion,
IBaseResource planDefinition,
LibraryEngine libraryEngine,
ModelResolver modelResolver,
IInputParameterResolver inputParameterResolver) {
try {
if (modelResolver == null) {
modelResolver = FhirModelResolverCache.resolverForVersion(fhirVersion);
}
var planDefinitionUrl = modelResolver.resolvePath(planDefinition, "url");
if (planDefinitionUrl == null) {
var url = PLANDEFINITION_URL + planDefinition.getIdElement().getIdPart();
IBaseDatatype urlType =
switch (fhirVersion) {
case DSTU3 -> new org.hl7.fhir.dstu3.model.StringType(url);
case R4 -> new org.hl7.fhir.r4.model.CanonicalType(url);
case R5 -> new org.hl7.fhir.r5.model.CanonicalType(url);
default -> null;
};
modelResolver.setValue(planDefinition, "url", urlType);
}
} catch (Exception e) {
// Do nothing
var planDefinitionAdapter = (IPlanDefinitionAdapter) IAdapterFactory.createAdapterForResource(planDefinition);
if (!planDefinitionAdapter.hasUrl()) {
var url = PLANDEFINITION_URL + planDefinitionAdapter.getId();
planDefinitionAdapter.setUrl(url);
}
IBaseDatatype userLanguage =
switch (fhirVersion) {
Expand All @@ -92,7 +68,7 @@ public static org.opencds.cqf.fhir.cr.plandefinition.apply.ApplyRequest newPDApp
default -> null;
};
return new org.opencds.cqf.fhir.cr.plandefinition.apply.ApplyRequest(
planDefinition,
planDefinitionAdapter.get(),
Ids.newId(fhirVersion, Ids.ensureIdType(PATIENT_ID, "Patient")),
Ids.newId(fhirVersion, Ids.ensureIdType(PATIENT_ID, "Encounter")),
Ids.newId(fhirVersion, Ids.ensureIdType(PATIENT_ID, "Practitioner")),
Expand All @@ -106,7 +82,6 @@ public static org.opencds.cqf.fhir.cr.plandefinition.apply.ApplyRequest newPDApp
null,
null,
libraryEngine,
modelResolver,
inputParameterResolver);
}

Expand All @@ -122,13 +97,11 @@ public static GenerateRequest newGenerateRequestForVersion(
} catch (Exception e) {
// Do nothing
}
return newGenerateRequestForVersion(fhirVersion, profile, libraryEngine);
return newGenerateRequestForVersion(profile, libraryEngine);
}

public static GenerateRequest newGenerateRequestForVersion(
FhirVersionEnum fhirVersion, IBaseResource profile, LibraryEngine libraryEngine) {
return new GenerateRequest(
profile, false, true, libraryEngine, FhirModelResolverCache.resolverForVersion(fhirVersion));
public static GenerateRequest newGenerateRequestForVersion(IBaseResource profile, LibraryEngine libraryEngine) {
return new GenerateRequest(profile, false, true, libraryEngine);
}

public static PopulateRequest newPopulateRequestForVersion(
Expand All @@ -139,24 +112,15 @@ public static PopulateRequest newPopulateRequestForVersion(
null,
null,
null,
libraryEngine,
FhirModelResolverCache.resolverForVersion(fhirVersion));
libraryEngine);
}

public static ExtractRequest newExtractRequestForVersion(
FhirVersionEnum fhirVersion,
LibraryEngine libraryEngine,
IBaseResource questionnaireResponse,
IBaseResource questionnaire) {
return new ExtractRequest(
questionnaireResponse,
questionnaire,
Ids.newId(fhirVersion, Ids.ensureIdType(PATIENT_ID, "Patient")),
null,
null,
libraryEngine,
FhirModelResolverCache.resolverForVersion(fhirVersion),
null);
return new ExtractRequest(questionnaireResponse, questionnaire, null, null, libraryEngine, null);
}

public static EvaluateRequest newEvaluateRequestForVersion(
Expand All @@ -168,7 +132,6 @@ public static EvaluateRequest newEvaluateRequestForVersion(
null,
null,
null,
libraryEngine,
FhirModelResolverCache.resolverForVersion(fhirVersion));
libraryEngine);
}
}
Loading