pyegeria 5.3.6.2.4__py3-none-any.whl → 5.3.6.3__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 (31) hide show
  1. pyegeria/__init__.py +3 -0
  2. pyegeria/commands/cat/{freddies-inbox → dr_egeria_inbox}/freddie_intro.md +64 -16
  3. pyegeria/commands/cat/{freddie_jupyter.py → dr_egeria_jupyter.py} +8 -16
  4. pyegeria/commands/cat/{freddie_md.py → dr_egeria_md.py} +29 -32
  5. pyegeria/commands/cat/glossary_actions.py +59 -1
  6. pyegeria/commands/cat/list_categories.py +185 -0
  7. pyegeria/commands/cat/list_glossaries.py +26 -33
  8. pyegeria/commands/cat/list_terms.py +47 -47
  9. pyegeria/commands/cli/egeria.py +51 -61
  10. pyegeria/commands/cli/egeria_cat.py +53 -31
  11. pyegeria/create_tech_guid_lists.py +2 -5
  12. pyegeria/glossary_browser_omvs.py +257 -105
  13. pyegeria/glossary_manager_omvs.py +148 -1591
  14. pyegeria/md_processing_utils.py +816 -0
  15. {pyegeria-5.3.6.2.4.dist-info → pyegeria-5.3.6.3.dist-info}/METADATA +1 -1
  16. {pyegeria-5.3.6.2.4.dist-info → pyegeria-5.3.6.3.dist-info}/RECORD +21 -29
  17. {pyegeria-5.3.6.2.4.dist-info → pyegeria-5.3.6.3.dist-info}/entry_points.txt +5 -0
  18. pyegeria/commands/cat/freddie_jup.py +0 -124
  19. pyegeria/commands/cat/freddie_utils.py +0 -590
  20. pyegeria/commands/cat/freddies-outbox/Terms-2025-03-06-13-19-29-Report.md +0 -69
  21. pyegeria/commands/cat/freddies-outbox/Terms-2025-03-06-13-20-30-Update-Form.md +0 -78
  22. pyegeria/commands/cat/glossary_creation_experiment.ipynb +0 -235
  23. pyegeria/test_j.html +0 -0
  24. pyegeria/test_m.html +0 -213
  25. pyegeria/test_m1.html +0 -273
  26. pyegeria/test_mer.ipynb +0 -596
  27. pyegeria/test_w.html +0 -213
  28. /pyegeria/commands/cat/{freddies-inbox → dr_egeria_inbox}/glossary_creation_experiment.ipynb +0 -0
  29. /pyegeria/commands/cat/{freddies-inbox → dr_egeria_inbox}/glossary_exp.md +0 -0
  30. {pyegeria-5.3.6.2.4.dist-info → pyegeria-5.3.6.3.dist-info}/LICENSE +0 -0
  31. {pyegeria-5.3.6.2.4.dist-info → pyegeria-5.3.6.3.dist-info}/WHEEL +0 -0
pyegeria/test_mer.ipynb DELETED
@@ -1,596 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "code",
5
- "id": "initial_id",
6
- "metadata": {
7
- "collapsed": true
8
- },
9
- "source": [
10
- ""
11
- ],
12
- "outputs": [],
13
- "execution_count": null
14
- },
15
- {
16
- "metadata": {},
17
- "cell_type": "code",
18
- "source": [
19
- "from pyegeria import save_mermaid_graph, render_mermaid, load_mermaid, construct_mermaid_html\n",
20
- "from IPython.display import display, HTML"
21
- ],
22
- "id": "ce93f58829adc918",
23
- "outputs": [],
24
- "execution_count": null
25
- },
26
- {
27
- "metadata": {},
28
- "cell_type": "code",
29
- "source": [
30
- "s = \"\"\"\n",
31
- "\n",
32
- " <div class=\"diagram-container\" style=\"width: 100%; max-width: 800px; margin: auto; padding: 20px; background: white; border: 1px solid #ddd; border-radius: 12px; position: relative;\">\n",
33
- " <h2 class='diagram-header'>Component for Solution Blueprint - Clinical Trial Management Solution Blueprint </h2>\n",
34
- "GUID: c4f8d707-7c85-4125-b5fd-c3257a2ef2ef\n",
35
- " <div class=\"pan-zoom-container\" style=\"width: 100%; height: 500px; overflow: hidden; position: relative; background: #f9f9f9; border: 1px solid #ccc; cursor: grab;\">\n",
36
- " <div id=\"Component_for_Solution_Blueprint_-_Clinical_Trial_Management_Solution_Blueprint_\" class=\"mermaid pan-zoom-content\" style=\"position: absolute; transform-origin: 0 0;\">\n",
37
- " flowchart TD\n",
38
- "%%{init: {&quot;flowchart&quot;: {&quot;htmlLabels&quot;: false}} }%%\n",
39
- "\n",
40
- "subgraph c4f8d707-7c85-4125-b5fd-c3257a2ef2ef [Components and Actors]\n",
41
- "fc2de77f-7320-48ea-8750-d434c6e870db@{ shape: text, label: &quot;*Description*\n",
42
- "**A description of how a clinical trial is managed in Coco Pharmaceuticals.**&quot;}\n",
43
- "37b8560d-84d4-434b-9b0d-105420fcc924@{ shape: subproc, label: &quot;*Solution Component*\n",
44
- "**Certify Hospital**&quot;}\n",
45
- "f37f3735-28a1-4e03-9ff5-3fe2f137f661@{ shape: trap-t, label: &quot;*Solution Actor Role*\n",
46
- "**Clinical Trial Manager**&quot;}\n",
47
- "f37f3735-28a1-4e03-9ff5-3fe2f137f661--&gt;|&quot;Certifier&quot;|37b8560d-84d4-434b-9b0d-105420fcc924\n",
48
- "72a86eec-9734-4bc0-babb-4fec0aa7c9ff@{ shape: docs, label: &quot;*Solution Component*\n",
49
- "**Assemble Treatment Assessment Report**&quot;}\n",
50
- "48bc201e-3d4e-4beb-bdb2-0fd9d134f6d5@{ shape: rect, label: &quot;*Solution Component*\n",
51
- "**Treatment Efficacy Evidence**&quot;}\n",
52
- "48bc201e-3d4e-4beb-bdb2-0fd9d134f6d5--&gt;|&quot;Solution Linking Wire&quot;|72a86eec-9734-4bc0-babb-4fec0aa7c9ff\n",
53
- "f37f3735-28a1-4e03-9ff5-3fe2f137f661--&gt;|&quot;Author&quot;|72a86eec-9734-4bc0-babb-4fec0aa7c9ff\n",
54
- "b5c8da4c-f925-4cf1-8294-e43cd2c1a584@{ shape: rect, label: &quot;*Solution Component*\n",
55
- "**Analyse Patient Data**&quot;}\n",
56
- "b5c8da4c-f925-4cf1-8294-e43cd2c1a584--&gt;|&quot;Solution Linking Wire&quot;|48bc201e-3d4e-4beb-bdb2-0fd9d134f6d5\n",
57
- "7f5dca65-50b4-4103-9ac7-3a406a09047a@{ shape: subproc, label: &quot;*Solution Component*\n",
58
- "**Weekly Measurements Onboarding Pipeline**&quot;}\n",
59
- "07705e15-efff-4f80-8992-f04ac85e0ef1@{ shape: rect, label: &quot;*Solution Component*\n",
60
- "**Landing Folder Cataloguer**&quot;}\n",
61
- "07705e15-efff-4f80-8992-f04ac85e0ef1--&gt;|&quot;Solution Linking Wire&quot;|7f5dca65-50b4-4103-9ac7-3a406a09047a\n",
62
- "f37f3735-28a1-4e03-9ff5-3fe2f137f661--&gt;|&quot;Steward&quot;|7f5dca65-50b4-4103-9ac7-3a406a09047a\n",
63
- "b0290339-c96c-4b05-904f-12fc98e54e14@{ shape: trap-t, label: &quot;*Solution Actor Role*\n",
64
- "**Certified Data Engineer**&quot;}\n",
65
- "b0290339-c96c-4b05-904f-12fc98e54e14--&gt;|&quot;Steward&quot;|7f5dca65-50b4-4103-9ac7-3a406a09047a\n",
66
- "d48f579f-76d3-4c49-b1b4-575f5645a9d0@{ shape: lin-cyl, label: &quot;*Solution Component*\n",
67
- "**Treatment Validation Sandbox**&quot;}\n",
68
- "26c07ca4-3b8e-484b-812b-36c1ace4b275@{ shape: rect, label: &quot;*Solution Component*\n",
69
- "**Populate Sandbox**&quot;}\n",
70
- "26c07ca4-3b8e-484b-812b-36c1ace4b275--&gt;|&quot;Solution Linking Wire&quot;|d48f579f-76d3-4c49-b1b4-575f5645a9d0\n",
71
- "ee2bb773-e630-4cf9-bdf1-7c2dd64fe4ec@{ shape: processes, label: &quot;*Solution Component*\n",
72
- "**Hospital Processes**&quot;}\n",
73
- "a8bd84ca-0aae-4534-b0e8-87e8659467a6@{ shape: trap-t, label: &quot;*Solution Actor Role*\n",
74
- "**Clinical Trial Participating Hospital Coordinator**&quot;}\n",
75
- "a8bd84ca-0aae-4534-b0e8-87e8659467a6--&gt;|&quot;Coordinator on behalf of hospital&quot;|ee2bb773-e630-4cf9-bdf1-7c2dd64fe4ec\n",
76
- "30adaab5-8870-47a8-8ae9-facbf84cb05a@{ shape: trap-t, label: &quot;*Solution Actor Role*\n",
77
- "**Clinical Trial Participating Hospital**&quot;}\n",
78
- "30adaab5-8870-47a8-8ae9-facbf84cb05a--&gt;|&quot;Owner&quot;|ee2bb773-e630-4cf9-bdf1-7c2dd64fe4ec\n",
79
- "d48f579f-76d3-4c49-b1b4-575f5645a9d0--&gt;|&quot;Solution Linking Wire&quot;|b5c8da4c-f925-4cf1-8294-e43cd2c1a584\n",
80
- "ece17806-836c-4756-b3a2-2d12dde215f6@{ shape: trap-t, label: &quot;*Solution Actor Role*\n",
81
- "**New Treatment Data Scientist**&quot;}\n",
82
- "ece17806-836c-4756-b3a2-2d12dde215f6--&gt;|&quot;Data Analyser&quot;|b5c8da4c-f925-4cf1-8294-e43cd2c1a584\n",
83
- "0c757e35-8a42-4d5f-b01b-c72a6cea65cc@{ shape: trap-t, label: &quot;*Solution Actor Role*\n",
84
- "**New Treatment Researcher.**&quot;}\n",
85
- "0c757e35-8a42-4d5f-b01b-c72a6cea65cc--&gt;|&quot;Results Interpreter&quot;|b5c8da4c-f925-4cf1-8294-e43cd2c1a584\n",
86
- "e9c2f911-ffcb-40c6-aeee-8c4d43811576@{ shape: subproc, label: &quot;*Solution Component*\n",
87
- "**Onboard Hospital**&quot;}\n",
88
- "b0290339-c96c-4b05-904f-12fc98e54e14--&gt;|&quot;Initiator&quot;|e9c2f911-ffcb-40c6-aeee-8c4d43811576\n",
89
- "849b0b42-f465-452b-813c-477d6398e082@{ shape: subproc, label: &quot;*Solution Component*\n",
90
- "**Set up clinical trial**&quot;}\n",
91
- "f37f3735-28a1-4e03-9ff5-3fe2f137f661--&gt;|&quot;Initiator&quot;|849b0b42-f465-452b-813c-477d6398e082\n",
92
- "a5d4d638-6836-47e5-99d0-fdcde637e13f@{ shape: lin-cyl, label: &quot;*Solution Component*\n",
93
- "**Weekly Measurements Data Lake Folder**&quot;}\n",
94
- "7f5dca65-50b4-4103-9ac7-3a406a09047a--&gt;|&quot;Solution Linking Wire&quot;|a5d4d638-6836-47e5-99d0-fdcde637e13f\n",
95
- "0bf2547c-937c-41b6-814f-6284849271a1@{ shape: odd, label: &quot;*Solution Component*\n",
96
- "**Treatment Assessment Report Validation and Delivery**&quot;}\n",
97
- "72a86eec-9734-4bc0-babb-4fec0aa7c9ff--&gt;|&quot;Solution Linking Wire&quot;|0bf2547c-937c-41b6-814f-6284849271a1\n",
98
- "f6bc847b-868d-43cc-b767-41f5fe3e47d1@{ shape: trap-t, label: &quot;*Solution Actor Role*\n",
99
- "**Clinical Trial Sponsor**&quot;}\n",
100
- "f6bc847b-868d-43cc-b767-41f5fe3e47d1--&gt;|&quot;Reviewer&quot;|0bf2547c-937c-41b6-814f-6284849271a1\n",
101
- "a5d4d638-6836-47e5-99d0-fdcde637e13f--&gt;|&quot;Solution Linking Wire&quot;|26c07ca4-3b8e-484b-812b-36c1ace4b275\n",
102
- "fb32bef2-e79f-4893-b500-2e547f24d482@{ shape: subproc, label: &quot;*Solution Component*\n",
103
- "**Set up Data Lake Folder**&quot;}\n",
104
- "b0290339-c96c-4b05-904f-12fc98e54e14--&gt;|&quot;Initiator&quot;|fb32bef2-e79f-4893-b500-2e547f24d482\n",
105
- "1c150d6e-30cf-481c-9afb-3b06c9c9e78f@{ shape: lin-cyl, label: &quot;*Solution Component*\n",
106
- "**Hospital Landing Area Folder**&quot;}\n",
107
- "ee2bb773-e630-4cf9-bdf1-7c2dd64fe4ec--&gt;|&quot;Solution Linking Wire&quot;|1c150d6e-30cf-481c-9afb-3b06c9c9e78f\n",
108
- "1c150d6e-30cf-481c-9afb-3b06c9c9e78f--&gt;|&quot;Solution Linking Wire&quot;|07705e15-efff-4f80-8992-f04ac85e0ef1\n",
109
- "11c7c850-c67c-41cc-9423-d74db47cbf3a@{ shape: subproc, label: &quot;*Solution Component*\n",
110
- "**Nominate Hospital**&quot;}\n",
111
- "f37f3735-28a1-4e03-9ff5-3fe2f137f661--&gt;|&quot;Initiator&quot;|11c7c850-c67c-41cc-9423-d74db47cbf3a\n",
112
- "end\n",
113
- "style 48bc201e-3d4e-4beb-bdb2-0fd9d134f6d5 color:#FFFFFF, fill:#838cc7, stroke:#3079ab\n",
114
- "style ece17806-836c-4756-b3a2-2d12dde215f6 color:#FFFFFF, fill:#AA00FF, stroke:#E1D5E7\n",
115
- "style e9c2f911-ffcb-40c6-aeee-8c4d43811576 color:#FFFFFF, fill:#838cc7, stroke:#3079ab\n",
116
- "style a5d4d638-6836-47e5-99d0-fdcde637e13f color:#FFFFFF, fill:#838cc7, stroke:#3079ab\n",
117
- "style 0bf2547c-937c-41b6-814f-6284849271a1 color:#FFFFFF, fill:#838cc7, stroke:#3079ab\n",
118
- "style 30adaab5-8870-47a8-8ae9-facbf84cb05a color:#FFFFFF, fill:#AA00FF, stroke:#E1D5E7\n",
119
- "style b0290339-c96c-4b05-904f-12fc98e54e14 color:#FFFFFF, fill:#AA00FF, stroke:#E1D5E7\n",
120
- "style 26c07ca4-3b8e-484b-812b-36c1ace4b275 color:#FFFFFF, fill:#838cc7, stroke:#3079ab\n",
121
- "style 1c150d6e-30cf-481c-9afb-3b06c9c9e78f color:#FFFFFF, fill:#838cc7, stroke:#3079ab\n",
122
- "style 07705e15-efff-4f80-8992-f04ac85e0ef1 color:#FFFFFF, fill:#838cc7, stroke:#3079ab\n",
123
- "style a8bd84ca-0aae-4534-b0e8-87e8659467a6 color:#FFFFFF, fill:#AA00FF, stroke:#E1D5E7\n",
124
- "style 0c757e35-8a42-4d5f-b01b-c72a6cea65cc color:#FFFFFF, fill:#AA00FF, stroke:#E1D5E7\n",
125
- "style c4f8d707-7c85-4125-b5fd-c3257a2ef2ef color:#3079ab, fill:#b7c0c7, stroke:#3079ab\n",
126
- "style 37b8560d-84d4-434b-9b0d-105420fcc924 color:#FFFFFF, fill:#838cc7, stroke:#3079ab\n",
127
- "style 11c7c850-c67c-41cc-9423-d74db47cbf3a color:#FFFFFF, fill:#838cc7, stroke:#3079ab\n",
128
- "style fc2de77f-7320-48ea-8750-d434c6e870db color:#000000, fill:#F9F7ED, stroke:#b7c0c7\n",
129
- "style 849b0b42-f465-452b-813c-477d6398e082 color:#FFFFFF, fill:#838cc7, stroke:#3079ab\n",
130
- "style 7f5dca65-50b4-4103-9ac7-3a406a09047a color:#FFFFFF, fill:#838cc7, stroke:#3079ab\n",
131
- "style ee2bb773-e630-4cf9-bdf1-7c2dd64fe4ec color:#FFFFFF, fill:#838cc7, stroke:#3079ab\n",
132
- "style 72a86eec-9734-4bc0-babb-4fec0aa7c9ff color:#FFFFFF, fill:#838cc7, stroke:#3079ab\n",
133
- "style b5c8da4c-f925-4cf1-8294-e43cd2c1a584 color:#FFFFFF, fill:#838cc7, stroke:#3079ab\n",
134
- "style f6bc847b-868d-43cc-b767-41f5fe3e47d1 color:#FFFFFF, fill:#AA00FF, stroke:#E1D5E7\n",
135
- "style d48f579f-76d3-4c49-b1b4-575f5645a9d0 color:#FFFFFF, fill:#838cc7, stroke:#3079ab\n",
136
- "style f37f3735-28a1-4e03-9ff5-3fe2f137f661 color:#FFFFFF, fill:#AA00FF, stroke:#E1D5E7\n",
137
- "style fb32bef2-e79f-4893-b500-2e547f24d482 color:#FFFFFF, fill:#838cc7, stroke:#3079ab\n",
138
- " </div>\n",
139
- " </div>\n",
140
- " </div>\n",
141
- "\n",
142
- " <script>\n",
143
- " // Load Mermaid if it's not already loaded\n",
144
- " if (typeof mermaid === \"undefined\") {\n",
145
- " const script = document.createElement('script');\n",
146
- " script.src = \"https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js\";\n",
147
- " script.onload = () => renderMermaidGraph();\n",
148
- " document.head.appendChild(script);\n",
149
- " } else {\n",
150
- " // Mermaid already loaded, render the graph immediately\n",
151
- " renderMermaidGraph();\n",
152
- " }\n",
153
- "\n",
154
- " function renderMermaidGraph() {\n",
155
- " mermaid.initialize({ startOnLoad: true });\n",
156
- "\n",
157
- " const container = document.querySelector('.pan-zoom-container');\n",
158
- " const content = document.querySelector('.pan-zoom-content');\n",
159
- "\n",
160
- " let scale = 1; // Current zoom level\n",
161
- " let panX = 0; // X-axis pan\n",
162
- " let panY = 0; // Y-axis pan\n",
163
- " let isDragging = false;\n",
164
- " let startX, startY;\n",
165
- "\n",
166
- " // Apply transformations\n",
167
- " const applyTransform = () => {\n",
168
- " content.style.transform = `translate(${panX}px, ${panY}px) scale(${scale})`;\n",
169
- " };\n",
170
- "\n",
171
- " // Fit diagram to container\n",
172
- " const centerAndFitDiagram = () => {\n",
173
- " const containerRect = container.getBoundingClientRect();\n",
174
- " const rect = content.getBoundingClientRect();\n",
175
- "\n",
176
- " scale = Math.min(\n",
177
- " containerRect.width / rect.width,\n",
178
- " containerRect.height / rect.height\n",
179
- " );\n",
180
- "\n",
181
- " panX = (containerRect.width - rect.width * scale) / 2;\n",
182
- " panY = (containerRect.height - rect.height * scale) / 2;\n",
183
- "\n",
184
- " applyTransform();\n",
185
- " };\n",
186
- "\n",
187
- " // Zoom functionality\n",
188
- " container.addEventListener('wheel', function(event) {\n",
189
- " event.preventDefault();\n",
190
- " const zoomSpeed = 0.1;\n",
191
- " const previousScale = scale;\n",
192
- "\n",
193
- " if (event.deltaY < 0) {\n",
194
- " scale = Math.min(scale + zoomSpeed, 4);\n",
195
- " } else {\n",
196
- " scale = Math.max(scale - zoomSpeed, 0.5);\n",
197
- " }\n",
198
- "\n",
199
- " const zoomRatio = scale / previousScale;\n",
200
- " const clientRect = container.getBoundingClientRect();\n",
201
- "\n",
202
- " panX -= (event.clientX - clientRect.left) * (zoomRatio - 1);\n",
203
- " panY -= (event.clientY - clientRect.top) * (zoomRatio - 1);\n",
204
- "\n",
205
- " applyTransform();\n",
206
- " });\n",
207
- "\n",
208
- " // Drag functionality\n",
209
- " container.addEventListener('mousedown', function(event) {\n",
210
- " isDragging = true;\n",
211
- " startX = event.clientX - panX;\n",
212
- " startY = event.clientY - panY;\n",
213
- " container.style.cursor = \"grabbing\";\n",
214
- " });\n",
215
- "\n",
216
- " container.addEventListener('mousemove', function(event) {\n",
217
- " if (!isDragging) return;\n",
218
- "\n",
219
- " panX = event.clientX - startX;\n",
220
- " panY = event.clientY - startY;\n",
221
- "\n",
222
- " applyTransform();\n",
223
- " });\n",
224
- "\n",
225
- " container.addEventListener('mouseup', function() {\n",
226
- " isDragging = false;\n",
227
- " container.style.cursor = \"grab\";\n",
228
- " });\n",
229
- "\n",
230
- " container.addEventListener('mouseleave', function() {\n",
231
- " isDragging = false;\n",
232
- " container.style.cursor = \"grab\";\n",
233
- " });\n",
234
- "\n",
235
- " setTimeout(centerAndFitDiagram, 200);\n",
236
- " }\n",
237
- " </script>\n",
238
- " \"\"\""
239
- ],
240
- "id": "6f8c28251d1dfa9f",
241
- "outputs": [],
242
- "execution_count": null
243
- },
244
- {
245
- "metadata": {
246
- "ExecuteTime": {
247
- "end_time": "2025-02-07T01:29:56.716699Z",
248
- "start_time": "2025-02-07T01:29:56.414355Z"
249
- }
250
- },
251
- "cell_type": "code",
252
- "source": [
253
- "from pyegeria.egeria_tech_client import EgeriaTech\n",
254
- "from pyegeria.mermaid_utilities import render_mermaid, construct_mermaid_html, load_mermaid\n",
255
- "from IPython.display import display, HTML\n",
256
- "\n",
257
- "c = EgeriaTech('qs-view-server','https://localhost:9443','erinoverview','secret')\n",
258
- "c.create_egeria_bearer_token()"
259
- ],
260
- "id": "2adde043f97ae76a",
261
- "outputs": [
262
- {
263
- "data": {
264
- "text/plain": [
265
- "'eyJraWQiOiI1NTNhNTIzOC1iNDFjLTQyZTItOTM2YS1iMGE3NjQ5YWFlOWQiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJzZWxmIiwic3ViIjoiZXJpbm92ZXJ2aWV3IiwiZXhwIjoxNzM4ODk1Mzk2LCJpYXQiOjE3Mzg4OTE3OTYsImRpc3BsYXlOYW1lIjoiRXJpbiBPdmVydmlldyJ9.roGnq2SiZYJ2u60waVkpd2zKdK2PeEpVf0D7L4-UTQyHmlQKjpzRdqgBUXy7B2kcgN2iEKloNaYXimdM23mQdqZrCIWGu8g_-Wt5fdSIX1ZU8QTIKa6oXJt-fKZCGGpHrRArfuQNrGm1q_k64pQa98ABc1OZkr6Z9Uorboxr7q73rOzfS-RRuKnsxyM9xKUBBMLXfrKiz8NZVX82ao46ihi2_c7EJ4PofGM4aAY1A5mgB2zOvEms2JTb6LU3I_3aexgg9JRBBUsCqf-RcRfsSnG-MZN93ry7rZAVeVx2oXCtA9xvk8oZ5k3FCk0Zxi7Yv2qku-9Igdqto1tVXVmeCw'"
266
- ]
267
- },
268
- "execution_count": 1,
269
- "metadata": {},
270
- "output_type": "execute_result"
271
- }
272
- ],
273
- "execution_count": 1
274
- },
275
- {
276
- "metadata": {
277
- "ExecuteTime": {
278
- "end_time": "2025-02-07T01:30:00.016156Z",
279
- "start_time": "2025-02-07T01:29:57.976937Z"
280
- }
281
- },
282
- "cell_type": "code",
283
- "source": [
284
- "bp = c.find_solution_blueprints('Clinical')\n",
285
- "sc = c.find_information_supply_chains('Clinical')\n",
286
- "g1 = bp[0]['mermaidGraph']\n",
287
- "s1 = sc[0]['mermaidGraph']"
288
- ],
289
- "id": "1f48750fa8f194c9",
290
- "outputs": [],
291
- "execution_count": 2
292
- },
293
- {
294
- "metadata": {
295
- "ExecuteTime": {
296
- "end_time": "2025-02-07T01:30:01.757080Z",
297
- "start_time": "2025-02-07T01:30:01.754630Z"
298
- }
299
- },
300
- "cell_type": "code",
301
- "source": "print(s1)",
302
- "id": "ebc1d9451ffb8698",
303
- "outputs": [
304
- {
305
- "name": "stdout",
306
- "output_type": "stream",
307
- "text": [
308
- "---\n",
309
- "title: Information Supply Chain - Clinical Trial Subject Onboarding [39a035f0-3b2b-45fe-adb8-ee8a19581f6a]\n",
310
- "---\n",
311
- "flowchart TD\n",
312
- "%%{init: {\"flowchart\": {\"htmlLabels\": false}} }%%\n",
313
- "\n",
314
- "39a035f0-3b2b-45fe-adb8-ee8a19581f6a@{ shape: flip-tri, label: \"*Information Supply Chain*\n",
315
- "**Clinical Trial Subject Onboarding**\"}\n",
316
- "384f2dce-60be-4ad1-8993-1f3b6070e8ee@{ shape: text, label: \"*Description*\n",
317
- "**Delivering the data necessary to add a person as a subject in a clinical trial.**\"}\n",
318
- "39a035f0-3b2b-45fe-adb8-ee8a19581f6a~~~384f2dce-60be-4ad1-8993-1f3b6070e8ee\n",
319
- "1195927b-9aca-4716-8cd4-2e2f30a13bf2@{ shape: text, label: \"*Purpose*\n",
320
- "**Ensure patient subject is aware of the process and potential risks in participation.**\"}\n",
321
- "384f2dce-60be-4ad1-8993-1f3b6070e8ee~~~1195927b-9aca-4716-8cd4-2e2f30a13bf2\n",
322
- "df4be8f9-f3cc-4af3-89cf-df27b3575460@{ shape: text, label: \"*Purpose*\n",
323
- "**Ensure patient subject has given permission for Coco Pharmaceuticals to acquire, store and process their personal data needed for the clinical trial.**\"}\n",
324
- "1195927b-9aca-4716-8cd4-2e2f30a13bf2~~~df4be8f9-f3cc-4af3-89cf-df27b3575460\n",
325
- "5d8b5071-d707-437a-be43-6e4487e8b04d@{ shape: text, label: \"*Purpose*\n",
326
- "**Ensure incoming data is validated and catalogued.**\"}\n",
327
- "df4be8f9-f3cc-4af3-89cf-df27b3575460~~~5d8b5071-d707-437a-be43-6e4487e8b04d\n",
328
- "1da03445-e4d6-4769-9cf6-b8810822c943@{ shape: text, label: \"*Purpose*\n",
329
- "**Ensure data and process owners are informed of key milestones and issues requiring attention.**\"}\n",
330
- "5d8b5071-d707-437a-be43-6e4487e8b04d~~~1da03445-e4d6-4769-9cf6-b8810822c943\n",
331
- "614ca1a4-bc66-44ff-b9e5-34c1ba4edecc@{ shape: text, label: \"*Purpose*\n",
332
- "**Ensure the process of data capture and validation is transparent and auditable.**\"}\n",
333
- "1da03445-e4d6-4769-9cf6-b8810822c943~~~614ca1a4-bc66-44ff-b9e5-34c1ba4edecc\n",
334
- "style 39a035f0-3b2b-45fe-adb8-ee8a19581f6a color:#FFFFFF, fill:#004563, stroke:#b7c0c7\n",
335
- "style 1da03445-e4d6-4769-9cf6-b8810822c943 color:#000000, fill:#F9F7ED, stroke:#b7c0c7\n",
336
- "style 5d8b5071-d707-437a-be43-6e4487e8b04d color:#000000, fill:#F9F7ED, stroke:#b7c0c7\n",
337
- "style 384f2dce-60be-4ad1-8993-1f3b6070e8ee color:#000000, fill:#F9F7ED, stroke:#b7c0c7\n",
338
- "style 614ca1a4-bc66-44ff-b9e5-34c1ba4edecc color:#000000, fill:#F9F7ED, stroke:#b7c0c7\n",
339
- "style 1195927b-9aca-4716-8cd4-2e2f30a13bf2 color:#000000, fill:#F9F7ED, stroke:#b7c0c7\n",
340
- "style df4be8f9-f3cc-4af3-89cf-df27b3575460 color:#000000, fill:#F9F7ED, stroke:#b7c0c7\n",
341
- "\n"
342
- ]
343
- }
344
- ],
345
- "execution_count": 3
346
- },
347
- {
348
- "metadata": {
349
- "ExecuteTime": {
350
- "end_time": "2025-02-07T01:30:03.540438Z",
351
- "start_time": "2025-02-07T01:30:03.537172Z"
352
- }
353
- },
354
- "cell_type": "code",
355
- "source": "load_mermaid()",
356
- "id": "b83a08cff7bc5c8f",
357
- "outputs": [
358
- {
359
- "data": {
360
- "text/plain": [
361
- "<IPython.core.display.HTML object>"
362
- ],
363
- "text/html": [
364
- "\n",
365
- " <script src=\"https://unpkg.com/mermaid@11.4.1/dist/mermaid.min.js\"></script>\n",
366
- " <script>\n",
367
- " document.addEventListener('DOMContentLoaded', function() {\n",
368
- " mermaid.initialize({startOnLoad: true});\n",
369
- " });\n",
370
- " </script>\n",
371
- "\n",
372
- " "
373
- ]
374
- },
375
- "metadata": {},
376
- "output_type": "display_data"
377
- }
378
- ],
379
- "execution_count": 4
380
- },
381
- {
382
- "metadata": {
383
- "ExecuteTime": {
384
- "end_time": "2025-02-07T01:30:04.918794Z",
385
- "start_time": "2025-02-07T01:30:04.915949Z"
386
- }
387
- },
388
- "cell_type": "code",
389
- "source": "render_mermaid(s1)",
390
- "id": "245bb4b173d65a6a",
391
- "outputs": [
392
- {
393
- "data": {
394
- "text/plain": [
395
- "<IPython.core.display.HTML object>"
396
- ],
397
- "text/html": [
398
- "\n",
399
- " <div id=\"Information_Supply_Chain_-_Clinical_Trial_Subject_Onboarding_-container\" class=\"diagram-container\" \n",
400
- " style=\"width: 90%; max-width: 800px; margin: auto; padding: 20px; \n",
401
- " background: white; border: 1px solid #ddd; \n",
402
- " border-radius: 12px; position: relative;\">\n",
403
- " \n",
404
- " <h2 style=\"text-align: center; color: #007acc; margin-bottom: 16px;\">\n",
405
- " Information Supply Chain - Clinical Trial Subject Onboarding \n",
406
- " </h2>\n",
407
- " \n",
408
- " <div class=\"pan-zoom-container\" \n",
409
- " style=\"width: 100%; height: 500px; overflow: hidden; \n",
410
- " position: relative; background: #f9f9f9; \n",
411
- " border: 1px solid #ccc; cursor: grab;\">\n",
412
- " <div id=\"Information_Supply_Chain_-_Clinical_Trial_Subject_Onboarding_\" class=\"mermaid pan-zoom-content\" \n",
413
- " style=\"position: absolute; transform-origin: 0 0;\">\n",
414
- " flowchart TD\n",
415
- "%%{init: {&quot;flowchart&quot;: {&quot;htmlLabels&quot;: false}} }%%\n",
416
- "\n",
417
- "39a035f0-3b2b-45fe-adb8-ee8a19581f6a@{ shape: flip-tri, label: &quot;*Information Supply Chain*\n",
418
- "**Clinical Trial Subject Onboarding**&quot;}\n",
419
- "384f2dce-60be-4ad1-8993-1f3b6070e8ee@{ shape: text, label: &quot;*Description*\n",
420
- "**Delivering the data necessary to add a person as a subject in a clinical trial.**&quot;}\n",
421
- "39a035f0-3b2b-45fe-adb8-ee8a19581f6a~~~384f2dce-60be-4ad1-8993-1f3b6070e8ee\n",
422
- "1195927b-9aca-4716-8cd4-2e2f30a13bf2@{ shape: text, label: &quot;*Purpose*\n",
423
- "**Ensure patient subject is aware of the process and potential risks in participation.**&quot;}\n",
424
- "384f2dce-60be-4ad1-8993-1f3b6070e8ee~~~1195927b-9aca-4716-8cd4-2e2f30a13bf2\n",
425
- "df4be8f9-f3cc-4af3-89cf-df27b3575460@{ shape: text, label: &quot;*Purpose*\n",
426
- "**Ensure patient subject has given permission for Coco Pharmaceuticals to acquire, store and process their personal data needed for the clinical trial.**&quot;}\n",
427
- "1195927b-9aca-4716-8cd4-2e2f30a13bf2~~~df4be8f9-f3cc-4af3-89cf-df27b3575460\n",
428
- "5d8b5071-d707-437a-be43-6e4487e8b04d@{ shape: text, label: &quot;*Purpose*\n",
429
- "**Ensure incoming data is validated and catalogued.**&quot;}\n",
430
- "df4be8f9-f3cc-4af3-89cf-df27b3575460~~~5d8b5071-d707-437a-be43-6e4487e8b04d\n",
431
- "1da03445-e4d6-4769-9cf6-b8810822c943@{ shape: text, label: &quot;*Purpose*\n",
432
- "**Ensure data and process owners are informed of key milestones and issues requiring attention.**&quot;}\n",
433
- "5d8b5071-d707-437a-be43-6e4487e8b04d~~~1da03445-e4d6-4769-9cf6-b8810822c943\n",
434
- "614ca1a4-bc66-44ff-b9e5-34c1ba4edecc@{ shape: text, label: &quot;*Purpose*\n",
435
- "**Ensure the process of data capture and validation is transparent and auditable.**&quot;}\n",
436
- "1da03445-e4d6-4769-9cf6-b8810822c943~~~614ca1a4-bc66-44ff-b9e5-34c1ba4edecc\n",
437
- "style 39a035f0-3b2b-45fe-adb8-ee8a19581f6a color:#FFFFFF, fill:#004563, stroke:#b7c0c7\n",
438
- "style 1da03445-e4d6-4769-9cf6-b8810822c943 color:#000000, fill:#F9F7ED, stroke:#b7c0c7\n",
439
- "style 5d8b5071-d707-437a-be43-6e4487e8b04d color:#000000, fill:#F9F7ED, stroke:#b7c0c7\n",
440
- "style 384f2dce-60be-4ad1-8993-1f3b6070e8ee color:#000000, fill:#F9F7ED, stroke:#b7c0c7\n",
441
- "style 614ca1a4-bc66-44ff-b9e5-34c1ba4edecc color:#000000, fill:#F9F7ED, stroke:#b7c0c7\n",
442
- "style 1195927b-9aca-4716-8cd4-2e2f30a13bf2 color:#000000, fill:#F9F7ED, stroke:#b7c0c7\n",
443
- "style df4be8f9-f3cc-4af3-89cf-df27b3575460 color:#000000, fill:#F9F7ED, stroke:#b7c0c7\n",
444
- " </div>\n",
445
- " </div>\n",
446
- " </div>\n",
447
- "\n",
448
- " <script>\n",
449
- " (function() {\n",
450
- " // Check if Mermaid.js is already loaded; load if not\n",
451
- " if (typeof mermaid === \"undefined\") {\n",
452
- " const script = document.createElement('script');\n",
453
- " script.src = \"https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js\";\n",
454
- " script.onload = () => initializeMermaid();\n",
455
- " document.head.appendChild(script);\n",
456
- " } else {\n",
457
- " initializeMermaid();\n",
458
- " }\n",
459
- "\n",
460
- " function initializeMermaid() {\n",
461
- " // Re-render the Mermaid chart\n",
462
- " mermaid.initialize({ startOnLoad: true });\n",
463
- " mermaid.init(undefined, document.querySelector(\"#Information_Supply_Chain_-_Clinical_Trial_Subject_Onboarding_\"));\n",
464
- "\n",
465
- " // Add interactivity for pan and zoom\n",
466
- " const container = document.querySelector('.pan-zoom-container');\n",
467
- " const content = document.querySelector('.pan-zoom-content');\n",
468
- "\n",
469
- " let scale = 1; // Current zoom level\n",
470
- " let panX = 0; // X-axis pan\n",
471
- " let panY = 0; // Y-axis pan\n",
472
- " let isDragging = false;\n",
473
- " let startX, startY;\n",
474
- "\n",
475
- " // Apply Transformations\n",
476
- " const applyTransform = () => {\n",
477
- " content.style.transform = `translate(${panX}px, ${panY}px) scale(${scale})`;\n",
478
- " };\n",
479
- "\n",
480
- " // Center Diagram on Load\n",
481
- " const centerAndFitDiagram = () => {\n",
482
- " const containerRect = container.getBoundingClientRect();\n",
483
- " const rect = content.getBoundingClientRect();\n",
484
- "\n",
485
- " scale = Math.min(\n",
486
- " containerRect.width / rect.width,\n",
487
- " containerRect.height / rect.height\n",
488
- " );\n",
489
- "\n",
490
- " panX = (containerRect.width - rect.width * scale) / 2;\n",
491
- " panY = (containerRect.height - rect.height * scale) / 2;\n",
492
- "\n",
493
- " applyTransform();\n",
494
- " };\n",
495
- "\n",
496
- " setTimeout(centerAndFitDiagram, 200); // Allow rendering time\n",
497
- "\n",
498
- " // Enable Mouse-Wheel Zoom\n",
499
- " container.addEventListener('wheel', (event) => {\n",
500
- " event.preventDefault();\n",
501
- " const zoomSpeed = 0.1;\n",
502
- " const previousScale = scale;\n",
503
- "\n",
504
- " if (event.deltaY < 0) {\n",
505
- " scale = Math.min(scale + zoomSpeed, 4);\n",
506
- " } else {\n",
507
- " scale = Math.max(scale - zoomSpeed, 0.5);\n",
508
- " }\n",
509
- "\n",
510
- " const zoomRatio = scale / previousScale;\n",
511
- " const clientRect = container.getBoundingClientRect();\n",
512
- "\n",
513
- " panX -= (event.clientX - clientRect.left) * (zoomRatio - 1);\n",
514
- " panY -= (event.clientY - clientRect.top) * (zoomRatio - 1);\n",
515
- "\n",
516
- " applyTransform();\n",
517
- " });\n",
518
- "\n",
519
- " // Enable Drag-to-Pan\n",
520
- " container.addEventListener('mousedown', (event) => {\n",
521
- " isDragging = true;\n",
522
- " startX = event.clientX - panX;\n",
523
- " startY = event.clientY - panY;\n",
524
- " container.style.cursor = \"grabbing\";\n",
525
- " });\n",
526
- "\n",
527
- " container.addEventListener('mousemove', (event) => {\n",
528
- " if (!isDragging) return;\n",
529
- "\n",
530
- " panX = event.clientX - startX;\n",
531
- " panY = event.clientY - startY;\n",
532
- "\n",
533
- " applyTransform();\n",
534
- " });\n",
535
- "\n",
536
- " container.addEventListener('mouseup', () => {\n",
537
- " isDragging = false;\n",
538
- " container.style.cursor = \"grab\";\n",
539
- " });\n",
540
- "\n",
541
- " container.addEventListener('mouseleave', () => {\n",
542
- " isDragging = false;\n",
543
- " container.style.cursor = \"grab\";\n",
544
- " });\n",
545
- " }\n",
546
- " })();\n",
547
- " </script>\n",
548
- "\n",
549
- " "
550
- ]
551
- },
552
- "metadata": {},
553
- "output_type": "display_data"
554
- }
555
- ],
556
- "execution_count": 5
557
- },
558
- {
559
- "metadata": {},
560
- "cell_type": "code",
561
- "source": "print(construct_mermaid_html(s1))",
562
- "id": "81dfb284e894fa3",
563
- "outputs": [],
564
- "execution_count": null
565
- },
566
- {
567
- "metadata": {},
568
- "cell_type": "code",
569
- "source": "",
570
- "id": "dec9454145d5dc79",
571
- "outputs": [],
572
- "execution_count": null
573
- }
574
- ],
575
- "metadata": {
576
- "kernelspec": {
577
- "display_name": "Python 3",
578
- "language": "python",
579
- "name": "python3"
580
- },
581
- "language_info": {
582
- "codemirror_mode": {
583
- "name": "ipython",
584
- "version": 2
585
- },
586
- "file_extension": ".py",
587
- "mimetype": "text/x-python",
588
- "name": "python",
589
- "nbconvert_exporter": "python",
590
- "pygments_lexer": "ipython2",
591
- "version": "2.7.6"
592
- }
593
- },
594
- "nbformat": 4,
595
- "nbformat_minor": 5
596
- }