Commit e95952ff authored by Vincent Michel's avatar Vincent Michel
Browse files

[entities] Add entity logic for Biopsy, BiopsySample and AnatomicPathologyReport

parent c5cafcc3e8db
......@@ -16,3 +16,30 @@
# with this program. If not, see <>.
"""cubicweb-clinipath entity's classes"""
from cubicweb.entities import AnyEntity
class Biopsy(AnyEntity):
__regid__ = 'Biopsy'
def dc_title(self):
return u'%s (%s)' % (self._cw._('Biopsy'), self.reverse_related_samples[0].dc_title())
class BiopsySample(AnyEntity):
__regid__ = 'BiopsySample'
def dc_title(self):
return u'%s (%s)' % (self._cw._('BiopsySample'), self.extracted_from[0].dc_title())
class AnatomicPathologyReport(AnyEntity):
__regid__ = 'AnatomicPathologyReport'
def dc_title(self):
return u'%s (%s)' % (self._cw._('AnatomicPathologyReport'), self.report_on[0].dc_title())
def formatted_content(self):
return u'\n'.join([d for d in (self.description, self.conclusions) if d])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment