tricc-oo 1.5.28__tar.gz → 1.6.0__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.28/tricc_oo.egg-info → tricc_oo-1.6.0}/PKG-INFO +1 -1
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/pyproject.toml +1 -1
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tests/build.py +1 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/converters/tricc_to_xls_form.py +2 -2
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/converters/xml_to_tricc.py +8 -7
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/models/base.py +2 -0
- tricc_oo-1.6.0/tricc_oo/strategies/output/dhis2_form.py +859 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/strategies/output/openmrs_form.py +51 -4
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/visitors/tricc.py +38 -28
- {tricc_oo-1.5.28 → tricc_oo-1.6.0/tricc_oo.egg-info}/PKG-INFO +1 -1
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo.egg-info/SOURCES.txt +1 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/LICENSE +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/README.md +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/setup.cfg +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tests/test_cql.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tests/to_ocl.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/__init__.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/converters/__init__.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/converters/codesystem_to_ocl.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/converters/cql/cqlLexer.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/converters/cql/cqlListener.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/converters/cql/cqlParser.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/converters/cql/cqlVisitor.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/converters/cql_to_operation.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/converters/datadictionnary.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/converters/drawio_type_map.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/converters/utils.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/models/__init__.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/models/calculate.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/models/lang.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/models/ocl.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/models/ordered_set.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/models/tricc.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/parsers/__init__.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/parsers/xml.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/serializers/__init__.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/serializers/planuml.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/serializers/xls_form.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/strategies/__init__.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/strategies/input/__init__.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/strategies/input/base_input_strategy.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/strategies/input/drawio.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/strategies/output/base_output_strategy.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/strategies/output/fhir_form.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/strategies/output/html_form.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/strategies/output/spice.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/strategies/output/xls_form.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/strategies/output/xlsform_cdss.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/strategies/output/xlsform_cht.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/strategies/output/xlsform_cht_hf.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/visitors/__init__.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/visitors/utils.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo/visitors/xform_pd.py +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo.egg-info/dependency_links.txt +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo.egg-info/requires.txt +0 -0
- {tricc_oo-1.5.28 → tricc_oo-1.6.0}/tricc_oo.egg-info/top_level.txt +0 -0
|
@@ -6,6 +6,7 @@ from tricc_oo.strategies.output.xls_form import XLSFormStrategy # noqa: F401
|
|
|
6
6
|
from tricc_oo.strategies.output.openmrs_form import OpenMRSStrategy # noqa: F401
|
|
7
7
|
from tricc_oo.strategies.output.fhir_form import FHIRStrategy # noqa: F401
|
|
8
8
|
from tricc_oo.strategies.output.html_form import HTMLStrategy # noqa: F401
|
|
9
|
+
from tricc_oo.strategies.output.dhis2_form import DHIS2Strategy # noqa: F401
|
|
9
10
|
from tricc_oo.strategies.input.drawio import DrawioStrategy # noqa: F401
|
|
10
11
|
import getopt
|
|
11
12
|
import logging
|
|
@@ -53,8 +53,8 @@ def get_export_name(node, replace_dots=True):
|
|
|
53
53
|
export_name = BOOLEAN_MAP[str(TRICC_FALSE_VALUE)]
|
|
54
54
|
elif value == '$this':
|
|
55
55
|
export_name = '.'
|
|
56
|
-
elif isinstance(value, str):
|
|
57
|
-
export_name = f"'{
|
|
56
|
+
elif isinstance(value, str) and not isinstance(node, str):
|
|
57
|
+
export_name = f"'{value}'"
|
|
58
58
|
else:
|
|
59
59
|
export_name = value
|
|
60
60
|
if hasattr(node, 'export_name'):
|
|
@@ -101,16 +101,16 @@ def create_activity(diagram, media_path, project):
|
|
|
101
101
|
|
|
102
102
|
external_id = diagram.attrib.get("id")
|
|
103
103
|
id = get_id(external_id, diagram.attrib.get("id"))
|
|
104
|
-
root = create_root_node(diagram)
|
|
105
|
-
|
|
104
|
+
root, name = create_root_node(diagram)
|
|
105
|
+
label = diagram.attrib.get("name")
|
|
106
106
|
form_id = diagram.attrib.get("name", None)
|
|
107
107
|
if root is not None:
|
|
108
108
|
activity = TriccNodeActivity(
|
|
109
109
|
root=root,
|
|
110
|
-
name=
|
|
110
|
+
name=name, # start node 'name' is saved in label
|
|
111
111
|
id=id,
|
|
112
112
|
external_id=external_id,
|
|
113
|
-
label=
|
|
113
|
+
label=label,
|
|
114
114
|
form_id=form_id,
|
|
115
115
|
)
|
|
116
116
|
if root.relevance is not None:
|
|
@@ -130,7 +130,7 @@ def create_activity(diagram, media_path, project):
|
|
|
130
130
|
if (
|
|
131
131
|
issubclass(n.__class__, (TriccNodeDisplayModel, TriccNodeDisplayCalculateBase))
|
|
132
132
|
and not isinstance(n, (TriccRhombusMixIn, TriccNodeRhombus, TriccNodeDisplayBridge))
|
|
133
|
-
and not n.name.startswith("label_")
|
|
133
|
+
and not n.name.startswith("label_") # FIXME
|
|
134
134
|
):
|
|
135
135
|
system = n.name.split(".")[0] if "." in n.name else "tricc"
|
|
136
136
|
if isinstance(n, TriccNodeSelectOption) and isinstance(n.select, TriccNodeSelectNotAvailable):
|
|
@@ -444,17 +444,18 @@ def create_root_node(diagram):
|
|
|
444
444
|
if elm is not None:
|
|
445
445
|
external_id = elm.attrib.get("id")
|
|
446
446
|
id = get_id(external_id, diagram.attrib.get("id"))
|
|
447
|
+
name = generate_id("start"+external_id)
|
|
447
448
|
node = TriccNodeActivityStart(
|
|
448
449
|
id=id,
|
|
449
450
|
external_id=external_id,
|
|
450
451
|
# parent=elm.attrib.get("parent"),
|
|
451
|
-
name=
|
|
452
|
+
name=name,
|
|
452
453
|
label=diagram.attrib.get("name"),
|
|
453
454
|
relevance=elm.attrib.get("relevance"),
|
|
454
455
|
instance=int(elm.attrib.get("instance") if elm.attrib.get("instance") is not None else 1),
|
|
455
456
|
)
|
|
456
457
|
load_expressions(node)
|
|
457
|
-
return node
|
|
458
|
+
return node, elm.attrib.get("name", generate_id("act"+external_id))
|
|
458
459
|
|
|
459
460
|
|
|
460
461
|
# converter XML item to object
|