tricc-oo 1.5.27__tar.gz → 1.5.28__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.
- {tricc_oo-1.5.27/tricc_oo.egg-info → tricc_oo-1.5.28}/PKG-INFO +1 -1
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/pyproject.toml +1 -1
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/converters/tricc_to_xls_form.py +1 -1
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/strategies/output/openmrs_form.py +2 -2
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/strategies/output/xls_form.py +3 -3
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/visitors/tricc.py +8 -2
- {tricc_oo-1.5.27 → tricc_oo-1.5.28/tricc_oo.egg-info}/PKG-INFO +1 -1
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/LICENSE +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/README.md +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/setup.cfg +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tests/build.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tests/test_cql.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tests/to_ocl.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/__init__.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/converters/__init__.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/converters/codesystem_to_ocl.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/converters/cql/cqlLexer.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/converters/cql/cqlListener.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/converters/cql/cqlParser.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/converters/cql/cqlVisitor.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/converters/cql_to_operation.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/converters/datadictionnary.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/converters/drawio_type_map.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/converters/utils.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/converters/xml_to_tricc.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/models/__init__.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/models/base.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/models/calculate.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/models/lang.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/models/ocl.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/models/ordered_set.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/models/tricc.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/parsers/__init__.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/parsers/xml.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/serializers/__init__.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/serializers/planuml.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/serializers/xls_form.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/strategies/__init__.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/strategies/input/__init__.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/strategies/input/base_input_strategy.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/strategies/input/drawio.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/strategies/output/base_output_strategy.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/strategies/output/fhir_form.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/strategies/output/html_form.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/strategies/output/spice.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/strategies/output/xlsform_cdss.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/strategies/output/xlsform_cht.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/strategies/output/xlsform_cht_hf.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/visitors/__init__.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/visitors/utils.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo/visitors/xform_pd.py +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo.egg-info/SOURCES.txt +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo.egg-info/dependency_links.txt +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo.egg-info/requires.txt +0 -0
- {tricc_oo-1.5.27 → tricc_oo-1.5.28}/tricc_oo.egg-info/top_level.txt +0 -0
|
@@ -56,7 +56,7 @@ def get_export_name(node, replace_dots=True):
|
|
|
56
56
|
elif isinstance(value, str):
|
|
57
57
|
export_name = f"'{clean_str(value, replace_dots=replace_dots)}'"
|
|
58
58
|
else:
|
|
59
|
-
export_name =
|
|
59
|
+
export_name = value
|
|
60
60
|
if hasattr(node, 'export_name'):
|
|
61
61
|
node.export_name = export_name
|
|
62
62
|
return export_name
|
|
@@ -439,7 +439,7 @@ class OpenMRSStrategy(BaseOutPutStrategy):
|
|
|
439
439
|
if len(ref_expressions) == 1:
|
|
440
440
|
return ref_expressions[0]
|
|
441
441
|
if len(ref_expressions) > 1:
|
|
442
|
-
return " || ".join(ref_expressions)
|
|
442
|
+
return "(" + " || ".join(ref_expressions) + ")"
|
|
443
443
|
else:
|
|
444
444
|
return "true"
|
|
445
445
|
|
|
@@ -472,7 +472,7 @@ class OpenMRSStrategy(BaseOutPutStrategy):
|
|
|
472
472
|
return f"({ref_expressions[0]}.includes({ref_expressions[1]}))"
|
|
473
473
|
|
|
474
474
|
def tricc_operation_count(self, ref_expressions):
|
|
475
|
-
return f"({ref_expressions[0]}.length)"
|
|
475
|
+
return f"({ref_expressions[0]}.length || 0)"
|
|
476
476
|
|
|
477
477
|
def tricc_operation_multiplied(self, ref_expressions):
|
|
478
478
|
return "*".join(ref_expressions)
|
|
@@ -399,7 +399,7 @@ class XLSFormStrategy(BaseOutPutStrategy):
|
|
|
399
399
|
# build lower level
|
|
400
400
|
if hasattr(self, f"tricc_operation_{operation.operator}"):
|
|
401
401
|
callable = getattr(self, f"tricc_operation_{operation.operator}")
|
|
402
|
-
return callable(ref_expressions)
|
|
402
|
+
return callable(list(map(str, ref_expressions)))
|
|
403
403
|
else:
|
|
404
404
|
raise NotImplementedError(
|
|
405
405
|
f"This type of opreation '{operation.operator}' is not supported in this strategy"
|
|
@@ -460,9 +460,9 @@ class XLSFormStrategy(BaseOutPutStrategy):
|
|
|
460
460
|
return "1"
|
|
461
461
|
|
|
462
462
|
def tricc_operation_native(self, ref_expressions):
|
|
463
|
-
|
|
463
|
+
|
|
464
464
|
if len(ref_expressions) > 0:
|
|
465
|
-
if ref_expressions[0].startswith(("'","`",)):
|
|
465
|
+
if ref_expressions[0].startswith(("'", "`",)):
|
|
466
466
|
ref_expressions[0] = ref_expressions[0][1:-1]
|
|
467
467
|
if ref_expressions[0] == "GetChoiceName":
|
|
468
468
|
return f"""jr:choice-name({
|
|
@@ -2613,10 +2613,16 @@ def generate_base(node, processed_nodes, **kwargs):
|
|
|
2613
2613
|
constraints_min = ""
|
|
2614
2614
|
constraints_max = ""
|
|
2615
2615
|
if node.min is not None and node.min != "":
|
|
2616
|
-
|
|
2616
|
+
node.min = float(node.min)
|
|
2617
|
+
if int(node.min) == node.min:
|
|
2618
|
+
node.min = int(node.min)
|
|
2619
|
+
constraints.append(TriccOperation(TriccOperator.MORE_OR_EQUAL, ["$this", TriccStatic(node.min)]))
|
|
2617
2620
|
constraints_min = "The minimun value is {0}.".format(node.min)
|
|
2618
2621
|
if node.max is not None and node.max != "":
|
|
2619
|
-
|
|
2622
|
+
node.max = float(node.max)
|
|
2623
|
+
if int(node.max) == node.max:
|
|
2624
|
+
node.max = int(node.max)
|
|
2625
|
+
constraints.append(TriccOperation(TriccOperator.LESS_OR_EQUAL, ["$this", TriccStatic(node.max)]))
|
|
2620
2626
|
constraints_max = "The maximum value is {0}.".format(node.max)
|
|
2621
2627
|
if len(constraints) > 1:
|
|
2622
2628
|
node.constraint = TriccOperation(TriccOperator.AND, constraints)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|