Package Gnumed :: Package business :: Module gmMedication :: Class cBrandedDrug |
[frames] | no frames]

# Class cBrandedDrug

source code

                                       object --+
                                                |
    pycommon.gmBusinessDBObject.cBusinessDBObject --+
                                                    |
                                                   cBrandedDrug

Represents a drug as marketed by a manufacturer.

Instance Methods
save_payload(self, conn=None) Store updated values (if any) in database. | source code
set_substances_as_components(self, substances=None) | source code
add_component(self, substance=None, atc=None, amount=None, unit=None, pk_substance=None) | source code
remove_component(self, substance=None) | source code
Inherited from `pycommon.gmBusinessDBObject.cBusinessDBObject`: `__del__`, `__getitem__`, `__init__`, `__setitem__`, `__str__`, `__unicode__`, `fields_as_dict`, `format`, `get_fields`, `get_patient`, `get_updatable_fields`, `is_modified`, `refetch_payload`, `same_payload`, `save` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Class Variables
| external_code = `property(_get_external_code, lambda x: x)`
| external_code_type = `property(_get_external_code_type, lambda `...``
| components = `property(_get_components, lambda x: x)`
| components_as_substances = `property(_get_components_as_substan`...``
| is_vaccine = `property(_get_is_vaccine, lambda x: x)`
| is_in_use_by_patients = `property(_get_is_in_use_by_patients, l`...``

Properties
Inherited from `object`: `__class__`

Method Details

### save_payload(self, conn=None) | source code
    Store updated values (if any) in database.

    Optionally accepts a pre-existing connection
    - returns a tuple (<True|False>, <data>)
    - True: success
    - False: an error occurred
            * data is (error, message)
            * for error meanings see gmPG2.run_rw_queries()
Overrides: pycommon.gmBusinessDBObject.cBusinessDBObject.save_payload (inherited documentation)

Class Variable Details

  ### external_code_type Value:
      property(_get_external_code_type, lambda x: x)

  ### components_as_substances Value:
      property(_get_components_as_substances, lambda x: x)

  ### is_in_use_by_patients Value:
      property(_get_is_in_use_by_patients, lambda x: x)