mbu-dev-shared-components 4.2.3__tar.gz → 4.2.4__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 (61) hide show
  1. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/PKG-INFO +1 -1
  2. mbu_dev_shared_components-4.2.4/mbu_dev_shared_components/solteqtand/application/clinic.py +124 -0
  3. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components.egg-info/PKG-INFO +1 -1
  4. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/pyproject.toml +1 -1
  5. mbu_dev_shared_components-4.2.3/mbu_dev_shared_components/solteqtand/application/clinic.py +0 -75
  6. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/LICENSE +0 -0
  7. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/README.md +0 -0
  8. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/database/__init__.py +0 -0
  9. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/database/connection.py +0 -0
  10. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/database/constants.py +0 -0
  11. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/database/logging.py +0 -0
  12. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/database/utility.py +0 -0
  13. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/getorganized/__init__.py +0 -0
  14. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/getorganized/auth.py +0 -0
  15. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/getorganized/cases.py +0 -0
  16. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/getorganized/contacts.py +0 -0
  17. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/getorganized/documents.py +0 -0
  18. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/getorganized/objects.py +0 -0
  19. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/google/__init__.py +0 -0
  20. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/google/api/__init__.py +0 -0
  21. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/google/api/auth.py +0 -0
  22. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/google/workspace/__init__.py +0 -0
  23. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/google/workspace/alerts.py +0 -0
  24. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/msoffice365/__init__.py +0 -0
  25. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/msoffice365/excel/__init__.py +0 -0
  26. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/msoffice365/excel/excel_reader.py +0 -0
  27. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/msoffice365/sharepoint_api/__init__.py +0 -0
  28. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/msoffice365/sharepoint_api/files.py +0 -0
  29. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/os2forms/__init__.py +0 -0
  30. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/os2forms/documents.py +0 -0
  31. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/os2forms/forms.py +0 -0
  32. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/romexis/__init__.py +0 -0
  33. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/romexis/db_handler.py +0 -0
  34. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/romexis/helper_functions.py +0 -0
  35. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/sap/__init__.py +0 -0
  36. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/sap/create_invoice.py +0 -0
  37. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/solteqtand/__init__.py +0 -0
  38. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/solteqtand/application/__init__.py +0 -0
  39. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/solteqtand/application/aftalebog.py +0 -0
  40. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/solteqtand/application/app_handler.py +0 -0
  41. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/solteqtand/application/appointment.py +0 -0
  42. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/solteqtand/application/base_ui.py +0 -0
  43. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/solteqtand/application/document.py +0 -0
  44. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/solteqtand/application/edi_portal.py +0 -0
  45. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/solteqtand/application/event.py +0 -0
  46. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/solteqtand/application/exceptions.py +0 -0
  47. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/solteqtand/application/handler_base.py +0 -0
  48. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/solteqtand/application/journal_note.py +0 -0
  49. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/solteqtand/application/patient.py +0 -0
  50. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/solteqtand/database/__init__.py +0 -0
  51. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/solteqtand/database/db_handler.py +0 -0
  52. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/utils/__init__.py +0 -0
  53. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/utils/db_stored_procedure_executor.py +0 -0
  54. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/utils/fernet_encryptor.py +0 -0
  55. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/utils/file_handler.py +0 -0
  56. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components/utils/json_handler.py +0 -0
  57. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components.egg-info/SOURCES.txt +0 -0
  58. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components.egg-info/dependency_links.txt +0 -0
  59. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components.egg-info/requires.txt +0 -0
  60. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/mbu_dev_shared_components.egg-info/top_level.txt +0 -0
  61. {mbu_dev_shared_components-4.2.3 → mbu_dev_shared_components-4.2.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mbu_dev_shared_components
3
- Version: 4.2.3
3
+ Version: 4.2.4
4
4
  Summary: Shared components to use in RPA projects
5
5
  Author-email: MBU <rpa@mbu.aarhus.dk>
6
6
  License-Expression: MIT
@@ -0,0 +1,124 @@
1
+ import uiautomation as auto
2
+
3
+ from .handler_base import HandlerBase
4
+
5
+
6
+ class ClinicHandler(HandlerBase):
7
+ """
8
+ Handles changing the primart clinic for a patient (if it's not "Tandplejen Aarhus").
9
+ """
10
+
11
+ def change_primary_clinic(self, current_primary_clinic: str, is_field_locked: bool):
12
+ """
13
+ Changes the primary clinic for the patient.
14
+ """
15
+ try:
16
+ self.open_tab("Stamkort")
17
+
18
+ if current_primary_clinic != "Tandplejen Aarhus":
19
+ if is_field_locked:
20
+ locked_field = self.wait_for_control(
21
+ auto.CheckBoxControl,
22
+ {"AutomationId": "CheckPatientClinicRegLocked"},
23
+ search_depth=9,
24
+ )
25
+
26
+ if locked_field.GetPattern(
27
+ auto.PatternId.TogglePattern
28
+ ).ToggleState:
29
+ locked_field.GetPattern(auto.PatternId.TogglePattern).Toggle()
30
+ locked_field.SendKeys("{Ctrl}s", waitTime=0)
31
+
32
+ box_clinic_parent = self.wait_for_control(
33
+ auto.GroupControl,
34
+ {"AutomationId": "GroupBoxPatientDentalInfo"},
35
+ search_depth=8,
36
+ )
37
+ box_clinic = box_clinic_parent.PaneControl(
38
+ searchDepth=2, AutomationId="ControlClinicSelectorPatientClinicReg"
39
+ ).PaneControl(searchDepth=2, AutomationId="PictureBoxClinic")
40
+ box_clinic.Click(simulateMove=False, waitTime=0)
41
+
42
+ clinic_list = self.wait_for_control(
43
+ auto.WindowControl,
44
+ {"AutomationId": "FormFindClinics"},
45
+ search_depth=2,
46
+ )
47
+
48
+ clinic_list_items = clinic_list.ListControl(
49
+ AutomationId="ListClinics"
50
+ ).ListItemControl(Name="Tandplejen Aarhus")
51
+ clinic_list_items.GetPattern(10017).ScrollIntoView()
52
+ clinic_list_items.SetFocus()
53
+ clinic_list_items.DoubleClick(simulateMove=False, waitTime=0)
54
+
55
+ locked_field = self.wait_for_control(
56
+ auto.CheckBoxControl,
57
+ {"AutomationId": "CheckPatientClinicRegLocked"},
58
+ search_depth=9,
59
+ )
60
+
61
+ if (
62
+ locked_field.GetPattern(auto.PatternId.TogglePattern).ToggleState
63
+ == 0
64
+ ):
65
+ locked_field.GetPattern(auto.PatternId.TogglePattern).Toggle()
66
+ locked_field.SendKeys("{Ctrl}s", waitTime=0)
67
+
68
+ self.wait_for_control(
69
+ auto.TextControl, {"Name": "Patient er gemt."}, search_depth=3
70
+ )
71
+
72
+ print("Primary clinic changed successfully.")
73
+ print("Patient already has the primary clinic set to 'Tandplejen Aarhus'")
74
+ except Exception as e:
75
+ print(f"Error while changing primary clinic: {e}")
76
+ raise
77
+
78
+ def change_private_clinic(self, private_clinic: str):
79
+ """
80
+ Changes the primary clinic for the patient.
81
+ """
82
+ try:
83
+ self.open_tab("Stamkort")
84
+ self.open_sub_tab("Tilhør")
85
+
86
+ box_clinic_parent = self.wait_for_control(
87
+ auto.GroupControl,
88
+ {"AutomationId": "GroupBoxPatientPrivateDentist"},
89
+ search_depth=20,
90
+ )
91
+ box_clinic = box_clinic_parent.PaneControl(
92
+ searchDepth=2, AutomationId="ControlClinicSelectorPatientPrivateDentist"
93
+ ).PaneControl(searchDepth=2, AutomationId="PictureBoxClinic")
94
+ box_clinic.Click(simulateMove=False, waitTime=0)
95
+
96
+ clinic_list = self.wait_for_control(
97
+ auto.WindowControl, {"AutomationId": "FormFindClinics"}, search_depth=10
98
+ )
99
+ clinic_list.PaneControl(AutomationId="Panel1").PaneControl(
100
+ AutomationId="ButtonReset"
101
+ ).Click(simulateMove=False, waitTime=0)
102
+ clinic_list.PaneControl(AutomationId="Panel1").PaneControl(
103
+ AutomationId="ButtonSearchClinics"
104
+ ).Click(simulateMove=False, waitTime=0)
105
+
106
+ clinic_list_updated = self.wait_for_control(
107
+ auto.WindowControl, {"AutomationId": "FormFindClinics"}, search_depth=10
108
+ )
109
+ clinic_list_items = clinic_list_updated.ListControl(
110
+ AutomationId="ListClinics"
111
+ ).ListItemControl(Name=private_clinic, timeout=30)
112
+ clinic_list_items.GetPattern(10017).ScrollIntoView()
113
+ clinic_list_items.SetFocus()
114
+ clinic_list_items.DoubleClick(simulateMove=False, waitTime=0)
115
+
116
+ self.app_window.SendKeys("{Ctrl}s", waitTime=0)
117
+
118
+ self.wait_for_control(
119
+ auto.TextControl, {"Name": "Patient er gemt."}, search_depth=3
120
+ )
121
+
122
+ except Exception as e:
123
+ print(f"Error while changing primary clinic: {e}")
124
+ raise
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mbu_dev_shared_components
3
- Version: 4.2.3
3
+ Version: 4.2.4
4
4
  Summary: Shared components to use in RPA projects
5
5
  Author-email: MBU <rpa@mbu.aarhus.dk>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "mbu_dev_shared_components"
7
- version = "4.2.3"
7
+ version = "4.2.4"
8
8
  authors = [
9
9
  { name="MBU", email="rpa@mbu.aarhus.dk" },
10
10
  ]
@@ -1,75 +0,0 @@
1
- import uiautomation as auto
2
-
3
- from .handler_base import HandlerBase
4
-
5
-
6
- class ClinicHandler(HandlerBase):
7
- """
8
- Handles changing the primart clinic for a patient (if it's not "Tandplejen Aarhus").
9
- """
10
-
11
- def change_primary_clinic(self, current_primary_clinic: str, is_field_locked: bool):
12
- """
13
- Changes the primary clinic for the patient.
14
- """
15
- try:
16
- self.open_tab("Stamkort")
17
-
18
- if current_primary_clinic != "Tandplejen Aarhus":
19
- if is_field_locked:
20
- locked_field = self.wait_for_control(
21
- auto.CheckBoxControl,
22
- {'AutomationId': 'CheckPatientClinicRegLocked'},
23
- search_depth=9
24
- )
25
-
26
- if locked_field.GetPattern(auto.PatternId.TogglePattern).ToggleState:
27
- locked_field.GetPattern(auto.PatternId.TogglePattern).Toggle()
28
- locked_field.SendKeys('{Ctrl}s', waitTime=0)
29
-
30
- box_clinic_parent = self.wait_for_control(
31
- auto.GroupControl,
32
- {'AutomationId': 'GroupBoxPatientDentalInfo'},
33
- search_depth=8
34
- )
35
- box_clinic = box_clinic_parent.PaneControl(
36
- searchDepth=2,
37
- AutomationId="ControlClinicSelectorPatientClinicReg"
38
- ).PaneControl(
39
- searchDepth=2,
40
- AutomationId="PictureBoxClinic"
41
- )
42
- box_clinic.Click(simulateMove=False, waitTime=0)
43
-
44
- clinic_list = self.wait_for_control(
45
- auto.WindowControl,
46
- {'AutomationId': 'FormFindClinics'},
47
- search_depth=2
48
- )
49
-
50
- clinic_list_items = clinic_list.ListControl(AutomationId="ListClinics").ListItemControl(Name="Tandplejen Aarhus")
51
- clinic_list_items.GetPattern(10017).ScrollIntoView()
52
- clinic_list_items.SetFocus()
53
- clinic_list_items.DoubleClick(simulateMove=False, waitTime=0)
54
-
55
- locked_field = self.wait_for_control(
56
- auto.CheckBoxControl,
57
- {'AutomationId': 'CheckPatientClinicRegLocked'},
58
- search_depth=9
59
- )
60
-
61
- if locked_field.GetPattern(auto.PatternId.TogglePattern).ToggleState == 0:
62
- locked_field.GetPattern(auto.PatternId.TogglePattern).Toggle()
63
- locked_field.SendKeys('{Ctrl}s', waitTime=0)
64
-
65
- self.wait_for_control(
66
- auto.TextControl,
67
- {'Name': 'Patient er gemt.'},
68
- search_depth=3
69
- )
70
-
71
- print("Primary clinic changed successfully.")
72
- print("Patient already has the primary clinic set to 'Tandplejen Aarhus'")
73
- except Exception as e:
74
- print(f"Error while changing primary clinic: {e}")
75
- raise