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__, get_fields, get_patient, get_updatable_fields, is_modified, refetch_payload, same_payload, save

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

Properties
  external_code
  external_code_type
  components
  components_as_substances
  is_vaccine

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)

Property Details

external_code

Get Method:
_get_external_code(self)
Set Method:
unreachable(x)

external_code_type

Get Method:
_get_external_code_type(self)
Set Method:
unreachable(x)

components

Get Method:
_get_components(self)
Set Method:
unreachable(x)

components_as_substances

Get Method:
_get_components_as_substances(self)
Set Method:
unreachable(x)

is_vaccine

Get Method:
_get_is_vaccine(self)
Set Method:
unreachable(x)