tricc-oo 1.5.9__py3-none-any.whl → 1.5.11__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tricc_oo/converters/drawio_type_map.py +1 -1
- tricc_oo/models/calculate.py +1 -2
- tricc_oo/models/tricc.py +1 -0
- tricc_oo/serializers/xls_form.py +2 -2
- tricc_oo/strategies/output/xlsform_cht.py +478 -306
- tricc_oo/visitors/tricc.py +89 -58
- {tricc_oo-1.5.9.dist-info → tricc_oo-1.5.11.dist-info}/METADATA +1 -1
- {tricc_oo-1.5.9.dist-info → tricc_oo-1.5.11.dist-info}/RECORD +10 -10
- {tricc_oo-1.5.9.dist-info → tricc_oo-1.5.11.dist-info}/WHEEL +0 -0
- {tricc_oo-1.5.9.dist-info → tricc_oo-1.5.11.dist-info}/top_level.txt +0 -0
|
@@ -129,7 +129,7 @@ TYPE_MAP = {
|
|
|
129
129
|
},
|
|
130
130
|
TriccNodeType.rhombus: {
|
|
131
131
|
"objects": ["UserObject", "object"],
|
|
132
|
-
"attributes": ["save", "expression", 'label'],
|
|
132
|
+
"attributes": ["save", "expression", 'label','priority'],
|
|
133
133
|
"mandatory_attributes": ["reference"],
|
|
134
134
|
"model": TriccNodeRhombus
|
|
135
135
|
},
|
tricc_oo/models/calculate.py
CHANGED
|
@@ -53,7 +53,7 @@ class TriccNodeCount(TriccNodeDisplayCalculateBase):
|
|
|
53
53
|
class TriccNodeProposedDiagnosis(TriccNodeDisplayCalculateBase):
|
|
54
54
|
tricc_type: TriccNodeType = TriccNodeType.proposed_diagnosis
|
|
55
55
|
severity: str = None
|
|
56
|
-
|
|
56
|
+
|
|
57
57
|
|
|
58
58
|
class TriccNodeFakeCalculateBase(TriccNodeCalculateBase):
|
|
59
59
|
...
|
|
@@ -131,7 +131,6 @@ class TriccNodeRhombus(TriccNodeCalculateBase,TriccRhombusMixIn):
|
|
|
131
131
|
class TriccNodeDiagnosis(TriccNodeDisplayCalculateBase):
|
|
132
132
|
tricc_type: TriccNodeType = TriccNodeType.diagnosis
|
|
133
133
|
severity: str = None
|
|
134
|
-
priority: Union[float, int, None] = None
|
|
135
134
|
def __init__(self, **data):
|
|
136
135
|
data['reference'] = f'"final.{data["name"]}" is true'
|
|
137
136
|
super().__init__(**data)
|
tricc_oo/models/tricc.py
CHANGED
|
@@ -18,6 +18,7 @@ class TriccNodeCalculateBase(TriccNodeBaseModel):
|
|
|
18
18
|
expression_reference: Union[str, TriccOperation] = None
|
|
19
19
|
last: bool = None
|
|
20
20
|
datatype: str = 'boolean'
|
|
21
|
+
priority: Union[float, int, None] = None
|
|
21
22
|
# to use the enum value of the TriccNodeType
|
|
22
23
|
class Config:
|
|
23
24
|
use_enum_values = True # <--
|
tricc_oo/serializers/xls_form.py
CHANGED
|
@@ -305,14 +305,14 @@ def gen_operation_hash(op):
|
|
|
305
305
|
|
|
306
306
|
|
|
307
307
|
def generate_choice_filter(strategy, node):
|
|
308
|
-
if isinstance(node, TriccNodeSelectOption) and node.relevance:
|
|
308
|
+
if isinstance(node, TriccNodeSelectOption) and node.relevance and node.relevance != TriccStatic(True):
|
|
309
309
|
return gen_operation_hash(node.relevance)
|
|
310
310
|
if not isinstance(node, (TriccNodeSelectMultiple, TriccNodeSelectOne)):
|
|
311
311
|
return
|
|
312
312
|
relevances = {}
|
|
313
313
|
option_filter = {}
|
|
314
314
|
for o in node.options.values():
|
|
315
|
-
if o.relevance:
|
|
315
|
+
if o.relevance and o.relevance != TriccStatic(True):
|
|
316
316
|
key = gen_operation_hash(o.relevance)
|
|
317
317
|
if key not in relevances:
|
|
318
318
|
relevances[key] = o.relevance
|