A023, FHIR STU3 - returned FHIR fails parsing

I’ve successfully set up in the INT environment an api call to the A023 Advice and Guidance request. But when I got to parse the returned FHIR message to a type of Fhir.Model.List I get the following error:

Found unknown element ‘reference’. At List.entry[0].item.reference, line 1, position 1504.

This relates to the “item” element at the bottom of each entry

“item”: {
“reference”: “CommunicationRequest/000000070000”
}

Am I using the correct model to parse the result to?

Full error:

One or more errors occurred. (Found unknown element ‘reference’. At List.entry[0].item.reference, line 1, position 1504.) (Found unknown element ‘item’. At List.entry[0].item, line 1, position 1491.) (Found unknown element ‘entry’. At List.entry[1], line 1, position 162.) (Found unknown element ‘status’. At List.status, line 1, position 126.) (Found unknown element ‘mode’. At List.mode, line 1, position 143.) (Encountered unknown resource type ‘List’. At $this, line 1, position 2.)

Hi @David_Hobson - That UBRN (000000070000) doesn’t look like one I’d expect in the INT environment; it looks like a Sandbox example.

Can you confirm you have followed these steps on INT:

  1. Created an A&G request to a provider and
  2. There are open A&G requests on the provider worklist?

Once you have a populated A&G worklist on INT, you should be able to retrieve it via A023.

Hope that helps!

Thanks,
Z.

Apologies, I copied the wrong text. The reference returned in my working example is

“item”: {
“reference”: “CommunicationRequest/000049813409”
}

Although I think the issue is higher up in the error chain..
Encountered unknown resource type ‘List’. At $this, line 1, position 2.

It happens when I run this method

JsonSerializer.Deserializestu3::Hl7.Fhir.Model.List(await response.Content.ReadAsStringAsync(), options)

Turns out it was my Json options causing the issue

Had to alias the Fhir

stu3::Hl7.Fhir.Model.ModelInfo.ModelInspector