BookmarkSubscribeRSS Feed
mssh2712
Calcite | Level 5

 

 At the moment these rules are getting misinterpreted widely in the industry. They are: Recode subject ID and Recode ID variables. Please provide the macros to solve these issues. 

 

Some parameters to follow for the two rules:

 

  1. We need to align recode of Study ID, Subject ID and Site ID and be consistent. It should not be random per value.
  1. For IDs, we want to be able to sequence them. So if we have a range of 20 Subject IDs, for example, we want the recode to be in order, append 1-20 in a sequence – Suggestions: Can we not add another rule called Recode Sequence. It should select each subject ID in that dataset, work out the sequence and apply a sequence recode.
  2. What do you do with subject ID recode across multiple datasets? What if we have the same subject in another Study. The recode value needs to be the same wherever that subject appears. 
  3. Can you add a partial recode? We have fields where we leave some parts of the value and scramble the rest so that it cannot be identified. 

 

 

 

Rules explanation:

 

Recode subject ID and Recode ID variable

Create a new random unique subject ID that is not made up of any identifiable information. Site numbers must not be replicated in the recoded subject IDs. The list of original subject IDs and the recoded ones must not have any values in common. The same recoded subject ID must be used in extension study data. If the same subject is part of several studies within the same request, consider providing same subject ID. If excluded patients (protocol inclusion/exclusion criteria) are deleted, this must be documented. A general recommendation is to not delete any patients (even screening failures) and their related data. This recommendation applies to both variables SUBJID and USUBJID, and the recoding for both must be consistent between them and across datasets. It is also advised to sort de-identified datasets with recoded USUBJID before release.

 
Variables such as Reference ID or Sponsor ID are usually constructed using CRF page numbers or laboratory sample numbers, which are Direct Identifiers and require recoding. The list of original IDs and the recoded ones must not have any values in common. This applies also to Investigator ID and Site ID, among others, when applicable.
1 REPLY 1
Reeza
Super User
Here's an example of recoding ID's. Beyond that I suspect there's not exactly what you want and you'll need to make your own macro. Or invest in a tool that does this by default (they do exist). https://gist.github.com/statgeek/fd94b0b6e78815430c1340e8c19f8644

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1092 views
  • 0 likes
  • 2 in conversation