← Back to team overview

dhis2-devs team mailing list archive

Re: Single Event Without Registration

 

Hi, Lars.

Thank you for the info.

And, Yes, we do need to query the events data in our DHIS Apps requirement.


Below are our DHIS Apps requirements:

- Build data entry grid (in excel sheet like) for 'Single Event Wtihout
Registration'.

- List events ('Single Event Without Registration') on dropdown list for
selection.

- Upon event dropdown selection, generate event data entry table in excel
speadsheet fashion.

- On table generation:
    --> The columns will be populated with data elements belonging to the
event.
    --> The rows will be populated for the existing event data.
    --> The cells will be rendering Textbox, or Dropdown, or etc. depending
on the data element value type.

 - New event data entry row will exist in the bottom row.  If that row is
filled, the data will be saved as event data in DHIS and the new row will
appear at the bottom for new entry.


I have tested the /api/events/--UID--.json and it is giving the data.
So, what I can do for now is
- Create sqlView to retrieve all the programStageInstance UID and add
filter parameter to retrieve the data for the programStage we want
- convert the .csv data into json, for easier access
- for each programStageInstance UID, call /api/events to retrieve data.





On Thu, Aug 8, 2013 at 7:06 PM, Lars Helge Øverland <larshelge@xxxxxxxxx>wrote:

> Hi James,
>
> we have some limited support for retrieving events in trunk (latest
> development version). You can fetch events through their UIDs. Sorry but we
> don't have any querying capabilities yet, although we are planning to
> implement that too.
>
> In trunk, when you create an event, you will now get both a "reference"
> element and a "href" element which tell you the generated UID for the
> events you just created. See example at the end.
>
> You can then use this UID to retrieve the event with a GET request
>
> api/events/<uid>.json
>
> Documentation here:
> http://www.dhis2.org/doc/snapshot/en/user/html/ch25s07.html
>
> If you need to query the events please share with us your requirements so
> we can take it into account when designing the feature.
>
> regards,
>
> Lars
>
>
>
>
> ----
>
> <importSummaries
> xmlns="http://dhis2.org/schema/dxf/2.0";>
>     <importSummaryList>
>         <importSummary>
>             <status>SUCCESS</status>
>             <dataValueCount imported="2" updated="0" ignored="0" />
>             <reference>eLvaci7Lb9j</reference>
>             <href>http://apps.dhis2.org/dev/api/events/eLvaci7Lb9j</href>
>         </importSummary>
>         <importSummary>
>             <status>SUCCESS</status>
>             <dataValueCount imported="2" updated="0" ignored="0" />
>             <reference>JCZ4WBXMddc</reference>
>             <href>http://apps.dhis2.org/dev/api/events/JCZ4WBXMddc</href>
>         </importSummary>
>     </importSummaryList>
>     </importSummaries>
>
>
> On Thu, Aug 8, 2013 at 11:14 AM, James Chang <jamesbchang@xxxxxxxxx>wrote:
>
>> Hi.
>>
>> Now that DHIS 2.12 has Web API that we can insert(submit) 'Single Event
>> Without Registration' data, I am trying to build DHIS Apps for it.
>>
>> I am planning on creating a dynamic HTML table using jQuery for a
>> selected ProgramStage (Single Event Without Registration).  The columns
>> (data elements) will be populated depending on the ProgramStage selection.
>>
>> I found out that I can get the columns (Data Elements) by calling Web API.
>>
>> http://localhost:8080/api/programStages/CBbrPwnG1gG.json?viewClass=detailed?link=false
>>
>>
>> However, do we have something in API or in Analytics that we can get the
>> entered data in DHIS?  Preferably in JSON?
>> This will be ProgramStageInstance data for 'Single Event Without
>> Registration'.
>>
>> Thanks.
>>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>

Follow ups

References