hapifhir / hapi-fhir

🔥 HAPI FHIR - Java API for HL7 FHIR Clients and Servers
http://hapifhir.io
Apache License 2.0
2.04k stars 1.33k forks source link

HAPI FHIR Public Server sending a 502 error #6483

Open ddeveloper72 opened 3 days ago

ddeveloper72 commented 3 days ago

NOTE: Before filing a ticket, please see the following URL: https://github.com/hapifhir/hapi-fhir/wiki/Getting-Help

Describe the bug Server sending a 502 error.http://[hapi.fhir.org](http://hapi.fhir.org/)/

To Reproduce Steps to reproduce the behavior: I'm using the following Python function to retrieve a list of the most recently updated patient IDs


def fhir_patient_list():
    """Get a list of patients from the HAPI server and display them to the user"""

    client = SyncFHIRClient("http://hapi.fhir.org/baseR4")
    try:
        patients = client.resources("Patient").sort("-_lastUpdated").limit(100).fetch()

        patient_list = []
        for patient in patients:
            patient_list.append(
                {
                    "id": patient.id,
                }
            )
            # print(patient_list)

        return render_template("fhir_patient_list.html", patients=patient_list)
    except Exception as e:
        flash("Error fetching patient list: " + str(e), "alert-danger")
        return redirect(url_for("index"))

The server returns an error I'm rendering in jinja: Error fetching patient list: { "resourceType": "OperationOutcome", "issue": [ { "severity": "fatal", "code": "invalid", "diagnostics": "Error" } ], "text": { "status": "generated", "div": "Something went wrong" } }

Expected behavior I was expecting to be able to get a list of the last 100 most recently updated patient IDs from the HAPI FHIR Server

Screenshots image

Environment (please complete the following information):

Additional context Thank you for providing an Excellent Service to the public