Skip to content

Commit

Permalink
Updated config to allow ips generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Niels Wolters committed Feb 14, 2024
1 parent e1d902c commit b733197
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 14 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@

<!-- HAPI-FHIR uses Logback for logging support. The logback library is included automatically by Maven as a part of the hapi-fhir-base dependency, but you also need to include a logging library. Logback
is used here, but log4j would also be fine. -->
<dependency>
<!-- <dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
</dependency> -->

<!-- Needed for JEE/Servlet support -->
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
public class AppProperties {

private Boolean cr_enabled = false;
private Boolean ips_enabled = false;
private Boolean ips_enabled = true;
private Boolean openapi_enabled = false;
private Boolean mdm_enabled = false;
private String mdm_rules_json_location = "mdm-rules.json";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@ public class IpsConfigCondition implements Condition {

@Override
public boolean matches(ConditionContext theConditionContext, AnnotatedTypeMetadata theAnnotatedTypeMetadata) {
System.out.println("\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
String property = theConditionContext.getEnvironment().getProperty("hapi.fhir.ips_enabled");
return Boolean.parseBoolean(property);
Boolean result = Boolean.parseBoolean(property);

if(result) {
System.out.println("IpsConfigCondition.matches: true");
} else {
System.out.println("IpsConfigCondition.matches: false");
}

System.out.println("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\n");
return result;
}
}
20 changes: 10 additions & 10 deletions src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,16 @@ hapi:
# install_transitive_ig_dependencies: true
#implementationguides:
### example from registry (packages.fhir.org)
# swiss:
# name: swiss.mednet.fhir
# version: 0.8.0
# reloadExisting: false
# installMode: STORE_AND_INSTALL
# swiss:
# name: swiss.mednet.fhir
# version: 0.8.0
# reloadExisting: false
# installMode: STORE_AND_INSTALL
# example not from registry
# ips_1_0_0:
# packageUrl: https://build.fhir.org/ig/HL7/fhir-ips/package.tgz
# name: hl7.fhir.uv.ips
# version: 1.0.0
# ips_1_0_0:
# packageUrl: https://build.fhir.org/ig/HL7/fhir-ips/package.tgz
# name: hl7.fhir.uv.ips
# version: 1.0.0
# supported_resource_types:
# - Patient
# - Observation
Expand All @@ -111,7 +111,7 @@ hapi:
# auto_create_placeholder_reference_targets: false
### tells the server to automatically append the current version of the target resource to references at these paths
# auto_version_reference_at_paths: Device.patient, Device.location, Device.parent, DeviceMetric.parent, DeviceMetric.source, Observation.device, Observation.subject
# ips_enabled: false
ips_enabled: true
# default_encoding: JSON
# default_pretty_print: true
# default_page_size: 20
Expand Down

0 comments on commit b733197

Please sign in to comment.