Export/Import Container Definition
Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

Export/Import Container Definition

Introduction

The export/import feature (introduced in v4.1) helps you move containers from one instance of OpenSpecimen to another. When a new freezer needs to be set up in OpenSpecimen, you can create it on a test server to ensure everything works as expected. Once the structure is finalized, this can be moved to production using this feature.

Export Containers

  1. Go to the 'Containers' list page

  2. Select one or more containers

  3. Click on 'Export' to export the container definition



  4. A zip file gets downloaded with the whole freezer definition as a CSV file

  5. If the data to be exported is more, an email will be sent to the registered mail Id.

The exported file is only the freezer's structure but not the details of the specimens stored in it.

Import Containers

The CSV file generated by exporting can be used for importing, or a template can be downloaded. Refer to the data dictionary on the wiki page for adding data to the template file. This is useful for moving containers from one server to another, like a test to production. 

Pre-requisites for importing containers:

  • Import the container types, if any, associated with the containers being imported. For more details, refer to the wiki page.

  • Collection Protocols: If any CP restrictions are set for the containers, these have to exist before importing the containers

  • Sites: The parent site associated with the container should exist

Follow the below steps to import the container CSV

  1. Go to 'Containers' →  'Import' → 'Containers.'

  2. Upload the CSV file and click on Create for a new container or update to save any changes to an existing container.

  3. Click on validate and import.

  4. Refer to 'Import status' to check the status of the import job.

Updating Collection Protocol and Specimen Type restrictions

  1. Adding new restrictions:

    Add multiple columns to set restrictions. e.g., Allowed Specimen Type#1, Allowed Specimen Type#2, Allowed Collection Protocol#1, Allowed Collection Protocol#2.
    The values should match with collection protocol short title, Specimen type values defined in dropdown manager
    To add a Collection Protocol restriction: The Site of container should also be associated with the Collection Protocol.

  2. Removing existing restrictions
    From the container definition export: replace existing value in Allowed Specimen Type#1/ Allowed Collection Protocol#1 with ‘##set_to_blank##’.

Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com