Adding Sample Data
You can quickly add test/sample data by copying dataset files into the /santedb/data
directory of the docker container either using a custom dockerfile or by mounting a volume from the docker image.
Dataset Files
These dataset files can be generated from the sdbac
command prompt with the cdr.query
command to produce dataset files. Dataset files provide a 1:1 mapping to the underlying CDR storage engine and are expressed in XML RIM objects. Dataset files can include:
Infrastructure elements like Assigning Authorities, Concepts, Extension Types, etc.
Clinical elements like Entities or Acts
For example, to initialize an MPI with an identity domain, and an organization with a custom policy, for a particular use case, create a new dataset file containing the identity domain, organization and custom policy:
The file would be copied into the /santedb/data directory of the santedb-mpi or santedb-icdr container with the following Dockerfile.
FHIR Resources
You can also seed data into the /santedb/data/fhir
directory of the container using a custom dockerfile or by mounting the volume from the docker container.
FHIR resources are limited to only those resources which have a IFhirResourceHandler implementation registered and configured. (TODO: Insert link)
FHIR resources can be in JSON or in XML format, and are simply placed in the directory. The seeder then processes these files on application start and will generate two files:
A file with a .completed extension which indicates that the message contents were successfully processed and included into the SanteDB iCDR database.
A file with a .response extension which is the FHIR response that would have been sent via the REST API. This is useful for diagnosing issues with your FHIR message being seeded.
Seeding data via FHIR requires at least version 2.1.11 of the iCDR FHIR plugin.
Deploying on Container
You can deploy either dataset files or FHIR files onto your running iCDR container by either including the files in a custom Dockerfile
such as:
Alternately , you can mount the /santedb/data
directory as a volume for your container and copy the files, or you can use a command line interface and docker cp
such as:
Last updated