View source: R/checkMechanismValidity.R
checkMechanismValidity | R Documentation |
This function will return an object of invalid mechanisms and periods. All data which is reported must have a period within the valid start and end dates of the attribute option combination to which it is assigned. The mechanism must also be associated with the operating unit. If either of these two conditions are not met, the data will be flagged as being invalid.
checkMechanismValidity(
d,
organisationUnit = NA,
return_violations = TRUE,
d2session = dynGet("d2_default_session", inherits = TRUE)
)
d |
D2 Parsed data frame |
organisationUnit |
Organisation unit ancestor. |
return_violations |
Boolean to return violations only. |
d2session |
DHIS2 Session id |
Returns a data frame of invalid period-mechanism combinations. A warning will also be issued. Returns TRUE if there are no violations.
## Not run:
d <- d2Parser("myfile.csv",type="csv")
ds <- getCurrentDataSets(type="RESULTS")
checkMechanismValidity(data=d, organisationUnit = "f5RoebaDLMx")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.