I got a developer's key and I think I have everything setup to develop on top of the FHIR RESTful API. I'm new to using OpenDental (OD) and to the FHIR model. I'm using this doc as reference: https://www.opendental.com/resources/Op ... -1Spec.pdf
My code is written in Scala so I do as described in that doc:
Code: Select all
//val url = "https://api.opendental.com/fhir/organization?name=Relaxation%20Dental"
val url = "https://api.opendental.com/fhir/capabilitystatement"
val fhirRequest: WSRequest = ws.url(url)
.withHttpHeaders(
"Content-Type" -> "application/json",
"Authorization" -> "FHIRAPIKey=%s".format(config.get[String]("fhir.api.key")),
"Accept" -> "application/json"
)
.withRequestTimeout(10000.millis)
val futureResponse = fhirRequest.get()
futureResponse.map { response =>
Ok(response.json)
}
For every valid request I get back the following:
Code: Select all
{"issue":[{"severity":"error","code":"exception","details":{"text":"The server has encountered an error."}}]}
TIA,
Best regards,
Giovanni