Bundle load issue with null `AllergyIntolerance.ca...
# support
a
Hi, we've noticed an issue when attempting to load bundles with
AllergyIntolerance.category
set to
[null]
and a
dataAbsentReason
specified on `_category`:
Copy code
"category": [
    null
  ],
  "_category": [
    {
      "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason",
      "valueCode": "unsupported"
    }
  ]
When calling POST /fhir/R4, we get the error:
Copy code
{
  "resourceType": "OperationOutcome",
  "issue": [
    {
      "severity": "error",
      "code": "invalid",
      "details": {
        "text": "Cannot convert undefined or null to object"
      }
    }
  ],
  "extension": [
    {
      "url": "https://medplum.com/fhir/StructureDefinition/tracing",
      "extension": [
        {
          "url": "requestId",
          "valueUuid": "67ab9aea-2d81-4130-9007-7214ff0e0bc9"
        },
        {
          "url": "traceId",
          "valueUuid": "0da18d9f-8160-43a8-9240-62cefcff64bc"
        }
      ]
    }
  ]
}
This error seems to be coming from `rewriteIdsInObject`https://github.com/medplum/medplum/blob/3447ea303994e4584333f7a50b2f8fc57579d21c/packages/fhir-router/src/batch.ts#L201 However, when calling POST /fhir/R4/Bundle/$validate for the same Bundle, we get the
All OK
response with no errors. Could you help me understand why this would occur? Is it expected for Medplum to be able to load a resource that's formatted like this?
Hey @rahul1, I wanted to check if there's any update on the issue I raised earlier regarding the bundle loading error. Your insights on this would be really helpful whenever you get a chance. Thanks!
r
HI @exquisite_hamster_10635 , I jsut confirmed with the team that this is indeed valid FHIR, and a bug in the batch processor. I've filed a ticket to fix here: https://github.com/medplum/medplum/issues/3580
Hi @amandamcgivern , we just pushed a fix for this here: https://github.com/medplum/medplum/pull/3582
a
@rahul1 Thanks for fixing that so quickly!
155 Views