toUpload static method

dynamic toUpload(
  1. TrackedEntityInstanceRelationship trackedEntityInstanceRelationship
)

Implementation

static toUpload(
    TrackedEntityInstanceRelationship trackedEntityInstanceRelationship) {
  return {
    "relationshipType": trackedEntityInstanceRelationship.relationshipType,
    "relationship": trackedEntityInstanceRelationship.id,
    "from": {
      "trackedEntityInstance": {
        "trackedEntityInstance":
            trackedEntityInstanceRelationship.fromTrackedInstance,
      }
    },
    "to": {
      "trackedEntityInstance": {
        "trackedEntityInstance":
            trackedEntityInstanceRelationship.toTrackedInstance
      }
    }
  };
}