← Back to team overview

dhis2-devs team mailing list archive

Re: [Dhis2-users] Importing data from external system?

 

Thanks Lars this is useful.  I should add, looking at this example,
that the primary difference currently with the dxf2 datavalueset which
is imported through the import module is the addition of an idScheme
attribute.  In the web api example we have

<dataValueSet xmlns="http://dhis2.org/schema/dxf/2.0"; period="201201"
dataSet="pBOMPrpg1QX" orgUnit="DiszpKrYNg8">
  <dataValue dataElement="f7n9E0hX8qk" value="12" />
  <dataValue dataElement="Ix2HsbDMLea" value="14" />
  <dataValue dataElement="eY5ehpbEsB7" value="16" />
</dataValueSet>

In the other stream we have

<dataValueset xmlns="http://dhis2.org/schema/dxf/2.0";
idScheme="code|uid" ..... />

which allows a client to choose to use the code field or the uid as
the identifier for orgunits, dataelements etc.  The idScheme attribute
is optional, and defaults to assuming uid as is the current case with
the web api.  There are some cases where the code might be more
appropriate, for example where these codes are coming from a 3rd party
registry or where the client doesn't have the flexibility to map to
dhis2 uids - then we can map to the external system using our code
fields.

Need to get together on skype one of these days soon with Morten and
yourself and bring these things together.

On 19 March 2012 16:58, Lars Helge Øverland <larshelge@xxxxxxxxx> wrote:
>
>
> On Sun, Mar 18, 2012 at 3:22 AM, Mark Spohr <mhspohr@xxxxxxxxx> wrote:
>>
>> Thanks for all of these great ideas.
>> The web-api sounds most interesting now.  I'll have to spend some time
>> with it.  This may be a good way to ease the difficulty of correlating all
>> of the ids with the import of external data.
>>
>
> Hi Mark, we have put up some documentation and an example on how to send
> data values using the web API here:
>
> http://dhis2.org/doc/snapshot/en/user/html/ch24.html
>
> Lars


References