@sasindi/labmanagement 1.0.7 → 1.0.9
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.
- package/dist/100.js +1 -0
- package/dist/100.js.map +1 -0
- package/dist/515.js +1 -0
- package/dist/515.js.map +1 -0
- package/dist/529.js +1 -1
- package/dist/724.js +1 -0
- package/dist/724.js.map +1 -0
- package/dist/main.js +1 -1
- package/dist/openmrs-esm-labmanagement.js.buildmanifest.json +77 -52
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/labmanagement.component.tsx +12 -1
- package/src/labtestmaster.component.tsx +355 -0
- package/src/root.component.tsx +4 -0
- package/src/routes.json +5 -0
- package/dist/340.js +0 -1
- package/dist/340.js.map +0 -1
- package/dist/840.js +0 -1
- package/dist/840.js.map +0 -1
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"chunks": [
|
|
3
|
+
{
|
|
4
|
+
"type": "chunk",
|
|
5
|
+
"rendered": true,
|
|
6
|
+
"initial": false,
|
|
7
|
+
"entry": false,
|
|
8
|
+
"size": 53962,
|
|
9
|
+
"sizes": {
|
|
10
|
+
"javascript": 53962
|
|
11
|
+
},
|
|
12
|
+
"names": [],
|
|
13
|
+
"idHints": [],
|
|
14
|
+
"runtime": [
|
|
15
|
+
"@sasindi/labmanagement",
|
|
16
|
+
"main"
|
|
17
|
+
],
|
|
18
|
+
"files": [
|
|
19
|
+
"100.js"
|
|
20
|
+
],
|
|
21
|
+
"auxiliaryFiles": [
|
|
22
|
+
"100.js.map"
|
|
23
|
+
],
|
|
24
|
+
"hash": "f94afa5ea2dce609",
|
|
25
|
+
"childrenByOrder": {}
|
|
26
|
+
},
|
|
3
27
|
{
|
|
4
28
|
"type": "chunk",
|
|
5
29
|
"rendered": true,
|
|
@@ -141,30 +165,6 @@
|
|
|
141
165
|
"hash": "8827a9640a66d0ab",
|
|
142
166
|
"childrenByOrder": {}
|
|
143
167
|
},
|
|
144
|
-
{
|
|
145
|
-
"type": "chunk",
|
|
146
|
-
"rendered": true,
|
|
147
|
-
"initial": false,
|
|
148
|
-
"entry": false,
|
|
149
|
-
"size": 518,
|
|
150
|
-
"sizes": {
|
|
151
|
-
"javascript": 518
|
|
152
|
-
},
|
|
153
|
-
"names": [],
|
|
154
|
-
"idHints": [],
|
|
155
|
-
"runtime": [
|
|
156
|
-
"@sasindi/labmanagement",
|
|
157
|
-
"main"
|
|
158
|
-
],
|
|
159
|
-
"files": [
|
|
160
|
-
"340.js"
|
|
161
|
-
],
|
|
162
|
-
"auxiliaryFiles": [
|
|
163
|
-
"340.js.map"
|
|
164
|
-
],
|
|
165
|
-
"hash": "ed38777b267d7445",
|
|
166
|
-
"childrenByOrder": {}
|
|
167
|
-
},
|
|
168
168
|
{
|
|
169
169
|
"type": "chunk",
|
|
170
170
|
"rendered": false,
|
|
@@ -316,6 +316,33 @@
|
|
|
316
316
|
"hash": "e7f62638f188a200",
|
|
317
317
|
"childrenByOrder": {}
|
|
318
318
|
},
|
|
319
|
+
{
|
|
320
|
+
"type": "chunk",
|
|
321
|
+
"rendered": true,
|
|
322
|
+
"initial": false,
|
|
323
|
+
"entry": false,
|
|
324
|
+
"reason": "split chunk (cache group: defaultVendors)",
|
|
325
|
+
"size": 22672,
|
|
326
|
+
"sizes": {
|
|
327
|
+
"javascript": 22672
|
|
328
|
+
},
|
|
329
|
+
"names": [],
|
|
330
|
+
"idHints": [
|
|
331
|
+
"vendors"
|
|
332
|
+
],
|
|
333
|
+
"runtime": [
|
|
334
|
+
"@sasindi/labmanagement",
|
|
335
|
+
"main"
|
|
336
|
+
],
|
|
337
|
+
"files": [
|
|
338
|
+
"515.js"
|
|
339
|
+
],
|
|
340
|
+
"auxiliaryFiles": [
|
|
341
|
+
"515.js.map"
|
|
342
|
+
],
|
|
343
|
+
"hash": "7f1fb072c499bd40",
|
|
344
|
+
"childrenByOrder": {}
|
|
345
|
+
},
|
|
319
346
|
{
|
|
320
347
|
"type": "chunk",
|
|
321
348
|
"rendered": true,
|
|
@@ -361,7 +388,7 @@
|
|
|
361
388
|
"auxiliaryFiles": [
|
|
362
389
|
"529.js.map"
|
|
363
390
|
],
|
|
364
|
-
"hash": "
|
|
391
|
+
"hash": "24a1fc875c2764a6",
|
|
365
392
|
"childrenByOrder": {}
|
|
366
393
|
},
|
|
367
394
|
{
|
|
@@ -490,6 +517,30 @@
|
|
|
490
517
|
"hash": "15d3051c35b67e87",
|
|
491
518
|
"childrenByOrder": {}
|
|
492
519
|
},
|
|
520
|
+
{
|
|
521
|
+
"type": "chunk",
|
|
522
|
+
"rendered": true,
|
|
523
|
+
"initial": false,
|
|
524
|
+
"entry": false,
|
|
525
|
+
"size": 32023,
|
|
526
|
+
"sizes": {
|
|
527
|
+
"javascript": 32023
|
|
528
|
+
},
|
|
529
|
+
"names": [],
|
|
530
|
+
"idHints": [],
|
|
531
|
+
"runtime": [
|
|
532
|
+
"@sasindi/labmanagement",
|
|
533
|
+
"main"
|
|
534
|
+
],
|
|
535
|
+
"files": [
|
|
536
|
+
"724.js"
|
|
537
|
+
],
|
|
538
|
+
"auxiliaryFiles": [
|
|
539
|
+
"724.js.map"
|
|
540
|
+
],
|
|
541
|
+
"hash": "f5b528871a708426",
|
|
542
|
+
"childrenByOrder": {}
|
|
543
|
+
},
|
|
493
544
|
{
|
|
494
545
|
"type": "chunk",
|
|
495
546
|
"rendered": false,
|
|
@@ -562,32 +613,6 @@
|
|
|
562
613
|
"hash": "16e7031def07dc4e",
|
|
563
614
|
"childrenByOrder": {}
|
|
564
615
|
},
|
|
565
|
-
{
|
|
566
|
-
"type": "chunk",
|
|
567
|
-
"rendered": true,
|
|
568
|
-
"initial": false,
|
|
569
|
-
"entry": false,
|
|
570
|
-
"size": 30945,
|
|
571
|
-
"sizes": {
|
|
572
|
-
"javascript": 30945
|
|
573
|
-
},
|
|
574
|
-
"names": [],
|
|
575
|
-
"idHints": [
|
|
576
|
-
""
|
|
577
|
-
],
|
|
578
|
-
"runtime": [
|
|
579
|
-
"@sasindi/labmanagement",
|
|
580
|
-
"main"
|
|
581
|
-
],
|
|
582
|
-
"files": [
|
|
583
|
-
"840.js"
|
|
584
|
-
],
|
|
585
|
-
"auxiliaryFiles": [
|
|
586
|
-
"840.js.map"
|
|
587
|
-
],
|
|
588
|
-
"hash": "4cb7ada20ab61dbf",
|
|
589
|
-
"childrenByOrder": {}
|
|
590
|
-
},
|
|
591
616
|
{
|
|
592
617
|
"type": "chunk",
|
|
593
618
|
"rendered": true,
|
|
@@ -613,7 +638,7 @@
|
|
|
613
638
|
"auxiliaryFiles": [
|
|
614
639
|
"main.js.map"
|
|
615
640
|
],
|
|
616
|
-
"hash": "
|
|
641
|
+
"hash": "84059dae9db56d9f",
|
|
617
642
|
"childrenByOrder": {}
|
|
618
643
|
},
|
|
619
644
|
{
|
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","pages":[{"route":"labmanagement","component":"root","online":true,"offline":true},{"route":"addresults","component":"root","online":true,"offline":true},{"route":"approvetestresults","component":"root","online":true}],"extensions":[],"version":"1.0.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","pages":[{"route":"labmanagement","component":"root","online":true,"offline":true},{"route":"addresults","component":"root","online":true,"offline":true},{"route":"approvetestresults","component":"root","online":true},{"route":"labtestmaster","component":"root","online":true}],"extensions":[],"version":"1.0.9"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import { FlaskConical, ClipboardCheck, FileText, CheckSquare } from 'lucide-react';
|
|
3
|
+
import { FlaskConical, ClipboardCheck, FileText, CheckSquare, BookOpen } from 'lucide-react';
|
|
4
4
|
import styles from './labmanagement.scss';
|
|
5
5
|
|
|
6
6
|
const Labmanagement: React.FC = () => {
|
|
@@ -55,6 +55,17 @@ const Labmanagement: React.FC = () => {
|
|
|
55
55
|
themeOverlay: 'rgba(245, 158, 11, 0.06)',
|
|
56
56
|
themeFaded: 'rgba(245, 158, 11, 0.85)',
|
|
57
57
|
route: '/openmrs/spa/approvetestresults'
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: 'labtestmaster',
|
|
61
|
+
title: 'Lab Test Master',
|
|
62
|
+
icon: BookOpen,
|
|
63
|
+
themeColor: '#8b5cf6',
|
|
64
|
+
themeShadow: 'rgba(139, 92, 246, 0.19)',
|
|
65
|
+
themeShadowFaded: 'rgba(139, 92, 246, 0.25)',
|
|
66
|
+
themeOverlay: 'rgba(139, 92, 246, 0.06)',
|
|
67
|
+
themeFaded: 'rgba(139, 92, 246, 0.85)',
|
|
68
|
+
route: '/openmrs/spa/labtestmaster'
|
|
58
69
|
}
|
|
59
70
|
];
|
|
60
71
|
|
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import { ArrowLeft, Search, Plus, Trash2, CheckCircle2, AlertCircle, BookOpen } from 'lucide-react';
|
|
4
|
+
|
|
5
|
+
interface LabTest {
|
|
6
|
+
id: string;
|
|
7
|
+
testName: string;
|
|
8
|
+
shortCode: string;
|
|
9
|
+
category: string;
|
|
10
|
+
unit: string;
|
|
11
|
+
normalRange: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const LabTestMaster: React.FC = () => {
|
|
15
|
+
const { t } = useTranslation();
|
|
16
|
+
const [searchQuery, setSearchQuery] = useState('');
|
|
17
|
+
const [showForm, setShowForm] = useState(false);
|
|
18
|
+
const [saveStatus, setSaveStatus] = useState<'idle' | 'success' | 'error'>('idle');
|
|
19
|
+
const [testName, setTestName] = useState('');
|
|
20
|
+
const [shortCode, setShortCode] = useState('');
|
|
21
|
+
const [category, setCategory] = useState('');
|
|
22
|
+
const [unit, setUnit] = useState('');
|
|
23
|
+
const [normalRange, setNormalRange] = useState('');
|
|
24
|
+
|
|
25
|
+
const navigateTo = (url: string) => {
|
|
26
|
+
window.history.pushState({}, '', url);
|
|
27
|
+
window.dispatchEvent(new PopStateEvent('popstate'));
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const [tests, setTests] = useState<LabTest[]>([
|
|
31
|
+
{ id: '1', testName: 'Full Blood Count (FBC)', shortCode: 'FBC', category: 'Haematology', unit: 'cells/µL', normalRange: '4.5–11.0 × 10⁹/L' },
|
|
32
|
+
{ id: '2', testName: 'Serum Creatinine', shortCode: 'SCr', category: 'Biochemistry', unit: 'mg/dL', normalRange: '0.6–1.2 mg/dL' },
|
|
33
|
+
{ id: '3', testName: 'Lipid Profile', shortCode: 'LP', category: 'Biochemistry', unit: 'mg/dL', normalRange: 'LDL < 100 mg/dL' },
|
|
34
|
+
{ id: '4', testName: 'Urine Full Report', shortCode: 'UFR', category: 'Microbiology', unit: '—', normalRange: 'No abnormalities' },
|
|
35
|
+
{ id: '5', testName: 'Blood Glucose Fasting', shortCode: 'FBG', category: 'Biochemistry', unit: 'mg/dL', normalRange: '70–100 mg/dL' },
|
|
36
|
+
]);
|
|
37
|
+
|
|
38
|
+
const filteredTests = tests.filter(test =>
|
|
39
|
+
test.testName.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
|
40
|
+
test.shortCode.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
|
41
|
+
test.category.toLowerCase().includes(searchQuery.toLowerCase())
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
const handleAdd = (e: React.FormEvent) => {
|
|
45
|
+
e.preventDefault();
|
|
46
|
+
if (!testName.trim() || !shortCode.trim()) {
|
|
47
|
+
setSaveStatus('error');
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const newTest: LabTest = {
|
|
51
|
+
id: Date.now().toString(),
|
|
52
|
+
testName,
|
|
53
|
+
shortCode,
|
|
54
|
+
category,
|
|
55
|
+
unit,
|
|
56
|
+
normalRange
|
|
57
|
+
};
|
|
58
|
+
setTests(prev => [...prev, newTest]);
|
|
59
|
+
setSaveStatus('success');
|
|
60
|
+
setTimeout(() => {
|
|
61
|
+
setSaveStatus('idle');
|
|
62
|
+
setShowForm(false);
|
|
63
|
+
setTestName('');
|
|
64
|
+
setShortCode('');
|
|
65
|
+
setCategory('');
|
|
66
|
+
setUnit('');
|
|
67
|
+
setNormalRange('');
|
|
68
|
+
}, 1500);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const handleDelete = (id: string) => {
|
|
72
|
+
setTests(prev => prev.filter(t => t.id !== id));
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const categoryColors: Record<string, { bg: string; color: string }> = {
|
|
76
|
+
Haematology: { bg: '#fce7f3', color: '#be185d' },
|
|
77
|
+
Biochemistry: { bg: '#dbeafe', color: '#1d4ed8' },
|
|
78
|
+
Microbiology: { bg: '#d1fae5', color: '#065f46' },
|
|
79
|
+
Immunology: { bg: '#ede9fe', color: '#6d28d9' },
|
|
80
|
+
Radiology: { bg: '#fed7aa', color: '#b45309' },
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
const getCategoryStyle = (cat: string) =>
|
|
84
|
+
categoryColors[cat] ?? { bg: '#f1f5f9', color: '#475569' };
|
|
85
|
+
|
|
86
|
+
return (
|
|
87
|
+
<div style={{
|
|
88
|
+
padding: '40px 24px',
|
|
89
|
+
maxWidth: '1200px',
|
|
90
|
+
margin: '0 auto',
|
|
91
|
+
fontFamily: 'Inter, system-ui, sans-serif',
|
|
92
|
+
color: '#1e293b'
|
|
93
|
+
}}>
|
|
94
|
+
{/* Header */}
|
|
95
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '16px', marginBottom: '32px' }}>
|
|
96
|
+
<button
|
|
97
|
+
onClick={() => navigateTo('/openmrs/spa/labmanagement')}
|
|
98
|
+
style={{
|
|
99
|
+
cursor: 'pointer',
|
|
100
|
+
background: '#ffffff',
|
|
101
|
+
border: '1px solid #cbd5e1',
|
|
102
|
+
borderRadius: '12px',
|
|
103
|
+
width: '44px',
|
|
104
|
+
height: '44px',
|
|
105
|
+
display: 'flex',
|
|
106
|
+
alignItems: 'center',
|
|
107
|
+
justifyContent: 'center',
|
|
108
|
+
boxShadow: '0 1px 2px rgba(0,0,0,0.05)',
|
|
109
|
+
transition: 'all 0.2s'
|
|
110
|
+
}}
|
|
111
|
+
onMouseEnter={(e) => {
|
|
112
|
+
e.currentTarget.style.borderColor = '#94a3b8';
|
|
113
|
+
e.currentTarget.style.background = '#f8fafc';
|
|
114
|
+
}}
|
|
115
|
+
onMouseLeave={(e) => {
|
|
116
|
+
e.currentTarget.style.borderColor = '#cbd5e1';
|
|
117
|
+
e.currentTarget.style.background = '#ffffff';
|
|
118
|
+
}}
|
|
119
|
+
>
|
|
120
|
+
<ArrowLeft style={{ width: '20px', height: '20px', color: '#64748b' }} />
|
|
121
|
+
</button>
|
|
122
|
+
<div style={{ flex: 1 }}>
|
|
123
|
+
<h1 style={{ fontSize: '28px', fontWeight: '700', margin: 0, letterSpacing: '-0.02em' }}>
|
|
124
|
+
{t('labTestMasterHeading', 'Lab Test Master')}
|
|
125
|
+
</h1>
|
|
126
|
+
<p style={{ fontSize: '14px', color: '#64748b', margin: '4px 0 0 0' }}>
|
|
127
|
+
Manage the master list of laboratory tests, short codes, and reference ranges.
|
|
128
|
+
</p>
|
|
129
|
+
</div>
|
|
130
|
+
<button
|
|
131
|
+
onClick={() => { setShowForm(true); setSaveStatus('idle'); }}
|
|
132
|
+
style={{
|
|
133
|
+
cursor: 'pointer',
|
|
134
|
+
display: 'flex',
|
|
135
|
+
alignItems: 'center',
|
|
136
|
+
gap: '8px',
|
|
137
|
+
background: '#8b5cf6',
|
|
138
|
+
color: '#ffffff',
|
|
139
|
+
border: 'none',
|
|
140
|
+
borderRadius: '14px',
|
|
141
|
+
padding: '12px 20px',
|
|
142
|
+
fontWeight: '600',
|
|
143
|
+
fontSize: '14px',
|
|
144
|
+
boxShadow: '0 4px 12px rgba(139,92,246,0.25)',
|
|
145
|
+
transition: 'background 0.2s'
|
|
146
|
+
}}
|
|
147
|
+
onMouseEnter={(e) => e.currentTarget.style.background = '#7c3aed'}
|
|
148
|
+
onMouseLeave={(e) => e.currentTarget.style.background = '#8b5cf6'}
|
|
149
|
+
>
|
|
150
|
+
<Plus style={{ width: '18px', height: '18px' }} />
|
|
151
|
+
Add Test
|
|
152
|
+
</button>
|
|
153
|
+
</div>
|
|
154
|
+
|
|
155
|
+
{/* Add Test Form */}
|
|
156
|
+
{showForm && (
|
|
157
|
+
<div style={{
|
|
158
|
+
background: '#ffffff',
|
|
159
|
+
borderRadius: '24px',
|
|
160
|
+
padding: '28px',
|
|
161
|
+
border: '1px solid #e2e8f0',
|
|
162
|
+
boxShadow: '0 4px 16px rgba(0,0,0,0.06)',
|
|
163
|
+
marginBottom: '32px'
|
|
164
|
+
}}>
|
|
165
|
+
<h2 style={{ fontSize: '18px', fontWeight: '600', margin: '0 0 20px 0' }}>
|
|
166
|
+
New Lab Test
|
|
167
|
+
</h2>
|
|
168
|
+
<form onSubmit={handleAdd} style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '16px' }}>
|
|
169
|
+
<div>
|
|
170
|
+
<label style={{ display: 'block', fontSize: '13px', fontWeight: '600', color: '#475569', marginBottom: '6px' }}>
|
|
171
|
+
Test Name <span style={{ color: '#ef4444' }}>*</span>
|
|
172
|
+
</label>
|
|
173
|
+
<input
|
|
174
|
+
type="text"
|
|
175
|
+
placeholder="e.g. Full Blood Count"
|
|
176
|
+
value={testName}
|
|
177
|
+
onChange={(e) => setTestName(e.target.value)}
|
|
178
|
+
style={{ width: '100%', padding: '11px', borderRadius: '10px', border: '1px solid #cbd5e1', fontSize: '14px', outline: 'none' }}
|
|
179
|
+
/>
|
|
180
|
+
</div>
|
|
181
|
+
<div>
|
|
182
|
+
<label style={{ display: 'block', fontSize: '13px', fontWeight: '600', color: '#475569', marginBottom: '6px' }}>
|
|
183
|
+
Short Code <span style={{ color: '#ef4444' }}>*</span>
|
|
184
|
+
</label>
|
|
185
|
+
<input
|
|
186
|
+
type="text"
|
|
187
|
+
placeholder="e.g. FBC"
|
|
188
|
+
value={shortCode}
|
|
189
|
+
onChange={(e) => setShortCode(e.target.value)}
|
|
190
|
+
style={{ width: '100%', padding: '11px', borderRadius: '10px', border: '1px solid #cbd5e1', fontSize: '14px', outline: 'none' }}
|
|
191
|
+
/>
|
|
192
|
+
</div>
|
|
193
|
+
<div>
|
|
194
|
+
<label style={{ display: 'block', fontSize: '13px', fontWeight: '600', color: '#475569', marginBottom: '6px' }}>
|
|
195
|
+
Category
|
|
196
|
+
</label>
|
|
197
|
+
<select
|
|
198
|
+
value={category}
|
|
199
|
+
onChange={(e) => setCategory(e.target.value)}
|
|
200
|
+
style={{ width: '100%', padding: '11px', borderRadius: '10px', border: '1px solid #cbd5e1', fontSize: '14px', outline: 'none', background: '#fff' }}
|
|
201
|
+
>
|
|
202
|
+
<option value="">Select category</option>
|
|
203
|
+
<option value="Haematology">Haematology</option>
|
|
204
|
+
<option value="Biochemistry">Biochemistry</option>
|
|
205
|
+
<option value="Microbiology">Microbiology</option>
|
|
206
|
+
<option value="Immunology">Immunology</option>
|
|
207
|
+
<option value="Radiology">Radiology</option>
|
|
208
|
+
</select>
|
|
209
|
+
</div>
|
|
210
|
+
<div>
|
|
211
|
+
<label style={{ display: 'block', fontSize: '13px', fontWeight: '600', color: '#475569', marginBottom: '6px' }}>
|
|
212
|
+
Unit
|
|
213
|
+
</label>
|
|
214
|
+
<input
|
|
215
|
+
type="text"
|
|
216
|
+
placeholder="e.g. mg/dL"
|
|
217
|
+
value={unit}
|
|
218
|
+
onChange={(e) => setUnit(e.target.value)}
|
|
219
|
+
style={{ width: '100%', padding: '11px', borderRadius: '10px', border: '1px solid #cbd5e1', fontSize: '14px', outline: 'none' }}
|
|
220
|
+
/>
|
|
221
|
+
</div>
|
|
222
|
+
<div style={{ gridColumn: '1 / -1' }}>
|
|
223
|
+
<label style={{ display: 'block', fontSize: '13px', fontWeight: '600', color: '#475569', marginBottom: '6px' }}>
|
|
224
|
+
Normal Range
|
|
225
|
+
</label>
|
|
226
|
+
<input
|
|
227
|
+
type="text"
|
|
228
|
+
placeholder="e.g. 4.5–11.0 × 10⁹/L"
|
|
229
|
+
value={normalRange}
|
|
230
|
+
onChange={(e) => setNormalRange(e.target.value)}
|
|
231
|
+
style={{ width: '100%', padding: '11px', borderRadius: '10px', border: '1px solid #cbd5e1', fontSize: '14px', outline: 'none' }}
|
|
232
|
+
/>
|
|
233
|
+
</div>
|
|
234
|
+
|
|
235
|
+
{saveStatus === 'success' && (
|
|
236
|
+
<div style={{ gridColumn: '1 / -1', display: 'flex', alignItems: 'center', gap: '8px', background: '#f0fdf4', color: '#15803d', padding: '12px', borderRadius: '10px', fontSize: '14px' }}>
|
|
237
|
+
<CheckCircle2 style={{ width: '18px', height: '18px' }} />
|
|
238
|
+
Lab test added successfully!
|
|
239
|
+
</div>
|
|
240
|
+
)}
|
|
241
|
+
{saveStatus === 'error' && (
|
|
242
|
+
<div style={{ gridColumn: '1 / -1', display: 'flex', alignItems: 'center', gap: '8px', background: '#fef2f2', color: '#b91c1c', padding: '12px', borderRadius: '10px', fontSize: '14px' }}>
|
|
243
|
+
<AlertCircle style={{ width: '18px', height: '18px' }} />
|
|
244
|
+
Test Name and Short Code are required.
|
|
245
|
+
</div>
|
|
246
|
+
)}
|
|
247
|
+
|
|
248
|
+
<div style={{ gridColumn: '1 / -1', display: 'flex', gap: '12px', justifyContent: 'flex-end' }}>
|
|
249
|
+
<button
|
|
250
|
+
type="button"
|
|
251
|
+
onClick={() => setShowForm(false)}
|
|
252
|
+
style={{ cursor: 'pointer', background: '#f1f5f9', border: '1px solid #e2e8f0', borderRadius: '12px', padding: '11px 20px', fontWeight: '600', fontSize: '14px', color: '#475569', transition: 'background 0.2s' }}
|
|
253
|
+
onMouseEnter={(e) => e.currentTarget.style.background = '#e2e8f0'}
|
|
254
|
+
onMouseLeave={(e) => e.currentTarget.style.background = '#f1f5f9'}
|
|
255
|
+
>
|
|
256
|
+
Cancel
|
|
257
|
+
</button>
|
|
258
|
+
<button
|
|
259
|
+
type="submit"
|
|
260
|
+
style={{ cursor: 'pointer', background: '#8b5cf6', color: '#ffffff', border: 'none', borderRadius: '12px', padding: '11px 24px', fontWeight: '600', fontSize: '14px', boxShadow: '0 4px 12px rgba(139,92,246,0.2)', transition: 'background 0.2s' }}
|
|
261
|
+
onMouseEnter={(e) => e.currentTarget.style.background = '#7c3aed'}
|
|
262
|
+
onMouseLeave={(e) => e.currentTarget.style.background = '#8b5cf6'}
|
|
263
|
+
>
|
|
264
|
+
Save Test
|
|
265
|
+
</button>
|
|
266
|
+
</div>
|
|
267
|
+
</form>
|
|
268
|
+
</div>
|
|
269
|
+
)}
|
|
270
|
+
|
|
271
|
+
{/* Search & Table */}
|
|
272
|
+
<div style={{ background: '#ffffff', borderRadius: '24px', padding: '28px', border: '1px solid #e2e8f0', boxShadow: '0 4px 6px -1px rgba(0,0,0,0.05)' }}>
|
|
273
|
+
{/* Search */}
|
|
274
|
+
<div style={{ position: 'relative', marginBottom: '24px', maxWidth: '400px' }}>
|
|
275
|
+
<input
|
|
276
|
+
type="text"
|
|
277
|
+
placeholder="Search by name, code or category..."
|
|
278
|
+
value={searchQuery}
|
|
279
|
+
onChange={(e) => setSearchQuery(e.target.value)}
|
|
280
|
+
style={{ width: '100%', padding: '12px 16px 12px 44px', borderRadius: '14px', border: '1px solid #cbd5e1', fontSize: '14px', outline: 'none' }}
|
|
281
|
+
/>
|
|
282
|
+
<Search style={{ position: 'absolute', left: '16px', top: '50%', transform: 'translateY(-50%)', width: '18px', height: '18px', color: '#94a3b8' }} />
|
|
283
|
+
</div>
|
|
284
|
+
|
|
285
|
+
{/* Table */}
|
|
286
|
+
<div style={{ overflowX: 'auto' }}>
|
|
287
|
+
<table style={{ width: '100%', borderCollapse: 'collapse', fontSize: '14px' }}>
|
|
288
|
+
<thead>
|
|
289
|
+
<tr style={{ borderBottom: '2px solid #f1f5f9' }}>
|
|
290
|
+
{['Test Name', 'Short Code', 'Category', 'Unit', 'Normal Range', ''].map((h) => (
|
|
291
|
+
<th key={h} style={{ textAlign: 'left', padding: '12px 16px', fontWeight: '600', color: '#64748b', fontSize: '12px', textTransform: 'uppercase', letterSpacing: '0.05em' }}>
|
|
292
|
+
{h}
|
|
293
|
+
</th>
|
|
294
|
+
))}
|
|
295
|
+
</tr>
|
|
296
|
+
</thead>
|
|
297
|
+
<tbody>
|
|
298
|
+
{filteredTests.map((test, idx) => {
|
|
299
|
+
const catStyle = getCategoryStyle(test.category);
|
|
300
|
+
return (
|
|
301
|
+
<tr
|
|
302
|
+
key={test.id}
|
|
303
|
+
style={{ borderBottom: '1px solid #f8fafc', background: idx % 2 === 0 ? '#ffffff' : '#fafafa', transition: 'background 0.15s' }}
|
|
304
|
+
onMouseEnter={(e) => (e.currentTarget.style.background = '#f1f5f9')}
|
|
305
|
+
onMouseLeave={(e) => (e.currentTarget.style.background = idx % 2 === 0 ? '#ffffff' : '#fafafa')}
|
|
306
|
+
>
|
|
307
|
+
<td style={{ padding: '14px 16px', fontWeight: '500', color: '#1e293b' }}>
|
|
308
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '10px' }}>
|
|
309
|
+
<div style={{ width: '36px', height: '36px', borderRadius: '10px', background: '#f3e8ff', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
|
310
|
+
<BookOpen style={{ width: '18px', height: '18px', color: '#8b5cf6' }} />
|
|
311
|
+
</div>
|
|
312
|
+
{test.testName}
|
|
313
|
+
</div>
|
|
314
|
+
</td>
|
|
315
|
+
<td style={{ padding: '14px 16px' }}>
|
|
316
|
+
<span style={{ fontFamily: 'monospace', fontWeight: '600', color: '#8b5cf6', background: '#f3e8ff', padding: '3px 8px', borderRadius: '6px', fontSize: '13px' }}>
|
|
317
|
+
{test.shortCode}
|
|
318
|
+
</span>
|
|
319
|
+
</td>
|
|
320
|
+
<td style={{ padding: '14px 16px' }}>
|
|
321
|
+
<span style={{ background: catStyle.bg, color: catStyle.color, padding: '3px 10px', borderRadius: '6px', fontSize: '12px', fontWeight: '600' }}>
|
|
322
|
+
{test.category || '—'}
|
|
323
|
+
</span>
|
|
324
|
+
</td>
|
|
325
|
+
<td style={{ padding: '14px 16px', color: '#475569' }}>{test.unit || '—'}</td>
|
|
326
|
+
<td style={{ padding: '14px 16px', color: '#475569' }}>{test.normalRange || '—'}</td>
|
|
327
|
+
<td style={{ padding: '14px 16px' }}>
|
|
328
|
+
<button
|
|
329
|
+
onClick={() => handleDelete(test.id)}
|
|
330
|
+
style={{ cursor: 'pointer', background: '#fef2f2', border: 'none', borderRadius: '8px', padding: '6px 8px', display: 'flex', alignItems: 'center', transition: 'background 0.2s' }}
|
|
331
|
+
onMouseEnter={(e) => e.currentTarget.style.background = '#fee2e2'}
|
|
332
|
+
onMouseLeave={(e) => e.currentTarget.style.background = '#fef2f2'}
|
|
333
|
+
>
|
|
334
|
+
<Trash2 style={{ width: '16px', height: '16px', color: '#ef4444' }} />
|
|
335
|
+
</button>
|
|
336
|
+
</td>
|
|
337
|
+
</tr>
|
|
338
|
+
);
|
|
339
|
+
})}
|
|
340
|
+
{filteredTests.length === 0 && (
|
|
341
|
+
<tr>
|
|
342
|
+
<td colSpan={6} style={{ textAlign: 'center', padding: '60px', color: '#94a3b8' }}>
|
|
343
|
+
No lab tests found.
|
|
344
|
+
</td>
|
|
345
|
+
</tr>
|
|
346
|
+
)}
|
|
347
|
+
</tbody>
|
|
348
|
+
</table>
|
|
349
|
+
</div>
|
|
350
|
+
</div>
|
|
351
|
+
</div>
|
|
352
|
+
);
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
export default LabTestMaster;
|
package/src/root.component.tsx
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BrowserRouter, Routes, Route } from 'react-router-dom';
|
|
3
3
|
import Labmanagement from './labmanagement.component';
|
|
4
|
+
import AddResults from './addresults.component';
|
|
5
|
+
import LabTestMaster from './labtestmaster.component';
|
|
4
6
|
|
|
5
7
|
const Root: React.FC = () => (
|
|
6
8
|
<BrowserRouter basename={window.getOpenmrsSpaBase()}>
|
|
7
9
|
<Routes>
|
|
8
10
|
<Route path="labmanagement" element={<Labmanagement />} />
|
|
11
|
+
<Route path="addresults" element={<AddResults />} />
|
|
12
|
+
<Route path="labtestmaster" element={<LabTestMaster />} />
|
|
9
13
|
</Routes>
|
|
10
14
|
</BrowserRouter>
|
|
11
15
|
);
|
package/src/routes.json
CHANGED
package/dist/340.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_sasindi_labmanagement=globalThis.webpackChunk_sasindi_labmanagement||[]).push([["340"],{1759(e,a,n){n.r(a),n.d(a,{default:()=>r});var t=n(8670),l=n.n(t),s=n(1969),m=n(8731);let r=function(){return l().createElement(s.BrowserRouter,{basename:window.getOpenmrsSpaBase()},l().createElement(s.Routes,null,l().createElement(s.Route,{path:"labmanagement",element:l().createElement(m.default,null)})))}}}]);
|
package/dist/340.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"340.js","sources":["webpack://@sasindi/labmanagement/./src/root.component.tsx"],"names":["BrowserRouter","window","Routes","Route","Labmanagement"],"mappings":"mNAYA,MARuB,W,OACrB,kBAACA,EAAAA,aAAaA,CAAAA,CAAC,SAAUC,OAAO,iBAAiB,E,EAC/C,kBAACC,EAAAA,MAAMA,CAAAA,KACL,kBAACC,EAAAA,KAAKA,CAAAA,CAAC,KAAK,gBAAgB,QAAS,kBAACC,EAAAA,OAAaA,CAAAA,K"}
|
package/dist/840.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_sasindi_labmanagement=globalThis.webpackChunk_sasindi_labmanagement||[]).push([["840"],{3401(e,a,n){n.d(a,{A:()=>A});var t=n(4991),r=n.n(t),o=n(6314),i=n.n(o)()(r());i.push([e.id,'.-labmanagement__labmanagement__container___79H24{min-height:100vh;background:#f8fafc;padding:40px 20px;font-family:"Inter",system-ui,sans-serif}.-labmanagement__labmanagement__header___06sMc{max-width:1200px;margin:0 auto 32px auto;border-bottom:1px solid #e2e8f0;padding-bottom:20px}.-labmanagement__labmanagement__heading___zAJ4V{font-size:28px;font-weight:700;color:#0f172a;margin-bottom:6px;letter-spacing:-0.02em}.-labmanagement__labmanagement__subtitle___5al-c{font-size:15px;color:#64748b;margin:0}.-labmanagement__labmanagement__grid___NJOJ\\+{max-width:1200px;margin:0 auto;display:grid;grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));gap:24px}.-labmanagement__labmanagement__card___Q7OI\\+{background:#f9fafb;border-radius:20px;padding:24px;border:2px solid #e5e7eb;box-shadow:0 2px 8px rgba(0,0,0,.05);transition:all .3s ease;height:100%;display:flex;flex-direction:column;align-items:center;gap:16px;position:relative;overflow:hidden;cursor:pointer}.-labmanagement__labmanagement__card___Q7OI\\+:hover{background:#fff;border-color:var(--card-theme-color);box-shadow:0 20px 40px var(--card-theme-shadow);transform:translateY(-8px) scale(1.02)}.-labmanagement__labmanagement__card___Q7OI\\+:hover .-labmanagement__labmanagement__cardHoverOverlay___jbcaX{opacity:1}.-labmanagement__labmanagement__card___Q7OI\\+:hover .-labmanagement__labmanagement__iconContainer___NcWvj{background:var(--card-theme-color);transform:rotate(5deg) scale(1.1)}.-labmanagement__labmanagement__card___Q7OI\\+:hover .-labmanagement__labmanagement__indicator___y7afY{width:100%}.-labmanagement__labmanagement__cardHoverOverlay___jbcaX{position:absolute;inset:0;background:linear-gradient(135deg, var(--card-theme-overlay), transparent);pointer-events:none;opacity:0;transition:opacity .3s ease}.-labmanagement__labmanagement__iconContainer___NcWvj{width:64px;height:64px;background:var(--card-theme-color-faded);border-radius:16px;display:flex;align-items:center;justify-content:center;box-shadow:0 8px 24px var(--card-theme-shadow-faded);transition:all .3s;color:#fff;position:relative;z-index:1}.-labmanagement__labmanagement__titleContainer___j4GoE{text-align:center;position:relative;z-index:1}.-labmanagement__labmanagement__cardTitle___JkMz\\+{font-weight:600;font-size:15px;color:#1f2937;margin:0;line-height:1.3}.-labmanagement__labmanagement__indicator___y7afY{height:3px;width:0%;background:var(--card-theme-color);border-radius:2px;position:absolute;bottom:0;left:0;z-index:1;transition:width .3s ease}',"",{version:3,sources:["webpack://./src/labmanagement.scss"],names:[],mappings:"AAAA,kDACE,gBAAA,CACA,kBAAA,CACA,iBAAA,CACA,wCAAA,CAGF,+CACE,gBAAA,CACA,uBAAA,CACA,+BAAA,CACA,mBAAA,CAGF,gDACE,cAAA,CACA,eAAA,CACA,aAAA,CACA,iBAAA,CACA,sBAAA,CAGF,iDACE,cAAA,CACA,aAAA,CACA,QAAA,CAGF,8CACE,gBAAA,CACA,aAAA,CACA,YAAA,CACA,2DAAA,CACA,QAAA,CAGF,8CACE,kBAAA,CACA,kBAAA,CACA,YAAA,CACA,wBAAA,CACA,oCAAA,CACA,uBAAA,CACA,WAAA,CACA,YAAA,CACA,qBAAA,CACA,kBAAA,CACA,QAAA,CACA,iBAAA,CACA,eAAA,CACA,cAAA,CAEA,oDACE,eAAA,CACA,oCAAA,CACA,+CAAA,CACA,sCAAA,CAEA,6GACE,SAAA,CAGF,0GACE,kCAAA,CACA,iCAAA,CAGF,sGACE,UAAA,CAKN,yDACE,iBAAA,CACA,OAAA,CACA,0EAAA,CACA,mBAAA,CACA,SAAA,CACA,2BAAA,CAGF,sDACE,UAAA,CACA,WAAA,CACA,wCAAA,CACA,kBAAA,CACA,YAAA,CACA,kBAAA,CACA,sBAAA,CACA,oDAAA,CACA,kBAAA,CACA,UAAA,CACA,iBAAA,CACA,SAAA,CAGF,uDACE,iBAAA,CACA,iBAAA,CACA,SAAA,CAGF,mDACE,eAAA,CACA,cAAA,CACA,aAAA,CACA,QAAA,CACA,eAAA,CAGF,kDACE,UAAA,CACA,QAAA,CACA,kCAAA,CACA,iBAAA,CACA,iBAAA,CACA,QAAA,CACA,MAAA,CACA,SAAA,CACA,yBAAA",sourcesContent:[".container {\n min-height: 100vh;\n background: #f8fafc;\n padding: 40px 20px;\n font-family: 'Inter', system-ui, sans-serif;\n}\n\n.header {\n max-width: 1200px;\n margin: 0 auto 32px auto;\n border-bottom: 1px solid #e2e8f0;\n padding-bottom: 20px;\n}\n\n.heading {\n font-size: 28px;\n font-weight: 700;\n color: #0f172a;\n margin-bottom: 6px;\n letter-spacing: -0.02em;\n}\n\n.subtitle {\n font-size: 15px;\n color: #64748b;\n margin: 0;\n}\n\n.grid {\n max-width: 1200px;\n margin: 0 auto;\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));\n gap: 24px;\n}\n\n.card {\n background: #f9fafb;\n border-radius: 20px;\n padding: 24px;\n border: 2px solid #e5e7eb;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);\n transition: all 0.3s ease;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n position: relative;\n overflow: hidden;\n cursor: pointer;\n\n &:hover {\n background: #ffffff;\n border-color: var(--card-theme-color);\n box-shadow: 0 20px 40px var(--card-theme-shadow);\n transform: translateY(-8px) scale(1.02);\n\n .cardHoverOverlay {\n opacity: 1;\n }\n\n .iconContainer {\n background: var(--card-theme-color);\n transform: rotate(5deg) scale(1.1);\n }\n\n .indicator {\n width: 100%;\n }\n }\n}\n\n.cardHoverOverlay {\n position: absolute;\n inset: 0;\n background: linear-gradient(135deg, var(--card-theme-overlay), transparent);\n pointer-events: none;\n opacity: 0;\n transition: opacity 0.3s ease;\n}\n\n.iconContainer {\n width: 64px;\n height: 64px;\n background: var(--card-theme-color-faded);\n border-radius: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0 8px 24px var(--card-theme-shadow-faded);\n transition: all 0.3s;\n color: #ffffff;\n position: relative;\n z-index: 1;\n}\n\n.titleContainer {\n text-align: center;\n position: relative;\n z-index: 1;\n}\n\n.cardTitle {\n font-weight: 600;\n font-size: 15px;\n color: #1f2937;\n margin: 0;\n line-height: 1.3;\n}\n\n.indicator {\n height: 3px;\n width: 0%;\n background: var(--card-theme-color);\n border-radius: 2px;\n position: absolute;\n bottom: 0;\n left: 0;\n z-index: 1;\n transition: width 0.3s ease;\n}"],sourceRoot:""}]),i.locals={container:"-labmanagement__labmanagement__container___79H24",header:"-labmanagement__labmanagement__header___06sMc",heading:"-labmanagement__labmanagement__heading___zAJ4V",subtitle:"-labmanagement__labmanagement__subtitle___5al-c",grid:"-labmanagement__labmanagement__grid___NJOJ+",card:"-labmanagement__labmanagement__card___Q7OI+",cardHoverOverlay:"-labmanagement__labmanagement__cardHoverOverlay___jbcaX",iconContainer:"-labmanagement__labmanagement__iconContainer___NcWvj",indicator:"-labmanagement__labmanagement__indicator___y7afY",titleContainer:"-labmanagement__labmanagement__titleContainer___j4GoE",cardTitle:"-labmanagement__labmanagement__cardTitle___JkMz+"};let A=i},6314(e){e.exports=function(e){var a=[];return a.toString=function(){return this.map(function(a){var n=e(a);return a[2]?"@media ".concat(a[2]," {").concat(n,"}"):n}).join("")},a.i=function(e,n,t){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(t)for(var o=0;o<this.length;o++){var i=this[o][0];null!=i&&(r[i]=!0)}for(var A=0;A<e.length;A++){var l=[].concat(e[A]);t&&r[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),a.push(l))}},a}},4991(e){function a(e,a){(null==a||a>e.length)&&(a=e.length);for(var n=0,t=Array(a);n<a;n++)t[n]=e[n];return t}e.exports=function(e){var n=function(e){if(Array.isArray(e))return e}(e)||function(e){var a,n,t=e&&("u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=t){var r=[],o=!0,i=!1;try{for(t=t.call(e);!(o=(a=t.next()).done)&&(r.push(a.value),4!==r.length);o=!0);}catch(e){i=!0,n=e}finally{try{o||null==t.return||t.return()}finally{if(i)throw n}}return r}}(e)||function(e){if(e){if("string"==typeof e)return a(e,4);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,4)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),t=n[1],r=n[3];if(!r)return t;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(r))));return[t].concat(r.sources.map(function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")})).concat(["/*# ".concat("sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o)," */")]).join("\n")}return[t].join("\n")}},5072(e){var a=[];function n(e){for(var n=-1,t=0;t<a.length;t++)if(a[t].identifier===e){n=t;break}return n}function t(e,t){for(var r={},o=[],i=0;i<e.length;i++){var A=e[i],l=t.base?A[0]+t.base:A[0],s=r[l]||0,c="".concat(l," ").concat(s);r[l]=s+1;var d=n(c),m={css:A[1],media:A[2],sourceMap:A[3],supports:A[4],layer:A[5]};if(-1!==d)a[d].references++,a[d].updater(m);else{var p=function(e,a){var n=a.domAPI(a);return n.update(e),function(a){a?(a.css!==e.css||a.media!==e.media||a.sourceMap!==e.sourceMap||a.supports!==e.supports||a.layer!==e.layer)&&n.update(e=a):n.remove()}}(m,t);t.byIndex=i,a.splice(i,0,{identifier:c,updater:p,references:1})}o.push(c)}return o}e.exports=function(e,r){var o=t(e=e||[],r=r||{});return function(e){e=e||[];for(var i=0;i<o.length;i++){var A=n(o[i]);a[A].references--}for(var l=t(e,r),s=0;s<o.length;s++){var c=n(o[s]);0===a[c].references&&(a[c].updater(),a.splice(c,1))}o=l}}},7659(e){var a={};e.exports=function(e,n){var t=function(e){if(void 0===a[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}a[e]=n}return a[e]}(e);if(!t)throw Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");t.appendChild(n)}},540(e){e.exports=function(e){var a=document.createElement("style");return e.setAttributes(a,e.attributes),e.insert(a,e.options),a}},5056(e,a,n){e.exports=function(e){var a=n.nc;a&&e.setAttribute("nonce",a)}},7825(e){e.exports=function(e){if("u"<typeof document)return{update:function(){},remove:function(){}};var a=e.insertStyleElement(e);return{update:function(n){var t,r,o;t="",n.supports&&(t+="@supports (".concat(n.supports,") {")),n.media&&(t+="@media ".concat(n.media," {")),(r=void 0!==n.layer)&&(t+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),t+=n.css,r&&(t+="}"),n.media&&(t+="}"),n.supports&&(t+="}"),(o=n.sourceMap)&&"u">typeof btoa&&(t+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleTagTransform(t,a,e.options)},remove:function(){var e;null===(e=a).parentNode||e.parentNode.removeChild(e)}}}},1113(e){e.exports=function(e,a){if(a.styleSheet)a.styleSheet.cssText=e;else{for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(document.createTextNode(e))}}},8731(e,a,n){n.r(a),n.d(a,{default:()=>M});var t=n(8670),r=n.n(t),o=n(4700);let i=(...e)=>e.filter((e,a,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===a).join(" ").trim(),A=e=>{let a=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,a,n)=>n?n.toUpperCase():a.toLowerCase());return a.charAt(0).toUpperCase()+a.slice(1)};var l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let s=(0,t.createContext)({}),c=(0,t.forwardRef)(({color:e,size:a,strokeWidth:n,absoluteStrokeWidth:r,className:o="",children:A,iconNode:c,...d},m)=>{let{size:p=24,strokeWidth:h=2,absoluteStrokeWidth:_=!1,color:u="currentColor",className:C=""}=(0,t.useContext)(s)??{},g=r??_?24*Number(n??h)/Number(a??p):n??h;return(0,t.createElement)("svg",{ref:m,...l,width:a??p??l.width,height:a??p??l.height,stroke:e??u,strokeWidth:g,className:i("lucide",C,o),...!A&&!(e=>{for(let a in e)if(a.startsWith("aria-")||"role"===a||"title"===a)return!0;return!1})(d)&&{"aria-hidden":"true"},...d},[...c.map(([e,a])=>(0,t.createElement)(e,a)),...Array.isArray(A)?A:[A]])}),d=(e,a)=>{let n=(0,t.forwardRef)(({className:n,...r},o)=>(0,t.createElement)(c,{ref:o,iconNode:a,className:i(`lucide-${A(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r}));return n.displayName=A(e),n},m=d("flask-conical",[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]]),p=d("clipboard-check",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]),h=d("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),_=d("square-check-big",[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);var u=n(5072),C=n.n(u),g=n(7825),f=n.n(g),b=n(7659),v=n.n(b),x=n(5056),y=n.n(x),w=n(540),k=n.n(w),E=n(1113),S=n.n(E),B=n(3401),O={};O.styleTagTransform=S(),O.setAttributes=y(),O.insert=v().bind(null,"head"),O.domAPI=f(),O.insertStyleElement=k(),C()(B.A,O);let N=B.A&&B.A.locals?B.A.locals:void 0,M=function(){var e=(0,o.useTranslation)().t,a=function(e){window.history.pushState({},"",e),window.dispatchEvent(new PopStateEvent("popstate"))};return r().createElement("div",{className:N.container},r().createElement("div",{className:N.grid},[{id:"samplecollection",title:"Sample Collection",icon:m,themeColor:"#06b6d4",themeShadow:"rgba(6, 182, 212, 0.19)",themeShadowFaded:"rgba(6, 182, 212, 0.25)",themeOverlay:"rgba(6, 182, 212, 0.06)",themeFaded:"rgba(6, 182, 212, 0.85)",route:"/openmrs/spa/samplecollection"},{id:"receivesamples",title:"Receive Samples",icon:p,themeColor:"#4f46e5",themeShadow:"rgba(79, 70, 229, 0.19)",themeShadowFaded:"rgba(79, 70, 229, 0.25)",themeOverlay:"rgba(79, 70, 229, 0.06)",themeFaded:"rgba(79, 70, 229, 0.85)",route:"/openmrs/spa/receivesamples"},{id:"addresults",title:"Add Results",icon:h,themeColor:"#10b981",themeShadow:"rgba(16, 185, 129, 0.19)",themeShadowFaded:"rgba(16, 185, 129, 0.25)",themeOverlay:"rgba(16, 185, 129, 0.06)",themeFaded:"rgba(16, 185, 129, 0.85)",route:"/openmrs/spa/addresults"},{id:"approvetestresults",title:"Test Results Approval",icon:_,themeColor:"#f59e0b",themeShadow:"rgba(245, 158, 11, 0.19)",themeShadowFaded:"rgba(245, 158, 11, 0.25)",themeOverlay:"rgba(245, 158, 11, 0.06)",themeFaded:"rgba(245, 158, 11, 0.85)",route:"/openmrs/spa/approvetestresults"}].map(function(n){var t=n.icon;return r().createElement("div",{key:n.id,onClick:function(){return a(n.route)},className:N.card,style:{"--card-theme-color":n.themeColor,"--card-theme-shadow":n.themeShadow,"--card-theme-shadow-faded":n.themeShadowFaded,"--card-theme-overlay":n.themeOverlay,"--card-theme-color-faded":n.themeFaded}},r().createElement("div",{className:N.cardHoverOverlay}),r().createElement("div",{className:N.iconContainer},r().createElement(t,{style:{width:"32px",height:"32px",color:"white"}})),r().createElement("div",{className:N.titleContainer},r().createElement("h3",{className:N.cardTitle},e(n.id,n.title))),r().createElement("div",{className:N.indicator}))})))}}}]);
|