Description Usage Arguments Value Note
d2Parser will parse a compliant DHIS2 XML,JSON or CSV file and transform it into a standard data frame which can be used in subsequent DATIM validation routines
1 2 |
filename |
Location of the payload to be imported. Should be a valid DHIS2 import file |
type |
Type of the file. Should be either xml, json or csv |
organisationUnit |
Organisation unit UID of the operating unit. If left blank, assumed to be global. |
dataElementIdScheme |
Should be one of either code, name, shortName or id. If this paramater is "id", then the Data elements are assumed to be already specififed as UIDs. |
orgUnitIdScheme |
Should be one of either code, name, shortName or id. If this paramater is "id", then the organisation units are assumed to be already specififed as UIDs |
idScheme |
Remapping scheme for category option combos |
invalidData |
Exclude any (NA or missing) data from the parsed file? |
Returns a data frame of at least "dataElement","period","orgUnit","categoryOptionCombo","attributeOptionCombo","value"
function(filename="/home/me/foo.xml",type="xml",dataElementIdScheme="code",orgUnitIdScheme="code",idScheme="id") Note that all values will be returned as characters.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.