The current API's ProcedureLogs endpoint doesn't allow for a date range.
It was suggested by OpenDental to use the Queries endpoint instead.
The queries endpoint is a little out of my scope.
Could someone please tell me if the following has the correct SQL syntax for the db?
sqlCommand = `SELECT PatNum, ProcDate,ProcFee,Surf,ToothNum,CodeNum FROM procedurelog WHERE ProcDate < '${end}' AND ProcDate > '${start}' AND ProcStatus = '2' AND ProvNum= '${provider}'`;
ProcedureLogs Date Range
Re: ProcedureLogs Date Range
Good morning,
Are you getting an error when you send this command with real data? You will want to put your SqlCommand in double quotes, not single as shown in your post. For example, using Queries PUT ShortQuery with the payload:
with our public demo dental office credentials successfully returns a short list of procedures.
I also recommend looking at Open Dental's Query Examples page for commonly used queries.
Are you getting an error when you send this command with real data? You will want to put your SqlCommand in double quotes, not single as shown in your post. For example, using Queries PUT ShortQuery with the payload:
Code: Select all
{
"SqlCommand": "SELECT PatNum,ProcDate,ProcFee,Surf,ToothNum,CodeNum FROM procedurelog WHERE ProcDate < '2020-10-31' AND ProcDate > '2020-10-25' AND ProcStatus = '1' AND ProvNum= '3' "
}
I also recommend looking at Open Dental's Query Examples page for commonly used queries.