← Back to team overview

oship-dev team mailing list archive

[Branch ~oship-dev/oship/devel] Rev 473: Bug #611390 fix. Better implementation of enumeration

 

------------------------------------------------------------
revno: 473
committer: Eduardo César edu@starforge>
branch nick: local
timestamp: Fri 2010-08-20 11:19:44 -0300
message:
  Bug #611390 fix. Better implementation of enumeration
modified:
  src/oship/openehr/rm/datatypes/quantity/__init__.py


--
lp:oship
https://code.launchpad.net/~oship-dev/oship/devel

Your team OSHIP Development Team is subscribed to branch lp:oship.
To unsubscribe from this branch go to https://code.launchpad.net/~oship-dev/oship/devel/+edit-subscription
=== modified file 'src/oship/openehr/rm/datatypes/quantity/__init__.py'
--- src/oship/openehr/rm/datatypes/quantity/__init__.py	2010-08-08 19:19:54 +0000
+++ src/oship/openehr/rm/datatypes/quantity/__init__.py	2010-08-20 14:19:44 +0000
@@ -259,12 +259,17 @@
     Class of enumeration constants defining types of proportion for the
     DV_PROPORTION class.
     """
+    RATIO = 0
+    UNITARY = 1
+    PERCENT = 2
+    FRACTION = 3
+    INTEGERFRACTION = 4
     def __init__(self):
-        self.pkRatio = 0
-        self.pkUnitary = 1
-        self.pkPercent = 2
-        self.pkFraction = 3
-        self.pkIntegerFraction = 4
+        self.pkRatio = RATIO
+        self.pkUnitary = UNITARY
+        self.pkPercent = PERCENT
+        self.pkFraction = FRACTION
+        self.pkIntegerFraction = INTEGERFRACTION
 
     def validProportionKind(n):
         """