← Back to team overview

dhis2-devs team mailing list archive

Re: Single Event Without Registration

 

Okay thanks James, looks good.

Lars


On Fri, Aug 9, 2013 at 5:14 PM, James Chang <jamesbchang@xxxxxxxxx> wrote:

> Thanks, Lars.
>
> Just to clarify the Apps' rows and parameters:
>
> Since this is Events(Single Event Without Registration) data entry
> (spreadsheet style) table, the user will select an program (event) from
> program list.
> Just like '1. Selection.jgp' (attached image) - Single Event Without
> Registration program selection in DHIS.
>
>  Upon selection, data entry table's column number will be decided and
> cell's data entry render type (textbox, dropdown, etc) will be decided.
> Just like '2. Data Entry.jgp' in single row format.
>
> 'Mock.jgp' shows the Apps layout.
>
> Have a good day~
>
>
>
> On Fri, Aug 9, 2013 at 8:00 PM, Lars Helge Øverland <larshelge@xxxxxxxxx>wrote:
>
>> Hi James
>>
>> Thanks for the update.
>>
>> Yes I think that creating an SQL view for pulling out event that is a
>> nice solution while waiting for the improved API. Note that you can query
>> your SQL view from the URL like documented here:
>>
>> http://www.dhis2.org/doc/snapshot/en/user/html/ch25s18.html
>>
>> It is a little unclear to me what will appear on the rows in your app -
>> ie. what parameters you select before arriving at the tabular grid.
>>
>> cheers
>>
>> Lars
>>
>>
>> On Fri, Aug 9, 2013 at 6:22 AM, James Chang <jamesbchang@xxxxxxxxx>wrote:
>>
>>> 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
>>>>>
>>>>>
>>>>
>>>
>>
>

References