Got feedback or spotted a mistake?

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

Import Records

This feature is implemented in OpenSpecimen v9.0 to provide the auto bulk import feature from the User Interface. In the older version(Auto Bulk Import) the user has to connect to the server and put the file on the server etc.

Import Records feature supports all the objects like Collection Protocol, Participant, Specimens, etc. The user needs to use the same template specified on the Bulk Import Template wiki page.

Advantages of this feature:

  1. Supported to importing Participant/Specimen centric collection protocol

  2. Can import multiple bulk import files in one go by adding those in ZIP

  3. Schedule the auto bulk import based on the timestamp specified in the file name

  4. Users do not need to use the auto bulk import feature to schedule import jobs.

 

How does the Import Record feature work?

  1. Once the user uploads the file, OpenSpecimen picks the file and import based on the timestamp specified in the file name.

  2. The most recent timestamp file will be picked first and import

 

You need the Super Admin privileges to access this feature.

How to access this feature?

  1. Login to the OpenSpecimen; Go to the Extras → Click on the Imports Records card.

  2. Select the CSV/Zip file and Import

  3. Download the import report

If your ZIP file has multiple CSV like Participant, Visits and Specimens, OpenSpecimen will import the files based on the timestamp added in the CSV file name. So, your participant CSV should be earlier timestamp than your visits and specimens.

Below, an example ZIP file contains – Three files Participant, Visits, and Specimen. OpenSpecimen picks the file based on the timestamp added to that file name.

Rules for the import file naming:

The Import Records features accepted the specific naming conversion files as below.

Data

Format

Description

Data

Format

Description

Standard entities (e.g. Collection Protocol, Participant, Specimen, etc) 

<object_type>_<operation>_<timestamp>_[<csv_type>].csv

  1. object_type: Entity name specified in bulk import schema file (see list below)

  2. operation: Operation to perform, valid values are "create" or "update".

  3. timestamp: In yyyyMMddHHmmssSSS".

  4. csv_type (optional): Specify "m" in case of "Order" and "Shipment"

  5. Examples

    • cp_create_20160511162033124.csv

    • distributionOrder_create_20160511162033124.csv

Custom fields

<entity>_<operation>_<timestamp>_cpId_<cpId>.csv

  1. entity: cpr, visit, specimen.

  2. operation - Operation to be performed, "create" or "update"

  3. timestamp - In "yyyyMMddHHmmssSSS" format

  4. cpId - Specifying Identifier of collection protocol. 

  5. <cpId> - Identifier of collection protocol. You can get this identifier via DB or from the browser URL on the collection protocol overview page.

  6. Example: Specimen custom field level update file

    specimen_update_20200925115950000_cpId_4292.csv

Custom forms

extensions_<attached_level><form_name><operation>_<timestamp>.csv

  1. extensions: Static word to identify a custom form.

  2. attached_level: Level at which form is attached. 

    1. Participant

    2. SpecimenCollectionGroup (i.e Visit)

    3. Specimen

    4. SpecimenEvent

  3. form_name - System generated 'Form Name' of the custom form.

  4. operation - Operation to be performed, "create" or "update"

  5. timestamp - In "yyyyMMddHHmmssSSS" format

  6. Example: extensions_Participant_familyHistoryAnnotation_create_20160511162246252.csv

 

Following is the list of object types for OpenSpecimen entities

Entity

Object Type

Entity

Object Type

Institutes

institute

Site

site

User

user

User Roles

userRoles

Container

storageContainer

Distribution Order

distributionOrder

Shipment

shipment

Collection Protocol

cp

Participant registration

cpr

Participant registrations for multiple CP

cprMultiple

Participant consents

consent

Visits

visit

Specimen

specimen

Aliquots

specimenAliquot

Derivatives

specimenDerivative

Master Specimen

masterSpecimen

 

Examples:

  1. Import Collection Protocol - Participant and Specimen Centric

Fill the details in below-attached template. Rename the template based on the rules provided in the first table. Users can import the CSV file as is or can make a ZIP file and import it.

2. Import Participants

Fill the details in the template and import it as is or import as creating the ZIP file.

 

 

Got feedback or spotted a mistake?

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