Participant ID and Visit ID validation using entities

Hello..

I aim to employ entities to enhance the validation of participant IDs in my form, ensuring that it verifies whether a scanned or manually entered participant ID has been previously used. Furthermore, I seek to implement validation for specific visits within a longitudinal study. For instance, during a participant's second visit, the form should cross-reference the entities data to confirm that the participant is genuinely scheduled for visit 2 by checking if their previous visit was numbered 1. If anyone has experience with or insights into achieving this functionality, I would greatly appreciate guidance or advice.

hi @Chimwemwe

maybe this post can be useful to you

Hi @Chimwemwe,

I have tried making some example forms for you, based off what I learned from reading and responding to the forum post linked by @aurdipas.

For the first part of your question:

I aim to employ entities to enhance the validation of participant IDs in my form, ensuring that it verifies whether a scanned or manually entered participant ID has been previously used.

This form will create new patients as entities and check that the new patient ID has not been used before.

  • It uses the technique of putting the ${input_id} in the trigger column for the row used to check if the patient ID is a duplicate or not.
  • The form uses create_if on the entities tab to only create an entity if the patient ID does not match an existing patient ID, even though you can still submit the form (you will probably have different logic here).
  • It saves entity data consisting of patient ID, visit count (for follow up validation), and some other patient information like their name.

Patient Registration with Duplication Validation.xlsx (455.7 KB)

For the second part of your question:

For instance, during a participant's second visit, the form should cross-reference the entities data to confirm that the participant is genuinely scheduled for visit 2 by checking if their previous visit was numbered 1.

This followup form has the logic to look up a patient by ID and validate using data stored on that entity, such as the visit count.

  • This form will also update the visit count field on the chosen entity (provided that it is a valid visit number).
  • This form also uses the conditional update update_if on the entities tab to allow the form to be submitted without updating the entity if some of the data in the form is invalid.

Followup Visit with Validation.xlsx (459.1 KB)

I hope you find these forms helpful. I'm sure there is room for improvement, but I hope they demonstrate the functionality you are looking for and give you more ideas. It was good practice for me to make them!

@ktuite, this has worked perfectly. Thanks for your help!