Announcement

Collapse
No announcement yet.

Including 4 levels of ATCtext in WHO Drug coding

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Including 4 levels of ATCtext in WHO Drug coding

    Greg
    I have a client who wants the variables atc1text, atc2text, atc3text, and atc4text included in the data base. Looking at the optional fields, compress, and optional 1 and 2, I only see space for 3 of the four variables. Is there a trick to adding the fourth, either in the system or outside. I could imagine putting 2, 3 and 4 and somehow merging in the atc1 against a shorter list. Any thoughts?
    Dave
    Last edited by Ronni Rubenstein; 02-14-2008, 02:27 PM.

  • #2
    ATC information

    Dave,

    There is a limitation on the number of fields that can be mapped in the system. In order to get ALL of the ATC levels into the data, you will need to merge this on the back-end.

    In order to do this, the dictionary should be created with all 4 levels of ATC information. If you do not have the updated program, this can be downloaded from the forum. This creates the dictionary data set with all 4 code fields and related text for each level.

    Next, you will need to merge this information to your data. The ATC code that is capture when coding is the value of the 4th level. So you can merge by ATC4 and DRUGCODE. It may be easier to do this in an SQL step if your variable names in your data set are different than the dictionary values.

    Here is an example creating a work data set that brings this together. In this example, I have different variable name in the dictionary and data.

    Code:
    ** Assign libraries **;
    libname proto 'd:\program files\clinplus\codingdata\study1';
    libname dictlib 'd:\clinplus\coding200v8a\dictionaries\whodrug\2003q4';
    
    ** Merge in level 1, 2 and 3 ATC info **;
    proc sql;
    create table work.medstest as 
    select a.*, b.atc1, b.atc1text, b.atc2, b.atc2text, b.atc3, b.atc3text from proto.medstest as a
    left join dictlib.drug as b 
    on a.drugcd=b.drugcode and a.atccd=b.atc4;
    quit;
    Last edited by Ronni Rubenstein; 02-14-2008, 02:26 PM.

    Comment

    Working...
    X