data WORK.UC_ Data work.Uc_Test1;
Set work.Uc_Test;
*Identifying isolated cultures;
if Narrative =: 'Indications for Culture' or Accession =: 'Indications for Culture' then Isolated_Uc = 1;
else Isolated_Uc = 0;
if Narrative =: 'Urine culture reflexed based upon urinalysis results' or Accession =: 'Urine culture reflexed based upon urinalysis results' then UAReflexUc = 1;
else UAReflexUc = 0;
*Reason for isolated urince culture;
if Isolated_Uc = 1 then Reason_Isolated_Uc = scan(Narrative, 2, ";,");
*Reason for isolated urince culture;
if Isolated_Uc = 1 then Reason_Oth_Iso = scan(Narrative, 3, ";,,");
run; TEST; infile datalines dsd truncover; input Narrative:$255.; label Narrative="Narrative"; datalines; right renal pelvis,Specimen collected in the operating room.,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Add to most recent UA.,Indications for Culture:->Recent positive UA,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) After catheter change,Indications for Culture:->Recent positive UA,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) After foley changed,Indications for Culture:->Recent positive UA,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) BEFORE STARTING ABX,Indications for Culture:->Other (specify),Other Indication:->Neutropenic fever,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Before discharge,Indications for Culture:->Urology patient,Specimen received in a sterile container.,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Bladder urine for routine culture,Specimen collected in the operating room.,Specimen received in a sterile container.,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Bladder urine for routine culture,Specimen collected in the operating room.,Specimen received in a sterile container.,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Bladder urine for routine culture,Specimen collected in the operating room.,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Catheter placed 8/5. Please send from catheter specimen.,Indications for Culture:->Recent positive UA,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Clean catch after Foley removed,Indications for Culture:->Recent positive UA,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Collect from Foley,Indications for Culture:->Urology patient,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Collected at time of insertion of new foley,Indications for Culture:->Urology patient,Specimen received in a sterile container.,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Collected directly for Foley replacement,May use urine already collected if available.,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Draw prior to antibiotics given,Indications for Culture:->Recent positive UA,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) From LEFT PCN,Indications for Culture:->Urology patient,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) From RIGHT PCN,Indications for Culture:->Urology patient,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) From new catheter,Indications for Culture:->Recent positive UA,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) He actually does need a culture, specimen from this AM was rejected due to suspected contamination,Indications for Culture:->Recent positive UA,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) If urine protein creatinine ratio not collected, please send along with urine culture,Indications for Culture:->Recent positive UA,Specimen received in a sterile container.,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Indications for Culture:->Other (specify),Other Indication:->+ blood cultures,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Indications for Culture:->Other (specify),Other Indication:->.,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Indications for Culture:->Other (specify),Other Indication:->? bacteremia,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Indications for Culture:->Other (specify),Other Indication:->AKI bundle,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Indications for Culture:->Other (specify),Other Indication:->AKI in neutropenic patient,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Indications for Culture:->Other (specify),Other Indication:->AKI in renal allograft,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Indications for Culture:->Other (specify),Other Indication:->AKI,Specimen received in a sterile container.,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Indications for Culture:->Other (specify),Other Indication:->AKI,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Indications for Culture:->Other (specify),Other Indication:->AKI,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Indications for Culture:->Other (specify),Other Indication:->AKI,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Indications for Culture:->Other (specify),Other Indication:->AKI,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Indications for Culture:->Other (specify),Other Indication:->AKI,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Indications for Culture:->Other (specify),Other Indication:->AKI,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Indications for Culture:->Other (specify),Other Indication:->AKI,Testing performed by Aaaaaa-Bbbbbb Cccccccc Dddddddddddd Eeeeeeeeee (111-222-3333) Indications for Culture:->Other (specify),Other Indication:->AMS, hypotension,Specimen received in a sterile container. ;;;; Thank you for all who responded. I am attaching the SAS dataset. I tried the following code but I am not able to get the Other Indication reasonn if the Indication for Culture is Other (specify).
... View more