Building FHIR Server

2,042 views
Skip to first unread message

Janardhana D.S

unread,
Nov 4, 2016, 3:07:23 AM11/4/16
to FHIR DOTNET
Hi All,

I built a FHIR server using C# and ASP.NET Web API. The Web API returns list of patient data as a string. 
Now I want to make it as bundle of resource so that I can query the resources and also search withing the resource. Any suggestions....?

Thanks,
Jana


Mirjam Baltus

unread,
Nov 4, 2016, 6:21:34 AM11/4/16
to FHIR DOTNET
Hello!

Are you working on the server side code, or client side?
To be a FHIR server, your server needs to return valid FHIR xml or FHIR json on a client's request. So server side you need to build your Bundle of Patient resources, serialize that to the format you want and send that to the client. Is that what you're asking?

Have you already looked at the FHIR .Net API, which provides you with the complete FHIR model and methods to parse/serialize resources etc.?

You could also take a look at the Spark server, for an example of server side code. Spark is one of the publically available test servers for FHIR.

Mirjam

Janardhana D.S

unread,
Nov 8, 2016, 11:29:13 PM11/8/16
to FHIR DOTNET
Hi,

Yes I am working on server side implementation. Thanks for your reply.


Thanks,
Jana

Janardhana D.S

unread,
Nov 10, 2016, 12:13:27 AM11/10/16
to FHIR DOTNET
Hi,

As I mentioned earlier, I have built a FHIR server using ASP.NET WEB API. In my server/service I have created a list of Patient using FHIR patient resource. Now I want to make it as a searchable resource where the user can query / search based on Patient ID or Patient Name. So I was not clear how to implement this in WEB API. 

Note: I am not that good at ASP.NET.


Thanks,
Jana

Mirjam Baltus

unread,
Nov 10, 2016, 7:11:40 AM11/10/16
to FHIR DOTNET
Search is a complicated thing to implement, so I cannot help you with that logic directly.
Please do take a look at the Spark server, where search has been implemented already. In Spark the search is performed against a database, which indexes search values for performance.

If you do not care about performance, you could take your list of Patient resources and iterate through them, inspecting the fields your client wants to search on.
So for example if the client wants a search on Patient Name, those values would be in the Patient.Name.Family and/or Patient.Name.Given. Both these are lists, so you'll have to check within those lists as well. So you could do something like this for each Patient in your list:

foreach (var name in pat.Name)
{
    foreach (var fam in name.Family)
    {
        // check if fam matches searchstring
        // and add Patient to your searchset Bundle if it does
    }
    foreach (var given in name.Given)
    {
        // also check of there are matches here
    }
}

But I would not recommend for performance reasons, if your list is a large one.

If you're not a .Net person, but perhaps more into Java, you could also check out the HAPI FHIR server for ideas about implementing a server.

SS

unread,
Nov 11, 2017, 4:41:14 AM11/11/17
to FHIR DOTNET
Hi..
I am also looking for same...
I am also looking to build fihr server for .net application
Please share your code...
Help is appreciated..

azurec...@gmail.com

unread,
Nov 15, 2017, 10:10:02 PM11/15/17
to FHIR DOTNET
I am new to Fhir API, I need help to setup the FHIR Server API, 

My background .Net developer knowledge in API, 

Any one interested work together let me know azurec...@gmail.com

Mirjam Baltus

unread,
Nov 16, 2017, 7:05:23 AM11/16/17
to FHIR DOTNET
Please tell us more details of where you encounter problems with setting up a FHIR server. Are you building one from scratch, or are you using the Vonk server, or perhaps another existing implementation?

SS

unread,
Nov 16, 2017, 7:40:38 AM11/16/17
to FHIR DOTNET
Is there any one having c# code for adding FHIR resource like carePlan , etc

azurec...@gmail.com

unread,
Nov 16, 2017, 8:50:35 AM11/16/17
to FHIR DOTNET
I am building   from scratch FHIR Server..  I need help , I download the project from https://github.com/ewoutkramer/fhir-net-api/tree/develop-stu3.    it is open license?

SS

unread,
Nov 16, 2017, 9:07:48 AM11/16/17
to FHIR DOTNET
i am currently using vonk server 

Mirjam Baltus

unread,
Nov 16, 2017, 9:22:50 AM11/16/17
to FHIR DOTNET
Vonk supports all resource types, so you should be able to POST all types of resources to the server, for example by creating a client and making use of the FhirClient from the .Net FHIR API. You can check http://docs.simplifier.net/fhirnetapi/index.html for a short introduction to the api, plus some code examples.

@azurec...@gmail.com: building a FHIR server from scratch is a lot of hard work. You could take a look at the source code for the Spark server, but please note this is a DSTU2 server and it only has a MongoDb for database.
You could also take a look at Vonk (see link above), that provides you with full FHIR Rest functionality and support for all resource types. The Vonk server is not open source.
Message has been deleted
Message has been deleted

pramod1...@gmail.com

unread,
Jul 29, 2020, 12:18:14 AM7/29/20
to FHIR DOTNET
Hi Can you guide me more to implement my own FHIR server in .net. My requirement is to take HL7 V2 as input and return HL7 FHIR format
Reply all
Reply to author
Forward
0 new messages