tricc-oo 1.6.13__tar.gz → 1.6.14__tar.gz

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.
Files changed (56) hide show
  1. {tricc_oo-1.6.13/tricc_oo.egg-info → tricc_oo-1.6.14}/PKG-INFO +1 -1
  2. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/pyproject.toml +1 -1
  3. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/visitors/tricc.py +17 -11
  4. {tricc_oo-1.6.13 → tricc_oo-1.6.14/tricc_oo.egg-info}/PKG-INFO +1 -1
  5. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/LICENSE +0 -0
  6. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/README.md +0 -0
  7. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/setup.cfg +0 -0
  8. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tests/build.py +0 -0
  9. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tests/test_cql.py +0 -0
  10. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tests/to_ocl.py +0 -0
  11. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/__init__.py +0 -0
  12. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/converters/__init__.py +0 -0
  13. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/converters/codesystem_to_ocl.py +0 -0
  14. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/converters/cql/cqlLexer.py +0 -0
  15. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/converters/cql/cqlListener.py +0 -0
  16. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/converters/cql/cqlParser.py +0 -0
  17. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/converters/cql/cqlVisitor.py +0 -0
  18. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/converters/cql_to_operation.py +0 -0
  19. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/converters/datadictionnary.py +0 -0
  20. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/converters/drawio_type_map.py +0 -0
  21. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/converters/tricc_to_xls_form.py +0 -0
  22. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/converters/utils.py +0 -0
  23. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/converters/xml_to_tricc.py +0 -0
  24. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/models/__init__.py +0 -0
  25. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/models/base.py +0 -0
  26. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/models/calculate.py +0 -0
  27. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/models/lang.py +0 -0
  28. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/models/ocl.py +0 -0
  29. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/models/ordered_set.py +0 -0
  30. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/models/tricc.py +0 -0
  31. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/parsers/__init__.py +0 -0
  32. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/parsers/xml.py +0 -0
  33. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/serializers/__init__.py +0 -0
  34. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/serializers/planuml.py +0 -0
  35. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/serializers/xls_form.py +0 -0
  36. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/strategies/__init__.py +0 -0
  37. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/strategies/input/__init__.py +0 -0
  38. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/strategies/input/base_input_strategy.py +0 -0
  39. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/strategies/input/drawio.py +0 -0
  40. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/strategies/output/base_output_strategy.py +0 -0
  41. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/strategies/output/dhis2_form.py +0 -0
  42. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/strategies/output/fhir_form.py +0 -0
  43. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/strategies/output/html_form.py +0 -0
  44. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/strategies/output/openmrs_form.py +0 -0
  45. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/strategies/output/spice.py +0 -0
  46. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/strategies/output/xls_form.py +0 -0
  47. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/strategies/output/xlsform_cdss.py +0 -0
  48. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/strategies/output/xlsform_cht.py +0 -0
  49. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/strategies/output/xlsform_cht_hf.py +0 -0
  50. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/visitors/__init__.py +0 -0
  51. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/visitors/utils.py +0 -0
  52. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo/visitors/xform_pd.py +0 -0
  53. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo.egg-info/SOURCES.txt +0 -0
  54. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo.egg-info/dependency_links.txt +0 -0
  55. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo.egg-info/requires.txt +0 -0
  56. {tricc_oo-1.6.13 → tricc_oo-1.6.14}/tricc_oo.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tricc-oo
3
- Version: 1.6.13
3
+ Version: 1.6.14
4
4
  Summary: Python library that converts CDSS L2 in L3
5
5
  Project-URL: Homepage, https://github.com/SwissTPH/tricc
6
6
  Project-URL: Issues, https://github.com/SwissTPH/tricc/issues
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "tricc-oo"
7
- version = "1.6.13"
7
+ version = "1.6.14"
8
8
  description = "Python library that converts CDSS L2 in L3"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -1735,13 +1735,13 @@ def replace_next_node(prev_node, next_node, old_node):
1735
1735
 
1736
1736
 
1737
1737
  # Priority constants
1738
- SAME_GROUP_PRIORITY = 7000
1739
- PARENT_GROUP_PRIORITY = 6000
1740
- ACTIVE_ACTIVITY_PRIORITY = 5000
1741
- NON_START_ACTIVITY_PRIORITY = 4000
1742
- ACTIVE_ACTIVITY_LOWER_PRIORITY = 3000
1743
- FLOW_CALCULATE_NODE_PRIORITY_TOP_UP = 50
1744
- RHOMBUS_PRIORITY_TO_UP = 50
1738
+ SAME_GROUP_PRIORITY = 70
1739
+ PARENT_GROUP_PRIORITY = 60
1740
+ ACTIVE_ACTIVITY_PRIORITY = 50
1741
+ NON_START_ACTIVITY_PRIORITY = 40
1742
+ ACTIVE_ACTIVITY_LOWER_PRIORITY = 30
1743
+ FLOW_CALCULATE_NODE_PRIORITY_TOP_UP = 3
1744
+ RHOMBUS_PRIORITY_TO_UP = 3
1745
1745
 
1746
1746
 
1747
1747
  def reorder_node_list(node_list, group, processed_nodes):
@@ -1751,8 +1751,11 @@ def reorder_node_list(node_list, group, processed_nodes):
1751
1751
  def get_priority(node):
1752
1752
  if node.id in MAP_PRIORITIES:
1753
1753
  return MAP_PRIORITIES[node.id]
1754
+ if isinstance(node, (TriccNodeActivityStart, TriccNodeMainStart)):
1755
+ return get_priority(node.activity)
1756
+
1754
1757
  # Cache attributes to avoid repeated getattr calls
1755
- priority = int(getattr(node, "priority", 0) or 0)
1758
+ priority = int(getattr(node, "priority", 0) or 0)
1756
1759
  node_group = getattr(node, "group", None)
1757
1760
  activity = getattr(node, "activity", None)
1758
1761
 
@@ -1982,7 +1985,7 @@ def get_prev_instance_skip_expression(node, processed_nodes, process, expression
1982
1985
 
1983
1986
  # end def
1984
1987
  def get_process_skip_expression(node, processed_nodes, process, expression=None):
1985
- list_ends = OrderedSet(filter(lambda x: issubclass(x.__class__, TriccNodeEnd), processed_nodes))
1988
+ list_ends = [x for x in processed_nodes if isinstance(x, TriccNodeEnd)]
1986
1989
  if list_ends:
1987
1990
  end_expressions = []
1988
1991
  f_end_expression = get_end_expression(list_ends)
@@ -1991,8 +1994,11 @@ def get_process_skip_expression(node, processed_nodes, process, expression=None)
1991
1994
  b_end_expression = get_end_expression(list_ends, "pause")
1992
1995
  if b_end_expression:
1993
1996
  end_expressions.append(b_end_expression)
1994
- if process[0] in PROCESSES:
1995
- for p in PROCESSES[PROCESSES.index(process[0]) + 1:]:
1997
+ process_index = None
1998
+ if process and process[0] in PROCESSES:
1999
+ process_index = PROCESSES.index(process[0])
2000
+ if process_index is not None:
2001
+ for p in PROCESSES[process_index + 1:]:
1996
2002
  p_end_expression = get_end_expression(list_ends, p)
1997
2003
  if p_end_expression:
1998
2004
  end_expressions.append(p_end_expression)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tricc-oo
3
- Version: 1.6.13
3
+ Version: 1.6.14
4
4
  Summary: Python library that converts CDSS L2 in L3
5
5
  Project-URL: Homepage, https://github.com/SwissTPH/tricc
6
6
  Project-URL: Issues, https://github.com/SwissTPH/tricc/issues
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes