tricc-oo 1.5.9__py3-none-any.whl → 1.5.10__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.
@@ -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
  },
@@ -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
- priority: Union[float, int, None] = None
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 # <--
@@ -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