Skip to content

Kodjin Configuration

How to enable history functionality

History should be configured in common configuration file for all services - globals.yaml.gotmpl. The configuration file's path is - etc/kodjin/{environment}/globals.yaml.gotmpl

History will only start to record events after you enable it. It will not get filled with existing data. For this reason it is highly recommended to enable history before cluster creation

To enable History the HISTORY_ENABLED should be set to true

Set HISTORY_ENABLED to true in kodjin globals

envs:
  history:
    HISTORY_ENABLED: true

when history is enabled, the clickhouse (deps) and fhir-server-clickhouse-migrations (kodjin) releases also need to be enabled

Example

file's path is etc/deps/<environment>/releases.yaml:

clickhouse:
  enabled: true

file's path is etc/kodjin/<environment>/releases.yaml:

fhir-server-clickhouse-migrations:
  enabled: true

If HISTORY_ENABLED was set to true after cluster creation (which is not recommended) all the relevant releases should be deployed using rmk tool
rmk release -- -l namespace=clickhouse -l app=fhir-server-clickhouse-migrations -l app=fhir-server-search -l app=fhir-server-api sync

How to switch on Multi-tenancy on Kodjin cluster

Headers and access token claims should be configured in Kodjin's infrastructure configuration file.

The configuration file indicates whether multi-tenancy is enabled and also provides information about URLs excluded from the multi-tenancy logic. The configuration file's path is - etc/kodjin/{environment}/values/fhir-config/multitenancy.json

Example of the file

"enabled": true,
"mandatory_metadata": {
  "tenant-id": {"rbac_claim": "practice_id"},
  "owned-by":  {"rbac_claim": "organization_id"},
},
"exclude_resources": [
    "CapabilityStatement",
    "ImplementationGuide",
    "SearchParameter",
    "ValueSet",
    "CodeSystem",
    "ConceptMap"
  ]

This configuration file should be delivered to Kodjin FHIR server services that support the multi-tenancy option. Kodjin's infrastructure configuration is pre-configured to deliver this configuration to services using a common configuration for all services - globals.yaml.gotmpl

Configuring bulk-export operation

To change the default value for time while exported resources are accessible for downloading (time-to-live or TTL) by bulk-export operation the Kodjin's cluster administrator should override the default value. The configuration file's path is: etc/kodjin/{environment}/values/fhir-server-search-export.yaml.gotmpl. Then add or modify value: OBJECT_TTL: 10

If OBJECTS_TTL value was changed after the cluster has been created all the fhir-server-search-export release should be deployed using rmk tool
rmk release -- -l app=fhir-server-search-export sync