-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simple, but useful PATCH operation #9
Comments
why not just use what the spec says about patch?
…On Wed, Jun 21, 2017 at 4:06 AM, niquola ***@***.***> wrote:
Problem
Sometimes you need update only part of resource,
but FHIR operations granularity requires to update resource as a whole.
There is json/xml-diff proposal, but it's not so easy to construct diff,
you need some library.
Server could diff and do it for you
Solution 1
Patch operation with the logic of object/hash-map merging:
PUT /Patient/1
{
birthDate: '1970-01-01',
name: [{given: ['nicola'], family: 'Ryzhikov', use: 'official'}],
active: false
}
PATCH /Patient/1
{
active: null, // delete active element
birthDate: '1970-02-01' // updaet birthDate element
}
Open questions
- more cases
- how work with collections?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#9>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AFllFcYyO1unUFKTg4nqt2EpfQXO_QC8ks5sGAokgaJpZM4N_87o>
.
--
-----
http://www.healthintersections.com.au / [email protected]
/ +61 411 867 065
|
This is just a sugar to PATCH API - 80% simplicity for 80% simple cases |
well, ok. maybe. I think it will turn out that the syntax is simpler, but
using it is full of pitfalls, and the simplicity will be marginal. There's
a reason why the existing xml and json patch don't do things that way?
Grahame
…On Thu, Jun 22, 2017 at 7:52 AM, niquola ***@***.***> wrote:
This is just a sugar to PATCH API - 80% simplicity for 80% cases
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFllFYNkEjDg54YX2Q8MEEMlhSE5q3rXks5sGZCzgaJpZM4N_87o>
.
--
-----
http://www.healthintersections.com.au / [email protected]
/ +61 411 867 065
|
https://datatracker.ietf.org/doc/rfc7396/?include_text=1 could be used for this |
I agree that this would be a simpler solution than regular PATCH in many scenarios. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
Sometimes you need update only part of resource,
but FHIR operations granularity requires to update resource as a whole.
There is json/xml-diff proposal, but it's not so easy to construct diff, you need some library.
Server could diff and do it for you
Solution 1
Patch operation with the logic of object/hash-map merging:
Open questions
The text was updated successfully, but these errors were encountered: