tricc-oo 1.6.20__tar.gz → 1.6.22__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.20/tricc_oo.egg-info → tricc_oo-1.6.22}/PKG-INFO +1 -1
  2. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/pyproject.toml +1 -1
  3. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/strategies/output/xls_form.py +4 -2
  4. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/visitors/tricc.py +3 -1
  5. {tricc_oo-1.6.20 → tricc_oo-1.6.22/tricc_oo.egg-info}/PKG-INFO +1 -1
  6. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/LICENSE +0 -0
  7. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/README.md +0 -0
  8. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/setup.cfg +0 -0
  9. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tests/build.py +0 -0
  10. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tests/test_cql.py +0 -0
  11. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tests/to_ocl.py +0 -0
  12. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/__init__.py +0 -0
  13. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/converters/__init__.py +0 -0
  14. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/converters/codesystem_to_ocl.py +0 -0
  15. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/converters/cql/cqlLexer.py +0 -0
  16. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/converters/cql/cqlListener.py +0 -0
  17. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/converters/cql/cqlParser.py +0 -0
  18. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/converters/cql/cqlVisitor.py +0 -0
  19. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/converters/cql_to_operation.py +0 -0
  20. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/converters/datadictionnary.py +0 -0
  21. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/converters/drawio_type_map.py +0 -0
  22. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/converters/tricc_to_xls_form.py +0 -0
  23. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/converters/utils.py +0 -0
  24. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/converters/xml_to_tricc.py +0 -0
  25. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/models/__init__.py +0 -0
  26. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/models/base.py +0 -0
  27. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/models/calculate.py +0 -0
  28. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/models/lang.py +0 -0
  29. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/models/ocl.py +0 -0
  30. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/models/ordered_set.py +0 -0
  31. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/models/tricc.py +0 -0
  32. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/parsers/__init__.py +0 -0
  33. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/parsers/xml.py +0 -0
  34. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/serializers/__init__.py +0 -0
  35. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/serializers/planuml.py +0 -0
  36. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/serializers/xls_form.py +0 -0
  37. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/strategies/__init__.py +0 -0
  38. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/strategies/input/__init__.py +0 -0
  39. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/strategies/input/base_input_strategy.py +0 -0
  40. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/strategies/input/drawio.py +0 -0
  41. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/strategies/output/base_output_strategy.py +0 -0
  42. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/strategies/output/dhis2_form.py +0 -0
  43. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/strategies/output/fhir_form.py +0 -0
  44. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/strategies/output/html_form.py +0 -0
  45. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/strategies/output/openmrs_form.py +0 -0
  46. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/strategies/output/spice.py +0 -0
  47. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/strategies/output/xlsform_cdss.py +0 -0
  48. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/strategies/output/xlsform_cht.py +0 -0
  49. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/strategies/output/xlsform_cht_hf.py +0 -0
  50. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/visitors/__init__.py +0 -0
  51. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/visitors/utils.py +0 -0
  52. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo/visitors/xform_pd.py +0 -0
  53. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo.egg-info/SOURCES.txt +0 -0
  54. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo.egg-info/dependency_links.txt +0 -0
  55. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/tricc_oo.egg-info/requires.txt +0 -0
  56. {tricc_oo-1.6.20 → tricc_oo-1.6.22}/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.20
3
+ Version: 1.6.22
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.20"
7
+ version = "1.6.22"
8
8
  description = "Python library that converts CDSS L2 in L3"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -25,6 +25,7 @@ from tricc_oo.models.tricc import (
25
25
  TriccNodeCalculateBase,
26
26
  TriccNodeBaseModel,
27
27
  TriccNodeSelectOption,
28
+ TriccNodeSelect,
28
29
  TriccNodeInputModel,
29
30
  TriccNodeDisplayModel,
30
31
  TRICC_FALSE_VALUE,
@@ -87,6 +88,8 @@ OPERATOR_COALESCE_FALLBACK = {
87
88
  TriccOperator.MORE_OR_EQUAL: -2147483648,
88
89
  TriccOperator.LESS: 2147483647,
89
90
  TriccOperator.LESS_OR_EQUAL: 2147483647,
91
+ TriccOperator.CONTAINS: "''",
92
+ TriccOperator.SELECTED: "''",
90
93
  }
91
94
 
92
95
 
@@ -127,7 +130,6 @@ class XLSFormStrategy(BaseOutPutStrategy):
127
130
  "df_calculate": self.df_calculate,
128
131
  "calculates": self.calculates,
129
132
  }
130
-
131
133
 
132
134
  def generate_export(self, node, **kwargs):
133
135
  return generate_xls_form_export(self, node, **kwargs)
@@ -743,7 +745,7 @@ class XLSFormStrategy(BaseOutPutStrategy):
743
745
  elif isinstance(r, TriccNodeSelectOption):
744
746
  logger.debug(f"select option {r.get_name()} from {r.select.get_name()} was used as a reference")
745
747
  return get_export_name(r)
746
- elif issubclass(r.__class__, TriccNodeInputModel):
748
+ elif issubclass(r.__class__, (TriccNodeInputModel, TriccNodeSelect)):
747
749
  return f"coalesce(${{{get_export_name(r)}}},{coalesce_fallback})"
748
750
  elif issubclass(r.__class__, TriccNodeBaseModel):
749
751
  return f"${{{get_export_name(r)}}}"
@@ -2194,7 +2194,9 @@ def get_prev_node_expression(node, processed_nodes, get_overall_exp=False, exclu
2194
2194
 
2195
2195
  for act_id in prev_activities:
2196
2196
  act_expression_inputs = []
2197
+ none_input_prev_node = False
2197
2198
  for prev_node in prev_activities[act_id]:
2199
+ none_input_prev_node = none_input_prev_node or not issubclass(prev_node.__class__, TriccNodeInputModel)
2198
2200
  if (
2199
2201
  excluded_name is None
2200
2202
  or prev_node != excluded_name
@@ -2230,7 +2232,7 @@ def get_prev_node_expression(node, processed_nodes, get_overall_exp=False, exclu
2230
2232
  negate=False,
2231
2233
  process=process,
2232
2234
  )
2233
- elif not issubclass(prev_node.__class__, TriccNodeInputModel):
2235
+ elif none_input_prev_node:
2234
2236
  # For non-input nodes, AND the activity relevance with the prev expression
2235
2237
  activity_relevance = get_node_expression(
2236
2238
  prev_node.activity,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tricc-oo
3
- Version: 1.6.20
3
+ Version: 1.6.22
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