Category cannot be opened

dear,

I created category, catCombo catOption via API, I got a 200 and the item are visible in the lists BUT I cannot open some categories and DataElementValue push fails

I pushed it on play and I found the same weird element in the failing to open Category

ex;

"categoryCombos":[null,{"id":"TIAbMD7ETV6"},{"id":"dGqzAN0Ji6D"}]

any Idea why ?

here the metadata payload

{
  "categories": [
    {
      "name": "ageGroup",
      "id": "luGsRXitbq9",
      "code": "ageGroup",
      "shortName": "ageGroup",
      "dataDimensionType": "DISAGGREGATION",
      "categoryOptions": [
        {
          "id": "BT49qinT8J7"
        },
        {
          "id": "ihP2RNzP0fm"
        },
        {
          "id": "N3B2jlgiRHX"
        },
        {
          "id": "GKQoNeejjdU"
        },
        {
          "id": "bByb9n23vPv"
        },
        {
          "id": "CMBqeoNZCY8"
        },
        {
          "id": "yWAJBUx0X7L"
        },
        {
          "id": "aT7zpmlMDE5"
        }
      ]
    },
    {
      "name": "sex",
      "id": "Tv9b9dYOHMG",
      "code": "sex",
      "shortName": "sex",
      "dataDimensionType": "DISAGGREGATION",
      "categoryOptions": [
        {
          "id": "j8ft17oIEID"
        },
        {
          "id": "paLPcwxxBRs"
        }
      ]
    },
    {
      "name": "payment_status",
      "id": "D6kthOINtaj",
      "code": "payment_status",
      "shortName": "payment_status",
      "dataDimensionType": "DISAGGREGATION",
      "categoryOptions": [
        {
          "id": "rX1JDBLwBiA"
        },
        {
          "id": "C8KH26bjs7Q"
        },
        {
          "id": "XmyWM5dAZox"
        }
      ]
    },
    {
      "name": "payment_state",
      "id": "YNcYTPXdB6r",
      "code": "payment_state",
      "shortName": "payment_state",
      "dataDimensionType": "DISAGGREGATION",
      "categoryOptions": [
        {
          "id": "xgxX1kA2tBt"
        },
        {
          "id": "rQTOPbaZ6uJ"
        }
      ]
    },
    {
      "name": "item_status",
      "id": "CmKkpIAtKiZ",
      "code": "item_status",
      "shortName": "item_status",
      "dataDimensionType": "DISAGGREGATION",
      "categoryOptions": [
        {
          "id": "pm3cAUuPSoI"
        },
        {
          "id": "RhMtzZxNr6r"
        }
      ]
    },
    {
      "name": "item_type",
      "id": "QY8oxETWP5x",
      "code": "item_type",
      "shortName": "item_type",
      "dataDimensionType": "DISAGGREGATION",
      "categoryOptions": [
        {
          "id": "u5ttdA70HEl"
        },
        {
          "id": "rogTXSuXf1m"
        },
        {
          "id": "k5hHXh6KrOo"
        }
      ]
    },
    {
      "name": "claim_status",
      "id": "IDB1T35Fs2E",
      "code": "claim_status",
      "shortName": "claim_status",
      "dataDimensionType": "DISAGGREGATION",
      "categoryOptions": [
        {
          "id": "DUkYtLabJWL"
        },
        {
          "id": "RhMtzZxNr6r"
        }
      ]
    }
  ],
  "categoryOptions": [
    {
      "name": "0-5",
      "id": "BT49qinT8J7",
      "code": "0-5"
    },
    {
      "name": "6-12",
      "id": "ihP2RNzP0fm",
      "code": "6-12"
    },
    {
      "name": "13-18",
      "id": "N3B2jlgiRHX",
      "code": "13-18"
    },
    {
      "name": "19-25",
      "id": "GKQoNeejjdU",
      "code": "19-25"
    },
    {
      "name": "26-35",
      "id": "bByb9n23vPv",
      "code": "26-35"
    },
    {
      "name": "36-55",
      "id": "CMBqeoNZCY8",
      "code": "36-55"
    },
    {
      "name": "56-75",
      "id": "yWAJBUx0X7L",
      "code": "56-75"
    },
    {
      "name": "76+",
      "id": "aT7zpmlMDE5",
      "code": "76+"
    },
    {
      "name": "M",
      "id": "j8ft17oIEID",
      "code": "M"
    },
    {
      "name": "F",
      "id": "paLPcwxxBRs",
      "code": "F"
    },
    {
      "name": "paid",
      "id": "rX1JDBLwBiA",
      "code": "paid"
    },
    {
      "name": "partialy-paid",
      "id": "C8KH26bjs7Q",
      "code": "partialy-paid"
    },
    {
      "name": "not-paid",
      "id": "XmyWM5dAZox",
      "code": "not-paid"
    },
    {
      "name": "new",
      "id": "xgxX1kA2tBt",
      "code": "new"
    },
    {
      "name": "renew",
      "id": "rQTOPbaZ6uJ",
      "code": "renew"
    },
    {
      "name": "approved",
      "id": "pm3cAUuPSoI",
      "code": "approved"
    },
    {
      "name": "rejected",
      "id": "RhMtzZxNr6r",
      "code": "rejected"
    },
    {
      "name": "Emergency",
      "id": "u5ttdA70HEl",
      "code": "Emergency"
    },
    {
      "name": "Referrals",
      "id": "rogTXSuXf1m",
      "code": "Referrals"
    },
    {
      "name": "Other",
      "id": "k5hHXh6KrOo",
      "code": "Other"
    },
    {
      "name": "aproved",
      "id": "DUkYtLabJWL",
      "code": "aproved"
    }
  ],
  "categoryCombos": [
    {
      "name": "ageGroup_sex",
      "id": "UBCZTtKoxWg",
      "code": "age_sex",
      "shortName": "age_sex",
      "categories": [
        {
          "id": "luGsRXitbq9"
        },
        {
          "id": "Tv9b9dYOHMG"
        }
      ],
      "dataDimensionType": "DISAGGREGATION"
    },
    {
      "name": "ageGroup_payment_state_payment_status_sex",
      "id": "TIAbMD7ETV6",
      "code": "age_pay_pay_sex",
      "shortName": "age_pay_pay_sex",
      "categories": [
        {
          "id": "luGsRXitbq9"
        },
        {
          "id": "Tv9b9dYOHMG"
        },
        {
          "id": "D6kthOINtaj"
        },
        {
          "id": "YNcYTPXdB6r"
        }
      ],
      "dataDimensionType": "DISAGGREGATION"
    },
    {
      "name": "ageGroup_item_status_item_type_sex",
      "id": "Ujxpt8MQQI1",
      "code": "age_ite_ite_sex",
      "shortName": "age_ite_ite_sex",
      "categories": [
        {
          "id": "CmKkpIAtKiZ"
        },
        {
          "id": "QY8oxETWP5x"
        },
        {
          "id": "Tv9b9dYOHMG"
        },
        {
          "id": "luGsRXitbq9"
        }
      ],
      "dataDimensionType": "DISAGGREGATION"
    },
    {
      "name": "ageGroup_claim_status_item_type_sex",
      "id": "dGqzAN0Ji6D",
      "code": "age_cla_ite_sex",
      "shortName": "age_cla_ite_sex",
      "categories": [
        {
          "id": "IDB1T35Fs2E"
        },
        {
          "id": "QY8oxETWP5x"
        },
        {
          "id": "Tv9b9dYOHMG"
        },
        {
          "id": "luGsRXitbq9"
        }
      ],
      "dataDimensionType": "DISAGGREGATION"
    }
  ],
  "dataElements": [
    {
      "name": "NB_INSUREES",
      "id": "IjXDFHSWw8n",
      "code": "NB_INSUREES",
      "shortName": "NB_INSUREES",
      "aggregationType": "SUM",
      "domainType": "AGGREGATE",
      "valueType": "NUMBER",
      "categoryCombo": {
        "id": "UBCZTtKoxWg"
      }
    },
    {
      "name": "NB_FAMILY",
      "id": "bPjbBbjECI1",
      "code": "NB_FAMILY",
      "shortName": "NB_FAMILY",
      "aggregationType": "SUM",
      "domainType": "AGGREGATE",
      "valueType": "NUMBER",
      "categoryCombo": {
        "id": "TIAbMD7ETV6"
      }
    },
    {
      "name": "SUM_CONTRIBUTIONS",
      "id": "eUHBJXdKBr8",
      "code": "SUM_CONTRIBUTIONS",
      "shortName": "SUM_CONTRIBUTIONS",
      "aggregationType": "SUM",
      "domainType": "AGGREGATE",
      "valueType": "NUMBER"
    },
    {
      "name": "NB_CLAIM",
      "id": "AYFt457XLmN",
      "code": "NB_CLAIM",
      "shortName": "NB_CLAIM",
      "aggregationType": "SUM",
      "domainType": "AGGREGATE",
      "valueType": "NUMBER",
      "categoryCombo": {
        "id": "Ujxpt8MQQI1"
      }
    },
    {
      "name": "NB_CLAIM_ITEM",
      "id": "cYBrQuKsAUS",
      "code": "NB_CLAIM_ITEM",
      "shortName": "NB_CLAIM_ITEM",
      "aggregationType": "SUM",
      "domainType": "AGGREGATE",
      "valueType": "NUMBER",
      "categoryCombo": {
        "id": "dGqzAN0Ji6D"
      }
    },
    {
      "name": "NB_CLAIM_SERVICE",
      "id": "gdwnsTlNDVr",
      "code": "NB_CLAIM_SERVICE",
      "shortName": "NB_CLAIM_SERVICE",
      "aggregationType": "SUM",
      "domainType": "AGGREGATE",
      "valueType": "NUMBER",
      "categoryCombo": {
        "id": "dGqzAN0Ji6D"
      }
    },
    {
      "name": "NB_BENEFIT",
      "id": "U3z5QNFJEkC",
      "code": "NB_BENEFIT",
      "shortName": "NB_BENEFIT",
      "aggregationType": "SUM",
      "domainType": "AGGREGATE",
      "valueType": "NUMBER",
      "categoryCombo": {
        "id": "dGqzAN0Ji6D"
      }
    },
    {
      "name": "SUM_ASKED_BENEFIT",
      "id": "Gz0LtxKeRfQ",
      "code": "SUM_ASKED_BENEFIT",
      "shortName": "SUM_ASKED_BENEFIT",
      "aggregationType": "SUM",
      "domainType": "AGGREGATE",
      "valueType": "NUMBER",
      "categoryCombo": {
        "id": "dGqzAN0Ji6D"
      }
    }
  ],
  "dataSets": [
    {
      "name": "Enrolment",
      "id": "tS4D4c2HiTk",
      "code": "Enrolment",
      "dataSetElements": [
        {
          "dataElement": {
            "id": "IjXDFHSWw8n"
          },
          "dataSet": {
            "id": "tS4D4c2HiTk"
          }
        },
        {
          "dataElement": {
            "id": "bPjbBbjECI1"
          },
          "dataSet": {
            "id": "tS4D4c2HiTk"
          }
        },
        {
          "dataElement": {
            "id": "eUHBJXdKBr8"
          },
          "dataSet": {
            "id": "tS4D4c2HiTk"
          }
        }
      ],
      "periodType": "Monthly"
    },
    {
      "name": "PROCESSED_CLAIM",
      "id": "xPaW8A6hAAE",
      "code": "PROCESSED_CLAIM",
      "dataSetElements": [
        {
          "dataElement": {
            "id": "AYFt457XLmN"
          },
          "dataSet": {
            "id": "xPaW8A6hAAE"
          }
        },
        {
          "dataElement": {
            "id": "cYBrQuKsAUS"
          },
          "dataSet": {
            "id": "xPaW8A6hAAE"
          }
        },
        {
          "dataElement": {
            "id": "gdwnsTlNDVr"
          },
          "dataSet": {
            "id": "xPaW8A6hAAE"
          }
        },
        {
          "dataElement": {
            "id": "U3z5QNFJEkC"
          },
          "dataSet": {
            "id": "xPaW8A6hAAE"
          }
        },
        {
          "dataElement": {
            "id": "Gz0LtxKeRfQ"
          },
          "dataSet": {
            "id": "xPaW8A6hAAE"
          }
        }
      ],
      "periodType": "Monthly"
    }
  ]
}
1 Like

Thanks for reporting this @pmpdelcroix! It will require some more testing to figure it out, but it will help a lot if you would please share the steps to reproduce as well.

Please what is the API request that is failing exactly? It’ll be a good idea to learn more about the endpoint and the configuration around it. Does it fail in all the versions? When does it not fail? …etc More info will help investigate it further.

Thanks!

Hi,

that is my issue no error on the API when loading the metadata but:

  • on the frontend I cannot open few categories such as sex DHIS 2 Demo - Sierra Leone

  • on the API, when I try to push DataValueSet using ADX

"conflicts": [
            {
                "objects": {},
                "value": "Data element not found or not accessible: `null`",
                "errorCode": "E7610",
                "property": "dataElement",
                "indexes": [
                    0,
                    1,
                    2,
                    3,
                    4,
                    5,
                    6,
                    7,
                    8,
                    9,
                    10,
                    11,
                    12,
                    13,
                    14,
                    15,
                    16,
                    17,
                    18,
                    19,
                    20,
                    21,
                    22,
                    23,
                    24
                ]
            },
            {
                "object": "ADX Error",
                "value": "Value for categoryOptionCombo is null"
            }
        ]

the issue really seems linked to the fact that there is null in the category.categoryCombo because I could find the DE via the code

https://play.dhis2.org/40.0.0/api/29/dataElements?filter=code:eq:NB_INSUREES

DE shows no null

https://play.dhis2.org/40.0.0/api/29/dataElements/IjXDFHSWw8n

CatCopmbo llok also OK

https://play.dhis2.org/40.0.0/api/29/categoryCombos/UBCZTtKoxWg

what is weirder is that on category is used only in 1 catCombo BUT in the json representation I see 2 nullin the categoryCombos list

here the metadata used
metadata.json (10.8 KB)

I am facing this issue on v40 and v2.39 on my private server and play server

other findings:

  • the metadata import works well on 2.35, 2.37, 2.38

So I guess it is a 2.39+ bug, I will use 2.38

br

I still have an issue that I don’t get:

I tied the ADX upload with the example Data - DHIS2 Documentation (the data code is DS_387142 not TB/HIV (VCCT))

it works

BUT when I push my data it said

"object": "ADX Error",
 "value": "Value for categoryOptionCombo is null"

I checked that my categoryComboOption are there: they were

then I checked the difference with the example and I found that the catoptionCombo have a code (manually created I guess), on the code level the error is due to an empty value so I tried to add a code manually on one of my catoptioncombo and the number of error was down to 1, so change the url to

{{host}}/api/dataValueSets?dataElementIdScheme=code&orgUnitIdScheme=code&categoryOptionComboIdScheme=uid

and I got better results (still some error but they seem data related)

I’m investigating the issue of null categoryCombos. You can track the progress here DHIS2-15351.

2 Likes