FHIR Chat · Spark FHIR · implementers

Stream: implementers

Topic: Spark FHIR


view this post on Zulip Dhiraj Talele (Jun 28 2017 at 10:49):

I am trying to make Update patient request but it is giving me following error

Endpoint returned a body with contentType 'text/html', while a valid FHIR xml/json body type was expected. Is this a FHIR endpoint?

Following is the code i am using

    Dim pat = New Hl7.Fhir.Model.Patient()
    pat .Id= "1234"
           Dim fhirClient = New FhirClient("http://Localhost:49912/FHIR")
           Dim resultBundle= fhirClient.Update(Of Hl7.Fhir.Model.Patient)(pat)

If instead on Update i do Create it worked properly
Dim resultBundle= fhirClient.Create(Of Hl7.Fhir.Model.Patient)(pat)

Actually I have to assign my custom id to patient so i have to use Update (because in create we can not mention id)FHIR

view this post on Zulip Dhiraj Talele (Jun 28 2017 at 10:50):

The thing is that when i publish FHIR server in IIS and if i do Update request then it gives this error (However Create request works in this case too when it is published in IIS)
But suppose if i simply run the Spark Solution (Using F5 ) and then use that endpoint then both Create and Update request works fine, Not sure if there i need to do any seting in IIS for this?

view this post on Zulip Dhiraj Talele (Jun 28 2017 at 11:37):

I am able to fix it, basically i used fhirclient.transaction and passed bundel to it, It worked for me, Thanks


Last updated: Apr 12 2022 at 19:14 UTC