-
Notifications
You must be signed in to change notification settings - Fork 0
Constants (1.1)
Constant values can be defined for a value in DHIS 2 that may change depending on defined Tracked Entity Attributes, Tracked Entity Types, Tracker Programs, Data Elements, Option Sets and Options. The typical use case are the options for male and female. These may be defined in a different way.
For a detailed description of all fields, please check the REST API documentation for administration and configuration.
{
"name": "Gender Male",
"description": null,
"category": "GENDER",
"code": "GENDER_MALE",
"dataType": "STRING",
"value": "Male",
"_links": {
"self": {
"href": "https://demos.dhis2.org/fhir-adapter/api/constants/1ded2081-8836-43dd-a5e1-7cb9562c93ef"
},
"constant": {
"href": "https://demos.dhis2.org/fhir-adapter/api/constants/1ded2081-8836-43dd-a5e1-7cb9562c93ef"
}
}
}
The example above defines the constant named "GENDER_MALE". This constant can be used to reference the value "Male". The value "Male" may have been used in as a option set code in DHIS 2. Since the comparison is made case-insensitively by the DHIS 2 FHIR Adapter, there is no need to take care about it when defining the constant in the DHIS 2 FHIR Adapter. The constant value may be "Male" and it will match the DHIS 2 option set code "MALE" as well.
The constants GENDER_MALE and GENDER_FEMALE exist by default and are used to map FHIR Administrative Genders from and to DHIS 2 Options.
The following code snippet maps FHIR administrative gender (variable input
is a FHIR Patient, variable output
is a DHIS 2 Tracked Entity Instance) to a DHIS 2 Tracked Entity Attribute that has the code "PERSON_GENDER".
output.setValue(context.createReference('PERSON_GENDER', 'CODE'), input.gender);
When converting from FHIR to DHIS 2 a lot of conversions from FHIR specific data types (like administrative gender) to DHIS 2 are done automatically.
Copyright (c) 2004-2019, University of Oslo. All rights reserved.
- Default FHIR Patient to DHIS 2 Tracked Entity Instance Mapping
- FHIR Administrative Gender to DHIS 2 Code Set Code
- Initial Setup
- Excel Import of Mappings
- FHIR REST Interfaces
- Connect a new FHIR Server
- Constants
- Coding Systems
- Configure FHIR Resources
- Export and Import
- Limitations
- REST API for Administration and Mapping
- Javascript API for Rules and Transformations to DHIS 2
- Javascript API for Rules and Transformations from DHIS 2
- Connect HAPI FHIR JPA Server
- Connect Jembi HEARTH FHIR Server
- Direct FHIR Import from OpenMRS
- Default FHIR Patient to DHIS 2 Tracked Entity Instance Mapping
- FHIR Administrative Gender to DHIS 2 Code Set Code
- Create Tracker Program with Vital Sign
- Add SNOMED CT Code for Vital Sign
- Export Organizations and Locations to FHIR Server
- Export Patients to FHIR Server
- Handle custom Tracked Entity Instance with no Attributes
- Mapping of Organizations