Situation
I’m using the Standard API in OpenEMR to access patient data. While most endpoints return data correctly, I’m unable to retrieve Allergies, Medical Problems, and Documents for a patient—even though this data has been entered via the OpenEMR GUI.
For example, when I call the allergy endpoint: https://openemr-alb-11111111233.us-east-2.elb.amazonaws.com/apis/default/api/patient/9f2fa833-c18a-4fb8-aea9-052491751516/allergy
I receive the following response:
{
“validationErrors”: ,
“internalErrors”: ,
“data”: ,
“links”: {
“first”: “https://openemr-alb-11111111132.us-east-2.elb.amazonaws.com/apis/default/api/patient/9f2eb833-c18a-4fb8-aea9-052491751516/allergy?_REWRITE_COMMAND=default%2Fapi%2Fpatient%2F9f2eb833-c18a-4fb8-aea9-052491751516%2Fallergy&site=default&_offset=0&_count=0”
}
}
i define all the scope below are the scope i define for the client and also when i request for the token then also i pass the scope to get access.
scope:
openid offline_access api:oemr api:fhir api:port user/allergy.read user/allergy.write user/appointment.read user/appointment.write user/dental_issue.read user/dental_issue.write user/document.read user/document.write user/drug.read user/encounter.read user/encounter.write user/facility.read user/facility.write user/immunization.read user/insurance.read user/insurance.write user/insurance_company.read user/insurance_company.write user/insurance_type.read user/list.read user/medical_problem.read user/medical_problem.write user/medication.read user/medication.write user/message.write user/patient.read user/patient.write user/practitioner.read user/practitioner.write user/prescription.read user/procedure.read user/soap_note.read user/soap_note.write user/surgery.read user/surgery.write user/transaction.read user/transaction.write user/vital.read user/vital.write user/AllergyIntolerance.read user/Binary.read user/CarePlan.read user/CareTeam.read user/Condition.read user/Coverage.read user/Device.read user/DiagnosticReport.read user/DocumentReference.read user/DocumentReference.$docref user/Encounter.read user/Goal.read user/Immunization.read user/Location.read user/Medication.read user/MedicationRequest.read user/Observation.read user/Organization.read user/Organization.write user/Patient.read user/Patient.write user/Person.read user/Practitioner.read user/Practitioner.write user/PractitionerRole.read user/Procedure.read user/Provenance.read patient/AllergyIntolerance.read patient/Appointment.read patient/Binary.read patient/CarePlan.read patient/CareTeam.read patient/Condition.read patient/Coverage.read patient/Device.read patient/DiagnosticReport.read patient/DocumentReference.read patient/DocumentReference.$docref patient/Encounter.read patient/Goal.read patient/Immunization.read patient/Location.read patient/MedicationRequest.read patient/Medication.read patient/Observation.read patient/Organization.read patient/Patient.read patient/Person.read patient/Practitioner.read patient/Procedure.read patient/Provenance.read
Token requests also include these scopes. Still, the API returns an empty data
array. I’d appreciate help identifying what might be missing or misconfigured.
OpenEMR Version
I’m using OpenEMR version : 7.0.2
Browser:
Postman (for API testing)
Operating System
i am using aws market place open emr.
Search
Yes, I searched the forum but couldn’t find a solution specific to this issue.
Logs
Did you check the logs?
I checked the logs but didn’t find any relevant errors related to the API call.
If needed, I can enable User Debugging under Administration → Globals → Logging → User Debugging Options → All
.