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
7784b9ac4792
Commit
6f6d5810
authored
Jun 03, 2014
by
Vladimir Popescu
Browse files
[schema] First version of the cube: schema and entities, closes #3912377
parent
a3ebf73c2448
Changes
1
Hide whitespace changes
Inline
Side-by-side
schema.py
View file @
7784b9ac
...
...
@@ -16,3 +16,66 @@
# with this program. If not, see <http://www.gnu.org/licenses/>.
"""cubicweb-clinipath schema"""
from
yams.buildobjs
import
(
EntityType
,
SubjectRelation
,
String
,
RichString
,
Int
,
Date
)
class
Biopsy
(
EntityType
):
"""Biopsy attributes"""
biopsy_type
=
String
(
maxsize
=
512
)
extraction_date
=
Date
()
size
=
String
(
maxsize
=
128
)
tumoral_cell_percent
=
Float
(
indexed
=
True
)
necrosis_percent
=
Float
(
indexed
=
True
)
has_gene_expression
=
Boolean
()
proliferating_cell_percent
=
Float
()
has_neoangiogenesis
=
Boolean
()
has_necrosis
=
Boolean
()
conclusions
=
String
(
maxsize
=
2056
,
fulltextindexed
=
True
)
class
BiopsySample
(
EntityType
):
size
=
String
(
maxsize
=
128
)
tumoral_cell_percent
=
Float
(
indexed
=
True
)
necrosis_percent
=
Float
(
indexed
=
True
)
has_gene_expression
=
Boolean
()
proliferating_cell_percent
=
Float
()
has_neoangiogenesis
=
Boolean
()
has_necrosis
=
Boolean
()
extracted_from
=
SubjectRelation
(
'Biopsy'
,
cardinality
=
'1*'
,
inlined
=
True
)
class
CellCulture
(
EntityType
):
""" Models cell cultures, with passages for now. Related to a
Biopsy."""
code
=
Int
()
culture_passage
=
Int
()
related_biopsy
=
SubjectRelation
(
'Biopsy'
,
cardinality
=
'?*'
,
inlined
=
True
,
composite
=
'object'
)
class
BloodSample
(
EntityType
):
""" Blood sample data """
code
=
Int
(
required
=
True
)
volume_ml
=
Int
()
sampling_date
=
Date
()
class
IHCMeasure
(
EntityType
):
"""An IHC measure."""
measured_on
=
SubjectRelation
((
'Biopsy'
,
'CellCulture'
),
inlined
=
True
,
cardinality
=
'1*'
)
class
IHCResult
(
EntityType
):
""" An IHC result."""
expression_value
=
Int
(
indexed
=
True
)
related_measure
=
SubjectRelation
(
'IHCMeasure'
,
inlined
=
True
,
cardinality
=
'1*'
)
class
AnatomicPathologyReport
(
EntityType
):
""" An Anatomic pathology report """
code
=
Int
(
required
=
True
)
description
=
RichString
(
fulltextindexed
=
True
)
conclusions
=
RichString
(
fulltextindexed
=
True
)
report_on
=
SubjectRelation
((
'Biopsy'
,
'CellCulture'
,
'BloodSample'
),
inlined
=
True
,
cardinality
=
'1*'
)
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