Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions bandhu_app/api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# bandhu_app/bandhu_app/api.py

import frappe


@frappe.whitelist()
def get_patient_by_uid(uid: str):
patient = frappe.get_all("Patient", filters={"custom_bandhu_id": uid}, fields=["name", "patient_name"])

if not patient:
return {"error": "Patient not found"}

return patient[0]
Loading
Loading