dhis2-users team mailing list archive
-
dhis2-users team
-
Mailing list archive
-
Message #06430
Re: Problems saving data on data entry form - ver. 2.18
Hi Laura,
this is a bit convoluted but what you need to do is to generate the
resource tables. You can do that from apps > data admin > resource tables.
After that's done it should work.
regards,
Lars
On Thu, Feb 26, 2015 at 4:20 PM, Laura E. Lincks <
laura.lincks@xxxxxxxxxxxxxxxxx> wrote:
> *DHIS ver. 2.18*
>
>
>
> We are in the process of setting up a fresh new instance (NOT an upgrade)
> and are manually adding some basic data to test data entry.
>
>
>
> So far we have entered:
>
> · One country, containing one province, containing one district,
> containing 2 sites (a 4-level hierarchy)
>
> · One data set with a simple data entry form
>
> · 7 data elements (assigned to the one data set)
>
> · No indicators
>
> · No categories, no category options, no category combinations
>
> · Of the 2 sites entered, one is assigned to the one data set
>
>
>
> When we access the data entry screen with the 7 data elements (which we
> can do), we can enter data for the site assigned to the data set but the
> data does not save. If we click the “Complete” button we receive the
> following error (and at this point I don’t have access to the backend to
> verify what might me in the tables it is querying):
>
>
>
> HTTP Status 500 - Request processing failed; nested exception is
> org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL
> grammar [select a.categoryoptioncomboid, a.organisationunitid, (select
> min(coalesce(dal.level, 0)) from period p join dataset ds on ds.datasetid
> in (76) left join dataapproval da on da.datasetid = ds.datasetid and
> da.periodid = p.periodid and da.attributeoptioncomboid =
> a.categoryoptioncomboid and da.organisationunitid = a.organisationunitid
> left join dataapprovallevel dal on dal.dataapprovallevelid =
> da.dataapprovallevelid where p.periodid in (101) ) as
> highest_approved_level, (select substring(min(concat(100000 +
> coalesce(dal.level, 0), coalesce(da.accepted, FALSE))) from 7) from period
> p join dataset ds on ds.datasetid in (76) left join dataapproval da on
> da.datasetid = ds.datasetid and da.periodid = p.periodid and
> da.attributeoptioncomboid = a.categoryoptioncomboid and
> da.organisationunitid = a.organisationunitid left join dataapprovallevel
> dal on dal.dataapprovallevelid = da.dataapprovallevelid where p.periodid in
> (101) ) as accepted_at_highest_level, true as ready_below, false as
> approved_above from ( select distinct cocco.categoryoptioncomboid,
> ccoc.categorycomboid, o.organisationunitid from
> categoryoptioncombos_categoryoptions cocco join categorycombos_optioncombos
> ccoc on ccoc.categoryoptioncomboid = cocco.categoryoptioncomboid and
> ccoc.categorycomboid in (14) join dataelementcategoryoption co on
> co.categoryoptionid = cocco.categoryoptionid and (co.startdate is null or
> co.startdate <= '2014-12-31') and (co.enddate is null or co.enddate >=
> '2014-10-01') join _orgunitstructure o on o.organisationunitid = 66 left
> join categoryoption_organisationunits coo on coo.categoryoptionid =
> co.categoryoptionid left join _orgunitstructure ous on ous.idlevel4=
> o.organisationunitid and ous.organisationunitid = coo.organisationunitid
> left join _orgunitstructure o1 on o1.organisationunitid =
> o.organisationunitid and o1.idlevel1 = coo.organisationunitid left join
> _orgunitstructure o2 on o2.organisationunitid = o.organisationunitid and
> o2.idlevel2 = coo.organisationunitid left join _orgunitstructure o3 on
> o3.organisationunitid = o.organisationunitid and o3.idlevel3 =
> coo.organisationunitid left join dataelementcategoryoptionusergroupaccesses
> couga on couga.categoryoptionid = cocco.categoryoptionid left join
> usergroupaccess uga on uga.usergroupaccessid = couga.usergroupaccessid left
> join usergroupmembers ugm on ugm.usergroupid = uga.usergroupid where (
> coo.categoryoptionid is null or ous.organisationunitid is not null or
> o1.organisationunitid is not null or o2.organisationunitid is not null or
> o3.organisationunitid is not null ) and cocco.categoryoptioncomboid = 15 )
> as a]; nested exception is org.postgresql.util.PSQLException: ERROR:
> relation "_orgunitstructure" does not exist
>
>
>
> I notice the query is looking at “categoryoptioncomboid = 15”. I’m not
> sure how this is possible as we haven’t entered any categories, category
> options or category option combos. I also can’t determine why
> orgunitstructure does not exist nor what
> orgunitstructure.organisationunitid = 66 refers to.
>
>
>
> Regardless, the Complete button should not prevent the data we are
> entering from being saved.
>
>
>
> Any ideas?? TIA.
>
> --
>
> *Laura E. Lincks*
> Database
> Manager/
> Developer
> ICAP - Columbia University
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help : https://help.launchpad.net/ListHelp
>
>
References