Skip to content

Commit

Permalink
chore: autopublish 2024-10-29T21:27:59Z
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 29, 2024
1 parent 7c13253 commit a8a0c4b
Show file tree
Hide file tree
Showing 810 changed files with 17,357 additions and 2,925 deletions.
2 changes: 1 addition & 1 deletion projects/dhis2-single-page-docs/am_ET/.cache_timestamp
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-10-28T21:24:15Z
2024-10-29T21:26:27Z
2 changes: 1 addition & 1 deletion projects/dhis2-single-page-docs/ar/.cache_timestamp
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-10-28T21:24:15Z
2024-10-29T21:26:27Z
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
revision_date: '2024-10-25'
tags:
- Develop
- DHIS core version master
- Develop
template: single.html
---

Expand Down Expand Up @@ -2196,6 +2196,133 @@ following payload to change the style:
}
}
```
## Category Option { #category-option }

### Merge category options { #category_option_merge }

The category option merge endpoint allows you to merge a number of category options (sources) into a target category option.

#### Authorisation { #authorisation }

The main authority required to perform a category option merge is `F_CATEGORY_OPTION_MERGE`.
Other authorities required relate to the general sharing and access of category options, `F_CATEGORY_OPTION_PUBLIC_ADD` and `F_CATEGORY_OPTION_DELETE`.

#### Request { #request }

Merge category options with a POST request:

```
POST /api/categoryOptions/merge
```

The payload in JSON format looks like the following:

```json
{
"sources": [
"FbLZS3ueWbQ",
"dPSWsKeAZNw"
],
"target": "rEq3Hkd3XXH",
"deleteSources": true
}
```

The JSON properties are described in the following table.

Table: Merge payload fields

| Field | Required | Value |
|-------------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| sources | Yes | Array of identifiers of the category options to merge (the source category options) |
| target | Yes | Identifier of the category option to merge the sources into (the target category option) |
| deleteSources | No | Whether to delete the source category options after the operation. Default is false. |

The merge operation will merge the source category options into the target category option. One or many source category options can be specified. Only one target should be specified.

The merge operation will transfer all source category option metadata associations to the target category option.
The following metadata get updated:


| Metadata | Property | Action taken |
|---------------------|-----------------|----------------------------|
| Category | categoryOptions | remove sources, add target |
| CategoryDimension | items | remove sources, add target |
| CategoryOptionCombo | categoryOptions | remove sources, add target |
| CategoryOptionGroup | members | remove sources, add target |
| OrganisationUnit | categoryOptions | remove sources, add target |


#### Validation { #validation }

The following constraints and error codes apply.

Table: Constraints and error codes

| Error code | Description |
|------------|-----------------------------------------------------------|
| E1650 | At least one source category option must be specified |
| E1651 | Target category option must be specified |
| E1652 | Target category option cannot be a source category option |
| E1653 | Source/Target category option does not exist: `{uid}` |


#### Response { #response }
##### Success { #success }
Sample success response looks like:

```json
{
"httpStatus": "OK",
"httpStatusCode": 200,
"status": "OK",
"response": {
"mergeReport": {
"mergeErrors": [],
"mergeType": "CATEGORY_OPTION",
"sourcesDeleted": [
"FbLZS3ueWbQ", "dPSWsKeAZNw"
],
"message": "CATEGORY_OPTION merge complete"
}
}
}
```

##### Failure { #failure }
Sample error response looks like:

```json
{
"httpStatus": "Conflict",
"httpStatusCode": 409,
"status": "WARNING",
"message": "One or more errors occurred, please see full details in merge report.",
"response": {
"mergeReport": {
"mergeErrors": [
{
"message": "At least one source category options must be specified",
"errorCode": "E1650",
"args": []
},
{
"message": "Target category option does not exist: `abcdefg1221`",
"errorCode": "E1653",
"args": [
"Target",
"abcdefg1221"
]
}
],
"mergeType": "CATEGORY_OPTION",
"sourcesDeleted": [],
"message": "CATEGORY_OPTION merge has errors"
}
}
}
```


## Data Elements { #data-elements }

Expand Down Expand Up @@ -16347,6 +16474,7 @@ The example will exchange data using the DHIS 2 play environment, and refer to t
To summarize, in this example, event data records were aggregated from the facility level to the national level in the org unit hierarchy and from event data to monthly data values using program indicators. The data values were exchanged with a target DHIS 2 instance by using the `code` property to reference metadata.



# I18n { #i18n }

## Locales { #webapi_locales }
Expand Down Expand Up @@ -17523,6 +17651,7 @@ what permissions they have at each level:
/api/me/dataApprovalWorkflows



# Settings and configuration { #settings-and-configuration }

## System settings { #webapi_system_settings }
Expand Down Expand Up @@ -21523,6 +21652,7 @@ reported during the merge. The only validation done in the service relates to re
mentioned in the previous section.



# Email { #email }

## Email { #webapi_email }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
revision_date: '2024-10-14'
tags:
- Use
- DHIS core version 2.38
- Use
template: single.html
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
revision_date: '2024-10-14'
tags:
- Use
- DHIS core version 2.38
- Use
template: single.html
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
revision_date: '2024-10-14'
tags:
- Use
- DHIS core version 2.39
- Use
template: single.html
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
revision_date: '2024-10-14'
tags:
- Use
- DHIS core version 2.39
- Use
template: single.html
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
revision_date: '2024-10-14'
tags:
- Use
- DHIS core version 2.40
- Use
template: single.html
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
revision_date: '2024-10-14'
tags:
- Use
- DHIS core version 2.40
- Use
template: single.html
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
revision_date: '2024-10-14'
tags:
- Use
- DHIS core version master
- Use
template: single.html
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
revision_date: '2024-10-14'
tags:
- Use
- DHIS core version master
- Use
template: single.html
---

Expand Down
2 changes: 1 addition & 1 deletion projects/dhis2-single-page-docs/cs/.cache_timestamp
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-10-28T21:24:20Z
2024-10-29T21:26:34Z
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
revision_date: '2023-01-13'
tags:
- Vývoj
- DHIS core verze 2.37
- Vývoj
template: single.html
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
revision_date: '2024-07-02'
tags:
- Vývoj
- DHIS základní verze 2.39
- Vývoj
template: single.html
---

Expand Down
Loading

0 comments on commit a8a0c4b

Please sign in to comment.