Resource Type Not Returned in Response Body


I’m using Hl7.Fhir.STU3. When I create a new patient, the resource type is specified as shown below

But it is not returned in the response body

Could you please clarify what the problem is ?

That’s not a valid response. But you haven’t details what the server is, or exactly what you did to create the new patient.

We are using the Nuget package [Hl7.Fhir.STU3] v 1.5.0 of ASP.NET Core v 2.2 in Visual Studio 2017 (v 15.9.18) hosted on Windows 10 Desktop.

I have also attached the class definition of the patient model and its base classes.



Patient Model

you still haven’t said what the server is, or what your actual code is doing.


We don’t have a FHIR server yet, we are still in the process of building the server using the technologies mentioned in the previous messages, and our plan is to gradually support the FHIR Restful APIs one by one.

We have started our work by trying to build a proof of concept that implements the [read] interaction with [Patient] Resource. but as you mentioned, we still couldn’t generate a valid response, and here we need help.

Do I need to share more details?

There’s no enough information here to figure out what you’re doing, let alone doing wrong. Have you worked through the standard dotnet tutorials?

Looks like you’re trying to actually create a server.
If that’s what you’re doing, you might want to check the fhir-net-web-api which does all the controller level stuff for you, so you can concentrate on your storage layer in your server.

There is an stu3 and R4 branch to go from.
Just look at the demofileserver project for a start point.
Has both full framework owin version, and aspnetcore. 2 and aspnetcore version