Serve original patient chart lookup over EzDent API

This commit is contained in:
SantaSpeen committed 2026-11-22 03:58:05 +03:00
1 parent 96fb58fa4e
commit 5852266ed9
4 files changed
+38 -2

No files matched your search

+7
View File
@@ -143,6 +143,13 @@ final class ServerStore {
return records
}
func patient(chartNumber: String) throws -> PatientRecord? {
lock.lock()
defer { lock.unlock() }
return try query("SELECT id, name, chart_number FROM patients WHERE chart_number = ? COLLATE BINARY",
values: [.text(chartNumber)], map: { try self.patient($0) }).first
}
func patient(_ id: UUID) throws -> PatientRecord? {
lock.lock()
defer { lock.unlock() }