@sarabodach this is a PR into your PR. Here's some thoughts:
Including TRSPID in the dup variables seems sub optimal - would it only catch a mapping issue or something? But also trying to add RAVE in at the end also isn't perfect - by just merging on variables a guess is made of which form the dup is in. And the guess is not always right (e.g. the same info can be in indicator vs non indicator form). Ultimately I decided to leave SPID/RAVE out of this check.
Duping with VISIT seems to get rid of a lot of records where date duplicate is flagged due to missing date. While missing dates may be bad its not technically a duplicate if its at different visits. Checking for missing dates could be a separate check.
From @harriscw via https://github.com/pharmaverse/sdtmchecks/pull/281#issue-2051488428:
@sarabodach this is a PR into your PR. Here's some thoughts: