Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 4.01 KB

File metadata and controls

38 lines (28 loc) · 4.01 KB

Domain 'locations'

The locations subfolder contains CSV import files for saving locations in bulk. This is a possible example of its content:

locations/
  ├──locations.csv
  └── ...

There is currently only one format for the location CSV line, here are the possible headers with a sample data set:

Uuid Void/Retire Name Description Parent Tags Attribute|9eca4f4e-707f-4bb8-8289-2f9b6e93803c Attribute|Last Audit Date Address 1 Address 2 Address 3 Address 4 Address 5 Address 6 City/Village County/District State/Province Postal Code Country
a03e395c-b881-49b7-b6fc-983f6bddc7fc The Lake Clinic-Cambodia Login Location; Facility Location HQ Facility 2017-05-15 Paradise Street Siem Reap Siem Reap Cambodia
OPD Room The Lake Clinic-Cambodia Consultation Location


Let's review some important headers.

Header Name (mandatory)

This is not a localized header.

Header Parent

This is a pointer to the parent location. Both location UUIDs and names are supported to refer to another location.

Header Tags

The list of location tags. Location tag names should be provided. Those names can point to either existing location tags, or if no existing tag is found a new tag with the specified name will be created.

Attribute headers

Locations support attributes. The values for those attributes can be set under ad-hoc headers starting with the special prefix Attribute|. The value indicated on a CSV line will be resolved to its final value based on the type of the attribute. Let us look at an example:

Attribute|Last Audit Date
2017-05-15

This attribute points to an attribute type identified by "Last Audit Date". The attribute type identifier (a name here) suggests that it might be an attribute of custom datatype Date. This means that its value, represented by the string 2017-05-15, will eventually be resolved as the Java date Mon May 15 00:00:00 2017 set as an attribute of the location described by the CSV line.

The RHS of the attribute header, the part that refers to the attribute type, can either point to an attribute type name or to an attribute type UUID.

Further examples:

Please look at the test configuration folder for sample import files for all domains, see here.