Repository

Create custom resources, search parameters, indexes in Configuration project

Repository is our concept of wrapping resourceType-specific entities, as search parameters, indexes, and more, into one entity, called repository. With defined repository, you can create custom resource, search parameters and indexes.

Create repository

Prerequisites: check out Aidbox configuration project structure.

To create a repository add a service aidbox.repository.v1 in system.edn like this.

zrc/system.edn
{ns main
 import #{aidbox.index.v1
          aidbox.search-parameter.v1
          aidbox
          aidbox.repository.v1
          zen.fhir}

 zen-config
 {...}

patient-repository
 {:zen/tags #{aidbox.repository.v1/repository}
  :resourceType "Patient" ; or your own
  :indexes #{<my-indexes>}
  :extra-parameter-sources :all
  :search-parameters #{<my-parameters>}}

 repositories
 {:zen/tags #{aidbox/service}
  :engine aidbox.repository.v1/engine
  :repositories #{patient-repository <my-other-repositories>}
  :load-default true}

 box {:zen/tags #{aidbox/system}
      :config   zen-config
      :services
      {:repositories repositories}}}

Here we defined patient-repository which can contain custom search-parameters and indexes.

Create custom resource

Described in Custom resources module.

Create search parameter

Described in SearchParameter page.

Create index for search parameter

Described in Index page.

Create index by SQL

Described in Index page.

Last updated