From 2ed10827d37c39e03777ecd9c853ff5160fa79eb Mon Sep 17 00:00:00 2001 From: gered Date: Fri, 1 Aug 2014 15:06:43 -0400 Subject: [PATCH] add delete operation --- src/clj_hl7_fhir/core.clj | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/clj_hl7_fhir/core.clj b/src/clj_hl7_fhir/core.clj index 30437b5..c418865 100644 --- a/src/clj_hl7_fhir/core.clj +++ b/src/clj_hl7_fhir/core.clj @@ -330,6 +330,19 @@ (apply join-paths uri-components) :body resource))) +(defn delete + "deletes an existing resource. returns nil on success, throws an exception if an error + response was received. + + reference: + delete: http://hl7.org/implement/standards/fhir/http.html#delete" + [base-url type id] + (let [resource-name (->fhir-resource-name type) + uri-components ["/" resource-name id]] + (fhir-request :delete + base-url + (apply join-paths uri-components)))) + ;(def server-url "http://fhir.healthintersections.com.au/open") ;(def server-url "http://spark.furore.com/fhir") ;(def server-url "http://fhirtest.uhn.ca/base")