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

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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