tricc-oo 1.5.13__py3-none-any.whl → 1.6.8__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.
Files changed (47) hide show
  1. tests/build.py +20 -28
  2. tests/test_build.py +260 -0
  3. tests/test_cql.py +48 -109
  4. tests/to_ocl.py +15 -17
  5. tricc_oo/__init__.py +0 -6
  6. tricc_oo/converters/codesystem_to_ocl.py +51 -40
  7. tricc_oo/converters/cql/cqlLexer.py +1 -0
  8. tricc_oo/converters/cql/cqlListener.py +1 -0
  9. tricc_oo/converters/cql/cqlParser.py +1 -0
  10. tricc_oo/converters/cql/cqlVisitor.py +1 -0
  11. tricc_oo/converters/cql_to_operation.py +129 -123
  12. tricc_oo/converters/datadictionnary.py +45 -54
  13. tricc_oo/converters/drawio_type_map.py +146 -65
  14. tricc_oo/converters/tricc_to_xls_form.py +58 -28
  15. tricc_oo/converters/utils.py +4 -4
  16. tricc_oo/converters/xml_to_tricc.py +296 -235
  17. tricc_oo/models/__init__.py +2 -1
  18. tricc_oo/models/base.py +333 -305
  19. tricc_oo/models/calculate.py +66 -51
  20. tricc_oo/models/lang.py +26 -27
  21. tricc_oo/models/ocl.py +146 -161
  22. tricc_oo/models/ordered_set.py +15 -19
  23. tricc_oo/models/tricc.py +149 -89
  24. tricc_oo/parsers/xml.py +15 -30
  25. tricc_oo/serializers/planuml.py +4 -6
  26. tricc_oo/serializers/xls_form.py +110 -153
  27. tricc_oo/strategies/input/base_input_strategy.py +28 -32
  28. tricc_oo/strategies/input/drawio.py +59 -71
  29. tricc_oo/strategies/output/base_output_strategy.py +151 -65
  30. tricc_oo/strategies/output/dhis2_form.py +908 -0
  31. tricc_oo/strategies/output/fhir_form.py +377 -0
  32. tricc_oo/strategies/output/html_form.py +224 -0
  33. tricc_oo/strategies/output/openmrs_form.py +694 -0
  34. tricc_oo/strategies/output/spice.py +106 -127
  35. tricc_oo/strategies/output/xls_form.py +322 -244
  36. tricc_oo/strategies/output/xlsform_cdss.py +627 -142
  37. tricc_oo/strategies/output/xlsform_cht.py +252 -125
  38. tricc_oo/strategies/output/xlsform_cht_hf.py +13 -24
  39. tricc_oo/visitors/tricc.py +1424 -1033
  40. tricc_oo/visitors/utils.py +16 -16
  41. tricc_oo/visitors/xform_pd.py +91 -89
  42. {tricc_oo-1.5.13.dist-info → tricc_oo-1.6.8.dist-info}/METADATA +128 -84
  43. tricc_oo-1.6.8.dist-info/RECORD +52 -0
  44. tricc_oo-1.6.8.dist-info/licenses/LICENSE +373 -0
  45. {tricc_oo-1.5.13.dist-info → tricc_oo-1.6.8.dist-info}/top_level.txt +0 -0
  46. tricc_oo-1.5.13.dist-info/RECORD +0 -46
  47. {tricc_oo-1.5.13.dist-info → tricc_oo-1.6.8.dist-info}/WHEEL +0 -0
@@ -1,20 +1,29 @@
1
1
  import logging
2
2
  import os
3
- import json
4
- from copy import copy
5
3
 
6
4
  from tricc_oo.converters.xml_to_tricc import create_activity
7
5
  from tricc_oo.visitors.tricc import (
8
- process_calculate,
6
+ load_calculate,
9
7
  set_prev_next_node,
10
8
  replace_node,
11
9
  stashed_node_func,
12
- TriccProject
13
10
  )
14
11
  from tricc_oo.visitors.utils import PROCESSES
15
- from tricc_oo.converters.codesystem_to_ocl import transform_fhir_to_ocl
16
12
 
17
- from tricc_oo.models import *
13
+ from tricc_oo.models import (
14
+ TriccProject,
15
+ OrderedSet,
16
+ TriccNodeActivity,
17
+ TriccNodeGoTo,
18
+ TriccNodeLinkOut,
19
+ TriccNodeMoreInfo,
20
+ TriccNodeSelect,
21
+ TriccNodeSelectNotAvailable,
22
+ TriccRhombusMixIn,
23
+ get_node_from_list
24
+
25
+ )
26
+
18
27
  from tricc_oo.strategies.input.base_input_strategy import BaseInputStrategy
19
28
  from tricc_oo.parsers.xml import read_drawio
20
29
 
@@ -38,12 +47,12 @@ class DrawioStrategy(BaseInputStrategy):
38
47
  # add save nodes and merge nodes
39
48
  stashed_node_func(
40
49
  start_page.root,
41
- process_calculate,
50
+ load_calculate,
42
51
  used_calculates=used_calculates,
43
52
  calculates=calculates,
44
53
  recursive=False,
45
54
  codesystems=project.code_systems,
46
- process=[start_page.root.process]
55
+ process=[start_page.root.process],
47
56
  )
48
57
 
49
58
  logger.info("# check if all edges (arrow) where used")
@@ -58,7 +67,6 @@ class DrawioStrategy(BaseInputStrategy):
58
67
 
59
68
  def execute(self, file_content, media_path):
60
69
  project = TriccProject()
61
- files = []
62
70
  diagrams = []
63
71
  # read all project.pages
64
72
  logger.info("# Create the activities from diagram project.pages")
@@ -70,7 +78,6 @@ class DrawioStrategy(BaseInputStrategy):
70
78
  # logger.critical(f"no input file found at {in_filepath}")
71
79
  # exit(1)
72
80
  # for file in files:
73
- images_diagram = []
74
81
  for f in file_content:
75
82
  file_diagrams = read_drawio(f)
76
83
  diagrams += file_diagrams
@@ -81,16 +88,18 @@ class DrawioStrategy(BaseInputStrategy):
81
88
  if id_tab in project.pages:
82
89
  logger.critical(f"{id_tab} diagram (drawio tab) already loaded (Duplicate diagram ID ?)")
83
90
  exit(1)
84
- logger.info("Create the activity {0}::{1}".format(
85
- id_tab, name_tab))
86
-
87
- create_activity(
88
- diagram, media_path, project)
91
+ logger.info("Create the activity {0}::{1}".format(id_tab, name_tab))
92
+
93
+ create_activity(diagram, media_path, project)
89
94
  if len(project.pages) == old_page_len:
90
95
  logger.error(f"diagram {id_tab}::{name_tab} was not loaded properly")
91
96
  logger.info("# Create the graph from the start node")
92
97
  for k, v in project.code_systems.items():
93
- with open(os.path.join(os.path.dirname(media_path), f"{k}_codesystem.json"), "w", encoding='utf-8') as file:
98
+ with open(
99
+ os.path.join(os.path.dirname(media_path), f"{k}_codesystem.json"),
100
+ "w",
101
+ encoding="utf-8",
102
+ ) as file:
94
103
  file.write(v.json(indent=4))
95
104
 
96
105
  for k, v in project.value_sets.items():
@@ -122,17 +131,18 @@ class DrawioStrategy(BaseInputStrategy):
122
131
 
123
132
  def linking_nodes(self, node, page, pages, processed_nodes=OrderedSet(), path=[]):
124
133
  # get the edges that have that node as source
125
-
126
-
127
134
  node_edge = list(
128
- filter(lambda x: (
129
- ( x.source and x.source == node.id) or
130
- (not x.source and x.source_external_id and x.source_external_id == node.external_id) or
131
- x.source == node
132
- ), page.edges)
135
+ filter(
136
+ lambda x: (
137
+ (x.source and x.source == node.id)
138
+ or (not x.source and x.source_external_id and x.source_external_id == node.external_id)
139
+ or x.source == node
140
+ ),
141
+ page.edges,
142
+ )
133
143
  )
134
144
  node.activity = page
135
- # build current path
145
+ # build current path
136
146
  current_path = path + [node.id]
137
147
  # don't stop the walkthroug by default
138
148
  for edge in node_edge:
@@ -159,11 +169,9 @@ class DrawioStrategy(BaseInputStrategy):
159
169
  processed_nodes,
160
170
  current_path,
161
171
  )
162
-
172
+
163
173
  elif isinstance(target_node, TriccNodeGoTo):
164
- next_page = self.walkthrough_goto_node(
165
- target_node, page, pages, processed_nodes, current_path
166
- )
174
+ next_page = self.walkthrough_goto_node(target_node, page, pages, processed_nodes, current_path)
167
175
  for n in page.nodes:
168
176
  sn = page.nodes[n]
169
177
  if (
@@ -183,25 +191,24 @@ class DrawioStrategy(BaseInputStrategy):
183
191
  if link_out is not None:
184
192
  target_node = link_out
185
193
  elif isinstance(node, TriccNodeMoreInfo):
186
-
194
+
187
195
  if target_node.name == node.parent.name:
188
196
  node.parent = target_node
189
197
  if issubclass(target_node.__class__, TriccNodeSelect):
190
198
  for key, option in target_node.options.items():
191
- self.linking_nodes(
192
- option, page, pages, processed_nodes, current_path
193
- )
199
+ self.linking_nodes(option, page, pages, processed_nodes, current_path)
194
200
  processed_nodes.add(target_node)
195
- logger.debug("{}::{}: processed ({})".format(
196
- 'linking_nodes', target_node.get_name(), len(processed_nodes)))
197
- self.linking_nodes(
198
- target_node, page, pages, processed_nodes, current_path
201
+ logger.debug(
202
+ "{}::{}: processed ({})".format(
203
+ "linking_nodes",
204
+ target_node.get_name(),
205
+ len(processed_nodes),
206
+ )
199
207
  )
208
+ self.linking_nodes(target_node, page, pages, processed_nodes, current_path)
200
209
  elif edge.target in current_path:
201
210
  logger.error(
202
- "possible loop detected for node {0} in page {1}; path:".format(
203
- node.get_name(), page.label
204
- )
211
+ "possible loop detected for node {0} in page {1}; path:".format(node.get_name(), page.label)
205
212
  )
206
213
  for node_id in current_path:
207
214
  node = get_node_from_list(processed_nodes, node_id)
@@ -212,11 +219,7 @@ class DrawioStrategy(BaseInputStrategy):
212
219
  else:
213
220
  set_prev_next_node(node, target_node)
214
221
  else:
215
- logger.error(
216
- "target not found {0} for node {1}".format(
217
- edge.target, node.get_name()
218
- )
219
- )
222
+ logger.error("target not found {0} for node {1}".format(edge.target, node.get_name()))
220
223
  # page.edges.remove(edge)
221
224
 
222
225
  def walkthrough_goto_node(self, node, page, pages, processed_nodes, current_path):
@@ -224,23 +227,20 @@ class DrawioStrategy(BaseInputStrategy):
224
227
  if node.link in pages:
225
228
  next_page = pages[node.link]
226
229
  # walk thought the next page
227
- max_instance = 1
228
230
  if node.instance == 0 or next_page.root.instance == 0:
229
- next_page = next_page.make_instance((1000+node.activity.instance) if node.activity.instance>1 else None)
231
+ next_page = next_page.make_instance(
232
+ (1000 + node.activity.instance) if node.activity.instance > 1 else None
233
+ )
230
234
  else:
231
235
  # return existing instance if any
232
236
  next_page = next_page.make_instance(node.instance)
233
237
  if next_page.id not in pages:
234
238
  pages[next_page.id] = next_page
235
239
  logger.debug(
236
- "jumping to page {0}::{1} from {2}".format(
237
- next_page.label, next_page.instance, node.get_name()
238
- )
240
+ "jumping to page {0}::{1} from {2}".format(next_page.label, next_page.instance, node.get_name())
239
241
  )
240
242
  if next_page not in processed_nodes:
241
- self.linking_nodes(
242
- next_page.root, next_page, pages, processed_nodes, current_path
243
- )
243
+ self.linking_nodes(next_page.root, next_page, pages, processed_nodes, current_path)
244
244
  for c in next_page.calculates:
245
245
  if len(c.prev_nodes) == 0:
246
246
  self.linking_nodes(
@@ -250,7 +250,7 @@ class DrawioStrategy(BaseInputStrategy):
250
250
  processed_nodes,
251
251
  current_path,
252
252
  )
253
-
253
+
254
254
  processed_nodes.add(next_page)
255
255
 
256
256
  replace_node(node, next_page, page)
@@ -259,30 +259,22 @@ class DrawioStrategy(BaseInputStrategy):
259
259
  return next_page
260
260
  else:
261
261
  logger.critical(
262
- "node {0} from page {1} doesnot have a valid link: {2}".format(
263
- node.label, page.label, node.link
264
- )
262
+ "node {0} from page {1} doesnot have a valid link: {2}".format(node.label, page.label, node.link)
265
263
  )
266
264
  exit(1)
267
265
 
268
- def walkthrough_link_out_node(
269
- self, node, page, pages, processed_nodes, current_path
270
- ):
266
+ def walkthrough_link_out_node(self, node, page, pages, processed_nodes, current_path):
271
267
  if node.reference is not None:
272
268
  link_in_list = []
273
269
  link_in_page = None
274
270
  for page in pages:
275
- link_in_list += list(
276
- filter(lambda x: (x.name == node.reference), page.nodes)
277
- )
271
+ link_in_list += list(filter(lambda x: (x.name == node.reference), page.nodes))
278
272
  # save the first page where a link is found to continue the walktrhough
279
273
  if len(link_in_list) > 0 and link_in_page is None:
280
274
  link_in_page = page
281
275
  if len(link_in_list) == 0:
282
276
  logger.warning(
283
- "link in {0} not found for link out {1} in page {2}".format(
284
- node.reference, node.name, page.label
285
- )
277
+ "link in {0} not found for link out {1} in page {2}".format(node.reference, node.name, page.label)
286
278
  )
287
279
  elif len(link_in_list) > 1:
288
280
  logger.warning(
@@ -300,14 +292,10 @@ class DrawioStrategy(BaseInputStrategy):
300
292
  self.linking_nodes(
301
293
  linked_target_node,
302
294
  link_in_page,
303
- project.pages,
295
+ pages,
304
296
  processed_nodes,
305
297
  current_path,
306
298
  )
307
299
  return linked_target_node
308
300
  else:
309
- logger.warning(
310
- "link out {0} in page {1} : reference not found".format(
311
- node.name, page.label
312
- )
313
- )
301
+ logger.warning("link out {0} in page {1} : reference not found".format(node.name, page.label))
@@ -3,146 +3,232 @@ import logging
3
3
  from tricc_oo.visitors.tricc import stashed_node_func
4
4
  import datetime
5
5
 
6
- logger = logging.getLogger('default')
6
+ logger = logging.getLogger("default")
7
7
 
8
8
 
9
9
  class BaseOutPutStrategy:
10
- processes = ['main']
10
+ processes = ["main"]
11
11
  project = None
12
12
  output_path = None
13
- # list of supported processes for the strategy,
13
+ # list of supported processes for the strategy,
14
14
  # the order of the list will be apply
15
-
15
+
16
16
  def __init__(self, project, output_path):
17
17
  self.output_path = output_path
18
18
  self.project = project
19
-
19
+
20
20
  def get_tricc_operation_expression(self, operation):
21
- raise NotImplemented("get_tricc_operation_expression not implemented")
22
-
21
+ raise NotImplementedError("get_tricc_operation_expression not implemented")
22
+
23
23
  def execute(self):
24
-
24
+
25
25
  version = datetime.datetime.now().strftime("%Y%m%d%H%M")
26
26
  logger.info(f"build version: {version}")
27
- if 'main' in self.project.start_pages:
27
+ if "main" in self.project.start_pages:
28
28
  self.process_base(self.project.start_pages, pages=self.project.pages, version=version)
29
29
  else:
30
30
  logger.critical("Main process required")
31
31
 
32
-
33
32
  logger.info("generate the relevance based on edges")
34
33
 
35
-
36
-
37
34
  # create relevance Expression
38
35
 
39
36
  # create calculate Expression
40
37
  self.process_calculate(self.project.start_pages, pages=self.project.pages)
41
38
  logger.info("generate the export format")
42
- # create calculate Expression
39
+ # create calculate Expression
43
40
  self.process_export(self.project.start_pages, pages=self.project.pages)
44
-
41
+
45
42
  logger.info("print the export")
46
-
43
+
47
44
  self.export(self.project.start_pages, version=version)
48
-
49
- ### walking function
45
+
46
+ logger.info("validate the output")
47
+ self.validate()
48
+
49
+ # walking function
50
50
  def process_base(self, start_pages, **kwargs):
51
51
  # for each node, check if condition is required issubclass(TriccNodeDisplayModel)
52
52
  # process name
53
- stashed_node_func(start_pages[self.processes[0]].root, self.generate_base, **{**self.get_kwargs(),**kwargs} )
54
- self.do_clean( **{**self.get_kwargs(),**kwargs})
55
-
53
+ stashed_node_func(
54
+ start_pages[self.processes[0]].root,
55
+ self.generate_base,
56
+ **{**self.get_kwargs(), **kwargs},
57
+ )
58
+ self.do_clean(**{**self.get_kwargs(), **kwargs})
59
+
56
60
  def process_relevance(self, start_pages, **kwargs):
57
-
58
- stashed_node_func(start_pages[self.processes[0]].root, self.generate_relevance, **{**self.get_kwargs(),**kwargs} )
59
- self.do_clean( **{**self.get_kwargs(),**kwargs})
60
-
61
+
62
+ stashed_node_func(
63
+ start_pages[self.processes[0]].root,
64
+ self.generate_relevance,
65
+ **{**self.get_kwargs(), **kwargs},
66
+ )
67
+ self.do_clean(**{**self.get_kwargs(), **kwargs})
68
+
61
69
  def process_calculate(self, start_pages, **kwargs):
62
70
  # call the strategy specific code
63
- stashed_node_func(start_pages[self.processes[0]].root, self.generate_calculate, **{**self.get_kwargs(),**kwargs} )
64
- self.do_clean(**{**self.get_kwargs(),**kwargs})
65
-
71
+ stashed_node_func(
72
+ start_pages[self.processes[0]].root,
73
+ self.generate_calculate,
74
+ **{**self.get_kwargs(), **kwargs},
75
+ )
76
+ self.do_clean(**{**self.get_kwargs(), **kwargs})
77
+
66
78
  def process_export(self, start_pages, **kwargs):
67
- stashed_node_func(start_pages[self.processes[0]].root, self.generate_export, **{**self.get_kwargs(),**kwargs} )
68
- self.do_clean(**{**self.get_kwargs(),**kwargs})
69
-
70
-
79
+ stashed_node_func(
80
+ start_pages[self.processes[0]].root,
81
+ self.generate_export,
82
+ **{**self.get_kwargs(), **kwargs},
83
+ )
84
+ self.do_clean(**{**self.get_kwargs(), **kwargs})
85
+
71
86
  # node function
72
87
  @abc.abstractmethod
73
- def generate_calculate(self, node, **kwargs ):
74
- pass
88
+ def generate_calculate(self, node, **kwargs):
89
+ # called to generate the calculates on the project
90
+ pass
91
+
75
92
  @abc.abstractmethod
76
93
  def generate_base(self, node, **kwargs):
77
- pass
94
+ pass
78
95
 
79
-
80
96
  @abc.abstractmethod
81
97
  def generate_relevance(self, node, **kwargs):
98
+ # called to generate the references on the project
99
+
82
100
  pass
83
-
84
-
101
+
85
102
  @abc.abstractmethod
86
103
  def generate_export(self, node, **kwargs):
104
+ # called to the project export
105
+
87
106
  pass
88
107
 
89
108
  @abc.abstractmethod
90
109
  def export(self, **kwargs):
91
110
  pass
111
+
112
+ @abc.abstractmethod
113
+ def validate(self):
114
+ pass
115
+
92
116
  def tricc_operation_equal(self, ref_expressions):
93
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
117
+ # r[0] = r[1]
118
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
119
+
94
120
  def tricc_operation_not_equal(self, ref_expressions):
95
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
121
+ # r[0] != r[1]
122
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
123
+
96
124
  def tricc_operation_not(self, ref_expressions):
97
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
125
+ # !r[0]
126
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
127
+
98
128
  def tricc_operation_and(self, ref_expressions):
99
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
129
+ # r[0] and r[1] ... and r[n]
130
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
131
+
100
132
  def tricc_operation_or(self, ref_expressions):
101
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
133
+ # r[0] or r[1] ... or r[n]
134
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
135
+
102
136
  def tricc_operation_or_and(self, ref_expressions):
103
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
137
+ # (r[0] or r[1] ... or r[n-1]) and r[n]
138
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
139
+
104
140
  def tricc_operation_native(self, ref_expressions):
105
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
141
+ # r[0](*r[1:])
142
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
143
+
106
144
  def tricc_operation_istrue(self, ref_expressions):
107
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
145
+ # r[0] is true
146
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
147
+
108
148
  def tricc_operation_isfalse(self, ref_expressions):
109
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
149
+ # r[0] is false
150
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
151
+
110
152
  def tricc_operation_selected(self, ref_expressions):
111
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
153
+ # for choice question (single or multiple) it returns true if the second reference is selected
154
+ # r[1] in r[0]
155
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
156
+
112
157
  def tricc_operation_more_or_equal(self, ref_expressions):
113
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
158
+ # r[0] >= r[1]
159
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
160
+
114
161
  def tricc_operation_less_or_equal(self, ref_expressions):
115
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
162
+ # r[0] <= r[1]
163
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
164
+
116
165
  def tricc_operation_more(self, ref_expressions):
117
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
166
+ # r[0] > r[1]
167
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
168
+
118
169
  def tricc_operation_less(self, ref_expressions):
119
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
170
+ # r[0] < r[1]
171
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
172
+
120
173
  def tricc_operation_between(self, ref_expressions):
121
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
174
+ # r[0] between r[1] and r[2]
175
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
176
+
122
177
  def tricc_operation_case(self, ref_expressions):
123
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
178
+ # case r[0] when r[1][0] then r[1][1] ... when r[n-1][0] then r[n-1][1] else (r[n] or None)
179
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
180
+
124
181
  def tricc_operation_if(self, ref_expressions):
125
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
182
+ # if r[0][0] then r[0][1] ... elif r[n-1][0] then r[n-1][1] else (r[n] or None)
183
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
184
+
126
185
  def tricc_operation_contains(self, ref_expressions):
127
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
186
+ # r[0] contains r[1]
187
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
188
+
128
189
  def tricc_operation_exists(self, ref_expressions):
129
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
190
+ # r[0] exists
191
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
192
+
130
193
  def tricc_operation_has_qualifier(self, ref_expressions):
131
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
194
+ # r[0] is a class and has r[1] qualifier
195
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
196
+
132
197
  def tricc_operation_zscore(self, ref_expressions):
133
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
198
+ # FIXME zscore((gender=r[0], Xfy=r[1], xfY=r[2])
199
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
200
+
201
+ def tricc_operation_datetime_to_decimal(self, ref_expressions):
202
+ # cast r[0] in decimal
203
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
204
+
205
+ def tricc_operation_round(self, ref_expressions):
206
+ # round(r[0], r[1])
207
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
208
+
134
209
  def tricc_operation_izscore(self, ref_expressions):
135
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
210
+ # FIXME izscore(gender=r[0], Z=r[1], xfY=r[2])
211
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
212
+
136
213
  def tricc_operation_age_day(self, ref_expressions):
137
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
214
+ # Patient age in day
215
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
216
+
138
217
  def tricc_operation_age_month(self, ref_expressions):
139
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
218
+ # Patient age in Month
219
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
220
+
140
221
  def tricc_operation_age_year(self, ref_expressions):
141
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
222
+ # Patient age in Years
223
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
224
+
142
225
  def tricc_operation_concatenate(self, ref_expressions):
143
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
144
- ## Utils
226
+ # concatenate(*r)
227
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
228
+
229
+ # Utils
145
230
  def do_clean(self, **kwargs):
146
231
  pass
232
+
147
233
  def get_kwargs(self):
148
- return {}
234
+ return {}