feat:npi id added ,ui changes
This commit is contained in:
parent
67efbb4350
commit
d7c48870d0
|
@ -38,7 +38,7 @@ def fetch_records(config):
|
||||||
if connection.is_connected():
|
if connection.is_connected():
|
||||||
|
|
||||||
cursor = connection.cursor(dictionary=True)
|
cursor = connection.cursor(dictionary=True)
|
||||||
cursor.execute(f"SELECT '{ config['instance'] }' as instance, kols.id,CONCAT_WS(' ',kols.first_name,kols.middle_name,kols.last_name) as kol_name, GROUP_CONCAT(DISTINCT projects.name) as project_name, clients.name as client_name,CONCAT(client_users.first_name,client_users.last_name) as user_name, GROUP_CONCAT(DISTINCT log_activities.transaction_name,':',date(log_activities.created_on)) as project_details,case when user_kols.opt_in_out_status = 3 then 'Opted Out' when user_kols.opt_in_out_status = 4 then 'Opted In' else '' end as status FROM kols left join user_kols on user_kols.kol_id = kols.id inner join opt_inout_statuses on opt_inout_statuses.id = user_kols.opt_in_out_status left join log_activities on log_activities.miscellaneous1 = user_kols.kol_id left join client_users on client_users.id = user_kols.user_id left join clients on client_users.client_id = clients.id left join project_kols on project_kols.kol_id = user_kols.kol_id left join projects on projects.id = project_kols.project_id where log_activities.module ='opt_in_out' and log_activities.transaction_name in ('New','Opt-in Requested','Opt-out','Opt-in Approved','Opt-in Expired','Opt-in Received','Opt-in') group by kols.id;")
|
cursor.execute(f"SELECT '{ config['instance'] }' as instance, kols.npi_num,kols.id,CONCAT_WS(' ',kols.first_name,kols.middle_name,kols.last_name) as kol_name, GROUP_CONCAT(DISTINCT projects.name) as project_name, clients.name as client_name,CONCAT(client_users.first_name,client_users.last_name) as user_name, GROUP_CONCAT(DISTINCT log_activities.transaction_name,':',date(log_activities.created_on)) as project_details,case when user_kols.opt_in_out_status = 3 then 'Opted Out' when user_kols.opt_in_out_status = 4 then 'Opted In' else '' end as status FROM kols left join user_kols on user_kols.kol_id = kols.id inner join opt_inout_statuses on opt_inout_statuses.id = user_kols.opt_in_out_status left join log_activities on log_activities.miscellaneous1 = user_kols.kol_id left join client_users on client_users.id = user_kols.user_id left join clients on client_users.client_id = clients.id left join project_kols on project_kols.kol_id = user_kols.kol_id left join projects on projects.id = project_kols.project_id where log_activities.module ='opt_in_out' and log_activities.transaction_name in ('New','Opt-in Requested','Opt-out','Opt-in Approved','Opt-in Expired','Opt-in Received','Opt-in') group by kols.id;")
|
||||||
records = cursor.fetchall()
|
records = cursor.fetchall()
|
||||||
return records
|
return records
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,8 @@
|
||||||
"cs_assigned_poc",
|
"cs_assigned_poc",
|
||||||
"optin_type",
|
"optin_type",
|
||||||
"data_processed_date",
|
"data_processed_date",
|
||||||
"instance"
|
"instance",
|
||||||
|
"npi_id"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
@ -83,12 +84,17 @@
|
||||||
"fieldname": "instance",
|
"fieldname": "instance",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"label": "Instance"
|
"label": "Instance"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "npi_id",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Npi ID"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"is_virtual": 1,
|
"is_virtual": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2024-06-19 17:59:49.749353",
|
"modified": "2024-06-20 15:03:39.506553",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Opt management production",
|
"module": "Opt management production",
|
||||||
"name": "optlistprod",
|
"name": "optlistprod",
|
||||||
|
|
|
@ -29,6 +29,7 @@ class optlistprod(Document):
|
||||||
"optin_approved_date" : optinReceived(str(client["project_details"]),"Opt-in Approved"),
|
"optin_approved_date" : optinReceived(str(client["project_details"]),"Opt-in Approved"),
|
||||||
"status" : str(client["status"]),
|
"status" : str(client["status"]),
|
||||||
"instance" : str(client["instance"]),
|
"instance" : str(client["instance"]),
|
||||||
|
"npi_id": str(client["npi_num"]),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -120,6 +121,7 @@ def getValues():
|
||||||
"optin_approved_date" : optinReceived(str(client["project_details"]),"Opt-in Approved"),
|
"optin_approved_date" : optinReceived(str(client["project_details"]),"Opt-in Approved"),
|
||||||
"status" : str(client["status"]),
|
"status" : str(client["status"]),
|
||||||
"instance" : str(client["instance"]),
|
"instance" : str(client["instance"]),
|
||||||
|
"npi_id": str(client["npi_num"]),
|
||||||
}
|
}
|
||||||
for client in records
|
for client in records
|
||||||
]
|
]
|
||||||
|
|
|
@ -143,16 +143,16 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
paginationSizeSelector: [5, 10, 50, 100],
|
paginationSizeSelector: [5, 10, 50, 100],
|
||||||
paginationCounter: "rows",
|
paginationCounter: "rows",
|
||||||
columns:[ // Define table columns
|
columns:[ // Define table columns
|
||||||
{title:"KOL ID", field:"kol_id",headerFilterPlaceholder: "Search",hozAlign:"center", headerFilter: true,width:150},
|
{title:"Instance", field:"instance",headerFilterPlaceholder: "Search", headerFilter: true,width:100},
|
||||||
{title:"KOL Name", field:"kol_name",headerFilterPlaceholder: "Search", headerFilter: true,},
|
|
||||||
{title:"Project Name", field:"project_name",headerFilterPlaceholder: "Search", headerFilter: true,width:250,tooltip:true},
|
|
||||||
{title:"Client Name", field:"client_name",headerFilterPlaceholder: "Search", headerFilter: true,tooltip:true},
|
{title:"Client Name", field:"client_name",headerFilterPlaceholder: "Search", headerFilter: true,tooltip:true},
|
||||||
{title:"Client POC", field:"client_poc",headerFilterPlaceholder: "Search", headerFilter: true,},
|
{title:"NPI ID", field:"npi_id",headerFilterPlaceholder: "Search", headerFilter: true,width:100},
|
||||||
|
{title:"KOL ID", field:"kol_id",headerFilterPlaceholder: "Search", headerFilter: true,width:100},
|
||||||
|
{title:"KOL Name", field:"kol_name",headerFilterPlaceholder: "Search", headerFilter: true,},
|
||||||
|
{title:"Status", field:"status",headerFilterPlaceholder: "Search", headerFilter: true,},
|
||||||
{title:"Requested Date", field:"optin_received_date",headerFilterPlaceholder: "Search", headerFilter: true,},
|
{title:"Requested Date", field:"optin_received_date",headerFilterPlaceholder: "Search", headerFilter: true,},
|
||||||
{title:"Approved Date", field:"optin_approved_date",headerFilterPlaceholder: "Search", headerFilter: true,},
|
{title:"Approved Date", field:"optin_approved_date",headerFilterPlaceholder: "Search", headerFilter: true,},
|
||||||
{title:"Status", field:"status",headerFilterPlaceholder: "Search", headerFilter: true,},
|
{title:"Project Name", field:"project_name",headerFilterPlaceholder: "Search", headerFilter: true,width:250,tooltip:true},
|
||||||
{title:"Instance", field:"instance",headerFilterPlaceholder: "Search", headerFilter: true,},
|
{title:"Client POC", field:"client_poc",headerFilterPlaceholder: "Search", headerFilter: true,},
|
||||||
// {title:"CS Assigned POC", field:"cs_assigned_poc",headerFilterPlaceholder: "Search", headerFilter: true,},
|
// {title:"CS Assigned POC", field:"cs_assigned_poc",headerFilterPlaceholder: "Search", headerFilter: true,},
|
||||||
// {title:"Opt-In Type", field:"optin_type",headerFilterPlaceholder: "Search", headerFilter: true,},
|
// {title:"Opt-In Type", field:"optin_type",headerFilterPlaceholder: "Search", headerFilter: true,},
|
||||||
// {title:"Data Processed Date", field:"data_processed_date",headerFilterPlaceholder: "Search", headerFilter: true}
|
// {title:"Data Processed Date", field:"data_processed_date",headerFilterPlaceholder: "Search", headerFilter: true}
|
||||||
|
|
|
@ -13,10 +13,10 @@ def fetch_data():
|
||||||
"client_name" : str(client["client_name"]),
|
"client_name" : str(client["client_name"]),
|
||||||
"client_poc" : str(client["client_poc"]),
|
"client_poc" : str(client["client_poc"]),
|
||||||
"optin_received_date" : str(client["optin_received_date"]),
|
"optin_received_date" : str(client["optin_received_date"]),
|
||||||
"optin_approved_date" : "empty" if not str(client["optin_approved_date"]) else str(client["optin_approved_date"]),
|
"optin_approved_date" : str(client["optin_approved_date"]),
|
||||||
"status" : str(client["status"]),
|
"status" : str(client["status"]),
|
||||||
"instance" : str(client["instance"]),
|
"instance" : str(client["instance"]),
|
||||||
|
"npi_id": str(client["npi_id"]),
|
||||||
|
|
||||||
}
|
}
|
||||||
for client in records]
|
for client in records]
|
||||||
|
|
Loading…
Reference in New Issue