mekomsolutions / openmrs-module-initializer

The OpenMRS Initializer module is an API-only module that processes the content of the configuration folder when it is found inside OpenMRS' application data directory.
MIT License
23 stars 79 forks source link

Add support for Cohort Attribute types #245

Closed icrc-loliveira closed 1 year ago

icrc-loliveira commented 1 year ago

Domain 'cohortattributetypes'

The cohortattributetypes subfolder contains CSV import files for defining cohort Attribute types, used by the cohort module.

This is a possible example of its contents:

cohorttypes/
  ├──cohortattributetypes.csv
  └── ...

The format of this CSV should be as follows:

Uuid Void/Retire Name Description Datatype classname Min occurs Max occurs Preferred handler classname Handler config _order:1000
09790099-9190-429d-811a-aac9edb8d98e Control This is a control group. org.openmrs.customdatatype.datatype.FreeTextDatatype

Headers that start with an underscore such as _order:1000 are metadata headers. The values in the columns under those headers are never read by the CSV parser.

Header Name

This is required for every entry. This will be the name of the cohort attribute type, wherever that is used.

Header Description

This is required for every entry. This will be the description of the cohort attribute type, wherever that is used.

Header Datatype classname (mandatory)

This points to the Java type of the attribute that is defined by the attribute type. Here is the list of possible values.