Insiders Call Summary: Using Entities to prevent duplicates and show summaries

Highlights

  • :world_map: Roadmap: Brief overview (@Aly_Blenkin)
  • :zap: Lightning talk: @Rudo shares his work supporting Indigenous communities
  • :diving_mask: Deep dive: Using Entities to prevent duplicates and show work summaries (@LN)

Resources

Want to join the @Insiders call on June 5th?
Learn how to become an Insider so you can participate in the monthly calls.

4 Likes

I'm unable to access the slides, can you please check the permissions?

3 Likes

Thanks for flagging that, @nmambre! It should be fixed now.

We'll work to get all of the information that's not already in the documentation included. If you have thoughts on aspects that were particularly helpful or that didn't work well for you, we can use that feedback to keep improving.

Insiders: I'll share info about the two May entity office hour sessions in a few minutes and I look forward to diving even deeper then!

2 Likes

Can you share the form example for constraint for duplicate as shown in the video?

The form from the video was enroll student in program.

Here are a couple more examples of the same technique used in a couple different ways: register unique subjects, register enumerator.

Please note that this doesn't work well with server edits because when you make an edit you use the latest version of the Entity List which will contain the registered Entity, failing the uniqueness check.

Thanks for the sharing.

Entity creation:
You are right that the form will fail the uniqueness check therefore it doesn't work well with server edit.

Entity update:
This also applies when the relevance/constraint applies to an entity property. It makes me wonder about even more things.

AFAIK
submission edit will not re-trigger entity create (re-registration) or entity update (attribute update). Hence, entity need to manually edited

If edit does require, the workaround to edit the submission and entity with constraint /relevance applied are

For entity update:
 * Using pyodk,  to re-submit the edited xml for submission and manually update the entity
 * Or, manually edit the entity property to empty string, then edit the submission and re-update the entity manually.

For entity creation:
 * Delete the entity and reject the submission and re-create entity with new submission

Is there any better approach than this?

That's correct. And the reason for that is that the Entity may have been changed from other sources so we consider the submission and the Entity to lead separate existences after the submission has been received and processed. In some workflows, it will still make sense to edit submissions because the submission data is what gets analyzed and Entities are just used to link submissions together. If this is what you're trying to do, I think we can modify the uniqueness check to work for edits.

If the goal is to edit the Entity, you can do that by editing it directly or by introducing an update form that can be used to edit some or all of an Entity's properties.

I would recommend trying to model your data so that for each piece of information you're collecting, either the submission or the Entity is considered the source of truth but not both. If that doesn't seem possible, it would be helpful to learn more about your workflow and we can dig into how to best model it.

1 Like