-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify mapping logic and components #506
Comments
@adrianq This was the card related to |
Changes to the mapping during its implementation
Current data model structure{
"aggregatedDataElements": {
"idA1": {
"mappedId": "idB",
"mappedName": "(DEL) Total number of reports actually received in (current reporting year) (c) - private",
"code": "MAL_PREREF_ART_SUPP_COMMUNITY_DISC",
"conflicts": false,
"global": false,
"mapping": {
"categoryCombos": {
"JzvGfLYkX17": {
"mappedId": "JzvGfLYkX17",
"mappedName": "default",
"mapping": {},
"conflicts": false
}
},
"categoryOptions": {
"DMyxTSpvKOp-Y7fcspgsU43": {
"mappedId": "DISABLED",
"mappedCode": "DISABLED",
"code": "default",
"global": false,
"conflicts": true
}
}
}
}
} Biggest problem with current data model
Proposal
|
Tasks:
MappingTable
so that accepts multiple mappings with priority by order as props and has an update method forwarded to the parent)Original comments:
MappingTable
and its utility methods hold too much logic for a componentRequirements:
MappingTable
. The component is similar to aMetadataTable
but with some advanced contextual actions. Some of these contextual actions open modals that include a recursiveMappingTable
inside a Wizard.mappingType
key (a superset of a metadata type, see: dataElements and aggregatedDataElements). Each dictionary entry is a dictionary itself holding the origin identifiers as keys.-
. This allows to map a certain metadata element only when combined with other metadata. We currently support only two variants of this eventDataElements withprogramId-programStageId-dataElementId
and category options withcategoryId-categoryOptionId
. It always follow the outer to inner rule and the last element in a split by dash array would be the metadata element we apply any operation.Improvements:
autoMap
feature.id1-id2-id3
structure and add methods to it as helpers depending on the metadata type they're.The text was updated successfully, but these errors were encountered: