pubmed_parser/medline_parser.py
def parse_other_id(medline):
    """Parse OtherID from article, each separated by ;

    Parameters
    ----------
    medline: Element
        The lxml node pointing to a medline document

    Returns
    -------
    other_id: str
        String of semi-colon separated Other IDs found in the document
    """
    pmc = ''
    other_id = list()
    oids = medline.findall('OtherID')
    if oids is not None:
        for oid in oids:
            if 'PMC' in oid.text:
                pmc = oid.text
            else:
                other_id.append(oid.text)
        other_id = '; '.join(other_id)
    else:
        other_id = ''
    return {
        'pmc': pmc,
        'other_id': other_id
    }
Parse OtherID from article, each separated by ;

    Parameters
    ----------
    medline: Element
        The lxml node pointing to a medline document

    Returns
    -------
    other_id: str
        String of semi-colon separated Other IDs found in the document
    
Parse OtherID from article, each separated by ;
Parameters

Element
The lxml node pointing to a medline document

Returns

str
String of semi-colon separated Other IDs found in the document
Parse OtherID from article each separated by ; Parameters Element The lxml node pointing to a medline document Returns str String of semi - colon separated Other IDs found in the document
def parse_other_id(medline):
    pmc = ''
    other_id = list()
    oids = medline.findall('OtherID')
    if oids is not None:
        for oid in oids:
            if 'PMC' in oid.text:
                pmc = oid.text
            else:
                other_id.append(oid.text)
        other_id = '; '.join(other_id)
    else:
        other_id = ''
    return {
        'pmc': pmc,
        'other_id': other_id
    }
def parse_other_id ( medline ) : pmc = '' other_id = list ( ) oids = medline . findall ( 'OtherID' ) if oids is not None : for oid in oids : if 'PMC' in oid . text : pmc = oid . text else : other_id . append ( oid . text ) other_id = '; ' . join ( other_id ) else : other_id = '' return { 'pmc' : pmc , 'other_id' : other_id }
Parse OtherID from article, each separated by ;
Parameters
Parse OtherID from article each separated by ; Parameters
"""Parse OtherID from article, each separated by ;

    Parameters
    ----------
    medline: Element
        The lxml node pointing to a medline document

    Returns
    -------
    other_id: str
        String of semi-colon separated Other IDs found in the document
    """
medline