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

Switch FHIR Server to CQF Ruler #17

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
245 changes: 100 additions & 145 deletions dev/config/hapi/application.yaml
Original file line number Diff line number Diff line change
@@ -1,149 +1,104 @@
# originally from:
# https://raw.githubusercontent.com/DBCG/cqf-ruler/v0.7.1/server/src/main/resources/application.yaml
spring:
jpa:
properties:
hibernate.format_sql: false
hibernate.show_sql: false
# hibernate.hbm2ddl.auto: update
# hibernate.jdbc.batch_size: 20
# hibernate.cache.use_query_cache: false
# hibernate.cache.use_second_level_cache: false
# hibernate.cache.use_structured_entries: false
# hibernate.cache.use_minimal_puts: false
### These settings will enable fulltext search with lucene
hibernate.search.enabled: true
hibernate.search.backend.type: lucene
# hibernate.search.backend.analysis.configurer: ca.uhn.fhir.jpa.search.HapiLuceneAnalysisConfigurer
# hibernate.search.backend.directory.type: local-filesystem
# hibernate.search.backend.directory.root: target/lucenefiles
# hibernate.search.backend.lucene_version: lucene_current
batch:
job:
enabled: false
main:
# TODO 5.6.0 -> Prevent duplicate bean definitions in the Spring batch config in HAPI: see:
allow-bean-definition-overriding: true
config:
import: classpath:org/opencds/cqf/external/application.yaml
---
spring:
main:
allow-bean-definition-overriding: true # the cqf-ruler plugins override serveral upstream hapi beans
---
hapi:
fhir:
### This is the FHIR version. Choose between, DSTU2, DSTU3, R4 or R5
fhir_version: R4
### enable to use the ApacheProxyAddressStrategy which uses X-Forwarded-* headers
### to determine the FHIR server address
# use_apache_address_strategy: false
### forces the use of the https:// protocol for the returned server address.
### alternatively, it may be set using the X-Forwarded-Proto header.
# use_apache_address_strategy_https: false
### enable to set the Server URL
# server_address: http://hapi.fhir.org/baseR4
# defer_indexing_for_codesystems_of_size: 101
# install_transitive_ig_dependencies: true
# implementationguides:
### example from registry (packages.fhir.org)
# swiss:
# name: swiss.mednet.fhir
# version: 0.8.0
# example not from registry
# ips_1_0_0:
# url: https://build.fhir.org/ig/HL7/fhir-ips/package.tgz
# name: hl7.fhir.uv.ips
# version: 1.0.0
# supported_resource_types:
# - Patient
# - Observation
# allow_cascading_deletes: true
# allow_contains_searches: true
# allow_external_references: true
# allow_multiple_delete: true
# allow_override_default_search_params: true
# auto_create_placeholder_reference_targets: false
# cql_enabled: true
# default_encoding: JSON
# default_pretty_print: true
# default_page_size: 20
# delete_expunge_enabled: true
# enable_repository_validating_interceptor: false
# enable_index_missing_fields: false
# enable_index_contained_resource: false
# enforce_referential_integrity_on_delete: false
# enforce_referential_integrity_on_write: false
# etag_support_enabled: true
# expunge_enabled: true
# daoconfig_client_id_strategy: null
# client_id_strategy: ALPHANUMERIC
# fhirpath_interceptor_enabled: false
# filter_search_enabled: true
# graphql_enabled: true
# narrative_enabled: true
# mdm_enabled: true
# partitioning:
# allow_references_across_partitions: false
# partitioning_include_in_search_hashes: false
cors:
allow_Credentials: true
# These are allowed_origin patterns, see: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/cors/CorsConfiguration.html#setAllowedOriginPatterns-java.util.List-
allowed_origin:
- '*'
fhir:
fhir_version: R4
allow_external_references: true
enforce_referential_integrity_on_delete: false
enforce_referential_integrity_on_write: false
cors:
allow_Credentials: true
allowed_origin:
- "*"
openapi_enabled: true
tester_enabled: true
tester:
home:
name: Local Tester
server_address: "http://localhost:8080/fhir"
refuse_to_fetch_third_party_urls: false
fhir_version: R4

## CQL Settings
cql:
# enabled: true
engine:
# debug_logging_enabled: false
options: "EnableExpressionCaching"
# use_embedded_libraries: true
# translator:
# analyzeDataRequirements: false
# collapseDataRequirements: true
# options: "EnableAnnotations,EnableLocators,DisableListDemotion,DisableListPromotion"

## RA Settings
ra:
#e enabled: true
report:
endpoint: ""

sdc:
# enabled: true
extract:
endpoint: "http://localhost:8080/fhir/"
username:
password:
transform:
enabled: true
replace_code:
username:
password:
endpoint:

## Dev Tools Settings
devtools:
# enabled: true

## Security settings
security:
# enabled: true
basic_auth:
enabled: false
username: someuser
password: thepassword
oauth:
enabled: false
securityCors: true
securityUrl: http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris
securityExtAuthUrl: authorize
securityExtAuthValueUri: http://launch.smarthealthit.org/v/r4/auth/authorize
securityExtTokenUrl: token
securityExtTokenValueUri: http://launch.smarthealthit.org/v/r4/auth/token
serviceSystem: http://hl7.org/fhir/restful-security-service
serviceCode: SMART-on-FHIR
serviceDisplay: SMART-on-FHIR
serviceText: OAuth2 using SMART-on-FHIR profile (see http://docs.smarthealthit.org)

# Search coordinator thread pool sizes
search-coord-core-pool-size: 20
search-coord-max-pool-size: 100
search-coord-queue-capacity: 200
## CR Settings
cr:
enabled: true
measure_report:
care_gaps_reporter: Organization/alphora
care_gaps_composition_section_author: Organization/alphora-author
# measure_evaluation:
# threaded_enabled: true
# threaded_batch_size: 1000
# num_threads: 8

# logger:
# error_format: 'ERROR - ${requestVerb} ${requestUrl}'
# format: >-
# Path[${servletPath}] Source[${requestHeader.x-forwarded-for}]
# Operation[${operationType} ${operationName} ${idOrResourceName}]
# UA[${requestHeader.user-agent}] Params[${requestParameters}]
# ResponseEncoding[${responseEncodingNoDefault}]
# log_exceptions: true
# name: fhirtest.access
# max_binary_size: 104857600
# max_page_size: 200
# retain_cached_searches_mins: 60
# reuse_cached_search_results_millis: 60000
tester:
home:
name: Local Tester
server_address: 'http://localhost:8080/fhir'
refuse_to_fetch_third_party_urls: false
fhir_version: R4
global:
name: Global Tester
server_address: "http://hapi.fhir.org/baseR4"
refuse_to_fetch_third_party_urls: false
fhir_version: R4
# validation:
# requests_enabled: true
# responses_enabled: true
# binary_storage_enabled: true
# bulk_export_enabled: true
# subscription:
# resthook_enabled: true
# websocket_enabled: false
# email:
# from: some@test.com
# host: google.com
# port:
# username:
# password:
# auth:
# startTlsEnable:
# startTlsRequired:
# quitWait:
# lastn_enabled: true
### This is configuration for normalized quantity serach level default is 0
### 0: NORMALIZED_QUANTITY_SEARCH_NOT_SUPPORTED - default
### 1: NORMALIZED_QUANTITY_STORAGE_SUPPORTED
### 2: NORMALIZED_QUANTITY_SEARCH_SUPPORTED
# normalized_quantity_search_level: 2
#elasticsearch:
# debug:
# pretty_print_json_log: false
# refresh_after_write: false
# enabled: false
# password: SomePassword
# required_index_status: YELLOW
# rest_url: 'localhost:9200'
# protocol: 'http'
# schema_management_strategy: CREATE
# username: SomeUsername
## CDS Hook Settings
cdshooks:
enabled: true
fhirserver:
expandValueSets: true
maxCodesPerQuery: 64
searchStyle: GET
prefetch:
maxUriLength: 8000
5 changes: 3 additions & 2 deletions dev/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,19 @@ services:


fhir:
image: hapiproject/hapi:${FHIR_IMAGE_TAG:-v5.5.1}
image: ${FHIR_IMAGE_NAME:-alphora/cqf-ruler}:${FHIR_IMAGE_TAG:-0.8.1}
environment:
SPRING_CONFIG_LOCATION: file:///opt/application.yaml
spring.datasource.url: jdbc:postgresql://db:5432/hapifhir
spring.datasource.username: postgres
spring.datasource.password: postgres
spring.datasource.driverClassName: org.postgresql.Driver
spring.jpa.hibernate.dialect: org.hibernate.dialect.PostgreSQL94Dialect
spring.jpa.properties.hibernate.dialect: ca.uhn.fhir.jpa.model.dialect.HapiFhirPostgres94Dialect

# make URLs relative to fEMR for pagination
# TODO remove when fEMR can rewrite URLs
hapi.fhir.server_address: 'https://femr.${BASE_DOMAIN:-localtest.me}/fhir/'
hapi.fhir.tester.home.server_address: 'https://fhir.${BASE_DOMAIN:-localtest.me}/fhir/'
volumes:
- "./config/hapi/application.yaml:/opt/application.yaml:ro"
depends_on:
Expand Down