Added some files for CQL support - more work to be done on this..
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package ca.uhn.fhir.jpa.starter.cql;
|
||||
|
||||
import org.springframework.context.annotation.Condition;
|
||||
import org.springframework.context.annotation.ConditionContext;
|
||||
import org.springframework.core.type.AnnotatedTypeMetadata;
|
||||
|
||||
public class CqlConfigCondition implements Condition {
|
||||
|
||||
@Override
|
||||
public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) {
|
||||
String property = conditionContext.getEnvironment().getProperty("hapi.fhir.cql_enabled");
|
||||
boolean enabled = Boolean.parseBoolean(property);
|
||||
return enabled;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package ca.uhn.fhir.jpa.starter.cql;
|
||||
|
||||
import ca.uhn.fhir.cql.config.CqlDstu3Config;
|
||||
import ca.uhn.fhir.jpa.starter.annotations.OnDSTU3Condition;
|
||||
import org.springframework.context.annotation.Conditional;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
@Configuration
|
||||
@Conditional({OnDSTU3Condition.class, CqlConfigCondition.class})
|
||||
@Import({CqlDstu3Config.class})
|
||||
public class CqlConfigDstu3 {
|
||||
}
|
||||
13
src/main/java/ca/uhn/fhir/jpa/starter/cql/CqlConfigR4.java
Normal file
13
src/main/java/ca/uhn/fhir/jpa/starter/cql/CqlConfigR4.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package ca.uhn.fhir.jpa.starter.cql;
|
||||
|
||||
import ca.uhn.fhir.cql.config.CqlR4Config;
|
||||
import ca.uhn.fhir.jpa.starter.annotations.OnR4Condition;
|
||||
import org.springframework.context.annotation.Conditional;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
@Configuration
|
||||
@Conditional({OnR4Condition.class, CqlConfigCondition.class})
|
||||
@Import({CqlR4Config.class})
|
||||
public class CqlConfigR4 {
|
||||
}
|
||||
@@ -29,6 +29,7 @@ hapi:
|
||||
fhir:
|
||||
### This is the FHIR version. Choose between, DSTU2, DSTU3, R4 or R5
|
||||
fhir_version: R4
|
||||
cql_enabled: true
|
||||
# defer_indexing_for_codesystems_of_size: 101
|
||||
# implementationguides:
|
||||
# -
|
||||
|
||||
@@ -9,9 +9,15 @@
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="org.springframework.beans" level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
</logger>
|
||||
<logger name="org.springframework.core" level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
</logger>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
</root>
|
||||
|
||||
</configuration>
|
||||
</configuration>
|
||||
|
||||
Reference in New Issue
Block a user