Entity-based data collection

Not currently but we know those are important to add soon.

Right now entities can only be created, not updated through any means at all. The model we are currently planning on is that submission edits do NOT affect entities. In the future, submissions will be able to create, update or archive entities. Once a submission has performed that action, it is essentially "unlinked" from the entity it acted on.

Edits are complex no matter what but we think the model described above is the easiest to understand. We consider submissions to represent encounters and entities to represent current state. It's possible to find out that an encounter had errors and to edit that encounter but in the mean time, the entity may have gone through other transformations so it may no longer be appropriate to update. For example, consider this scenario:

  • A tree gets registered. The registration form submission has a diameter of 15cm, that's what gets written to the entity.
  • The tree gets measured again. A follow-up form submission has a diameter of 20cm, that now gets written to the entity (this can't be done today -- it's an update)
  • The registration form submission gets edited because another data source shows that the original diameter was actually 17cm.

I think we have four options:

  1. Apply the edit to the current state of the entity. This would mean changing the 20cm to 17cm. That clearly doesn't make sense: the edit was to a previous point in time.
  2. Apply the edit to historical state of the entity. This would probably get the history closer to reality but it's potentially extremely confusing. What if that 15cm was used in intermediary analysis? What if it was read by other forms? If we just magically change it to a 17, information is lost.
  3. Don't apply the edit to the entity. This leaves it up to the person making edits to consider whether the new information should apply to the corresponding entity or not.
  4. Apply the edit to the entity only if the edited submission was the latest to affect the entity. This is a hybrid of 1 and 3. It allows some submission edits to affect entities. It may be hard to build a mental model around.

Please keep in mind that this is preview functionality and not yet ready for usage at scale. You can read more in the docs where we recently tried to make the limitations more clear, including related to performance. We are going to be working on things like progressive updates to clients eventually.

3 Likes