Description Usage Arguments Value Note
sims2Parser will parse a semi-compliant DHIS2 CSV file and transform it into a standard data frame which can be used in subsequent DATIM validation routines. The difference with d2Parser is that an extra (non-standard) field will be introduced to record the SIMS visit. This will in turn be used to deduplicate visits which occur at the same site + mechanism + date combination. This function will automatically decollide these types of visits
1 2 3 | sims2Parser(filename, dataElementIdScheme = "code", orgUnitIdScheme = "id",
idScheme = "id", invalidData = FALSE, hasHeader = TRUE,
isoPeriod = NA)
|
filename |
Location of the payload to be imported. Should be a valid SIMS2 aggregate file. See the separate spec for details |
dataElementIdScheme |
Should be one of either code, name, shortName or id. The default is "code". 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? |
hasHeader |
TRUE by default. Should be set to FALSE if the file does not contain header information. |
isoPeriod |
period to be used for date shift boundaries. If not provided, no boundaries are set. |
Returns a data frame of "dataElement","period","orgUnit","categoryOptionCombo","attributeOptionCombo","value"
function(filename="/home/me/foo.csv",dataElementIdScheme="code",orgUnitIdScheme="code",idScheme="id",invalidData=FALSE) 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.