Closed
Description
Describe the bug
When POSTing a Bundle with a ifNoneExist
clause, the server incorrectly rejects it with:
IllegalArgumentException: Invalid match URL format (must match "[resourceType]?[params]")
.
To Reproduce
PUT
the followingSearchParameter
to the server athttp://localhost:8080/fhir/SearchParameter/patient-first-identifier
:
{
"resourceType": "SearchParameter",
"status": "active",
"id": "patient-first-identifier",
"code": "patient-first-identifier",
"type": "token",
"base": [
"Patient"
],
"expression": "Patient.identifier.first()"
}
- POST the following
Bundle
to the server athttp://localhost:8080/fhir
:
{
"resourceType": "Bundle",
"type": "transaction",
"entry": [
{
"fullUrl": "urn:uuid:3155007d-6761-4275-bbad-31fba2b09d62",
"resource": {
"resourceType": "Patient",
"identifier": [
{
"use": "official",
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "MR"
}
]
},
"system": "MRN",
"value": "123456789"
}
],
"name": [
{
"use": "official",
"family": "Doe",
"given": [
"John"
]
}
],
"gender": "male",
"birthDate": "1990-12-21",
"deceasedBoolean": false
},
"request": {
"method": "POST",
"url": "/Patient",
"ifNoneExist": "patient-first-identifier=MRN%7C123456789"
}
}
]
}
- Notice that the server rejects it with the following ERROR:
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "HAPI-0389: Failed to call access method: java.lang.IllegalArgumentException: Invalid match URL format (must match \"[resourceType]?[params]\")"
}
]
}
Observed behavior
The server rejects the Bundle
with an IllegalArgumentException
and does not create the Patient
resource.
Expected behavior
The server should accept the Bundle
and create the Patient
resource.
Environment:
- HAPI FHIR Version 6.5.0-SNAPSHOT
Metadata
Metadata
Assignees
Labels
No labels