Tools module (import/export, registers)

 

General information

 

The openIMIS tools module provides import and export functionalities for various types of data, in various formats.

The list of currently supported format is:

  • XLS

  • XLSX

  • JSON

  • CSV

  • XML

The XML files are handled by in-house code, whereas all the other formats are managed with the django-import-export plugin.

Medical Items - medical.Item

Export

You can export medical items in all supported formats described in the introduction.

Import

To easily import new medical items, you can:

  1. Export the current items in the preferred format

  2. Add the required information for each new item in the next lines.

This way, you don’t need to recreate the file structure from scratch.

 

You can import medical items in all supported formats described in the introduction.

Currently, the import strategy and the dry run checkbox are taken into account only for XML files. Their value will be ignored for any other type of upload, even if the strategy is required.

File structure

The following table provides the import/export file structure, along with an example of item values.

male_cat

female_cat

adult_cat

minor_cat

delete

code

name

type

package

price

quantity

care_type

frequency

male_cat

female_cat

adult_cat

minor_cat

delete

code

name

type

package

price

quantity

care_type

frequency

1

0

1

1

 

TEST_I

Test Item

D

Package

5.22

4

B

1

Result in openIMIS after uploading the above example

 

List of fields and possible values

Field Name

Possible values

Optional / Mandatory

Explanation

Field Name

Possible values

Optional / Mandatory

Explanation

male_cat

  • 0

  • 1

Mandatory

  • 0 = this item cannot be given to males

  • 1 = this item can be given to males

female_cat

  • 0

  • 1

Mandatory

  • 0 = this item cannot be given to females

  • 1 = this item can be given to females

adult_cat

  • 0

  • 1

Mandatory

  • 0 = this item cannot be given to adults

  • 1 = this item can be given to adults

minor_cat

  • 0

  • 1

Mandatory

  • 0 = this item cannot be given to children

  • 1 = this item can be given to children

delete

  • 0

  • 1

  • Nothing

Optional

  • 1 = this item will be deleted

  • Otherwise, this item will not be deleted

code

Any code, from 1 to 6 characters

Mandatory

Codes must be unique

name

Any name, from 1 to 100 characters

Mandatory

 

type

  • D

  • M

Mandatory

  • D = drug

  • M = consumable

package

  • Any package description, with maximum 255 characters

  • Nothing

Optional

 

price

Any price, formatted such as 123.45

Mandatory

  • No currency label

  • With a . for decimals (optional if the price is an integer, such as 420)

  • No , for thousands separator (e.g. 1234567.89)

quantity

  • Any integer up to 32767

  • Nothing

Optional

 

care_type

  • I

  • O

  • B

Mandatory

  • I = for in patients

  • O = for out patients

  • B = for both

frequency

  • Any integer up to 32767

  • Nothing

Optional

 

 

 


Medical Services - medical.Service

Export

You can export medical services in all supported formats described in the introduction.

Import

To easily import new medical services, you can:

  1. Export the current services in the preferred format

  2. Add the required information for each new service in the next lines.

This way, you don’t need to recreate the file structure from scratch.

 

You can import medical services in all supported formats described in the introduction.

Currently, the import strategy and the dry run checkbox are taken into account only for XML files. Their value will be ignored for any other type of upload, even if the strategy is required.

File structure

The following table provides the import/export file structure, along with an example of service values.

male_cat

female_cat

adult_cat

minor_cat

delete

category

code

name

type

level

price

care_type

frequency

male_cat

female_cat

adult_cat

minor_cat

delete

category

code

name

type

level

price

care_type

frequency

0

1

0

0

 

 

TEST_S

Test Service

P

D

42

O

2

Result in openIMIS after uploading the above example

 

List of fields and possible values

Field Name

Possible values

Optional / Mandatory

Explanation

Field Name

Possible values

Optional / Mandatory

Explanation

male_cat

  • 0

  • 1

Mandatory

  • 0 = this service cannot be provided to males

  • 1 = this service can be provided to males

female_cat

  • 0

  • 1

Mandatory

  • 0 = this service cannot be provided to females

  • 1 = this service can be provided to females

adult_cat

  • 0

  • 1

Mandatory

  • 0 = this service cannot be provided to adults

  • 1 = this service can be provided to adults

minor_cat

  • 0

  • 1

Mandatory

  • 0 = this service cannot be provided to children

  • 1 = this service can be provided to children

delete

  • 0

  • 1

  • Nothing

Optional

  • 1 = this service will be deleted

  • Otherwise, this service will not be deleted

category

  • S

  • D

  • A

  • H

  • C

  • O

  • V

  • Nothing

Optional

  • S = surgery

  • D = delivery

  • A = antenatal

  • H = hospitalization

  • C = consultation

  • O = other

  • V = visit

code

Any code, from 1 to 6 characters

Mandatory

Codes must be unique

name

Any name, from 1 to 100 characters

Mandatory

 

type

  • C

  • P

Mandatory

  • C = curative

  • P = preventative

level

  • S

  • V

  • D

  • H

Mandatory

  • S = simple service

  • V = visit

  • D = day hospital

  • H = hospital care

price

Any price, formatted such as 123.45

Mandatory

  • No currency label

  • With a . for decimals (optional if the price is an integer, such as 420)

  • No , for thousands separator (e.g. 1234567.89)

care_type

  • I

  • O

  • B

Mandatory

  • I = for in patients

  • O = for out patients

  • B = for both

frequency

  • Any integer up to 32767

  • Nothing

Optional

 

 

 

 


Diagnoses

Only XML.


Locations

Only XML.


Health Facilities

Only XML.

 

Did you encounter a problem or do you have a suggestion?

Please contact our Service Desk



This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. https://creativecommons.org/licenses/by-sa/4.0/