I try this curl string to look up a name and it won't accept spaces. The percent code isn't working so I was wondering about a workaround. Getting a partial match here isn't an option and I need to just get only that patient's record.
curl --location --request GET 'https://api.opendental.com/fhir/v2/pati ... lowenstein' --header 'Authorization: ODFHIR 04KBfUMsB2yXGClp/XOx0ePQSmMIcGhl2' --header 'Accept: application/json'
finding a pt name with the API
- jordansparks
- Site Admin
- Posts: 5770
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
- Contact:
Re: finding a pt name with the API
We are working every day on the API. Today, we were finally able to track down your issue. Basically, our documentation does not have good enough examples. I hope to be able to upload better documentation for your issue within a day or two. The "name" parameter that you used would only be for a portion of a name, not first and last. Instead, use a combination of "family", "given", and "birthdate" to search for a unique patient. But like I said, the documentation for that will improve significantly.
Jordan Sparks, DMD
http://www.opendental.com
http://www.opendental.com
Re: finding a pt name with the API
I figured that part out eventually, but now have a different issue. Can I look up a patient by partial match for a birthday. I want to find all patients who have a birthday on November 2 for example. I need to do this without including a year and the API won't let me do it.
- jordansparks
- Site Admin
- Posts: 5770
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
- Contact:
Re: finding a pt name with the API
Queries are far more powerful for read-only than the API will ever be. The purpose of the API is to let users make changes to data in the database without running forbidden Update and Insert commands. We will add as many Select functions as we can, but it's never going to be more than the tip of the iceberg. This particular example does look like it might make its way into the API because sending birthday cards is something that third parties will want to do. But it will be a while. We're rebuilding the API to not use FHIR, which I'm pretty excited about. So the terminology and style will match our database and UI, and the learning curve will be lower.
Jordan Sparks, DMD
http://www.opendental.com
http://www.opendental.com
Re: finding a pt name with the API
So basically, I can do the same thing by running a direct SQL select statement and parsing through those results?
- jordansparks
- Site Admin
- Posts: 5770
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
- Contact:
Re: finding a pt name with the API
Right. Now that you mention it, we might add a function to our API to allow a query to be passed in, and a table to be returned. That way, queries could be done through the API, solving a lot of these kinds of issues.
Jordan Sparks, DMD
http://www.opendental.com
http://www.opendental.com