mbu-dev-shared-components 2.0.1__tar.gz → 2.2.0__tar.gz

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 (58) hide show
  1. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/PKG-INFO +1 -1
  2. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/solteqtand/application/app_handler.py +40 -23
  3. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/solteqtand/application/document.py +1 -1
  4. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/solteqtand/application/edi_portal.py +21 -7
  5. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/solteqtand/application/handler_base.py +5 -1
  6. mbu_dev_shared_components-2.2.0/mbu_dev_shared_components/solteqtand/application/journal_note.py +38 -0
  7. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components.egg-info/PKG-INFO +1 -1
  8. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components.egg-info/SOURCES.txt +1 -0
  9. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/pyproject.toml +1 -1
  10. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/LICENSE +0 -0
  11. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/README.md +0 -0
  12. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/database/__init__.py +0 -0
  13. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/database/constants.py +0 -0
  14. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/database/logging.py +0 -0
  15. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/database/utility.py +0 -0
  16. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/getorganized/__init__.py +0 -0
  17. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/getorganized/auth.py +0 -0
  18. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/getorganized/cases.py +0 -0
  19. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/getorganized/contacts.py +0 -0
  20. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/getorganized/documents.py +0 -0
  21. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/getorganized/objects.py +0 -0
  22. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/google/__init__.py +0 -0
  23. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/google/api/__init__.py +0 -0
  24. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/google/api/auth.py +0 -0
  25. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/google/workspace/__init__.py +0 -0
  26. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/google/workspace/alerts.py +0 -0
  27. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/msoffice365/__init__.py +0 -0
  28. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/msoffice365/excel/__init__.py +0 -0
  29. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/msoffice365/excel/excel_reader.py +0 -0
  30. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/msoffice365/sharepoint_api/__init__.py +0 -0
  31. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/msoffice365/sharepoint_api/files.py +0 -0
  32. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/os2forms/__init__.py +0 -0
  33. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/os2forms/documents.py +0 -0
  34. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/os2forms/forms.py +0 -0
  35. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/romexis/__init__.py +0 -0
  36. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/romexis/db_handler.py +0 -0
  37. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/romexis/helper_functions.py +0 -0
  38. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/sap/__init__.py +0 -0
  39. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/sap/create_invoice.py +0 -0
  40. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/solteqtand/__init__.py +0 -0
  41. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/solteqtand/application/__init__.py +0 -0
  42. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/solteqtand/application/appointment.py +0 -0
  43. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/solteqtand/application/base_ui.py +0 -0
  44. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/solteqtand/application/clinic.py +0 -0
  45. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/solteqtand/application/event.py +0 -0
  46. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/solteqtand/application/exceptions.py +0 -0
  47. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/solteqtand/application/patient.py +0 -0
  48. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/solteqtand/database/__init__.py +0 -0
  49. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/solteqtand/database/db_handler.py +0 -0
  50. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/utils/__init__.py +0 -0
  51. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/utils/db_stored_procedure_executor.py +0 -0
  52. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/utils/fernet_encryptor.py +0 -0
  53. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/utils/file_handler.py +0 -0
  54. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components/utils/json_handler.py +0 -0
  55. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components.egg-info/dependency_links.txt +0 -0
  56. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components.egg-info/requires.txt +0 -0
  57. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/mbu_dev_shared_components.egg-info/top_level.txt +0 -0
  58. {mbu_dev_shared_components-2.0.1 → mbu_dev_shared_components-2.2.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mbu_dev_shared_components
3
- Version: 2.0.1
3
+ Version: 2.2.0
4
4
  Summary: Shared components to use in RPA projects
5
5
  Author-email: MBU <rpa@mbu.aarhus.dk>
6
6
  Classifier: Programming Language :: Python :: 3
@@ -1,45 +1,53 @@
1
- """This module contains the PatientHandler class, which manages patient-related actions in the Solteq Tand application."""
1
+ """This module provides the main application handler for Solteq Tand, integrating various components."""
2
2
  import os
3
3
  import uiautomation as auto
4
4
 
5
5
  from .base_ui import BaseUI
6
-
7
-
8
- class SolteqTandApp(BaseUI):
6
+ from .patient import PatientHandler
7
+ from .document import DocumentHandler
8
+ from .appointment import AppointmentHandler
9
+ from .edi_portal import EDIHandler
10
+ from .clinic import ClinicHandler
11
+ from .event import EventHandler
12
+ from .journal_note import JournalNoteHandler
13
+
14
+
15
+ class SolteqTandApp(
16
+ BaseUI,
17
+ PatientHandler,
18
+ DocumentHandler,
19
+ AppointmentHandler,
20
+ EDIHandler,
21
+ ClinicHandler,
22
+ EventHandler,
23
+ JournalNoteHandler
24
+ ):
9
25
  """
10
26
  Main application handler for Solteq Tand, integrating various components.
11
- Inherits from BaseUI for core UI methods, and composes all feature handlers.
27
+
28
+ Inherits from:
29
+ BaseUI: Provides basic UI interaction methods.
30
+ PatientHandler: Handles patient-related operations.
31
+ DocumentHandler: Manages document operations.
32
+ AppointmentHandler: Manages appointment operations.
33
+ EDIHandler: Handles EDI portal interactions.
34
+ ClinicHandler: Manages clinic-related operations.
35
+ EventHandler: Processes events in the application.
36
+ JournalNoteHandler: Handles journal note operations.
12
37
  """
13
38
 
14
39
  def __init__(self, app_path: str, username: str = None, password: str = None):
15
40
  """
16
41
  Initializes the Solteq Tand application handler.
42
+
17
43
  Args:
18
44
  app_path (str): Path to the Solteq Tand application executable.
19
- username (str): Username for login.
20
- password (str): Password for login.
21
45
  """
22
- super().__init__()
23
46
  self.app_path = app_path
24
47
  self.username = username
25
48
  self.password = password
26
49
  self.app_window = None
27
50
 
28
- # Compose feature handlers, passing this App as parent
29
- from .patient import PatientHandler
30
- from .appointment import AppointmentHandler
31
- from .document import DocumentHandler
32
- from .edi_portal import EDIHandler
33
- from .clinic import ClinicHandler
34
- from .event import EventHandler
35
-
36
- self.patient = PatientHandler(self)
37
- self.appointment = AppointmentHandler(self)
38
- self.document = DocumentHandler(self)
39
- self.edi = EDIHandler(self)
40
- self.clinic = ClinicHandler(self)
41
- self.event = EventHandler(self)
42
-
43
51
  def start_application(self):
44
52
  """
45
53
  Starts the application using the specified path.
@@ -121,3 +129,12 @@ class SolteqTandApp(BaseUI):
121
129
  if not is_tab_selected:
122
130
  tab_button.SetFocus()
123
131
  tab_button.SendKeys('{ENTER}')
132
+
133
+ def close_solteq_tand(self):
134
+ """Closes the Solteq Tand application gracefully."""
135
+ try:
136
+ if self.app_window:
137
+ self.close_window(self.app_window)
138
+ self.app_window = None
139
+ except Exception as error:
140
+ print(f"Error closing Solteq Tand application window: {error}")
@@ -355,7 +355,7 @@ class DocumentHandler(HandlerBase):
355
355
  print(f"Error while sending discharge document via DigitalPost: {e}")
356
356
  raise
357
357
 
358
- def create_digital_printet_journal(self, document_type: str) -> None:
358
+ def create_digital_printet_journal(self) -> None:
359
359
  """
360
360
  Creates a digital printet journal for the patient
361
361
  and stores it in the documentsilo.
@@ -56,15 +56,29 @@ class EDIHandler(HandlerBase):
56
56
  auto.WindowControl, {"ClassName": "Chrome_WidgetWin_1"}, search_depth=3
57
57
  )
58
58
 
59
- root_web_area = self.wait_for_control(
60
- edge_window.DocumentControl, {"AutomationId": "RootWebArea"}, search_depth=14
61
- )
59
+ edge_window.SetFocus()
62
60
 
63
- next_button = self.wait_for_control(
64
- auto.ButtonControl, {"Name": "Næste"}, search_depth=50
65
- )
61
+ try:
62
+ next_button = self.wait_for_control(
63
+ auto.ButtonControl, {"Name": "Næste"},
64
+ search_depth=50,
65
+ timeout=5
66
+ )
67
+ except TimeoutError:
68
+ next_button = None
69
+
70
+ if not next_button:
71
+ try:
72
+ next_button = self.wait_for_control(
73
+ auto.ButtonControl, {"Name": "patientInformationNextButton"},
74
+ search_depth=50,
75
+ timeout=5
76
+ )
77
+ except TimeoutError:
78
+ next_button = None
66
79
 
67
- # edge_window.SetFocus()
80
+ if not next_button:
81
+ raise RuntimeError("Next button not found in EDI Portal")
68
82
  next_button.Click(simulateMove=False, waitTime=0)
69
83
  time.sleep(sleep_time)
70
84
  except Exception as e:
@@ -10,4 +10,8 @@ class HandlerBase:
10
10
  self._parent = parent
11
11
 
12
12
  def __getattr__(self, name):
13
- return getattr(self._parent, name)
13
+ parent = object.__getattribute__(self, "_parent")
14
+ try:
15
+ return object.__getattribute__(parent, name)
16
+ except AttributeError as exc:
17
+ raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'") from exc
@@ -0,0 +1,38 @@
1
+ import uiautomation as auto
2
+
3
+ from .handler_base import HandlerBase
4
+
5
+
6
+ class JournalNoteHandler(HandlerBase):
7
+ """
8
+ Handles the processing of journal notes in the Solteq Tand application.
9
+ """
10
+
11
+ def create_journal_note(self, note_message: str, checkmark_in_complete: bool):
12
+ """
13
+ Creates a journal note for the given patient.
14
+
15
+ Args:
16
+ note_message (str): The note message.
17
+ checkmark_in_complete (bool): Checks the checkmark in 'Afslut'.
18
+ """
19
+ self.open_tab("Journal")
20
+
21
+ self.wait_for_control(
22
+ auto.DocumentControl,
23
+ {"AutomationId": "RichTextBoxInput"},
24
+ search_depth=21
25
+ )
26
+
27
+ input_box = self.app_window.DocumentControl(AutomationId="RichTextBoxInput")
28
+ input_box_value_pattern = input_box.GetValuePattern()
29
+ input_box_value_pattern.SetValue(value=note_message, waitTime=0)
30
+
31
+ if checkmark_in_complete:
32
+ checkbox = self.app_window.CheckBoxControl(AutomationId="CheckBoxAssignCompletionStatus")
33
+ checkbox.SetFocus()
34
+ checkbox.Click(simulateMove=False, waitTime=0)
35
+
36
+ save_button = self.app_window.PaneControl(AutomationId="buttonSave")
37
+ save_button.SetFocus()
38
+ save_button.Click(simulateMove=False, waitTime=0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mbu_dev_shared_components
3
- Version: 2.0.1
3
+ Version: 2.2.0
4
4
  Summary: Shared components to use in RPA projects
5
5
  Author-email: MBU <rpa@mbu.aarhus.dk>
6
6
  Classifier: Programming Language :: Python :: 3
@@ -45,6 +45,7 @@ mbu_dev_shared_components/solteqtand/application/edi_portal.py
45
45
  mbu_dev_shared_components/solteqtand/application/event.py
46
46
  mbu_dev_shared_components/solteqtand/application/exceptions.py
47
47
  mbu_dev_shared_components/solteqtand/application/handler_base.py
48
+ mbu_dev_shared_components/solteqtand/application/journal_note.py
48
49
  mbu_dev_shared_components/solteqtand/application/patient.py
49
50
  mbu_dev_shared_components/solteqtand/database/__init__.py
50
51
  mbu_dev_shared_components/solteqtand/database/db_handler.py
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "mbu_dev_shared_components"
7
- version = "2.0.1" # Specify the version manually here
7
+ version = "2.2.0" # Specify the version manually here
8
8
  authors = [
9
9
  { name="MBU", email="rpa@mbu.aarhus.dk" },
10
10
  ]