tricc-oo 1.5.22__py3-none-any.whl → 1.5.24__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 (45) hide show
  1. tests/build.py +17 -23
  2. tests/test_cql.py +37 -108
  3. tests/to_ocl.py +15 -17
  4. tricc_oo/__init__.py +0 -6
  5. tricc_oo/converters/codesystem_to_ocl.py +51 -40
  6. tricc_oo/converters/cql/cqlLexer.py +1 -0
  7. tricc_oo/converters/cql/cqlListener.py +1 -0
  8. tricc_oo/converters/cql/cqlParser.py +1 -0
  9. tricc_oo/converters/cql/cqlVisitor.py +1 -0
  10. tricc_oo/converters/cql_to_operation.py +125 -123
  11. tricc_oo/converters/datadictionnary.py +45 -54
  12. tricc_oo/converters/drawio_type_map.py +143 -61
  13. tricc_oo/converters/tricc_to_xls_form.py +14 -24
  14. tricc_oo/converters/utils.py +3 -3
  15. tricc_oo/converters/xml_to_tricc.py +286 -231
  16. tricc_oo/models/__init__.py +2 -1
  17. tricc_oo/models/base.py +300 -308
  18. tricc_oo/models/calculate.py +63 -49
  19. tricc_oo/models/lang.py +26 -27
  20. tricc_oo/models/ocl.py +146 -161
  21. tricc_oo/models/ordered_set.py +15 -19
  22. tricc_oo/models/tricc.py +145 -89
  23. tricc_oo/parsers/xml.py +15 -30
  24. tricc_oo/serializers/planuml.py +4 -6
  25. tricc_oo/serializers/xls_form.py +81 -135
  26. tricc_oo/strategies/input/base_input_strategy.py +28 -32
  27. tricc_oo/strategies/input/drawio.py +59 -71
  28. tricc_oo/strategies/output/base_output_strategy.py +142 -67
  29. tricc_oo/strategies/output/fhir_form.py +377 -0
  30. tricc_oo/strategies/output/html_form.py +224 -0
  31. tricc_oo/strategies/output/openmrs_form.py +647 -0
  32. tricc_oo/strategies/output/spice.py +106 -127
  33. tricc_oo/strategies/output/xls_form.py +263 -222
  34. tricc_oo/strategies/output/xlsform_cdss.py +623 -142
  35. tricc_oo/strategies/output/xlsform_cht.py +108 -115
  36. tricc_oo/strategies/output/xlsform_cht_hf.py +13 -24
  37. tricc_oo/visitors/tricc.py +1297 -1016
  38. tricc_oo/visitors/utils.py +16 -16
  39. tricc_oo/visitors/xform_pd.py +91 -89
  40. {tricc_oo-1.5.22.dist-info → tricc_oo-1.5.24.dist-info}/METADATA +127 -84
  41. tricc_oo-1.5.24.dist-info/RECORD +50 -0
  42. tricc_oo-1.5.24.dist-info/licenses/LICENSE +373 -0
  43. tricc_oo-1.5.22.dist-info/RECORD +0 -46
  44. {tricc_oo-1.5.22.dist-info → tricc_oo-1.5.24.dist-info}/WHEEL +0 -0
  45. {tricc_oo-1.5.22.dist-info → tricc_oo-1.5.24.dist-info}/top_level.txt +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,150 +3,225 @@ 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
+ # walking function
50
47
  def process_base(self, start_pages, **kwargs):
51
48
  # for each node, check if condition is required issubclass(TriccNodeDisplayModel)
52
49
  # 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
-
50
+ stashed_node_func(
51
+ start_pages[self.processes[0]].root,
52
+ self.generate_base,
53
+ **{**self.get_kwargs(), **kwargs},
54
+ )
55
+ self.do_clean(**{**self.get_kwargs(), **kwargs})
56
+
56
57
  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
-
58
+
59
+ stashed_node_func(
60
+ start_pages[self.processes[0]].root,
61
+ self.generate_relevance,
62
+ **{**self.get_kwargs(), **kwargs},
63
+ )
64
+ self.do_clean(**{**self.get_kwargs(), **kwargs})
65
+
61
66
  def process_calculate(self, start_pages, **kwargs):
62
67
  # 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
-
68
+ stashed_node_func(
69
+ start_pages[self.processes[0]].root,
70
+ self.generate_calculate,
71
+ **{**self.get_kwargs(), **kwargs},
72
+ )
73
+ self.do_clean(**{**self.get_kwargs(), **kwargs})
74
+
66
75
  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
-
76
+ stashed_node_func(
77
+ start_pages[self.processes[0]].root,
78
+ self.generate_export,
79
+ **{**self.get_kwargs(), **kwargs},
80
+ )
81
+ self.do_clean(**{**self.get_kwargs(), **kwargs})
82
+
71
83
  # node function
72
84
  @abc.abstractmethod
73
- def generate_calculate(self, node, **kwargs ):
74
- pass
85
+ def generate_calculate(self, node, **kwargs):
86
+ # called to generate the calculates on the project
87
+ pass
88
+
75
89
  @abc.abstractmethod
76
90
  def generate_base(self, node, **kwargs):
77
- pass
91
+ pass
78
92
 
79
-
80
93
  @abc.abstractmethod
81
94
  def generate_relevance(self, node, **kwargs):
95
+ # called to generate the references on the project
96
+
82
97
  pass
83
-
84
-
98
+
85
99
  @abc.abstractmethod
86
100
  def generate_export(self, node, **kwargs):
101
+ # called to the project export
102
+
87
103
  pass
88
104
 
89
105
  @abc.abstractmethod
90
106
  def export(self, **kwargs):
91
107
  pass
108
+
92
109
  def tricc_operation_equal(self, ref_expressions):
93
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
110
+ # r[0] = r[1]
111
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
112
+
94
113
  def tricc_operation_not_equal(self, ref_expressions):
95
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
114
+ # r[0] != r[1]
115
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
116
+
96
117
  def tricc_operation_not(self, ref_expressions):
97
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
118
+ # !r[0]
119
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
120
+
98
121
  def tricc_operation_and(self, ref_expressions):
99
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
122
+ # r[0] and r[1] ... and r[n]
123
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
124
+
100
125
  def tricc_operation_or(self, ref_expressions):
101
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
126
+ # r[0] or r[1] ... or r[n]
127
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
128
+
102
129
  def tricc_operation_or_and(self, ref_expressions):
103
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
130
+ # (r[0] or r[1] ... or r[n-1]) and r[n]
131
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
132
+
104
133
  def tricc_operation_native(self, ref_expressions):
105
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
134
+ # r[0](*r[1:])
135
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
136
+
106
137
  def tricc_operation_istrue(self, ref_expressions):
107
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
138
+ # r[0] is true
139
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
140
+
108
141
  def tricc_operation_isfalse(self, ref_expressions):
109
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
142
+ # r[0] is false
143
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
144
+
110
145
  def tricc_operation_selected(self, ref_expressions):
111
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
146
+ # for choice question (single or multiple) it returns true if the second reference is selected
147
+ # r[1] in r[0]
148
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
149
+
112
150
  def tricc_operation_more_or_equal(self, ref_expressions):
113
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
151
+ # r[0] >= r[1]
152
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
153
+
114
154
  def tricc_operation_less_or_equal(self, ref_expressions):
115
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
155
+ # r[0] <= r[1]
156
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
157
+
116
158
  def tricc_operation_more(self, ref_expressions):
117
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
159
+ # r[0] > r[1]
160
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
161
+
118
162
  def tricc_operation_less(self, ref_expressions):
119
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
163
+ # r[0] < r[1]
164
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
165
+
120
166
  def tricc_operation_between(self, ref_expressions):
121
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
167
+ # r[0] between r[1] and r[2]
168
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
169
+
122
170
  def tricc_operation_case(self, ref_expressions):
123
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
171
+ # 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)
172
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
173
+
124
174
  def tricc_operation_if(self, ref_expressions):
125
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
175
+ # if r[0][0] then r[0][1] ... elif r[n-1][0] then r[n-1][1] else (r[n] or None)
176
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
177
+
126
178
  def tricc_operation_contains(self, ref_expressions):
127
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
179
+ # r[0] contains r[1]
180
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
181
+
128
182
  def tricc_operation_exists(self, ref_expressions):
129
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
183
+ # r[0] exists
184
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
185
+
130
186
  def tricc_operation_has_qualifier(self, ref_expressions):
131
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
187
+ # r[0] is a class and has r[1] qualifier
188
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
189
+
132
190
  def tricc_operation_zscore(self, ref_expressions):
133
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
191
+ # FIXME zscore((gender=r[0], Xfy=r[1], xfY=r[2])
192
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
193
+
134
194
  def tricc_operation_datetime_to_decimal(self, ref_expressions):
135
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
195
+ # cast r[0] in decimal
196
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
197
+
136
198
  def tricc_operation_round(self, ref_expressions):
137
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
199
+ # round(r[0], r[1])
200
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
201
+
138
202
  def tricc_operation_izscore(self, ref_expressions):
139
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
203
+ # FIXME izscore(gender=r[0], Z=r[1], xfY=r[2])
204
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
205
+
140
206
  def tricc_operation_age_day(self, ref_expressions):
141
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
207
+ # Patient age in day
208
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
209
+
142
210
  def tricc_operation_age_month(self, ref_expressions):
143
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
211
+ # Patient age in Month
212
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
213
+
144
214
  def tricc_operation_age_year(self, ref_expressions):
145
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
215
+ # Patient age in Years
216
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
217
+
146
218
  def tricc_operation_concatenate(self, ref_expressions):
147
- raise NotImplementedError(f"This type of opreration is not supported in this strategy")
148
- ## Utils
219
+ # concatenate(*r)
220
+ raise NotImplementedError("This type of opreration is not supported in this strategy")
221
+
222
+ # Utils
149
223
  def do_clean(self, **kwargs):
150
224
  pass
225
+
151
226
  def get_kwargs(self):
152
- return {}
227
+ return {}