Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Clinical Reasoning plugin #692

Merged
merged 29 commits into from
Jun 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ea58766
Reproducing issues with CR/HAPI cds-hooks processing
c-schuler Mar 4, 2024
b3aa943
Add new $questionnaire operation
barhodes Feb 12, 2024
1c58e4d
Update StarterIpsConfig.java
barhodes Feb 13, 2024
fc708df
Update pom.xml
barhodes Mar 4, 2024
2ff9983
Merge remote-tracking branch 'origin/cds-hooks-issue-repro' into br-2…
JPercival Mar 7, 2024
4ecc7ca
Fixes for configuration properties
JPercival Mar 12, 2024
a7bc396
Update VS Code launch properties
JPercival Mar 12, 2024
e43bfab
Merge remote-tracking branch 'origin/master' into br-cs-merged
JPercival Mar 12, 2024
6217261
Fixes for CQL logging
JPercival Mar 15, 2024
9d7a930
Update pom.xml
barhodes Mar 20, 2024
9c4fe1d
Remove unused threaded option
barhodes Mar 20, 2024
b3a68a6
Update to 7.1.7
barhodes Mar 28, 2024
4eedff7
Fix some CR defaults
JPercival Apr 3, 2024
1de364c
Update to new snapshot
JPercival Apr 11, 2024
c1f5046
Merge branch 'rel_7_1_tracking' into br-cs-merged
barhodes May 8, 2024
69e3ad6
Update pom.xml
barhodes May 8, 2024
da03ef9
Fix test settings
barhodes May 8, 2024
a0ad815
Do not make prefetch calls if all items are present
barhodes May 14, 2024
4a40970
Add alternative application.yaml for CDS settings.
barhodes May 15, 2024
69839e6
Add CdsHook tests and documentation
barhodes May 17, 2024
3badb7d
Merge branch 'master' into br-cs-merged
barhodes Jun 3, 2024
9953703
Comment out custom prefetch until it is more mature
barhodes Jun 3, 2024
efcea5c
Removal of DataEndpoint parameter is not longer needed
barhodes Jun 3, 2024
db48699
Fix debug logging setting being overwritten
barhodes Jun 7, 2024
c34f04d
Revert change
barhodes Jun 7, 2024
bf83fa1
Remove unused class
barhodes Jun 7, 2024
87ffa01
Adding Rec10 Test
c-schuler Jun 10, 2024
6a8a0cf
Disable test until fixed
barhodes Jun 11, 2024
e5bb1dd
fix tests
barhodes Jun 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixes for configuration properties
  • Loading branch information
JPercival committed Mar 12, 2024
commit 4ecc7ca7ebc06e4ae1ebda1fb3763d869bf8582b
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"cwd": "${workspaceFolder}",
"mainClass": "ca.uhn.fhir.jpa.starter.Application",
"projectName": "hapi-fhir-jpaserver-starter",
"args": "",
"args": "-Ddebug=true",
"envFile": "${workspaceFolder}/.env"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,10 @@

import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServiceRequestJson;
import org.hl7.fhir.r4.model.Bundle;
import org.hl7.fhir.r4.model.IdType;
import org.hl7.fhir.r4.model.PlanDefinition;
import org.hl7.fhir.r4.model.Resource;
import org.opencds.cqf.fhir.api.Repository;
import org.opencds.cqf.fhir.cql.engine.retrieve.RepositoryRetrieveProvider;
import org.opencds.cqf.fhir.cql.engine.retrieve.RetrieveSettings;
import org.opencds.cqf.fhir.cql.engine.terminology.RepositoryTerminologyProvider;
import org.opencds.cqf.fhir.utility.repository.InMemoryFhirRepository;

import java.util.HashMap;
import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
import ca.uhn.fhir.jpa.starter.cr.CrProperties;

public class ProviderConfiguration {

public static final ProviderConfiguration DEFAULT_PROVIDER_CONFIGURATION =
new ProviderConfiguration(false, "client_id");

private final String clientIdHeaderName;
private final boolean cqlLoggingEnabled;

Expand All @@ -16,8 +12,7 @@ public ProviderConfiguration(boolean cqlLoggingEnabled, String clientIdHeaderNam
}

public ProviderConfiguration(CdsHooksProperties cdsProperties, CrProperties crProperties) {
this.clientIdHeaderName = cdsProperties.getClientIdHeaderName();
this.cqlLoggingEnabled = crProperties.isCqlRuntimeDebugLoggingEnabled();
this(crProperties.getCql().getRuntime().isDebugLoggingEnabled(), cdsProperties.getClientIdHeaderName());
}

public String getClientIdHeaderName() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package ca.uhn.fhir.jpa.starter.cdshooks;

import ca.uhn.fhir.jpa.starter.cr.CrCommonConfig;
import ca.uhn.fhir.jpa.starter.cr.CrConfigCondition;
import ca.uhn.fhir.jpa.starter.cr.CrProperties;
import ca.uhn.hapi.fhir.cdshooks.api.ICdsHooksDaoAuthorizationSvc;
Expand All @@ -23,7 +24,7 @@

@Configuration
@Conditional({CdsHooksConfigCondition.class, CrConfigCondition.class})
@Import(CdsHooksConfig.class)
@Import({CdsHooksConfig.class, CrCommonConfig.class})
public class StarterCdsHooksConfig {

@Bean
Expand Down
22 changes: 22 additions & 0 deletions src/main/java/ca/uhn/fhir/jpa/starter/cr/CareGapsProperties.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package ca.uhn.fhir.jpa.starter.cr;

public class CareGapsProperties {
private String reporter = "default";
private String section_author = "default";

public String getReporter() {
return reporter;
}

public void setReporter(String reporter) {
this.reporter = reporter;
}

public String getSection_author() {
return section_author;
}

public void setSection_author(String section_author) {
this.section_author = section_author;
}
}
198 changes: 198 additions & 0 deletions src/main/java/ca/uhn/fhir/jpa/starter/cr/CqlCompilerProperties.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
package ca.uhn.fhir.jpa.starter.cr;

import org.cqframework.cql.cql2elm.CqlCompilerException;
import org.cqframework.cql.cql2elm.CqlTranslator;
import org.cqframework.cql.cql2elm.LibraryBuilder;

public class CqlCompilerProperties {
private Boolean validate_units = true;
private Boolean verify_only = false;
private String compatibility_level = "1.5";
private CqlCompilerException.ErrorSeverity error_level = CqlCompilerException.ErrorSeverity.Info;
private LibraryBuilder.SignatureLevel signature_level = LibraryBuilder.SignatureLevel.All;
private Boolean analyze_data_requirements = false;
private Boolean collapse_data_requirements = false;
private CqlTranslator.Format translator_format = CqlTranslator.Format.JSON;
private Boolean enable_date_range_optimization = true;
private Boolean enable_annotations = true;
private Boolean enable_locators = true;
private Boolean enable_results_type = true;
private Boolean enable_detailed_errors = true;
private Boolean disable_list_traversal = false;
private Boolean disable_list_demotion = false;
private Boolean disable_list_promotion = false;
private Boolean enable_interval_demotion = false;
private Boolean enable_interval_promotion = false;
private Boolean disable_method_invocation = false;
private Boolean require_from_keyword = false;
private Boolean disable_default_model_info_load = false;


public boolean isValidateUnits() {
return validate_units;
}

public void setValidateUnits(boolean validateUnits) {
this.validate_units = validateUnits;
}

public boolean isVerifyOnly() {
return verify_only;
}

public void setVerifyOnly(boolean verifyOnly) {
this.verify_only = verifyOnly;
}

public String getCompatibilityLevel() {
return compatibility_level;
}

public void setCompatibilityLevel(String compatibilityLevel) {
this.compatibility_level = compatibilityLevel;
}

public CqlCompilerException.ErrorSeverity getErrorSeverityLevel() {
return error_level;
}

public void setErrorSeverityLevel(CqlCompilerException.ErrorSeverity errorSeverityLevel) {
this.error_level = errorSeverityLevel;
}

public LibraryBuilder.SignatureLevel getSignatureLevel() {
return signature_level;
}

public void setSignatureLevel(LibraryBuilder.SignatureLevel signatureLevel) {
this.signature_level = signatureLevel;
}

public boolean isAnalyzeDataRequirements() {
return analyze_data_requirements;
}

public void setAnalyzeDataRequirements(boolean analyzeDataRequirements) {
this.analyze_data_requirements = analyzeDataRequirements;
}

public boolean isCollapseDataRequirements() {
return collapse_data_requirements;
}

public void setCollapseDataRequirements(boolean collapseDataRequirements) {
this.collapse_data_requirements = collapseDataRequirements;
}

public boolean isEnableDateRangeOptimization() {
return enable_date_range_optimization;
}

public void setEnableDateRangeOptimization(boolean enableDateRangeOptimization) {
this.enable_date_range_optimization = enableDateRangeOptimization;
}

public boolean isEnableAnnotations() {
return enable_annotations;
}

public void setEnableAnnotations(boolean enableAnnotations) {
this.enable_annotations = enableAnnotations;
}

public boolean isEnableLocators() {
return enable_locators;
}

public void setEnableLocators(boolean enableLocators) {
this.enable_locators = enableLocators;
}

public boolean isEnableResultsType() {
return enable_results_type;
}

public void setEnableResultsType(boolean enableResultsType) {
this.enable_results_type = enableResultsType;
}

public boolean isEnableDetailedErrors() {
return enable_detailed_errors;
}

public void setEnableDetailedErrors(boolean enableDetailedErrors) {
this.enable_detailed_errors = enableDetailedErrors;
}

public boolean isDisableListTraversal() {
return disable_list_traversal;
}

public void setDisableListTraversal(boolean disableListTraversal) {
this.disable_list_traversal = disableListTraversal;
}

public boolean isDisableListDemotion() {
return disable_list_demotion;
}

public void setDisableListDemotion(boolean disableListDemotion) {
this.disable_list_demotion = disableListDemotion;
}

public boolean isDisableListPromotion() {
return disable_list_promotion;
}

public void setDisableListPromotion(boolean disableListPromotion) {
this.disable_list_promotion = disableListPromotion;
}

public boolean isEnableIntervalPromotion() {
return enable_interval_promotion;
}

public void setEnableIntervalPromotion(boolean enableIntervalPromotion) {
this.enable_interval_promotion = enableIntervalPromotion;
}

public boolean isEnableIntervalDemotion() {
return enable_interval_demotion;
}

public void setEnableIntervalDemotion(boolean enableIntervalDemotion) {
this.enable_interval_demotion = enableIntervalDemotion;
}

public boolean isDisableMethodInvocation() {
return disable_method_invocation;
}

public void setDisableMethodInvocation(boolean disableMethodInvocation) {
this.disable_method_invocation = disableMethodInvocation;
}

public boolean isRequireFromKeyword() {
return require_from_keyword;
}

public void setRequireFromKeyword(boolean requireFromKeyword) {
this.require_from_keyword = requireFromKeyword;
}

public boolean isDisableDefaultModelInfoLoad() {
return disable_default_model_info_load;
}

public void setDisableDefaultModelInfoLoad(boolean disableDefaultModelInfoLoad) {
this.disable_default_model_info_load = disableDefaultModelInfoLoad;
}

public CqlTranslator.Format getTranslatorFormat() {
return translator_format;
}

public void setTranslatorFormat(CqlTranslator.Format translatorFormat) {
this.translator_format = translatorFormat;
}
}
53 changes: 53 additions & 0 deletions src/main/java/ca/uhn/fhir/jpa/starter/cr/CqlProperties.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
package ca.uhn.fhir.jpa.starter.cr;

import org.opencds.cqf.fhir.cql.engine.retrieve.RetrieveSettings;
import org.opencds.cqf.fhir.cql.engine.terminology.TerminologySettings;

public class CqlProperties {

private Boolean use_embedded_libraries = true;
private CqlCompilerProperties compiler = new CqlCompilerProperties();
private CqlRuntimeProperties runtime = new CqlRuntimeProperties();
private TerminologySettings terminology = new TerminologySettings();
private RetrieveSettings data = new RetrieveSettings();

public Boolean getUse_embedded_libraries() {
return use_embedded_libraries;
}

public void setUse_embedded_libraries(Boolean use_embedded_libraries) {
this.use_embedded_libraries = use_embedded_libraries;
}

public CqlCompilerProperties getCompiler() {
return compiler;
}

public void setCompiler(CqlCompilerProperties compiler) {
this.compiler = compiler;
}

public CqlRuntimeProperties getRuntime() {
return runtime;
}

public void setRuntime(CqlRuntimeProperties runtime) {
this.runtime = runtime;
}

public TerminologySettings getTerminology() {
return terminology;
}

public void setTerminology(TerminologySettings terminology) {
this.terminology = terminology;
}

public RetrieveSettings getData() {
return data;
}

public void setData(RetrieveSettings data) {
this.data = data;
}
}
35 changes: 35 additions & 0 deletions src/main/java/ca/uhn/fhir/jpa/starter/cr/CqlRuntimeProperties.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package ca.uhn.fhir.jpa.starter.cr;

public class CqlRuntimeProperties {

private Boolean debug_logging_enabled = false;
private Boolean enable_validation = false;
private Boolean enable_expression_caching = true;

public boolean isDebugLoggingEnabled() {
return debug_logging_enabled;
}

public void setDebugLoggingEnabled(boolean debug_logging_enabled) {
this.debug_logging_enabled = debug_logging_enabled;
}


public boolean isEnableExpressionCaching() {
return enable_expression_caching;
}

public void setEnableExpressionCaching(boolean enable_expression_caching) {
this.enable_expression_caching = enable_expression_caching;
}

public boolean isEnableValidation() {
return enable_validation;
}

public void EnableValidation(boolean enable_validation) {
this.enable_validation = enable_validation;
}


}
Loading
Loading