Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: Working with complex strings


From   "Dudekula, Anwar" <dudekulaan@upmc.edu>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Working with complex strings
Date   Wed, 30 Nov 2011 05:43:41 +0000

Thank you very much 

I will work on it .Would the parse() option split metoprolol tatrate 150mg bid as 

metoprolol tatrate and 150mg bid 

Or 

metoprolol & tatrate & 150mg &  bid

Thank you 
Anwar 

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Steve Nakoneshny
Sent: Wednesday, November 30, 2011 12:38 AM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: Working with complex strings

- help split - would have answered this question.

- split medication, parse( ) -

should do what you want.

Steve

Sent via carrier pigeon

On Nov 29, 2011, at 9:54 PM, "Dudekula, Anwar" <dudekulaan@upmc.edu> wrote:

> Dear Stata List Reader, 
> 
> I am working with deidentified hospitaldatabase with patient names(as string variable) and medications (as string variable)as follows 
> 
> Patients_name        medication
> ------------------------------------
> Patient-1            metoprolol 100 mg qday
> Patient-1            metoprolol tatrate 150mg bid
> Patient-1            atenelol 150 mg qday 
> Patient-2            hctz 25 mg qday 
> Patient-2            PEG interferon 
> Patient-3            cimzia 50 mg qday 
> 
> Question: I am interested in name of medication only , not their dosages.Is it possible to split  the medication string  after the name  i.e., 
> 
> 1) split  metoprolol tatrate 150mg bid into  metoprolol tatrate  &  150mg bid
> 2) split  metoprolol 100 mg qday into   metoprolol   &   100 mg qday
> 
> Thank you, 
> Yours Sincerely,
> Anwar 
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index