Issue in version 2.0 of dhis report release

Hi, I was working on released version 2.0 of dhisreport. After generic setup and customization, while previewing the report, I got following error : 2017-01-05 17:48:58.010::WARN: /openmrs/module/dhisreport/executeReport.form java.lang.RuntimeException: This report is not of the right class _ at org.openmrs.module.dhisreport.api.impl.DHIS2ReportingServiceImpl.generateReportingReportDefinition(DHIS2ReportingServiceImpl.java:300)_

​I am attaching sample reportDefination file. ​

​Any idea​, what is it that I am missing?

Note : OpenMRS version - 1.9.8 After importing reportDefination, in dhisreport_report_definition table, uuid column is null.reportDesign.docx (11.0 KB)

1 Like

Hello @sagarbele,

The 2.0 version of dhisreport only supports simple indicator reports and does not support disaggregated reports (as indicated by your report design). Also, only periodic indicator reports are supported.

Hi Maurya i am ghanshyam from HISP India.i have worked on sdmx.i am extracting the info for ADX.as ADX has last released in april 2016.can you give the format of report definition file for ADX 2.0 release.please also tell me which version of DHIS will support ADX 2.0 release. as i have DHIS website and i found ADX format as per below link https://docs.dhis2.org/2.26/en/developer/html/webapi_adx_data_format.html in ADX 2.0 release dataset is absent.then how data will be posted from ADX 2.0 to DHIS. i have also gone through trunk i.e 2.1 snapshot version of ADX in that you have added dataset.what is the plan for release of ADX 2.1 version.as there is long back in april 2016 you have released first version i.e 2.0 after that nothing.please also send me report definition file format for 2.1 snapshot as i have tried 2.1 snapshot and getting unsupported media type i.e response code is 415. please help us on this as you are leading ADX currently.

@maurya do you have any response to the above?

Hello @ghanshyamcusat2006,

This module is not ready for production as DHIS2 does not yet support DSD export of ADX dataset in a released version.

  • the latest developments on this work were done by @wyclif in this branch but, these changes are built against a unreleased version of DHIS2 2.29- https://github.com/openmrs/openmrs-module-dhisreport/tree/adx. You should be able to install that and it should be ready for configuration.
  • It was tested against was DHIS2 2.29.
  • This module depends on the dataset being already configured in DHIS2 and this module only imports the dataset and allows you to configure either SQL statements or Reporting module’s Periodic indicator report’s indicators to the DHIS2 dataset elements/indicators.
  • I think to test this version a sample DSD for import would look like - <?xml-model href="../schema/dsd_validation.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>

<mes:Structure xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:com=“http://www.sdmx.org/resources/sdmxml/schemas/v2_1/common” xmlns:str=“http://www.sdmx.org/resources/sdmxml/schemas/v2_1/structure” xmlns:mes=“http://www.sdmx.org/resources/sdmxml/schemas/v2_1/message” xsi:schemaLocation=“http://www.sdmx.org/resources/sdmxml/schemas/v2_1/message …/schema/sdmx/SDMXMessage.xsd”>

<mes:Header>
    <mes:ID>DS_SAMPLE</mes:ID>
    <mes:Test>false</mes:Test>
    <mes:Prepared>2018-03-26T23:45:31.00Z</mes:Prepared>
    <mes:Sender id=“sample_demo”/>
</mes:Header>
<mes:Structures>
    <str:Codelists>
        <!-- These is required for a valid ADX but we are not using it -->
        <Codelist id="CL_ORGUNIT" agencyID=“sample_id” version="1.0">
            <Name xml:lang="en">OrgUnit code list</Name>
            <Code id=“SAMPLE_1”>
                <Name xml:lang="en">Location A Clinic</Name>
            </Code>
        </Codelist>
        <Codelist id="CL_DATAELEMENT" agencyID="sample_id" version="1.0">
            <Name xml:lang="en">Sample data elements</Name>
            <!-- The id needs to be the UID of the data element in the dhis2 instance -->
            <Code id="DE_PHCR">
                <Annotations>
                    <Annotation id="Disaggregation">
                        <AnnotationText>GENDER</AnnotationText>
                    </Annotation>
                    <Annotation id="Disaggregation">
                        <AnnotationText>DC_COUNT</AnnotationText>
                    </Annotation>
                </Annotations>
                <Name xml:lang="en">
                    Patients Having Case Reports
                </Name>
            </Code>
        </Codelist>
        <!-- These next 2 codelists have be replaced with codelists of the actual aggregation categories your data elements use -->
        <Codelist id="CL_GENDER" agencyID="sample_id" version="1.0">
            <Name xml:lang="en">Male and Female</Name>
            <!-- This ids of the code tags need to match the UIDs of the category options in the dhis2 instance -->
            <Code id="MLE">
                <Name xml:lang="en">Male</Name>
            </Code>
            <Code id="FMLE">
                <Name xml:lang="en">Female</Name>
            </Code>
        </Codelist>
        <Codelist id="CL_DC_COUNT" agencyID="sample_id" version="1.0">
            <Name xml:lang="en">One, More Than One</Name>
            <Code id="DC_COUNT_ONE">
                <Name xml:lang="en">One</Name>
            </Code>
            <Code id="DC_COUNT_MTO">
                <Name xml:lang="en">More than One</Name>
            </Code>
        </Codelist>
    </str:Codelists>
    <str:Concepts>
        <str:ConceptScheme id="ADX_MANDATORY_CONCEPTS" agencyID="IHE_QRPH" version="1.0" isExternalReference="false" >
            <com:Name xml:lang="en">Mandatory concepts defined by IHE ADX profile</com:Name>
        </str:ConceptScheme>
        <ConceptScheme id=“SAMPLE_CONCEPTS" agencyID="sample_id" version="1.0">
            <Name xml:lang="en">SAMPLE concepts</Name>
            <Concept id="GENDER">
                <Name xml:lang="en">Male and Female</Name>
                <CoreRepresentation>
                    <Enumeration>
                        <Ref agencyID="sample_id" version="1.0" id="CL_GENDER"/>
                    </Enumeration>
                </CoreRepresentation>
            </Concept>
            <Concept id="DC_COUNT">
                <Name xml:lang="en">One, More Than One</Name>
                <CoreRepresentation>
                    <Enumeration>
                        <Ref agencyID="sample_id" version="1.0" id="CL_DC_COUNT"/>
                    </Enumeration>
                </CoreRepresentation>
            </Concept>
        </ConceptScheme>
    </str:Concepts>
    <str:DataStructures>
        <!-- The id of this tag should match the dataset UID in the dhis2 instance -->
        <str:DataStructure id="DS_SAMPLE” agencyID="sample_id" version="1.0">
            <com:Name xml:lang="en">Patients Having Case Reports</com:Name>
            <str:DataStructureComponents>
                <str:DimensionList>
                    <str:Dimension id="dataElement">
                        <str:ConceptIdentity>
                            <Ref id="dataElement" maintainableParentID="ADX_MANDATORY_CONCEPTS" maintainableParentVersion="1.0" agencyID="IHE_QRPH"/>
                        </str:ConceptIdentity>
                        <str:LocalRepresentation>
                            <str:Enumeration>
                                <Ref agencyID="sample_id" id="CL_DATAELEMENT" version="1.0"/>
                            </str:Enumeration>
                        </str:LocalRepresentation>
                    </str:Dimension>
                    <str:Dimension id="orgUnit">
                        <str:ConceptIdentity>
                            <Ref id="orgUnit" maintainableParentID="ADX_MANDATORY_CONCEPTS" maintainableParentVersion="1.0" agencyID="IHE_QRPH"/>
                        </str:ConceptIdentity>
                        <str:LocalRepresentation>
                            <str:Enumeration>
                                <Ref agencyID="sample_id" id="CL_ORGUNIT" version="1.0"/>
                            </str:Enumeration>
                        </str:LocalRepresentation>
                    </str:Dimension>
                    <str:Dimension id="GENDER">
                        <str:ConceptIdentity>
                            <Ref id="GENDER" maintainableParentID=“SAMPLE_CONCEPTS" maintainableParentVersion="1.0" agencyID="sample_id"/>
                        </str:ConceptIdentity>
                    </str:Dimension>
                    <str:Dimension id="DC_COUNT">
                        <str:ConceptIdentity>
                            <Ref id="DC_COUNT" maintainableParentID=“SAMPLE_CONCEPTS" maintainableParentVersion="1.0" agencyID="sample_id"/>
                        </str:ConceptIdentity>
                    </str:Dimension>
                    <str:TimeDimension id="TIME_PERIOD">
                        <str:ConceptIdentity>
                            <Ref id="period" maintainableParentID="ADX_MANDATORY_CONCEPTS" maintainableParentVersion="1.0" agencyID="IHE_QRPH"/>
                        </str:ConceptIdentity>
                        <str:LocalRepresentation>
                            <str:TextFormat textType="TimeRange"/>
                        </str:LocalRepresentation>
                    </str:TimeDimension>
                </str:DimensionList>
                <str:Group id="OUTER_DIMENSIONS">
                    <str:GroupDimension>
                        <str:DimensionReference>
                            <Ref id="orgUnit"/>
                        </str:DimensionReference>
                    </str:GroupDimension>
                    <str:GroupDimension>
                        <str:DimensionReference>
                            <Ref id="TIME_PERIOD"/>
                        </str:DimensionReference>
                    </str:GroupDimension>
                </str:Group>
                <str:MeasureList>
                    <str:PrimaryMeasure>
                        <str:ConceptIdentity>
                            <Ref id="value" maintainableParentID="ADX_MANDATORY_CONCEPTS" maintainableParentVersion="1.0" agencyID="IHE_QRPH"/>
                        </str:ConceptIdentity>
                    </str:PrimaryMeasure>
                </str:MeasureList>
            </str:DataStructureComponents>
        </str:DataStructure>
    </str:DataStructures>
</mes:Structures>
</mes:Structure>

People in OpenMRS are planning to have an architecture discussion around this to decide on a generic module based on the released version of DHIS2 with a ADX export option.

thanks @maurya for the information.i will try on my local machine.can you tell what is the plan for release of ADX 2.1