Gnumed.pycommon.gmDrugView.DrugView

Package Gnumed :: Package pycommon :: Module gmDrugView :: Class DrugView |
[frames] | no frames]

# Class DrugView

source code

handles a given Interface to a drug database via the Drug object

Instance Methods
__init__(self, aDatabaseName=None) Initialize the DrugView object with information supplied via the standard config file. | source code
SearchIndex(self, aType=None, aName=None, aMode='exact', format=0) Search a for a certain drug. | source code
getBrandsForGeneric(self, aId) Returns a list of drugs for a given generic substance. | source code
getProductInfo(self, aId) Returns an HTML-formatted drug information sheet for display in the Pharmaceutical Reference Browser. | source code

Method Details

### __init__(self, aDatabaseName=None) (Constructor) | source code
Initialize the DrugView object with information supplied via the standard config file. The data should be grouped together in the group designated by the database name.

### SearchIndex(self, aType=None, aName=None, aMode='exact', format=0) | source code
Search a for a certain drug. Possible values for index type include 0 (brand name index), 1 (generic name index) and 2 (indication index). mode can be either exact matching (that is, match all given letters using the LIKE operator), regular expression ('re') matching or complete list ('complete').

### getBrandsForGeneric(self, aId) | source code
Returns a list of drugs for a given generic substance. The substance is specified by aID.

### getProductInfo(self, aId) | source code
Returns an HTML-formatted drug information sheet for display in the Pharmaceutical Reference Browser. The drug is specified by aID.