Skip to content

Should we improve error handling when patient reference is not relative? #138

@Reinaard

Description

@Reinaard

When patient reference is not a relative url, then we get an error: Reference is not a valid Patient reference. Maybe it's a good idea to give a more specific error message like Patient reference can only be relative?

To Reproduce

Steps to reproduce the behavior:

  1. Register a bundle ar /registration
{
    "resourceType": "Bundle",
    "type": "transaction",
    "id": "bundle-careplan-example-012",
    "entry": [
        {
            "fullUrl": "https://patientendossier.nl/Patient/patient-018",
            "resource": {
                "resourceType": "Patient",
                "id": "patient-018",
                "identifier": [
                    {
                        "system": "http://fhir.nl/fhir/NamingSystem/bsn",
                        "value": "482169084"
                    }
                ],
                "name": [
                    {
                        "use": "official",
                        "family": "Jones",
                        "given": [
                            "Rita"
                        ]
                    }
                ],
                "gender": "male",
                "birthDate": "2000-01-31"
            },
            "request": {
                "method": "POST",
                "url": "https://patientendossier.nl/Patient/patient-018"
            }
        },
        {
            "resource": {
                "resourceType": "Immunization",
                "id": "imm123",
                "status": "completed",
                "vaccineCode": { "text": "Influenza vaccine" },
                "patient": { "reference": "https://patientendossier.nl/Patient/patient-018" },
                "occurrenceDateTime": "2024-11-15"
            }
        }
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions