FHIR Chat · PUT update Resource · hapi

Stream: hapi

Topic: PUT update Resource


view this post on Zulip DevGeek (Jul 26 2020 at 14:50):

Hi, any example on how to update a resource (patient for example) using PUT request ?

view this post on Zulip Rik Smithies (Jul 26 2020 at 14:55):

just PUT the patient data to [server]/Patient/{the existing id}
You will usually also need to set the content header appropriately. see http://hl7.org/fhir/http.html

view this post on Zulip DevGeek (Jul 27 2020 at 12:42):

@Rik Smithies I think I need to pass in the request body all the existing infos ? because I tried ti update only the birthDate and it deleted all other informations

view this post on Zulip Rik Smithies (Jul 27 2020 at 14:31):

yes that is the way FHIR REST works (and most REST I believe). You are always saying "make the Patient like this". There is no previous state considered. Unless you use PATCH - but you will need to learn the basics before going there.


Last updated: Apr 12 2022 at 19:14 UTC