Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PATCH error. #142

Open
MrSerWin opened this issue Jan 14, 2022 · 0 comments
Open

PATCH error. #142

MrSerWin opened this issue Jan 14, 2022 · 0 comments

Comments

@MrSerWin
Copy link

MrSerWin commented Jan 14, 2022

the same problem but issue is closed, thats why I desided open new one.
I have an error on PATCH operation.

I'm using the latest version from CDN
https://cdn.jsdelivr.net/npm/fhirclient@latest/build/fhir-client.min.js
My request is :
const url = /Patient/PatientID; // I use correct ID patient there
const response = await fhirClient.patch(url, body)
where body is:

 [
    {
        "op": "add",
        "path": "/gender",
        "value": "male"
    },
    {
        "op": "add",
        "path": "/name",
        "value": [
            {
                "family": "Abbott1",
                "given": [
                    "Geoffrey1"
                ]
            }
        ]
    },
    {
        "op": "add",
        "path": "/birthDate",
        "value": "1990-09-01"
    }
]

response is:

{
    "resourceType": "OperationOutcome",
    "text": {
        "status": "generated",
        "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Failed to call access method: java.lang.NullPointerException: input cannot be null</pre></td>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
    },
    "issue": [
        {
            "severity": "error",
            "code": "processing",
            "diagnostics": "Failed to call access method: java.lang.NullPointerException: input cannot be null"
        }
    ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant