mbu-dev-shared-components 2.0.0__tar.gz → 2.1.2__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 (60) hide show
  1. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/PKG-INFO +1 -1
  2. mbu_dev_shared_components-2.1.2/mbu_dev_shared_components/solteqtand/__init__.py +8 -0
  3. mbu_dev_shared_components-2.1.2/mbu_dev_shared_components/solteqtand/application/__init__.py +4 -0
  4. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/solteqtand/application/app_handler.py +9 -12
  5. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/solteqtand/application/appointment.py +2 -3
  6. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/solteqtand/application/clinic.py +2 -2
  7. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/solteqtand/application/document.py +3 -3
  8. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/solteqtand/application/edi_portal.py +23 -9
  9. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/solteqtand/application/event.py +2 -2
  10. mbu_dev_shared_components-2.1.2/mbu_dev_shared_components/solteqtand/application/handler_base.py +13 -0
  11. mbu_dev_shared_components-2.1.2/mbu_dev_shared_components/solteqtand/application/journal_note.py +38 -0
  12. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/solteqtand/application/patient.py +2 -2
  13. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components.egg-info/PKG-INFO +1 -1
  14. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components.egg-info/SOURCES.txt +2 -0
  15. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/pyproject.toml +1 -1
  16. mbu_dev_shared_components-2.0.0/mbu_dev_shared_components/solteqtand/__init__.py +0 -32
  17. mbu_dev_shared_components-2.0.0/mbu_dev_shared_components/solteqtand/application/__init__.py +0 -1
  18. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/LICENSE +0 -0
  19. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/README.md +0 -0
  20. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/database/__init__.py +0 -0
  21. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/database/constants.py +0 -0
  22. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/database/logging.py +0 -0
  23. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/database/utility.py +0 -0
  24. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/getorganized/__init__.py +0 -0
  25. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/getorganized/auth.py +0 -0
  26. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/getorganized/cases.py +0 -0
  27. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/getorganized/contacts.py +0 -0
  28. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/getorganized/documents.py +0 -0
  29. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/getorganized/objects.py +0 -0
  30. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/google/__init__.py +0 -0
  31. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/google/api/__init__.py +0 -0
  32. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/google/api/auth.py +0 -0
  33. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/google/workspace/__init__.py +0 -0
  34. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/google/workspace/alerts.py +0 -0
  35. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/msoffice365/__init__.py +0 -0
  36. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/msoffice365/excel/__init__.py +0 -0
  37. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/msoffice365/excel/excel_reader.py +0 -0
  38. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/msoffice365/sharepoint_api/__init__.py +0 -0
  39. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/msoffice365/sharepoint_api/files.py +0 -0
  40. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/os2forms/__init__.py +0 -0
  41. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/os2forms/documents.py +0 -0
  42. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/os2forms/forms.py +0 -0
  43. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/romexis/__init__.py +0 -0
  44. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/romexis/db_handler.py +0 -0
  45. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/romexis/helper_functions.py +0 -0
  46. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/sap/__init__.py +0 -0
  47. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/sap/create_invoice.py +0 -0
  48. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/solteqtand/application/base_ui.py +0 -0
  49. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/solteqtand/application/exceptions.py +0 -0
  50. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/solteqtand/database/__init__.py +0 -0
  51. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/solteqtand/database/db_handler.py +0 -0
  52. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/utils/__init__.py +0 -0
  53. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/utils/db_stored_procedure_executor.py +0 -0
  54. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/utils/fernet_encryptor.py +0 -0
  55. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/utils/file_handler.py +0 -0
  56. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components/utils/json_handler.py +0 -0
  57. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components.egg-info/dependency_links.txt +0 -0
  58. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components.egg-info/requires.txt +0 -0
  59. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/mbu_dev_shared_components.egg-info/top_level.txt +0 -0
  60. {mbu_dev_shared_components-2.0.0 → mbu_dev_shared_components-2.1.2}/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.0
3
+ Version: 2.1.2
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
@@ -0,0 +1,8 @@
1
+ # mbu_dev_shared_components/solteqtand/__init__.py
2
+ from .application import SolteqTandApp
3
+ from .database import SolteqTandDatabase
4
+
5
+ __all__ = [
6
+ "SolteqTandApp",
7
+ "SolteqTandDatabase",
8
+ ]
@@ -0,0 +1,4 @@
1
+ # mbu_dev_shared_components/solteqtand/application/__init__.py
2
+ from .app_handler import SolteqTandApp
3
+
4
+ __all__ = ["SolteqTandApp"]
@@ -1,6 +1,5 @@
1
-
1
+ """This module provides the main application handler for Solteq Tand, integrating various components."""
2
2
  import os
3
- import time
4
3
  import uiautomation as auto
5
4
 
6
5
  from .base_ui import BaseUI
@@ -10,11 +9,7 @@ from .appointment import AppointmentHandler
10
9
  from .edi_portal import EDIHandler
11
10
  from .clinic import ClinicHandler
12
11
  from .event import EventHandler
13
- from .exceptions import (
14
- ManualProcessingRequiredError,
15
- NotMatchingError,
16
- PatientNotFoundError,
17
- )
12
+ from .journal_note import JournalNoteHandler
18
13
 
19
14
 
20
15
  class SolteqTandApp(
@@ -24,11 +19,12 @@ class SolteqTandApp(
24
19
  AppointmentHandler,
25
20
  EDIHandler,
26
21
  ClinicHandler,
27
- EventHandler
22
+ EventHandler,
23
+ JournalNoteHandler
28
24
  ):
29
25
  """
30
26
  Main application handler for Solteq Tand, integrating various components.
31
-
27
+
32
28
  Inherits from:
33
29
  BaseUI: Provides basic UI interaction methods.
34
30
  PatientHandler: Handles patient-related operations.
@@ -37,12 +33,13 @@ class SolteqTandApp(
37
33
  EDIHandler: Handles EDI portal interactions.
38
34
  ClinicHandler: Manages clinic-related operations.
39
35
  EventHandler: Processes events in the application.
36
+ JournalNoteHandler: Handles journal note operations.
40
37
  """
41
-
38
+
42
39
  def __init__(self, app_path: str, username: str = None, password: str = None):
43
40
  """
44
41
  Initializes the Solteq Tand application handler.
45
-
42
+
46
43
  Args:
47
44
  app_path (str): Path to the Solteq Tand application executable.
48
45
  """
@@ -50,7 +47,7 @@ class SolteqTandApp(
50
47
  self.username = username
51
48
  self.password = password
52
49
  self.app_window = None
53
-
50
+
54
51
  def start_application(self):
55
52
  """
56
53
  Starts the application using the specified path.
@@ -1,14 +1,13 @@
1
1
  import uiautomation as auto
2
2
 
3
- from .base_ui import BaseUI
3
+ from .handler_base import HandlerBase
4
4
  from .exceptions import ManualProcessingRequiredError
5
5
 
6
6
 
7
- class AppointmentHandler(BaseUI):
7
+ class AppointmentHandler(HandlerBase):
8
8
  """
9
9
  Handles appointment-related UI interactions.
10
10
  """
11
-
12
11
  def get_list_of_appointments(self) -> dict:
13
12
  """
14
13
  Gets list of appointments as found in patient window
@@ -1,9 +1,9 @@
1
1
  import uiautomation as auto
2
2
 
3
- from .base_ui import BaseUI
3
+ from .handler_base import HandlerBase
4
4
 
5
5
 
6
- class ClinicHandler(BaseUI):
6
+ class ClinicHandler(HandlerBase):
7
7
  """
8
8
  Handles changing the primart clinic for a patient (if it's not "Tandplejen Aarhus").
9
9
  """
@@ -6,10 +6,10 @@ import psutil
6
6
  from docx2pdf import convert
7
7
  import uiautomation as auto
8
8
 
9
- from .base_ui import BaseUI
9
+ from .handler_base import HandlerBase
10
10
 
11
11
 
12
- class DocumentHandler(BaseUI):
12
+ class DocumentHandler(HandlerBase):
13
13
  """
14
14
  Handles everything under the “Dokumenter” sub-tab in a patient's record,
15
15
  including creating a document, merging from a template, converting DOCX → PDF,
@@ -355,7 +355,7 @@ class DocumentHandler(BaseUI):
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.
@@ -2,10 +2,10 @@
2
2
  import time
3
3
  import uiautomation as auto
4
4
 
5
- from .base_ui import BaseUI
5
+ from .handler_base import HandlerBase
6
6
 
7
7
 
8
- class EDIHandler(BaseUI):
8
+ class EDIHandler(HandlerBase):
9
9
  """
10
10
  Handles the EDI Portal UI interactions.
11
11
  """
@@ -56,15 +56,29 @@ class EDIHandler(BaseUI):
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:
@@ -1,9 +1,9 @@
1
1
  import uiautomation as auto
2
2
 
3
- from .base_ui import BaseUI
3
+ from .handler_base import HandlerBase
4
4
 
5
5
 
6
- class EventHandler(BaseUI):
6
+ class EventHandler(HandlerBase):
7
7
  """
8
8
  Handles “Hændelser” under “Stamkort”—specifically processes “Afgang til klinik 751”.
9
9
  """
@@ -0,0 +1,13 @@
1
+ """This module handles the base functionality."""
2
+
3
+
4
+ class HandlerBase:
5
+ """
6
+ Base class for all feature‐handlers. Delegates unknown attributes
7
+ (methods & properties) up to the main App instance.
8
+ """
9
+ def __init__(self, parent):
10
+ self._parent = parent
11
+
12
+ def __getattr__(self, name):
13
+ return getattr(self._parent, name)
@@ -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)
@@ -2,11 +2,11 @@
2
2
  import time
3
3
  import uiautomation as auto
4
4
 
5
- from .base_ui import BaseUI
5
+ from .handler_base import HandlerBase
6
6
  from .exceptions import PatientNotFoundError, NotMatchingError
7
7
 
8
8
 
9
- class PatientHandler(BaseUI):
9
+ class PatientHandler(HandlerBase):
10
10
  """Handles all patient-related actions in the Solteq Tand application."""
11
11
 
12
12
  def get_ssn_stamkort(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mbu_dev_shared_components
3
- Version: 2.0.0
3
+ Version: 2.1.2
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
@@ -44,6 +44,8 @@ mbu_dev_shared_components/solteqtand/application/document.py
44
44
  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
+ mbu_dev_shared_components/solteqtand/application/handler_base.py
48
+ mbu_dev_shared_components/solteqtand/application/journal_note.py
47
49
  mbu_dev_shared_components/solteqtand/application/patient.py
48
50
  mbu_dev_shared_components/solteqtand/database/__init__.py
49
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.0" # Specify the version manually here
7
+ version = "2.1.2" # Specify the version manually here
8
8
  authors = [
9
9
  { name="MBU", email="rpa@mbu.aarhus.dk" },
10
10
  ]
@@ -1,32 +0,0 @@
1
- """
2
- This module provides the main entry point for the Solteq Tand application.
3
- """
4
- from .application import (
5
- app_handler,
6
- appointment,
7
- base_ui,
8
- clinic,
9
- document,
10
- edi_portal,
11
- event,
12
- patient,
13
- exceptions,
14
- helper_functions,
15
- SolteqTandApp
16
- )
17
- from .database import SolteqTandDatabase
18
-
19
- __all__ = [
20
- "app_handler",
21
- "appointment",
22
- "base_ui",
23
- "clinic",
24
- "document",
25
- "edi_portal",
26
- "event",
27
- "patient",
28
- "exceptions",
29
- "helper_functions",
30
- "SolteqTandApp",
31
- "SolteqTandDatabase"
32
- ]
@@ -1 +0,0 @@
1
- from .app_handler import SolteqTandApp