tricc-oo 1.5.24__py3-none-any.whl → 1.5.25__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.
- tests/build.py +12 -15
- tests/test_cql.py +4 -4
- tricc_oo/converters/tricc_to_xls_form.py +39 -8
- tricc_oo/converters/utils.py +1 -1
- tricc_oo/models/tricc.py +2 -0
- tricc_oo/serializers/xls_form.py +1 -9
- tricc_oo/strategies/output/openmrs_form.py +15 -15
- tricc_oo/strategies/output/xls_form.py +13 -16
- tricc_oo/strategies/output/xlsform_cht.py +0 -1
- tricc_oo/visitors/tricc.py +2 -3
- {tricc_oo-1.5.24.dist-info → tricc_oo-1.5.25.dist-info}/METADATA +1 -1
- {tricc_oo-1.5.24.dist-info → tricc_oo-1.5.25.dist-info}/RECORD +15 -15
- {tricc_oo-1.5.24.dist-info → tricc_oo-1.5.25.dist-info}/WHEEL +0 -0
- {tricc_oo-1.5.24.dist-info → tricc_oo-1.5.25.dist-info}/licenses/LICENSE +0 -0
- {tricc_oo-1.5.24.dist-info → tricc_oo-1.5.25.dist-info}/top_level.txt +0 -0
tests/build.py
CHANGED
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
from tricc_oo.strategies.output.spice import SpiceStrategy
|
|
2
|
-
from tricc_oo.strategies.output.xlsform_cht_hf import XLSFormCHTHFStrategy
|
|
3
|
-
from tricc_oo.strategies.output.xlsform_cht import XLSFormCHTStrategy
|
|
4
|
-
from tricc_oo.strategies.output.xlsform_cdss import XLSFormCDSSStrategy
|
|
5
|
-
from tricc_oo.strategies.output.xls_form import XLSFormStrategy
|
|
6
|
-
from tricc_oo.strategies.output.openmrs_form import OpenMRSStrategy
|
|
7
|
-
from tricc_oo.strategies.output.fhir_form import FHIRStrategy
|
|
8
|
-
from tricc_oo.strategies.output.html_form import HTMLStrategy
|
|
9
|
-
|
|
10
|
-
from tricc_oo.strategies.input.drawio import DrawioStrategy
|
|
1
|
+
from tricc_oo.strategies.output.spice import SpiceStrategy # noqa: F401
|
|
2
|
+
from tricc_oo.strategies.output.xlsform_cht_hf import XLSFormCHTHFStrategy # noqa: F401
|
|
3
|
+
from tricc_oo.strategies.output.xlsform_cht import XLSFormCHTStrategy # noqa: F401
|
|
4
|
+
from tricc_oo.strategies.output.xlsform_cdss import XLSFormCDSSStrategy # noqa: F401
|
|
5
|
+
from tricc_oo.strategies.output.xls_form import XLSFormStrategy # noqa: F401
|
|
6
|
+
from tricc_oo.strategies.output.openmrs_form import OpenMRSStrategy # noqa: F401
|
|
7
|
+
from tricc_oo.strategies.output.fhir_form import FHIRStrategy # noqa: F401
|
|
8
|
+
from tricc_oo.strategies.output.html_form import HTMLStrategy # noqa: F401
|
|
9
|
+
from tricc_oo.strategies.input.drawio import DrawioStrategy # noqa: F401
|
|
11
10
|
import getopt
|
|
12
|
-
import gettext
|
|
13
11
|
import logging
|
|
14
12
|
import os
|
|
15
13
|
import sys
|
|
16
14
|
import gc
|
|
17
|
-
import shutil
|
|
18
15
|
from pathlib import Path
|
|
19
16
|
|
|
20
17
|
# set up logging to file
|
|
@@ -43,15 +40,15 @@ def setup_logger(
|
|
|
43
40
|
level=logging.INFO,
|
|
44
41
|
formatting="[%(asctime)s] {%(pathname)s:%(lineno)d} %(levelname)s - %(message)s",
|
|
45
42
|
):
|
|
46
|
-
|
|
43
|
+
logger = logging.getLogger(logger_name)
|
|
47
44
|
formatter = logging.Formatter(formatting)
|
|
48
45
|
file_handler = logging.FileHandler(log_file, mode="w+")
|
|
49
46
|
file_handler.setFormatter(formatter)
|
|
50
47
|
stream_handler = logging.StreamHandler()
|
|
51
48
|
stream_handler.setFormatter(formatter)
|
|
52
49
|
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
logger.setLevel(level)
|
|
51
|
+
logger.addHandler(file_handler)
|
|
55
52
|
|
|
56
53
|
|
|
57
54
|
class ColorFormatter(logging.Formatter):
|
tests/test_cql.py
CHANGED
|
@@ -53,9 +53,9 @@ class TestCql(unittest.TestCase):
|
|
|
53
53
|
|
|
54
54
|
def test_case(self):
|
|
55
55
|
case_cql = """
|
|
56
|
-
case AgeInMonths()
|
|
57
|
-
when 0 then 'newborn'
|
|
58
|
-
when 1 then 'newborn'
|
|
56
|
+
case AgeInMonths()
|
|
57
|
+
when 0 then 'newborn'
|
|
58
|
+
when 1 then 'newborn'
|
|
59
59
|
else 'child' end
|
|
60
60
|
"""
|
|
61
61
|
case_operation = transform_cql_to_operation(case_cql)
|
|
@@ -72,7 +72,7 @@ class TestCql(unittest.TestCase):
|
|
|
72
72
|
|
|
73
73
|
def test_ifs(self):
|
|
74
74
|
case_cql = """
|
|
75
|
-
case
|
|
75
|
+
case
|
|
76
76
|
when AgeInMonths() <= 2 then true
|
|
77
77
|
when AgeInYears() > 5 then true
|
|
78
78
|
else false end
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
from tricc_oo.converters.utils import clean_name
|
|
3
|
-
from tricc_oo.models.tricc import TriccNodeSelectOption
|
|
2
|
+
from tricc_oo.converters.utils import clean_name, clean_str
|
|
3
|
+
from tricc_oo.models.tricc import TriccNodeSelectOption, TRICC_TRUE_VALUE, TRICC_FALSE_VALUE
|
|
4
4
|
from tricc_oo.models.calculate import TriccNodeInput
|
|
5
|
-
from tricc_oo.models.base import TriccNodeBaseModel
|
|
5
|
+
from tricc_oo.models.base import TriccNodeBaseModel, TriccStatic, TriccReference
|
|
6
|
+
|
|
6
7
|
# from babel import _
|
|
7
8
|
|
|
8
9
|
# TRICC_SELECT_MULTIPLE_CALC_EXPRESSION = "count-selected(${{{0}}}) - number(selected(${{{0}}},'opt_none'))"
|
|
@@ -18,6 +19,10 @@ TRICC_NEGATE = "not({})"
|
|
|
18
19
|
# TRICC_AND_EXPRESSION = '{0} and {1}'
|
|
19
20
|
VERSION_SEPARATOR = "_Vv_"
|
|
20
21
|
INSTANCE_SEPARATOR = "_Ii_"
|
|
22
|
+
BOOLEAN_MAP = {
|
|
23
|
+
str(TRICC_TRUE_VALUE): 1,
|
|
24
|
+
str(TRICC_FALSE_VALUE): 0,
|
|
25
|
+
}
|
|
21
26
|
|
|
22
27
|
|
|
23
28
|
logger = logging.getLogger("default")
|
|
@@ -26,9 +31,36 @@ logger = logging.getLogger("default")
|
|
|
26
31
|
|
|
27
32
|
|
|
28
33
|
def get_export_name(node, replace_dots=True):
|
|
29
|
-
if
|
|
30
|
-
return
|
|
31
|
-
|
|
34
|
+
if hasattr(node, 'export_name') and node.export_name is not None:
|
|
35
|
+
return node.export_name
|
|
36
|
+
elif isinstance(node, bool):
|
|
37
|
+
return BOOLEAN_MAP[str(TRICC_TRUE_VALUE)] if node else BOOLEAN_MAP[str(TRICC_FALSE_VALUE)]
|
|
38
|
+
elif isinstance(node, TriccReference):
|
|
39
|
+
logger.warning(f"Reference {node.value} use in export, bad serialiuation probable")
|
|
40
|
+
return str(node.value)
|
|
41
|
+
elif isinstance(node, (str, TriccStatic, TriccNodeSelectOption)):
|
|
42
|
+
if isinstance(node, TriccNodeSelectOption):
|
|
43
|
+
value = node.name
|
|
44
|
+
elif isinstance(node, TriccStatic):
|
|
45
|
+
value = node.value
|
|
46
|
+
else:
|
|
47
|
+
value = node
|
|
48
|
+
if isinstance(value, bool): # or r.value in ('true', 'false')
|
|
49
|
+
export_name = BOOLEAN_MAP[str(TRICC_TRUE_VALUE)] if value else BOOLEAN_MAP[str(TRICC_FALSE_VALUE)]
|
|
50
|
+
elif value == TRICC_TRUE_VALUE:
|
|
51
|
+
export_name = BOOLEAN_MAP[str(TRICC_TRUE_VALUE)]
|
|
52
|
+
elif value == TRICC_FALSE_VALUE:
|
|
53
|
+
export_name = BOOLEAN_MAP[str(TRICC_FALSE_VALUE)]
|
|
54
|
+
elif isinstance(value, str):
|
|
55
|
+
export_name = f"'{clean_str(value, replace_dots=replace_dots)}'"
|
|
56
|
+
else:
|
|
57
|
+
export_name = str(value)
|
|
58
|
+
if hasattr(node, 'export_name'):
|
|
59
|
+
node.export_name = export_name
|
|
60
|
+
return export_name
|
|
61
|
+
elif not hasattr(node, 'export_name'):
|
|
62
|
+
return node
|
|
63
|
+
else:
|
|
32
64
|
node.gen_name()
|
|
33
65
|
if isinstance(node, TriccNodeSelectOption):
|
|
34
66
|
node.export_name = node.name
|
|
@@ -41,8 +73,7 @@ def get_export_name(node, replace_dots=True):
|
|
|
41
73
|
node.export_name = clean_name("load." + node.name, replace_dots=replace_dots)
|
|
42
74
|
else:
|
|
43
75
|
node.export_name = clean_name(node.name, replace_dots=replace_dots)
|
|
44
|
-
|
|
45
|
-
return node.export_name
|
|
76
|
+
return node.export_name
|
|
46
77
|
|
|
47
78
|
|
|
48
79
|
def get_list_names(list):
|
tricc_oo/converters/utils.py
CHANGED
|
@@ -23,7 +23,7 @@ def clean_str(name, replace_dots=False):
|
|
|
23
23
|
|
|
24
24
|
def clean_name(name, prefix="", replace_dots=False):
|
|
25
25
|
name = clean_str(name, replace_dots)
|
|
26
|
-
if name[0].isdigit():
|
|
26
|
+
if name and name[0].isdigit():
|
|
27
27
|
name = "id_" + name
|
|
28
28
|
elif name[0].isdigit() == "_":
|
|
29
29
|
name = name[1:]
|
tricc_oo/models/tricc.py
CHANGED
tricc_oo/serializers/xls_form.py
CHANGED
|
@@ -3,7 +3,7 @@ import hashlib
|
|
|
3
3
|
|
|
4
4
|
# from bs4 import BeautifulSoup
|
|
5
5
|
from tricc_oo.converters.tricc_to_xls_form import (
|
|
6
|
-
get_export_name,
|
|
6
|
+
get_export_name, BOOLEAN_MAP
|
|
7
7
|
)
|
|
8
8
|
from tricc_oo.models.lang import SingletonLangClass
|
|
9
9
|
from tricc_oo.converters.utils import clean_name, remove_html
|
|
@@ -13,7 +13,6 @@ from tricc_oo.models.base import (
|
|
|
13
13
|
)
|
|
14
14
|
from tricc_oo.models.calculate import (
|
|
15
15
|
TriccNodeDisplayCalculateBase,
|
|
16
|
-
|
|
17
16
|
)
|
|
18
17
|
from tricc_oo.models.tricc import (
|
|
19
18
|
TriccNodeActivity, TriccNodeBaseModel, TriccNodeSelectMultiple, TriccNodeSelectOption,
|
|
@@ -29,8 +28,6 @@ from tricc_oo.visitors.tricc import (
|
|
|
29
28
|
is_ready_to_process,
|
|
30
29
|
process_reference,
|
|
31
30
|
add_calculate,
|
|
32
|
-
TRICC_TRUE_VALUE,
|
|
33
|
-
TRICC_FALSE_VALUE,
|
|
34
31
|
get_applicability_expression,
|
|
35
32
|
get_prev_instance_skip_expression,
|
|
36
33
|
get_process_skip_expression,
|
|
@@ -41,11 +38,6 @@ logger = logging.getLogger("default")
|
|
|
41
38
|
langs = SingletonLangClass()
|
|
42
39
|
TRICC_CALC_EXPRESSION = "${{{0}}}>0"
|
|
43
40
|
|
|
44
|
-
BOOLEAN_MAP = {
|
|
45
|
-
str(TRICC_TRUE_VALUE): 1,
|
|
46
|
-
str(TRICC_FALSE_VALUE): 0,
|
|
47
|
-
}
|
|
48
|
-
|
|
49
41
|
|
|
50
42
|
def start_group(
|
|
51
43
|
strategy,
|
|
@@ -22,8 +22,7 @@ from tricc_oo.models.tricc import (
|
|
|
22
22
|
TriccNodeInputModel,
|
|
23
23
|
TriccNodeBaseModel,
|
|
24
24
|
TriccNodeDisplayModel,
|
|
25
|
-
|
|
26
|
-
)
|
|
25
|
+
)
|
|
27
26
|
|
|
28
27
|
from tricc_oo.models.calculate import TriccNodeDisplayCalculateBase, TriccNodeDiagnosis
|
|
29
28
|
from tricc_oo.models.ordered_set import OrderedSet
|
|
@@ -36,6 +35,7 @@ UUID_NAMESPACE = uuid.UUID('12345678-1234-5678-9abc-def012345678')
|
|
|
36
35
|
CIEL_YES = "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
|
|
37
36
|
CIEL_NO = "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
|
|
38
37
|
|
|
38
|
+
|
|
39
39
|
class OpenMRSStrategy(BaseOutPutStrategy):
|
|
40
40
|
processes = ["main"]
|
|
41
41
|
project = None
|
|
@@ -193,8 +193,8 @@ class OpenMRSStrategy(BaseOutPutStrategy):
|
|
|
193
193
|
if node.hint:
|
|
194
194
|
question["questionInfo"] = node.hint
|
|
195
195
|
if node.tricc_type in ['select_one', 'select_multiple']:
|
|
196
|
-
labelTrue = None
|
|
197
|
-
labelFalse = None
|
|
196
|
+
# labelTrue = None
|
|
197
|
+
# labelFalse = None
|
|
198
198
|
# Add answers if options
|
|
199
199
|
if hasattr(node, 'options'):
|
|
200
200
|
answers = []
|
|
@@ -204,10 +204,10 @@ class OpenMRSStrategy(BaseOutPutStrategy):
|
|
|
204
204
|
concept_val = self.get_option_value(opt.name)
|
|
205
205
|
if concept_val == TriccStatic(False):
|
|
206
206
|
concept_val = CIEL_NO
|
|
207
|
-
labelFalse = display
|
|
207
|
+
# labelFalse = display
|
|
208
208
|
if concept_val == TriccStatic(True):
|
|
209
209
|
concept_val = CIEL_YES
|
|
210
|
-
labelTrue = display
|
|
210
|
+
# labelTrue = display
|
|
211
211
|
answers.append({
|
|
212
212
|
"label": display,
|
|
213
213
|
"concept": concept_val,
|
|
@@ -241,7 +241,7 @@ class OpenMRSStrategy(BaseOutPutStrategy):
|
|
|
241
241
|
"id": self.get_export_name(node),
|
|
242
242
|
"type": "obs" if isinstance(node, TriccNodeDiagnosis) else "control",
|
|
243
243
|
"label": getattr(node, 'label', '').replace('\u00a0', ' ').strip(),
|
|
244
|
-
"hide":{
|
|
244
|
+
"hide": {
|
|
245
245
|
"hideWhenExpression": "true"
|
|
246
246
|
},
|
|
247
247
|
"questionOptions": {
|
|
@@ -414,16 +414,16 @@ class OpenMRSStrategy(BaseOutPutStrategy):
|
|
|
414
414
|
|
|
415
415
|
# Operation methods similar, but for string expressions
|
|
416
416
|
def tricc_operation_equal(self, ref_expressions):
|
|
417
|
-
if ref_expressions[1] == TriccStatic(True) or ref_expressions[1]
|
|
417
|
+
if ref_expressions[1] == TriccStatic(True) or ref_expressions[1] is True or ref_expressions[1] == 'true':
|
|
418
418
|
return f"{self._boolean(ref_expressions, '===', CIEL_YES, 'true')}"
|
|
419
|
-
elif ref_expressions[1] == TriccStatic(False) or ref_expressions[1]
|
|
419
|
+
elif ref_expressions[1] == TriccStatic(False) or ref_expressions[1] is False or ref_expressions[1] == 'false':
|
|
420
420
|
return f"{self._boolean(ref_expressions, '===', CIEL_NO, 'false')}"
|
|
421
421
|
return f"{ref_expressions[0]} === {ref_expressions[1]}"
|
|
422
422
|
|
|
423
423
|
def tricc_operation_not_equal(self, ref_expressions):
|
|
424
|
-
if ref_expressions[1] == TriccStatic(True) or ref_expressions[1]
|
|
424
|
+
if ref_expressions[1] == TriccStatic(True) or ref_expressions[1] is True or ref_expressions[1] == 'true':
|
|
425
425
|
return f"!{self._boolean(ref_expressions, '===', CIEL_YES, 'true')}"
|
|
426
|
-
elif ref_expressions[1] == TriccStatic(False) or ref_expressions[1]
|
|
426
|
+
elif ref_expressions[1] == TriccStatic(False) or ref_expressions[1] is False or ref_expressions[1] == 'false':
|
|
427
427
|
return f"!{self._boolean(ref_expressions, '===', CIEL_NO, 'false')}"
|
|
428
428
|
return f"{ref_expressions[0]} !== {ref_expressions[1]}"
|
|
429
429
|
|
|
@@ -494,11 +494,11 @@ class OpenMRSStrategy(BaseOutPutStrategy):
|
|
|
494
494
|
return f"{ref_expressions[0]}({','.join(ref_expressions[1:])})"
|
|
495
495
|
|
|
496
496
|
def tricc_operation_istrue(self, ref_expressions):
|
|
497
|
-
#return f"{ref_expressions[0]} === true"
|
|
497
|
+
# return f"{ref_expressions[0]} === true"
|
|
498
498
|
return f"{self._boolean(ref_expressions, '===', CIEL_YES, 'true')}"
|
|
499
499
|
|
|
500
500
|
def tricc_operation_isfalse(self, ref_expressions):
|
|
501
|
-
#return f"{ref_expressions[0]} === false"
|
|
501
|
+
# return f"{ref_expressions[0]} === false"
|
|
502
502
|
return f"{self._boolean(ref_expressions, '===', CIEL_NO, 'false')}"
|
|
503
503
|
|
|
504
504
|
def tricc_operation_parenthesis(self, ref_expressions):
|
|
@@ -514,11 +514,11 @@ class OpenMRSStrategy(BaseOutPutStrategy):
|
|
|
514
514
|
return f"!isEmpty{ref_expressions[0]})"
|
|
515
515
|
|
|
516
516
|
def tricc_operation_isnottrue(self, ref_expressions):
|
|
517
|
-
#return f"{ref_expressions[0]} !== true"
|
|
517
|
+
# return f"{ref_expressions[0]} !== true"
|
|
518
518
|
return f"!{self._boolean(ref_expressions, '===', CIEL_YES, 'true')}"
|
|
519
519
|
|
|
520
520
|
def tricc_operation_isnotfalse(self, ref_expressions):
|
|
521
|
-
#return f"{ref_expressions[0]} !== false"
|
|
521
|
+
# return f"{ref_expressions[0]} !== false"
|
|
522
522
|
return f"!{self._boolean(ref_expressions, '===', CIEL_NO, 'false')}"
|
|
523
523
|
|
|
524
524
|
def _boolean(self, ref_expressions, operator, answer_uuid, bool_val='false'):
|
|
@@ -25,9 +25,11 @@ from tricc_oo.models.tricc import (
|
|
|
25
25
|
TriccNodeBaseModel,
|
|
26
26
|
TriccNodeSelectOption,
|
|
27
27
|
TriccNodeInputModel,
|
|
28
|
-
TriccNodeDisplayModel
|
|
28
|
+
TriccNodeDisplayModel,
|
|
29
|
+
TRICC_FALSE_VALUE,
|
|
30
|
+
TRICC_TRUE_VALUE,
|
|
29
31
|
)
|
|
30
|
-
from tricc_oo.converters.tricc_to_xls_form import get_export_name
|
|
32
|
+
from tricc_oo.converters.tricc_to_xls_form import get_export_name, BOOLEAN_MAP
|
|
31
33
|
|
|
32
34
|
from tricc_oo.models.lang import SingletonLangClass
|
|
33
35
|
|
|
@@ -37,8 +39,6 @@ from tricc_oo.visitors.tricc import (
|
|
|
37
39
|
is_ready_to_process,
|
|
38
40
|
process_reference,
|
|
39
41
|
get_node_expressions,
|
|
40
|
-
TRICC_TRUE_VALUE,
|
|
41
|
-
TRICC_FALSE_VALUE,
|
|
42
42
|
set_last_version_false,
|
|
43
43
|
generate_calculate,
|
|
44
44
|
generate_base,
|
|
@@ -49,7 +49,6 @@ from tricc_oo.serializers.xls_form import (
|
|
|
49
49
|
end_group,
|
|
50
50
|
generate_xls_form_export,
|
|
51
51
|
start_group,
|
|
52
|
-
BOOLEAN_MAP,
|
|
53
52
|
)
|
|
54
53
|
from tricc_oo.strategies.output.base_output_strategy import BaseOutPutStrategy
|
|
55
54
|
|
|
@@ -722,23 +721,21 @@ class XLSFormStrategy(BaseOutPutStrategy):
|
|
|
722
721
|
logger.warning(f"reference `{r.value}` still used in a calculate")
|
|
723
722
|
return f"${{{get_export_name(r.value)}}}"
|
|
724
723
|
elif isinstance(r, TriccStatic):
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
if r
|
|
724
|
+
return get_export_name(r)
|
|
725
|
+
elif isinstance(r, str):
|
|
726
|
+
if r == TRICC_TRUE_VALUE:
|
|
728
727
|
return BOOLEAN_MAP[str(TRICC_TRUE_VALUE)]
|
|
729
|
-
|
|
728
|
+
elif r == TRICC_FALSE_VALUE:
|
|
730
729
|
return BOOLEAN_MAP[str(TRICC_FALSE_VALUE)]
|
|
731
|
-
|
|
732
|
-
return f"'{r
|
|
730
|
+
elif isinstance(r, str):
|
|
731
|
+
return f"'{r}'"
|
|
733
732
|
else:
|
|
734
|
-
return str(r
|
|
735
|
-
elif isinstance(r, str):
|
|
736
|
-
return f"{r}"
|
|
733
|
+
return str(r)
|
|
737
734
|
elif isinstance(r, (int, float)):
|
|
738
735
|
return str(r)
|
|
739
736
|
elif isinstance(r, TriccNodeSelectOption):
|
|
740
|
-
logger.
|
|
741
|
-
return
|
|
737
|
+
logger.debug(f"select option {r.get_name()} from {r.select.get_name()} was used as a reference")
|
|
738
|
+
return get_export_name(r)
|
|
742
739
|
elif issubclass(r.__class__, TriccNodeInputModel):
|
|
743
740
|
return f"coalesce(${{{get_export_name(r)}}},{coalesce_fallback})"
|
|
744
741
|
elif issubclass(r.__class__, TriccNodeBaseModel):
|
tricc_oo/visitors/tricc.py
CHANGED
|
@@ -44,6 +44,8 @@ from tricc_oo.models.tricc import (
|
|
|
44
44
|
TriccNodeDisplayModel,
|
|
45
45
|
TriccNodeMainStart,
|
|
46
46
|
TriccNodeAcceptDiagnostic,
|
|
47
|
+
TRICC_FALSE_VALUE,
|
|
48
|
+
TRICC_TRUE_VALUE,
|
|
47
49
|
)
|
|
48
50
|
from tricc_oo.visitors.utils import PROCESSES
|
|
49
51
|
from tricc_oo.converters.cql_to_operation import transform_cql_to_operation
|
|
@@ -53,9 +55,6 @@ from tricc_oo.converters.tricc_to_xls_form import get_list_names, get_export_nam
|
|
|
53
55
|
logger = logging.getLogger("default")
|
|
54
56
|
ONE_QUESTION_AT_A_TIME = False
|
|
55
57
|
|
|
56
|
-
TRICC_TRUE_VALUE = "true"
|
|
57
|
-
TRICC_FALSE_VALUE = "false"
|
|
58
|
-
|
|
59
58
|
|
|
60
59
|
def merge_node(from_node, to_node):
|
|
61
60
|
if from_node.activity != to_node.activity:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
tests/build.py,sha256=
|
|
2
|
-
tests/test_cql.py,sha256=
|
|
1
|
+
tests/build.py,sha256=rAYR6cSsNtQLH5vvrh_FNSBwWh_AynF3jG28jC-tiGs,6670
|
|
2
|
+
tests/test_cql.py,sha256=dAsLMqVaS6qxnq62fg5KqTFu6UG6pHO6Ab3NZ1c9T3Y,5248
|
|
3
3
|
tests/to_ocl.py,sha256=4e-i65K3UM6wHgdVcrZcM9AyL1bahIsXJiZTXhhHgQk,2048
|
|
4
4
|
tricc_oo/__init__.py,sha256=oWCE1ubmC_6iqaWOMgTei4eXVQgV202Ia-tXS1NnW_4,139
|
|
5
5
|
tricc_oo/converters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -7,8 +7,8 @@ tricc_oo/converters/codesystem_to_ocl.py,sha256=Fh7Vk73OsxljZKu1k6H9uzYwz334tpQT
|
|
|
7
7
|
tricc_oo/converters/cql_to_operation.py,sha256=PUyV_YpUY98Ox0H_F_CN3UUf_I-BhFZVOcWWKTtwecM,14492
|
|
8
8
|
tricc_oo/converters/datadictionnary.py,sha256=T2HLCBo4Am1p0kFqSH1r0PqbD8AC2IGuWkbvMvSCru0,3658
|
|
9
9
|
tricc_oo/converters/drawio_type_map.py,sha256=UCPiGs7Lw0bigKScmZUnmOhACBz-FiDq92jHkI7RTSQ,9113
|
|
10
|
-
tricc_oo/converters/tricc_to_xls_form.py,sha256=
|
|
11
|
-
tricc_oo/converters/utils.py,sha256=
|
|
10
|
+
tricc_oo/converters/tricc_to_xls_form.py,sha256=Aor4Tfnz_Q-qUM9QVR2gzQln0zRoMfD1eHK7YkO-a9Y,3438
|
|
11
|
+
tricc_oo/converters/utils.py,sha256=JZrtrvvOfXwdkw49pKauzinOcauWwsy-CVcw36TjyLo,1684
|
|
12
12
|
tricc_oo/converters/xml_to_tricc.py,sha256=cDoLTwIMHIqyyNqZGwQte9YdX4y5j1Ac6r7M-zuKWZc,39403
|
|
13
13
|
tricc_oo/converters/cql/cqlLexer.py,sha256=8HArbRphcrpnAG4uogJ2rHv4tc1WLzjN0B1uFeYILAc,49141
|
|
14
14
|
tricc_oo/converters/cql/cqlListener.py,sha256=fA7-8DcS2Q69ckwjdg57-OfFHBxjTZFdoSKrtw7Hffc,57538
|
|
@@ -20,12 +20,12 @@ tricc_oo/models/calculate.py,sha256=uNP0IDUqPQcJq9Co05H8eX5wbR_DikSxuOHxfVE5Dxg,
|
|
|
20
20
|
tricc_oo/models/lang.py,sha256=ZMRwdoPWe01wEDhOM0uRk-6rt3BkoAAZM8mZ61--s3A,2265
|
|
21
21
|
tricc_oo/models/ocl.py,sha256=MybSeB6fgCOUVJ4aektff0vrrTZsyfwZ2Gt_pPBu_FY,8728
|
|
22
22
|
tricc_oo/models/ordered_set.py,sha256=BpXLW8plRAy4te25PIUPvVXPnLPcypvKg3iNPhtPulA,3833
|
|
23
|
-
tricc_oo/models/tricc.py,sha256=
|
|
23
|
+
tricc_oo/models/tricc.py,sha256=lQ1xguJjhbRQ8wFt2rwefw_756aq_y4rWxf8Gj9zhas,17475
|
|
24
24
|
tricc_oo/parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
25
|
tricc_oo/parsers/xml.py,sha256=uzkb1y18MHfqVFmZqVh0sKT4cx6u0-NcAT_lV_gHBt8,4208
|
|
26
26
|
tricc_oo/serializers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
27
|
tricc_oo/serializers/planuml.py,sha256=t57587-6L3aDncpHh58lS77Zft8yxDE9DPtXx2BeUSU,132
|
|
28
|
-
tricc_oo/serializers/xls_form.py,sha256=
|
|
28
|
+
tricc_oo/serializers/xls_form.py,sha256=9nUcdT2YVzJ2Hu7WLNmphxpXg3GU-yvY6j4ua3i_FCo,21636
|
|
29
29
|
tricc_oo/strategies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
30
|
tricc_oo/strategies/input/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
31
31
|
tricc_oo/strategies/input/base_input_strategy.py,sha256=BEODXS74na1QRRcJVQ4cxiD8F7uRqaLyhE3QzKpGVvk,3891
|
|
@@ -33,18 +33,18 @@ tricc_oo/strategies/input/drawio.py,sha256=uXAUPhXOeg0Uk_BNqlCqFBW4cWNox4VfH559b
|
|
|
33
33
|
tricc_oo/strategies/output/base_output_strategy.py,sha256=M9UFR67-_CFoW681bPAeBS1OUGuFtmUbM_rltACI0hk,8798
|
|
34
34
|
tricc_oo/strategies/output/fhir_form.py,sha256=hbL921pe1Doun4IQrJuZ_Sq2fCh98G3grYie5olC4uc,15740
|
|
35
35
|
tricc_oo/strategies/output/html_form.py,sha256=qSleEZOMV_-Z04y-i-ucyd5rgAYWAyjPwMrw0IHtCRM,8604
|
|
36
|
-
tricc_oo/strategies/output/openmrs_form.py,sha256=
|
|
36
|
+
tricc_oo/strategies/output/openmrs_form.py,sha256=aiHUi_lDm48yaKqZGWyFMVPIj6OhQGcAADFDoYJteW0,27175
|
|
37
37
|
tricc_oo/strategies/output/spice.py,sha256=QMeoismVC3PdbvwTK0PtUjWX9jl9780fbQIXn76fMXw,10761
|
|
38
|
-
tricc_oo/strategies/output/xls_form.py,sha256=
|
|
38
|
+
tricc_oo/strategies/output/xls_form.py,sha256=sq0IXYtUgkUvzQtjXLfWoqOhsyRrFdGu3r8GCKaNr14,29586
|
|
39
39
|
tricc_oo/strategies/output/xlsform_cdss.py,sha256=X00Lt5MzV8TX14dR4dFI1MqllI5S1e13bKbeysWM9uA,17435
|
|
40
|
-
tricc_oo/strategies/output/xlsform_cht.py,sha256=
|
|
40
|
+
tricc_oo/strategies/output/xlsform_cht.py,sha256=RY_mre9j6w2vVnRFSGn5R3CuTWFjIbQyl1uWwz9Ay5E,22965
|
|
41
41
|
tricc_oo/strategies/output/xlsform_cht_hf.py,sha256=xm6SKirV3nMZvM2w54_zJcXAeAgAkq-EEqGEjnOWv6c,988
|
|
42
42
|
tricc_oo/visitors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
43
|
-
tricc_oo/visitors/tricc.py,sha256=
|
|
43
|
+
tricc_oo/visitors/tricc.py,sha256=RtE1oY6pWBasOmx_njexBg4qlHwPZd08QR45St5fPW0,107095
|
|
44
44
|
tricc_oo/visitors/utils.py,sha256=j83aAq5s5atXi3OC0jc_uJd54a8XrHHmizeeEbWZQJg,421
|
|
45
45
|
tricc_oo/visitors/xform_pd.py,sha256=ryAnI3V9x3eTmJ2LNsUZfvl0_yfCqo6oBgeSu-WPqaE,9613
|
|
46
|
-
tricc_oo-1.5.
|
|
47
|
-
tricc_oo-1.5.
|
|
48
|
-
tricc_oo-1.5.
|
|
49
|
-
tricc_oo-1.5.
|
|
50
|
-
tricc_oo-1.5.
|
|
46
|
+
tricc_oo-1.5.25.dist-info/licenses/LICENSE,sha256=Pz2eACSxkhsGfW9_iN60pgy-enjnbGTj8df8O3ebnQQ,16726
|
|
47
|
+
tricc_oo-1.5.25.dist-info/METADATA,sha256=JLxo_H_NO_4ldytDF35wcSW-Jq8w3ahiWnaxEPJzFDk,8577
|
|
48
|
+
tricc_oo-1.5.25.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
49
|
+
tricc_oo-1.5.25.dist-info/top_level.txt,sha256=NvbfMNAiy9m4b1unBsqpeOQWh4IgA1Xa33BtKA4abxk,15
|
|
50
|
+
tricc_oo-1.5.25.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|