Package Pyblio :: Package External :: Module PubMed :: Class QueryHelper
[hide private]
[frames] | no frames]

Class QueryHelper

source code

object --+
         |
        QueryHelper

Instance Methods [hide private]
 
makeQuery(self, field='ALL', keyword=None, abstract=False, epubahead=False, publication_type=None, language=None, subset=None, age_range=None, human_animal=None, gender=None, use_publication_date=False, from_date=None, to_date=None)
Compose an advanced query.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  query_fields = {'AD': 'Affiliation', 'ALL': 'All Fields', 'AU'...
  publication_types = {'addresses': 'Addresses', 'bibliography':...
  language = {'english': 'English', 'french': 'French', 'german'...
  age_range = [('infant', 'All Infant (birth-23 month)'), ('chil...
  human_animal = {'animal': 'Animal', 'human': 'Human'}
  gender = {'female': 'Female', 'male': 'Male'}
  subset = {'aids[sb]': 'AIDS', 'bioethics[ab]': 'Bioethics', 'c...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

makeQuery(self, field='ALL', keyword=None, abstract=False, epubahead=False, publication_type=None, language=None, subset=None, age_range=None, human_animal=None, gender=None, use_publication_date=False, from_date=None, to_date=None)

source code 
Compose an advanced query.

'field' is a single value from self.query_fields.
'publication_type' is a single value from self.publication_types, or None.
'language' is from self.language or None
'subset' is from self.subset or None
'age_range' is from self.age_range or None
'human_animal' is from self.human_animal or None
'gender' is from self.gender or None

If use_publication_date is True, select publications whose
publication date is between from_date and to_date, otherwise
use the entrez date.

Args:
  field: string
  keyword: string
  abstract: bool
  epubahead: bool
  publication_type: string or None
  language: string or None
  subset: string or None
  age_range: string or None
  human_animal: string or None
  gender: string or None
  pubdate: bool
  from_date: datetime.date() or None
  to_date: datetime.date() or None


Class Variable Details [hide private]

query_fields

Value:
{'AD': 'Affiliation',
 'ALL': 'All Fields',
 'AU': 'Author Name',
 'DP': 'Publication Date',
 'EDAT': 'Entrez Date',
 'FILTER': 'Filter',
 'IP': 'Issue',
 'LA': 'Language',
...

publication_types

Value:
{'addresses': 'Addresses',
 'bibliography': 'Bibliography',
 'biography': 'Biography',
 'classical article': 'Classical Article',
 'clinical conference': 'Clinical Conference',
 'clinical trial': 'Clinical Trial',
 'clinical trial, phase I': 'Clinical Trial, Phase I',
 'clinical trial, phase II': 'Clinical Trial, Phase II',
...

language

Value:
{'english': 'English',
 'french': 'French',
 'german': 'German',
 'italian': 'Italian',
 'japanese': 'Japanese',
 'russian': 'Russian',
 'spanish': 'Spanish'}

age_range

Value:
[('infant', 'All Infant (birth-23 month)'),
 ('child', 'All Child (0-18 years)'),
 ('adult', 'All Adult (19+ years)'),
 ('infant, newborn', 'Newborn (birth-1 month)'),
 ('infant', 'Infant (1-23 months)'),
 ('child, preschool', 'Preschool Child (2-5 years)'),
 ('child', 'Child (6-12 years)'),
 ('adolescence', 'Adolescent (13-18 years)'),
...

subset

Value:
{'aids[sb]': 'AIDS',
 'bioethics[ab]': 'Bioethics',
 'cam[sb]': 'Complementary and Alternative Medicine',
 'history[sb]': 'History of Medicine',
 'in process[sb]': 'In process',
 'jsubsetaim': 'Core clinical journals',
 'jsubsetb': 'Biotechnology journals',
 'jsubsetd': 'Dental journals',
...