I am working on a patient database. Patient table was connected to visits table with patient ID and visit date via 1-m relationship. Patient needs to finish their images across multiple visits (1, or 2, or 3) due to insurance requirements. We anticipate that the patients will have baseline, followup1 and followup2 visit groups. For each visit group, they will have multiple visits to finish their images. Their images will be reviewed by the visit groups.
So far closely after the study started, every visit belongs to the baseline visit group. I used the last function to make sure all different images were taken before an overall review of all the images at the same visit group will be generated.
My problem is that what to do when patients came back for their followup1 or followup2? It seems that Last function might not be enough to distinguish between different visit groups. Do I need to create a set of variables for baseline, followup1 and followup2 seperately? That causes some repetition. Is there any other way to manage this more efficiently?
Thank you for your input,