Hello @adunsulag ,
I am trying to retrieve appointment information from my OpenEMR installation using the Standard API on Postman. Anytime i hit the endpoint, i get unauthorized 401 on the endpoint example.org/apis/default/api/appointment.
I tried the FHIR API as well and i had an internal server error.
Please see the error in my logs below
[19-Aug-2023 15:00:22 UTC] PHP Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (2022-08-30 32:00:00) at position 11 (3): Unexpected character in /home/root3375/public_html/example.org/src/Services/FHIR/UtilsService.php:307
Stack trace:
#0 /home/root3375/public_html/example.org/src/Services/FHIR/UtilsService.php(307): DateTime->__construct('2022-08-30 32:0...', Object(DateTimeZone))
#1 /home/root3375/public_html/example.org/src/Services/FHIR/FhirAppointmentService.php(196): OpenEMR\Services\FHIR\UtilsService::getLocalDateAsUTC('2022-08-30 32:0...')
#2 /home/root3375/public_html/example.org/src/Services/FHIR/FhirServiceBase.php(219): OpenEMR\Services\FHIR\FhirAppointmentService->parseOpenEMRRecord(Array)
#3 /home/root3375/public_html/example.org/src/RestControllers/FHIR/FhirAppointmentRestController.php(49): OpenEMR\Services\FHIR\FhirServiceBase->getAll(Array, NULL)
#4 /home/root3375/public_html/example.org/_rest_routes.inc.php(7638): OpenEMR\RestControllers\FHIR\FhirAppointmentRestController->getAll(Arra in /home/root3375/public_html/example.org/src/Services/FHIR/UtilsService.php on line 307
and these are my scopes
- openid
- fhirUser
- online_access
- offline_access
- launch
- launch/patient
- api:oemr
- api:fhir
- api:port
- profile
- name
- address
- given_name
- family_name
- nickname
- phone
- phone_verified
- email_verified
- site:default
- patient/Appointment.read
- user/Appointment.read
I am running OpenEMR V7.0.0(2)