|
I have a huge immunization data set with multiple records for each client
for a variety of vaccines. I am trying to calculate 1. Count and the time (# of days) from date of birth to when the third dose of vaccine "DaPTP" was given 2. The time (# of days) from date of birth when the first dose of vaccine MMR was given and list those who had their first MMR at or after 590 days. 3. To create a list of cases if the second dose of Influenza was not given with in six weeks of the first dose of Influenza. Any help will be greatly appreciated. Below is sample data for two clients ID BirthDate ImmunizationDate Vaccine days 42 13/11/2008 16/01/2009 DaPTP-Hib 64 42 13/11/2008 16/01/2009 Pneumococcal 7 64 42 13/11/2008 18/03/2009 Pneumococcal 7 125 42 13/11/2008 18/03/2009 DaPTP-Hib 125 42 13/11/2008 20/05/2009 DaPTP-Hib 188 42 13/11/2008 20/05/2009 Pneumococcal 7 188 42 13/11/2008 13/05/2010 DaPTP-Hib 546 42 13/11/2008 13/05/2010 MMR 546 42 13/11/2008 13/05/2010 Pneumococcal 7 546 42 13/11/2008 09/12/2009 pH1N1 391 42 13/11/2008 06/11/2009 Influenza 368 42 13/11/2008 16/11/2009 pH1N1 368 42 13/11/2008 16/11/2009 Varicella 368 42 13/11/2008 16/11/2009 MMR 368 42 13/11/2008 16/11/2009 Meningococcal C 368 92 10/11/2008 21/03/2009 DaPTP-Hib 131 92 10/11/2008 21/03/2009 Pneumococcal 7 131 92 10/11/2008 21/03/2009 Meningococcal C 131 92 10/11/2008 21/03/2009 Hep B 131 92 10/11/2008 10/01/2009 DaPTP-Hib 61 92 10/11/2008 10/01/2009 Pneumococcal 7 61 92 10/11/2008 10/01/2009 Meningococcal C 61 92 10/11/2008 10/01/2009 Hep B 61 92 10/11/2008 31/05/2009 DaPTP-Hib 202 92 10/11/2008 31/05/2009 Pneumococcal 7 202 92 10/11/2008 15/07/2010 DaPTP-Hib 612 92 10/11/2008 15/07/2010 MMR 612 92 10/11/2008 15/07/2010 Meningococcal C 612 92 10/11/2008 15/07/2010 Varicella 612 92 10/11/2008 15/07/2010 Pneumococcal 13 612 92 10/11/2008 09/10/2010 Influenza 698 ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
Ahmed,
I would treat question separately and work only with those cases that had received the specific vaccine of interest. So: >>1. Count and the time (# of days) from date of birth to when the third dose of vaccine "DaPTP" was given. There's two questions here. Time, I understand. Count, I don't. please describe the computation for count. * syntax for time. Select if (vaccine eq 'DaPTP-Hib'). * then number the vaccination records within person Sort cases by id ImmunizationDate. Do if (#casenum eq 1 or id ne lag(id)). + Compute shot=1. Else. + compute shot=lag(shot)+1. End if. * it looks like 'days' is the number of days from date of birth to immunization date. * So keep only the persons with shot=3 because they are the only ones with the * third immunization. Select if (shot eq 3). Frequencies days. 2. The time (# of days) from date of birth when the first dose of vaccine MMR was given and list those who had their first MMR at or after 590 days. Select if (vaccine eq 'MMR'). Sort cases by id ImmunizationDate. Do if (#casenum eq 1 or id ne lag(id)). + Compute shot=1. Else. + compute shot=lag(shot)+1. End if. * Only first immunization is of interest. Select if (shot eq 1). Frequencies days. Temporary. Select if (date ge 590). List id BirthDate ImmunizationDate Vaccine days. 3. To create a list of cases if the second dose of Influenza was not given with in six weeks of the first dose of Influenza. There are two cases. Kids with no second shot and kids with their second shot after six weeks (42 days). I'm assuming there are no kids with thre or more influenza shots. Select if (vaccine eq 'Influenza'). Sort cases by id ImmunizationDate. Aggregate outfile=* mode=addvariables/break=id/shots=nu. If (shots eq 2 and (days-lag(days)) lt 42) shots=0. Temporary. Select if (shots eq 1 or shots eq 2). List id BirthDate ImmunizationDate Vaccine days. Gene Maguin -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Ahmed Sent: Sunday, October 10, 2010 6:14 PM To: [hidden email] Subject: creating list of clients behind on immunization I have a huge immunization data set with multiple records for each client for a variety of vaccines. I am trying to calculate 1. Count and the time (# of days) from date of birth to when the third dose of vaccine "DaPTP" was given 2. The time (# of days) from date of birth when the first dose of vaccine MMR was given and list those who had their first MMR at or after 590 days. 3. To create a list of cases if the second dose of Influenza was not given with in six weeks of the first dose of Influenza. Any help will be greatly appreciated. Below is sample data for two clients ID BirthDate ImmunizationDate Vaccine days 42 13/11/2008 16/01/2009 DaPTP-Hib 64 42 13/11/2008 16/01/2009 Pneumococcal 7 64 42 13/11/2008 18/03/2009 Pneumococcal 7 125 42 13/11/2008 18/03/2009 DaPTP-Hib 125 42 13/11/2008 20/05/2009 DaPTP-Hib 188 42 13/11/2008 20/05/2009 Pneumococcal 7 188 42 13/11/2008 13/05/2010 DaPTP-Hib 546 42 13/11/2008 13/05/2010 MMR 546 42 13/11/2008 13/05/2010 Pneumococcal 7 546 42 13/11/2008 09/12/2009 pH1N1 391 42 13/11/2008 06/11/2009 Influenza 368 42 13/11/2008 16/11/2009 pH1N1 368 42 13/11/2008 16/11/2009 Varicella 368 42 13/11/2008 16/11/2009 MMR 368 42 13/11/2008 16/11/2009 Meningococcal C 368 92 10/11/2008 21/03/2009 DaPTP-Hib 131 92 10/11/2008 21/03/2009 Pneumococcal 7 131 92 10/11/2008 21/03/2009 Meningococcal C 131 92 10/11/2008 21/03/2009 Hep B 131 92 10/11/2008 10/01/2009 DaPTP-Hib 61 92 10/11/2008 10/01/2009 Pneumococcal 7 61 92 10/11/2008 10/01/2009 Meningococcal C 61 92 10/11/2008 10/01/2009 Hep B 61 92 10/11/2008 31/05/2009 DaPTP-Hib 202 92 10/11/2008 31/05/2009 Pneumococcal 7 202 92 10/11/2008 15/07/2010 DaPTP-Hib 612 92 10/11/2008 15/07/2010 MMR 612 92 10/11/2008 15/07/2010 Meningococcal C 612 92 10/11/2008 15/07/2010 Varicella 612 92 10/11/2008 15/07/2010 Pneumococcal 13 612 92 10/11/2008 09/10/2010 Influenza 698 ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
Administrator
|
In reply to this post by Ahmed
This should get you started.
sort cases by ID Vaccine ImmunizationDate . MATCH FILES / FILE * / BY ID Vaccine / FIRST=Imm1 / LAST=ImmLast. IF Imm1 ImmCount=1. IF MISSING (ImmCount) ImmCount=LAG(ImmCount)+1. IF (VACCINE EQ "DaPTP-Hib") AND (ImmCount EQ 3 ) FLAG=1. IF (VACCINE EQ "MMR" ) AND (Imm1 AND days GE 590) FLAG=2. IF (VACCINE EQ "Influenza") AND (Imm1 AND ImmLast) FLAG=3. SORT CASES BY FLAG. SPLIT FILE BY FLAG. COMPUTE FILT = NOT MISSING(FLAG). FILTER BY FILT. LIST. On Sun, 10 Oct 2010 18:13:38 -0400, Ahmed <[hidden email]> wrote: >I have a huge immunization data set with multiple records for each client >for a variety of vaccines. I am trying to calculate > >1. Count and the time (# of days) from date of birth to when the third dose >of vaccine "DaPTP" was given > >2. The time (# of days) from date of birth when the first dose of vaccine >MMR was given and list those who had their first MMR at or after 590 days. > >3. To create a list of cases if the second dose of Influenza was not given >with in six weeks of the first dose of Influenza. > >Any help will be greatly appreciated. > >Below is sample data for two clients > >ID BirthDate ImmunizationDate Vaccine days >42 13/11/2008 16/01/2009 DaPTP-Hib 64 >42 13/11/2008 16/01/2009 Pneumococcal 7 64 >42 13/11/2008 18/03/2009 Pneumococcal 7 125 >42 13/11/2008 18/03/2009 DaPTP-Hib 125 >42 13/11/2008 20/05/2009 DaPTP-Hib 188 >42 13/11/2008 20/05/2009 Pneumococcal 7 188 >42 13/11/2008 13/05/2010 DaPTP-Hib 546 >42 13/11/2008 13/05/2010 MMR 546 >42 13/11/2008 13/05/2010 Pneumococcal 7 546 >42 13/11/2008 09/12/2009 pH1N1 391 >42 13/11/2008 06/11/2009 Influenza 368 >42 13/11/2008 16/11/2009 pH1N1 368 >42 13/11/2008 16/11/2009 Varicella 368 >42 13/11/2008 16/11/2009 MMR 368 >42 13/11/2008 16/11/2009 Meningococcal C 368 >92 10/11/2008 21/03/2009 DaPTP-Hib 131 >92 10/11/2008 21/03/2009 Pneumococcal 7 131 >92 10/11/2008 21/03/2009 Meningococcal C 131 >92 10/11/2008 21/03/2009 Hep B 131 >92 10/11/2008 10/01/2009 DaPTP-Hib 61 >92 10/11/2008 10/01/2009 Pneumococcal 7 61 >92 10/11/2008 10/01/2009 Meningococcal C 61 >92 10/11/2008 10/01/2009 Hep B 61 >92 10/11/2008 31/05/2009 DaPTP-Hib 202 >92 10/11/2008 31/05/2009 Pneumococcal 7 202 >92 10/11/2008 15/07/2010 DaPTP-Hib 612 >92 10/11/2008 15/07/2010 MMR 612 >92 10/11/2008 15/07/2010 Meningococcal C 612 >92 10/11/2008 15/07/2010 Varicella 612 >92 10/11/2008 15/07/2010 Pneumococcal 13 612 >92 10/11/2008 09/10/2010 Influenza 698 > >===================== >To manage your subscription to SPSSX-L, send a message to >[hidden email] (not to SPSSX-L), with no body text except the >command. To leave the list, send the command >SIGNOFF SPSSX-L >For a list of commands to manage subscriptions, send the command >INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
| Free forum by Nabble | Edit this page |
