tricc-oo 1.4.24__py3-none-any.whl → 1.4.26__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.
- tricc_oo/converters/tricc_to_xls_form.py +1 -1
- tricc_oo/models/base.py +3 -1
- tricc_oo/strategies/output/xls_form.py +2 -5
- tricc_oo/visitors/tricc.py +71 -62
- tricc_oo/visitors/xform_pd.py +11 -6
- {tricc_oo-1.4.24.dist-info → tricc_oo-1.4.26.dist-info}/METADATA +1 -1
- {tricc_oo-1.4.24.dist-info → tricc_oo-1.4.26.dist-info}/RECORD +9 -9
- {tricc_oo-1.4.24.dist-info → tricc_oo-1.4.26.dist-info}/WHEEL +1 -1
- {tricc_oo-1.4.24.dist-info → tricc_oo-1.4.26.dist-info}/top_level.txt +0 -0
|
@@ -35,7 +35,7 @@ def get_export_name(node, replace_dots=True):
|
|
|
35
35
|
node.gen_name()
|
|
36
36
|
if isinstance(node, TriccNodeSelectOption):
|
|
37
37
|
node.export_name = node.name
|
|
38
|
-
elif node.last
|
|
38
|
+
elif node.last == False:
|
|
39
39
|
node.export_name = clean_name(node.name + VERSION_SEPARATOR + str(node.version), replace_dots=replace_dots)
|
|
40
40
|
# elif node.activity.instance>1:
|
|
41
41
|
# if node.version:
|
tricc_oo/models/base.py
CHANGED
|
@@ -630,6 +630,8 @@ def not_clean(a):
|
|
|
630
630
|
# @param list_or
|
|
631
631
|
# @param and elm use upstream
|
|
632
632
|
def clean_or_list(list_or, elm_and=None):
|
|
633
|
+
if TriccStatic(True) in list_or:
|
|
634
|
+
return [TriccStatic(True)]
|
|
633
635
|
for a in list(list_or):
|
|
634
636
|
if isinstance(a, TriccOperation) and a.operator == TriccOperator.OR:
|
|
635
637
|
list_or.remove(a)
|
|
@@ -694,7 +696,7 @@ def simple_and_join(left, right):
|
|
|
694
696
|
)
|
|
695
697
|
|
|
696
698
|
def or_join(list_or, elm_and=None):
|
|
697
|
-
cleaned_list = clean_or_list(list_or, elm_and)
|
|
699
|
+
cleaned_list = clean_or_list(set(list_or), elm_and)
|
|
698
700
|
if len(cleaned_list) == 1:
|
|
699
701
|
return cleaned_list[0]
|
|
700
702
|
elif len(cleaned_list)>1:
|
|
@@ -616,10 +616,8 @@ class XLSFormStrategy(BaseOutPutStrategy):
|
|
|
616
616
|
if hasattr(node, 'expression') and (node.expression is None) and issubclass(node.__class__,TriccNodeCalculateBase):
|
|
617
617
|
node.expression = get_node_expressions(node, processed_nodes, process=kwargs.get('process', 'main '))
|
|
618
618
|
# continue walk
|
|
619
|
-
if issubclass(node.__class__, (TriccNodeDisplayModel, TriccNodeDisplayCalculateBase)):
|
|
619
|
+
if issubclass(node.__class__, (TriccNodeDisplayModel, TriccNodeDisplayCalculateBase, TriccNodeEnd)):
|
|
620
620
|
last_version = set_last_version_false(node, processed_nodes)
|
|
621
|
-
if not last_version:
|
|
622
|
-
node.last = True
|
|
623
621
|
return True
|
|
624
622
|
return False
|
|
625
623
|
|
|
@@ -635,8 +633,7 @@ class XLSFormStrategy(BaseOutPutStrategy):
|
|
|
635
633
|
# we don't overright if define in the diagram
|
|
636
634
|
if node.constraint is None:
|
|
637
635
|
if isinstance(node, TriccNodeSelectMultiple):
|
|
638
|
-
node.constraint =
|
|
639
|
-
TriccOperator.OR,
|
|
636
|
+
node.constraint = or_join(
|
|
640
637
|
[
|
|
641
638
|
TriccOperation(TriccOperator.EQUAL, ['$this', TriccStatic('opt_none')]),
|
|
642
639
|
TriccOperation(TriccOperator.NOT, [
|
tricc_oo/visitors/tricc.py
CHANGED
|
@@ -74,7 +74,7 @@ def get_node_expressions(node, processed_nodes, process=None):
|
|
|
74
74
|
expression = get_node_expression(node, processed_nodes=processed_nodes, is_calculate=is_calculate, process=process)
|
|
75
75
|
|
|
76
76
|
if is_calculate:
|
|
77
|
-
if expression and (not isinstance(expression, str) or expression != '') and expression is not True
|
|
77
|
+
if expression and (not isinstance(expression, str) or expression != '') and expression is not True :
|
|
78
78
|
num_expression = TriccOperation(
|
|
79
79
|
TriccOperator.CAST_NUMBER,
|
|
80
80
|
[expression]
|
|
@@ -96,10 +96,10 @@ def get_node_expressions(node, processed_nodes, process=None):
|
|
|
96
96
|
def set_last_version_false(node, processed_nodes):
|
|
97
97
|
node_name = node.name if not isinstance(node, TriccNodeEnd) else node.get_reference()
|
|
98
98
|
#last_version = get_last_version(node_name, processed_nodes) if issubclass(node.__class__, (TriccNodeDisplayModel, TriccNodeDisplayCalculateBase, TriccNodeEnd)) and not isinstance(node, TriccNodeSelectOption) else None
|
|
99
|
-
last_version = processed_nodes.find_prev(node, lambda item: hasattr(item, 'name') and item.name == node.name and issubclass(node.__class__, (TriccNodeDisplayModel, TriccNodeDisplayCalculateBase, TriccNodeEnd)) and not isinstance(node, TriccNodeSelectOption))
|
|
99
|
+
last_version = processed_nodes.find_prev(node, lambda item: item.id != node.id and hasattr(item, 'name') and item.name == node.name and issubclass(node.__class__, (TriccNodeDisplayModel, TriccNodeDisplayCalculateBase, TriccNodeEnd)) and not isinstance(node, TriccNodeSelectOption))
|
|
100
100
|
if last_version and getattr(node, 'process', '') != 'pause':
|
|
101
101
|
# 0-100 for manually specified instance. 100-200 for auto instance
|
|
102
|
-
node.version = get_next_version(node.name, processed_nodes, last_version.version + 1)
|
|
102
|
+
node.version = get_next_version(node.name, processed_nodes, last_version.version + 1, 0)
|
|
103
103
|
last_version.last = False
|
|
104
104
|
node.path_len = max(node.path_len, last_version.path_len + 1)
|
|
105
105
|
return last_version
|
|
@@ -152,8 +152,7 @@ def get_version_inheritance(node, last_version, processed_nodes):
|
|
|
152
152
|
def merge_expression(expression, last_version):
|
|
153
153
|
datatype = expression.get_datatype()
|
|
154
154
|
if datatype == 'boolean':
|
|
155
|
-
expression =
|
|
156
|
-
TriccOperator.OR,
|
|
155
|
+
expression = or_join(
|
|
157
156
|
[TriccOperation(TriccOperator.ISTRUE, [last_version]), expression]
|
|
158
157
|
)
|
|
159
158
|
|
|
@@ -472,13 +471,9 @@ def generate_calculates(node,calculates, used_calculates,processed_nodes):
|
|
|
472
471
|
if hasattr(node, 'save') and node.save is not None and node.save != '':
|
|
473
472
|
# get fragments type.name.icdcode
|
|
474
473
|
calculate_name=node.save
|
|
475
|
-
if
|
|
476
|
-
calc_node = get_count_node(node)
|
|
477
|
-
calc_node.path_len += 1
|
|
478
|
-
calc_node.name=calculate_name
|
|
479
|
-
calc_node.label = "save select: " +node.get_name()
|
|
480
|
-
elif node.name != calculate_name:
|
|
474
|
+
if node.name != calculate_name:
|
|
481
475
|
calc_id = generate_id(f"autosave{node.id}")
|
|
476
|
+
|
|
482
477
|
calc_node = TriccNodeCalculate(
|
|
483
478
|
name=calculate_name,
|
|
484
479
|
id = calc_id,
|
|
@@ -487,23 +482,20 @@ def generate_calculates(node,calculates, used_calculates,processed_nodes):
|
|
|
487
482
|
activity = node.activity,
|
|
488
483
|
label = "save: " +node.get_name(),
|
|
489
484
|
path_len=node.path_len+ 1,
|
|
490
|
-
last=True
|
|
485
|
+
last=True,
|
|
486
|
+
expression=get_node_expression(node,processed_nodes,True,True)
|
|
491
487
|
)
|
|
492
|
-
node.activity.
|
|
488
|
+
node.activity.calculates.append(calc_node)
|
|
493
489
|
last_version = set_last_version_false(calc_node, processed_nodes)
|
|
494
490
|
if last_version:
|
|
495
|
-
|
|
491
|
+
calc_node.expression = merge_expression(calc_node.expression, last_version)
|
|
496
492
|
processed_nodes.add(calc_node)
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
list_calc.append(calc_node)
|
|
504
|
-
#add_save_calculate(calc_node, calculates, used_calculates,processed_nodes)
|
|
505
|
-
for calc in list_calc:
|
|
506
|
-
node.activity.nodes[calc.id] = calc
|
|
493
|
+
logger.debug("generate_save_calculate:{}:{} as {}".format(calc_node.tricc_type, node.name if hasattr(node,'name') else node.id, calculate_name))
|
|
494
|
+
|
|
495
|
+
list_calc.append(calc_node)
|
|
496
|
+
#add_save_calculate(calc_node, calculates, used_calculates,processed_nodes)
|
|
497
|
+
for calc in list_calc:
|
|
498
|
+
node.activity.nodes[calc.id] = calc
|
|
507
499
|
return list_calc
|
|
508
500
|
|
|
509
501
|
|
|
@@ -965,7 +957,7 @@ def walkthrough_tricc_option(node, callback, processed_nodes, stashed_nodes, pat
|
|
|
965
957
|
node_path = node_path.copy(), **kwargs)
|
|
966
958
|
|
|
967
959
|
def get_next_version(name, processed_nodes, version=0, min=100):
|
|
968
|
-
return max(version, min,*[(getattr(n,'version',
|
|
960
|
+
return max(version, min,*[(getattr(n,'version',None) or getattr(n,'instance',None) or 0) for n in get_versions(name, processed_nodes)])+1
|
|
969
961
|
|
|
970
962
|
|
|
971
963
|
def get_data_for_log(node):
|
|
@@ -1505,7 +1497,7 @@ def get_node_expression( in_node, processed_nodes, is_calculate=False, is_prev=F
|
|
|
1505
1497
|
if isinstance(node, TriccNodeMainStart):
|
|
1506
1498
|
expression = get_applicability_expression(node.activity, processed_nodes, process, expression )
|
|
1507
1499
|
elif isinstance(node, (TriccNodeActivityStart)):
|
|
1508
|
-
return
|
|
1500
|
+
return TriccStatic(True)
|
|
1509
1501
|
|
|
1510
1502
|
elif isinstance(node, TriccNodeWait):
|
|
1511
1503
|
if is_prev:
|
|
@@ -1556,15 +1548,15 @@ def get_node_expression( in_node, processed_nodes, is_calculate=False, is_prev=F
|
|
|
1556
1548
|
logger.critical(f"Rhombus without expression {node.get_name()}")
|
|
1557
1549
|
elif is_prev and issubclass(node.__class__, TriccNodeDisplayCalculateBase):
|
|
1558
1550
|
expression = TriccOperation(TriccOperator.ISTRUE, [node])
|
|
1551
|
+
elif is_prev and is_calculate and (issubclass(node.__class__, TriccNodeSelect) or isinstance(node, TriccNodeSelectNotAvailable)):
|
|
1552
|
+
expression = get_count_terms_details( node, processed_nodes, is_calculate, negate, process)
|
|
1559
1553
|
elif hasattr(node, 'expression_reference') and isinstance(node.expression_reference, TriccOperation):
|
|
1560
1554
|
# if issubclass(node.__class__, TriccNodeDisplayCalculateBase):
|
|
1561
1555
|
# expression = TriccOperation(
|
|
1562
1556
|
# TriccOperator.CAST_NUMBER,
|
|
1563
1557
|
# [node.expression_reference])
|
|
1564
1558
|
# else:
|
|
1565
|
-
expression = node.expression_reference
|
|
1566
|
-
elif not is_prev and hasattr(node, 'relevance') and isinstance(node.relevance, TriccOperation):
|
|
1567
|
-
expression = node.relevance
|
|
1559
|
+
expression = node.expression_reference
|
|
1568
1560
|
elif is_prev and isinstance(node, TriccNodeSelectOption):
|
|
1569
1561
|
if negate:
|
|
1570
1562
|
negate_expression = get_selected_option_expression(node, negate)
|
|
@@ -1584,9 +1576,12 @@ def get_node_expression( in_node, processed_nodes, is_calculate=False, is_prev=F
|
|
|
1584
1576
|
negate_expression = get_calculation_terms(node, processed_nodes=processed_nodes, is_calculate=is_calculate, negate=True, process=process)
|
|
1585
1577
|
else:
|
|
1586
1578
|
expression = get_calculation_terms(node, processed_nodes=processed_nodes, is_calculate=is_calculate, process=process)
|
|
1579
|
+
|
|
1580
|
+
elif (not is_prev or not ONE_QUESTION_AT_A_TIME) and hasattr(node, 'relevance') and isinstance(node.relevance, (TriccOperation, TriccStatic)):
|
|
1581
|
+
expression = node.relevance
|
|
1587
1582
|
elif ONE_QUESTION_AT_A_TIME and is_prev and not is_calculate and hasattr(node, 'required') and node.required:
|
|
1588
1583
|
expression = get_required_node_expression(node)
|
|
1589
|
-
|
|
1584
|
+
|
|
1590
1585
|
if expression is None:
|
|
1591
1586
|
expression = get_prev_node_expression(node, processed_nodes=processed_nodes, is_calculate=is_calculate, process=process)
|
|
1592
1587
|
# in_node not in processed_nodes is need for calculates that can but run after the end of the activity
|
|
@@ -1846,8 +1841,7 @@ def get_prev_node_expression( node, processed_nodes, is_calculate=False, exclude
|
|
|
1846
1841
|
expression = expression_inputs[0]
|
|
1847
1842
|
|
|
1848
1843
|
elif expression_inputs:
|
|
1849
|
-
expression =
|
|
1850
|
-
TriccOperator.OR,
|
|
1844
|
+
expression = or_join(
|
|
1851
1845
|
expression_inputs
|
|
1852
1846
|
)
|
|
1853
1847
|
# if isinstance(node, TriccNodeExclusive):
|
|
@@ -1874,7 +1868,28 @@ def get_activity_end_terms( node, processed_nodes, process=None):
|
|
|
1874
1868
|
|
|
1875
1869
|
def get_count_terms( node, processed_nodes, is_calculate, negate=False, process=None):
|
|
1876
1870
|
terms = []
|
|
1871
|
+
|
|
1877
1872
|
for prev_node in node.prev_nodes:
|
|
1873
|
+
term = get_count_terms_details( prev_node, processed_nodes, is_calculate, negate, process)
|
|
1874
|
+
if term:
|
|
1875
|
+
terms.append(term)
|
|
1876
|
+
if len(terms) == 1:
|
|
1877
|
+
return TriccOperation(
|
|
1878
|
+
TriccOperator.CAST_NUMBER,
|
|
1879
|
+
[terms[0]]
|
|
1880
|
+
)
|
|
1881
|
+
elif len(terms) > 0:
|
|
1882
|
+
return TriccOperation(
|
|
1883
|
+
TriccOperator.PLUS,
|
|
1884
|
+
[
|
|
1885
|
+
TriccOperation(
|
|
1886
|
+
TriccOperator.CAST_NUMBER,
|
|
1887
|
+
[term]
|
|
1888
|
+
) for term in terms
|
|
1889
|
+
]
|
|
1890
|
+
)
|
|
1891
|
+
|
|
1892
|
+
def get_count_terms_details( prev_node, processed_nodes, is_calculate, negate=False, process=None):
|
|
1878
1893
|
operation_none = TriccOperation(
|
|
1879
1894
|
TriccOperator.SELECTED,
|
|
1880
1895
|
[
|
|
@@ -1882,12 +1897,20 @@ def get_count_terms( node, processed_nodes, is_calculate, negate=False, process=
|
|
|
1882
1897
|
TriccStatic('opt_none')
|
|
1883
1898
|
]
|
|
1884
1899
|
)
|
|
1885
|
-
if isinstance(prev_node,
|
|
1900
|
+
if isinstance(prev_node, TriccNodeSelectYesNo):
|
|
1901
|
+
return TriccOperation(
|
|
1902
|
+
TriccOperator.SELECTED,
|
|
1903
|
+
[
|
|
1904
|
+
prev_node,
|
|
1905
|
+
TriccStatic(prev_node.options[0].name)
|
|
1906
|
+
]
|
|
1907
|
+
)
|
|
1908
|
+
elif issubclass(prev_node.__class__, TriccNodeSelect):
|
|
1886
1909
|
if negate:
|
|
1887
|
-
|
|
1910
|
+
return
|
|
1888
1911
|
#terms.append(TRICC_SELECT_MULTIPLE_CALC_NONE_EXPRESSION.format(get_export_name(prev_node)))
|
|
1889
1912
|
else:
|
|
1890
|
-
|
|
1913
|
+
return TriccOperation(
|
|
1891
1914
|
TriccOperator.MINUS,
|
|
1892
1915
|
[
|
|
1893
1916
|
TriccOperation(
|
|
@@ -1902,23 +1925,22 @@ def get_count_terms( node, processed_nodes, is_calculate, negate=False, process=
|
|
|
1902
1925
|
operation_none
|
|
1903
1926
|
]
|
|
1904
1927
|
)
|
|
1905
|
-
])
|
|
1928
|
+
])
|
|
1906
1929
|
#terms.append(TRICC_SELECT_MULTIPLE_CALC_EXPRESSION.format(get_export_name(prev_node)))
|
|
1907
|
-
elif isinstance(prev_node, (
|
|
1908
|
-
|
|
1930
|
+
elif isinstance(prev_node, (TriccNodeSelectNotAvailable)):
|
|
1931
|
+
return TriccOperation(
|
|
1909
1932
|
TriccOperator.SELECTED,
|
|
1910
1933
|
[
|
|
1911
1934
|
prev_node,
|
|
1912
1935
|
TriccStatic('1')
|
|
1913
1936
|
]
|
|
1914
|
-
)
|
|
1937
|
+
)
|
|
1915
1938
|
#terms.append(TRICC_SELECTED_EXPRESSION.format(get_export_name(prev_node), '1'))
|
|
1916
1939
|
elif isinstance(prev_node, TriccNodeSelectOption):
|
|
1917
|
-
|
|
1940
|
+
return get_selected_option_expression(prev_node, negate)
|
|
1918
1941
|
else:
|
|
1919
1942
|
if negate:
|
|
1920
|
-
|
|
1921
|
-
TriccOperation(
|
|
1943
|
+
return TriccOperation(
|
|
1922
1944
|
TriccOperator.CAST_NUMBER,
|
|
1923
1945
|
[
|
|
1924
1946
|
TriccOperation(
|
|
@@ -1939,10 +1961,9 @@ def get_count_terms( node, processed_nodes, is_calculate, negate=False, process=
|
|
|
1939
1961
|
)
|
|
1940
1962
|
]
|
|
1941
1963
|
)
|
|
1942
|
-
|
|
1964
|
+
|
|
1943
1965
|
else:
|
|
1944
|
-
|
|
1945
|
-
TriccOperation(
|
|
1966
|
+
return TriccOperation(
|
|
1946
1967
|
TriccOperator.CAST_NUMBER,
|
|
1947
1968
|
[
|
|
1948
1969
|
get_node_expression(
|
|
@@ -1952,22 +1973,8 @@ def get_count_terms( node, processed_nodes, is_calculate, negate=False, process=
|
|
|
1952
1973
|
is_prev=True,
|
|
1953
1974
|
process=process)
|
|
1954
1975
|
]
|
|
1955
|
-
)
|
|
1956
|
-
|
|
1957
|
-
return TriccOperation(
|
|
1958
|
-
TriccOperator.CAST_NUMBER,
|
|
1959
|
-
[terms[0]]
|
|
1960
|
-
)
|
|
1961
|
-
elif len(terms) > 0:
|
|
1962
|
-
return TriccOperation(
|
|
1963
|
-
TriccOperator.PLUS,
|
|
1964
|
-
[
|
|
1965
|
-
TriccOperation(
|
|
1966
|
-
TriccOperator.CAST_NUMBER,
|
|
1967
|
-
[term]
|
|
1968
|
-
) for term in terms
|
|
1969
|
-
]
|
|
1970
|
-
)
|
|
1976
|
+
)
|
|
1977
|
+
|
|
1971
1978
|
|
|
1972
1979
|
|
|
1973
1980
|
def get_add_terms( node, processed_nodes, is_calculate=False, negate=False, process=None):
|
|
@@ -2180,7 +2187,7 @@ def get_calculation_terms( node, processed_nodes, is_calculate=False, negate=Fal
|
|
|
2180
2187
|
|
|
2181
2188
|
# Function that add element to array is not None or ''
|
|
2182
2189
|
def add_sub_expression(array, sub):
|
|
2183
|
-
if isinstance(sub, TriccOperation)
|
|
2190
|
+
if isinstance(sub, (TriccOperation, TriccStatic)):
|
|
2184
2191
|
not_sub = negate_term(sub)
|
|
2185
2192
|
if not_sub in array:
|
|
2186
2193
|
# avoid having 2 conditions that are complete opposites
|
|
@@ -2188,6 +2195,8 @@ def add_sub_expression(array, sub):
|
|
|
2188
2195
|
array.append(TriccStatic(True))
|
|
2189
2196
|
else:
|
|
2190
2197
|
array.append(sub)
|
|
2198
|
+
else:
|
|
2199
|
+
pass
|
|
2191
2200
|
# elif sub is None:
|
|
2192
2201
|
# array.append(TriccStatic(True))
|
|
2193
2202
|
|
tricc_oo/visitors/xform_pd.py
CHANGED
|
@@ -173,7 +173,7 @@ def get_tasksstrings(hidden_names, df_survey):
|
|
|
173
173
|
|
|
174
174
|
|
|
175
175
|
def get_task_js(form_id, calculate_name, title, form_types, hidden_names, df_survey, repalce_dots=False, task_title="'id: '+getField(report, 'g_registration.p_id')+'; age: '+getField(report, 'p_age')+getField(report, 'g_registration.p_gender')+' months; '+getField(report, 'p_weight') + 'kg; ' + getField(report, 'g_fever.p_temp')+'°'"):
|
|
176
|
-
task_name = f"{form_id}
|
|
176
|
+
task_name = f"{form_id}"
|
|
177
177
|
task_name_upper = task_name.upper()
|
|
178
178
|
|
|
179
179
|
|
|
@@ -181,17 +181,16 @@ def get_task_js(form_id, calculate_name, title, form_types, hidden_names, df_sur
|
|
|
181
181
|
/* eslint-disable no-use-before-define */
|
|
182
182
|
/* eslint-disable */
|
|
183
183
|
|
|
184
|
-
const {{injectDataFromForm, isFormArrayHasSourceId}} = require('./stph-extras');
|
|
184
|
+
const {{injectDataFromForm, isFormArrayHasSourceId}} = require('./stph-extras');
|
|
185
185
|
|
|
186
186
|
const CASE_DATA = ['{"','".join(hidden_names)}'];
|
|
187
187
|
|
|
188
|
-
const {{injectDataFromForm}} = require('./stph-extras');
|
|
189
188
|
|
|
190
189
|
const {task_name_upper}_FORMS = ['{"','".join(form_types)}'];
|
|
191
190
|
|
|
192
191
|
var task_title = "{task_title}"
|
|
193
192
|
|
|
194
|
-
const {task_name_upper}_TASK_FORM = '{form_id}
|
|
193
|
+
const {task_name_upper}_TASK_FORM = '{form_id}';
|
|
195
194
|
|
|
196
195
|
const {task_name}Content = function (content, contact, report){{
|
|
197
196
|
|
|
@@ -213,9 +212,12 @@ function {task_name}ContactLabel (){{
|
|
|
213
212
|
|
|
214
213
|
|
|
215
214
|
function {task_name}ResolveIf(contact, report, event, dueDate) {{
|
|
216
|
-
return isFormArrayHasSourceId( report, contact.reports, event, dueDate, {task_name_upper}
|
|
215
|
+
return isFormArrayHasSourceId( report, contact.reports, event, dueDate, {task_name_upper}_TASK_FORM);
|
|
217
216
|
}}
|
|
218
217
|
|
|
218
|
+
function {task_name}AppliesIf(contact, report, event, dueDate) {{
|
|
219
|
+
return report.{calculate_name};
|
|
220
|
+
}}
|
|
219
221
|
|
|
220
222
|
module.exports = {{
|
|
221
223
|
{task_name_upper}_TASK_FORM,
|
|
@@ -223,6 +225,7 @@ module.exports = {{
|
|
|
223
225
|
{task_name}Content,
|
|
224
226
|
{task_name}ContactLabel,
|
|
225
227
|
{task_name}ResolveIf,
|
|
228
|
+
{task_name}AppliesIf,
|
|
226
229
|
}}
|
|
227
230
|
//
|
|
228
231
|
//// to be copied in task
|
|
@@ -232,7 +235,8 @@ module.exports = {{
|
|
|
232
235
|
// {task_name_upper}_FORMS,
|
|
233
236
|
// {task_name}Content,
|
|
234
237
|
// {task_name}ContactLabel,
|
|
235
|
-
// {task_name}ResolveIf,
|
|
238
|
+
// {task_name}ResolveIf,
|
|
239
|
+
// {task_name}AppliesIf, }} = require('./{task_name}');
|
|
236
240
|
//
|
|
237
241
|
//module.exports = [
|
|
238
242
|
//
|
|
@@ -242,6 +246,7 @@ module.exports = {{
|
|
|
242
246
|
// title: 'diagnostic',
|
|
243
247
|
// appliesTo: 'reports',
|
|
244
248
|
// appliesToType: {task_name_upper}_FORMS,
|
|
249
|
+
// appliesIf: {task_name}AppliesIf,
|
|
245
250
|
// actions: [
|
|
246
251
|
// {{
|
|
247
252
|
// type: 'report',
|
|
@@ -7,7 +7,7 @@ tricc_oo/converters/codesystem_to_ocl.py,sha256=-ZKMBeIvzgqmhJfnn6ptuwpnHQtuE-fC
|
|
|
7
7
|
tricc_oo/converters/cql_to_operation.py,sha256=bsVD4HO5Zr2clHuIWz86gIUnI7aZ676IXDK5S7x32_o,14439
|
|
8
8
|
tricc_oo/converters/datadictionnary.py,sha256=WWKcTtKLfc4aduHcDBhr4JSfU2NqRMaslwX-wdZPIAw,3968
|
|
9
9
|
tricc_oo/converters/drawio_type_map.py,sha256=6ZcnQMtBU1dhf_NP_s0iX1DvRf0qS7-3UAe_WAPFVoQ,7027
|
|
10
|
-
tricc_oo/converters/tricc_to_xls_form.py,sha256=
|
|
10
|
+
tricc_oo/converters/tricc_to_xls_form.py,sha256=bJVd-FLrivrCxGI6mO2i0V7GVVuJZdaDuwcEf3gHNR8,2327
|
|
11
11
|
tricc_oo/converters/utils.py,sha256=UyndDORsDbRV5-gYW-yInK5ztjtYdeCw6K-mrYr1Emk,1688
|
|
12
12
|
tricc_oo/converters/xml_to_tricc.py,sha256=IO6jL1ljhrkWnPTe5EsQCfJ4wUoYitLH2P7TIJm4A9I,37457
|
|
13
13
|
tricc_oo/converters/cql/cqlLexer.py,sha256=t0-QvDv5kxCiBZJ9SfDumFOgnRSry_HJpakBZV224Ig,49126
|
|
@@ -15,7 +15,7 @@ tricc_oo/converters/cql/cqlListener.py,sha256=ketvj7XvO7t047S6A3_gTPvp2MlYk1bojm
|
|
|
15
15
|
tricc_oo/converters/cql/cqlParser.py,sha256=hIUdR907WX24P2Jlrxk-H0IT94n51yh_ZsCmwQhnFas,414730
|
|
16
16
|
tricc_oo/converters/cql/cqlVisitor.py,sha256=SWSDIqVYBhucR4VgLn_EPNs7LV9yCqsOmzFZ0bmRSGc,33865
|
|
17
17
|
tricc_oo/models/__init__.py,sha256=Rdk1fsNXHrbmXTQD1O7i0NC_A6os648Ap6CtWRliOg8,92
|
|
18
|
-
tricc_oo/models/base.py,sha256=
|
|
18
|
+
tricc_oo/models/base.py,sha256=6YU4FrUT4gE6WlERR1OPvQpq3bBKzG38I68_SZmaAao,24386
|
|
19
19
|
tricc_oo/models/calculate.py,sha256=Bw7OGa4OYxHP529wA23CZftMYDL_CA0SPQ0j1IFyTNA,7456
|
|
20
20
|
tricc_oo/models/lang.py,sha256=SwKaoxyRhE7gH_ZlYyFXzGuTQ5RE19y47LWAA35zYxg,2338
|
|
21
21
|
tricc_oo/models/ocl.py,sha256=ol35Gl1jCBp0Ven0yxOKzDIZkVL5Kx9uwaR_64pjxKI,8931
|
|
@@ -32,15 +32,15 @@ tricc_oo/strategies/input/base_input_strategy.py,sha256=-GQ_xRvJXzn-q_eT8R-wtFOT
|
|
|
32
32
|
tricc_oo/strategies/input/drawio.py,sha256=glLts9whixJM4HOV_GAWAK8az_H-eo9aeFAQbn99-4c,13362
|
|
33
33
|
tricc_oo/strategies/output/base_output_strategy.py,sha256=WiJwqm4g_x-rbksrjoE0ABhNMtM0_fAMoPH34RKZdc0,7173
|
|
34
34
|
tricc_oo/strategies/output/spice.py,sha256=s_COahyYCoc4Xv5TGh_AW9evDOW6GOex0Xwa_JWeLsI,11280
|
|
35
|
-
tricc_oo/strategies/output/xls_form.py,sha256=
|
|
35
|
+
tricc_oo/strategies/output/xls_form.py,sha256=nUK_eAzlHDLliq2lIkFhOkn1zVTPGTUElfuN9FB9Yrc,31005
|
|
36
36
|
tricc_oo/strategies/output/xlsform_cdss.py,sha256=8oLlgS1Hr6IVvI0O71kIk5oIKXbt2lPVc1SZIjzcSTc,9452
|
|
37
37
|
tricc_oo/strategies/output/xlsform_cht.py,sha256=SWu1GKI5PScSX420RiVVaCNCTINeTeLpCoX-zXQIhUE,19486
|
|
38
38
|
tricc_oo/strategies/output/xlsform_cht_hf.py,sha256=0D_H68a2S7oLKJENEePaRGIocrRIF45BofHlLOtGsKo,2206
|
|
39
39
|
tricc_oo/visitors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
40
|
-
tricc_oo/visitors/tricc.py,sha256
|
|
40
|
+
tricc_oo/visitors/tricc.py,sha256=HELyOpFo_-AHsegjK0tbnyRtWOhtK9sPr3r7uN8GsEs,98055
|
|
41
41
|
tricc_oo/visitors/utils.py,sha256=Gol4JNozPEd30Q1l8IPIPhx5fqVyy9R81GofGVebgD8,484
|
|
42
|
-
tricc_oo/visitors/xform_pd.py,sha256=
|
|
43
|
-
tricc_oo-1.4.
|
|
44
|
-
tricc_oo-1.4.
|
|
45
|
-
tricc_oo-1.4.
|
|
46
|
-
tricc_oo-1.4.
|
|
42
|
+
tricc_oo/visitors/xform_pd.py,sha256=HfcpbeeW--Q1wrRrF_uMoPATkzUxMGO5KvXtlPMG31o,9474
|
|
43
|
+
tricc_oo-1.4.26.dist-info/METADATA,sha256=DXqZoqrx1dWylZpGBaQJKDHQzKWWRIoCwLFCNt2DLqs,7878
|
|
44
|
+
tricc_oo-1.4.26.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
|
45
|
+
tricc_oo-1.4.26.dist-info/top_level.txt,sha256=NvbfMNAiy9m4b1unBsqpeOQWh4IgA1Xa33BtKA4abxk,15
|
|
46
|
+
tricc_oo-1.4.26.dist-info/RECORD,,
|
|
File without changes
|