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,46 +1,35 @@
1
- import datetime
2
1
  import logging
3
- import os
4
- import shutil
5
2
 
6
3
  import pandas as pd
7
4
 
8
5
  from tricc_oo.models.lang import SingletonLangClass
9
- from tricc_oo.serializers.xls_form import SURVEY_MAP,get_input_line, get_input_calc_line
6
+ from tricc_oo.serializers.xls_form import (
7
+ SURVEY_MAP,
8
+ )
10
9
  from tricc_oo.strategies.output.xlsform_cht import XLSFormCHTStrategy
11
- from tricc_oo.visitors.xform_pd import make_breakpoints, get_tasksstrings
12
10
 
13
11
  langs = SingletonLangClass()
14
12
  logger = logging.getLogger("default")
15
13
 
14
+
16
15
  class XLSFormCHTHFStrategy(XLSFormCHTStrategy):
17
16
 
18
-
19
17
  def get_contact_inputs(self, df_inputs):
20
- return None
18
+ return None
21
19
 
22
20
  def get_contact_inputs_calculate(self, df_inputs):
23
21
  return None
24
-
22
+
25
23
  def get_cht_summary(self):
26
-
24
+
27
25
  df_summary = pd.DataFrame(columns=SURVEY_MAP.keys())
28
- #[ #type, '',#name ''#label, '',#hint '',#help '',#default '',#'appearance', '',#'constraint', '',#'constraint_message' '',#'relevance' '',#'disabled' '',#'required' '',#'required message' '',#'read only' '',#'expression' '',#'repeat_count' ''#'image' ],
29
- #df_summary.loc[len(df_summary)] = [ 'begin_group', 'group_summary' , 'Summary', '', '', '', 'field-list summary', '', '', '', '', '', '', '', '', '', '' ]
30
- #df_summary.loc[len(df_summary)] = [ 'note', 'r_patient_info', '**${patient_name}** ID: ${patient_id}', '', '', '', '', '', '', '', '', '', '', '', '', '', '' ]
31
- #df_summary.loc[len(df_summary)] = [ 'note', 'r_followup', 'Follow Up <i class=“fa fa-flag”></i>', '', '', '', '', '', '','', '', '', '', '', '', '', '' ]
32
- #df_summary.loc[len(df_summary)] = [ 'note', 'r_followup_note' ,'FOLLOWUP instruction', '', '', '', '', '', '', '','', '', '', '', '', '', '' ]
33
- #df_summary.loc[len(df_summary)] = [ 'end_group', '' ,'', '', '', '', '', '', '', '', '', '', '', '', '','', '' ]
34
26
  return df_summary
35
-
27
+
36
28
  def tricc_operation_age_day(self, exps):
37
- raise NotImplemented("AgeInDays Not compatible with this strategy")
38
-
29
+ raise NotImplementedError("AgeInDays Not compatible with this strategy")
30
+
39
31
  def tricc_operation_age_year(self, exps):
40
- raise NotImplemented("AgeInYears Not compatible with this strategy")
41
-
42
- def tricc_operation_age_month(self, exps):
43
- raise NotImplemented("AgeInMonths Not compatible with this strategy")
32
+ raise NotImplementedError("AgeInYears Not compatible with this strategy")
44
33
 
45
-
46
-
34
+ def tricc_operation_age_month(self, exps):
35
+ raise NotImplementedError("AgeInMonths Not compatible with this strategy")