Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
clinipath
Commits
7463d642a6c4
Commit
e95952ff
authored
Jun 25, 2014
by
Vincent Michel
Browse files
[entities] Add entity logic for Biopsy, BiopsySample and AnatomicPathologyReport
parent
c5cafcc3e8db
Changes
1
Hide whitespace changes
Inline
Side-by-side
entities.py
View file @
7463d642
...
...
@@ -16,3 +16,30 @@
# with this program. If not, see <http://www.gnu.org/licenses/>.
"""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
())
@
property
def
formatted_content
(
self
):
return
u
'
\n
'
.
join
([
d
for
d
in
(
self
.
description
,
self
.
conclusions
)
if
d
])
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment