Spaces:
Runtime error
Runtime error
Commit
·
fd44f08
1
Parent(s):
839c732
Upd patient search sp
Browse files- static/js/app.js +5 -5
static/js/app.js
CHANGED
|
@@ -953,12 +953,12 @@ How can I assist you today?`;
|
|
| 953 |
const resp = await fetch(`/patients/${pid}`);
|
| 954 |
if (resp.ok) {
|
| 955 |
const patient = await resp.json();
|
| 956 |
-
status.textContent = `
|
| 957 |
} else {
|
| 958 |
-
status.textContent = `
|
| 959 |
}
|
| 960 |
} catch (e) {
|
| 961 |
-
status.textContent = `
|
| 962 |
}
|
| 963 |
status.style.color = 'var(--text-secondary)';
|
| 964 |
}
|
|
@@ -984,9 +984,9 @@ How can I assist you today?`;
|
|
| 984 |
|
| 985 |
if (status) {
|
| 986 |
if (patientName) {
|
| 987 |
-
status.textContent = `
|
| 988 |
} else {
|
| 989 |
-
status.textContent = `
|
| 990 |
}
|
| 991 |
status.style.color = 'var(--text-secondary)';
|
| 992 |
}
|
|
|
|
| 953 |
const resp = await fetch(`/patients/${pid}`);
|
| 954 |
if (resp.ok) {
|
| 955 |
const patient = await resp.json();
|
| 956 |
+
status.textContent = `Patient: ${patient.name || 'Unknown'} (${pid})`;
|
| 957 |
} else {
|
| 958 |
+
status.textContent = `Patient: ${pid}`;
|
| 959 |
}
|
| 960 |
} catch (e) {
|
| 961 |
+
status.textContent = `Patient: ${pid}`;
|
| 962 |
}
|
| 963 |
status.style.color = 'var(--text-secondary)';
|
| 964 |
}
|
|
|
|
| 984 |
|
| 985 |
if (status) {
|
| 986 |
if (patientName) {
|
| 987 |
+
status.textContent = `Patient: ${patientName} (${patientId})`;
|
| 988 |
} else {
|
| 989 |
+
status.textContent = `Patient: ${patientId}`;
|
| 990 |
}
|
| 991 |
status.style.color = 'var(--text-secondary)';
|
| 992 |
}
|