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

Class cDrugProduct

source code

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

Represents a drug as marketed by a manufacturer or a generic drug product.

Instance Methods
 
format(self, left_margin=0, include_component_details=False) source code
 
save_payload(self, conn=None)
Store updated values (if any) in database.
source code
 
set_substance_doses_as_components(self, substance_doses=None, link_obj=None) source code
 
add_component(self, substance=None, atc=None, amount=None, unit=None, dose_unit=None, pk_dose=None, pk_substance=None) source code
 
remove_component(self, pk_dose=None, pk_component=None) source code
 
exists_as_intake(self, pk_patient=None) source code
 
turn_into_intake(self, emr=None, encounter=None, episode=None) source code
 
delete_associated_vaccine(self) source code

Inherited from pycommon.gmBusinessDBObject.cBusinessDBObject: __del__, __getitem__, __init__, __setitem__, __str__, fields_as_dict, get_fields, get_patient, get_updatable_fields, is_modified, refetch_payload, same_payload, save, staff_id

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_doses = property(_get_components_as_doses, lambd...
  components_as_substances = property(_get_components_as_substan...
  is_fake_product = property(_get_is_fake_product, lambda x: x)
  is_vaccine = property(_get_is_vaccine, lambda x: x)
  is_in_use_by_patients = property(_get_is_in_use_by_patients, l...
  is_in_use_as_vaccine = property(_get_is_in_use_as_vaccine, lam...
Properties

Inherited from object: __class__

Method Details

format(self, left_margin=0, include_component_details=False)

source code 
Overrides: pycommon.gmBusinessDBObject.cBusinessDBObject.format

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_doses

Value:
property(_get_components_as_doses, 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)

is_in_use_as_vaccine

Value:
property(_get_is_in_use_as_vaccine, lambda x: x)