I currently creating a DHIS2 embedded application. I have a trackedentity which i want to link to specific events.
Ideally I would want to assign additional information to this this relationship. A sample that I have that is working for the relationships is this:
const mutationRelationships = {
resource: 'relationships',
type: 'create',
data: ({ trackedEntityInstance, courseId, score, type }) => ({
relationshipType: type,
from: {
trackedEntityInstance: {
trackedEntityInstance: courseId,
},
},
to: {
trackedEntityInstance: {
trackedEntityInstance: trackedEntityInstance,
},
},
}),
};
I have unsuccesfully tried to add attributes to this relationship creation - the relationship is created - but the attributes are not pushed through. Any advise on that?