From 68480a3ca0341332899bc0a5042ce0f445fe23f9 Mon Sep 17 00:00:00 2001 From: gered Date: Fri, 18 Jul 2014 13:34:47 -0400 Subject: [PATCH] update doc comments --- src/clj_hl7_fhir/core.clj | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/clj_hl7_fhir/core.clj b/src/clj_hl7_fhir/core.clj index ea6b89a..61510fa 100644 --- a/src/clj_hl7_fhir/core.clj +++ b/src/clj_hl7_fhir/core.clj @@ -271,8 +271,8 @@ (search base-url type where params))) (defn create - "creates a new resource. returns the created resource if successful, throws an exception - otherwise. + "creates a new resource. returns the created resource if successful and the server response + contained a 'Location' header, otherwise returns nil. throws an exception otherwise. reference: create: http://hl7.org/implement/standards/fhir/http.html#create" @@ -285,7 +285,13 @@ :body resource))) (defn update - [base-url type id resource & {:keys [version]}] + "updates an existing resource. returns the updated resource if successful and the server + response contained a 'Location' header, otherwise returns nil. throws an exception if + an error response was received. + + reference: + update: http://hl7.org/implement/standards/fhir/http.html#update" + [base-url type id resource & {:keys [version]}] (let [resource-name (->fhir-resource-name type) uri-components (if version ["/" resource-name id "_history" version]