2024-06-13 09:16:09 +00:00
|
|
|
import frappe
|
|
|
|
|
|
|
|
|
|
|
|
@frappe.whitelist(allow_guest=True)
|
|
|
|
def fetch_data():
|
|
|
|
records = frappe.get_list('optlistprod',
|
|
|
|
filters=None,
|
|
|
|
limit_page_length=20)
|
|
|
|
return [{
|
|
|
|
"kol_id" : str(client["kol_id"]),
|
|
|
|
"kol_name" : str(client["kol_name"]),
|
|
|
|
"project_name" : str(client["project_name"]),
|
|
|
|
"client_name" : str(client["client_name"]),
|
|
|
|
"client_poc" : str(client["client_poc"]),
|
|
|
|
"optin_received_date" : str(client["optin_received_date"]),
|
2024-06-20 09:58:14 +00:00
|
|
|
"optin_approved_date" : str(client["optin_approved_date"]),
|
2024-06-13 09:16:09 +00:00
|
|
|
"status" : str(client["status"]),
|
2024-06-20 06:03:33 +00:00
|
|
|
"instance" : str(client["instance"]),
|
2024-06-20 09:58:14 +00:00
|
|
|
"npi_id": str(client["npi_id"]),
|
2024-06-27 10:10:31 +00:00
|
|
|
"country" : str(client["country"]),
|
|
|
|
"data_processed_date" : str(client["data_processed_date"]),
|
|
|
|
"user_name": str(client["user_name"]),
|
2024-06-13 09:16:09 +00:00
|
|
|
}
|
|
|
|
for client in records]
|