diff OrthancCppClient/Patient.cpp @ 540:eaca3d38b2aa laaw

many fixes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 12 Sep 2013 12:55:07 +0200
parents 50d9660f960c
children 2d0a347e8cfc
line wrap: on
line diff
--- a/OrthancCppClient/Patient.cpp	Mon Aug 12 10:56:35 2013 +0200
+++ b/OrthancCppClient/Patient.cpp	Thu Sep 12 12:55:07 2013 +0200
@@ -76,4 +76,17 @@
       return defaultValue;
     }
   }
+  
+  void Patient::Delete()
+  {
+    Orthanc::HttpClient client(connection_.GetHttpClient());
+    client.SetMethod(Orthanc::HttpMethod_Delete);
+    client.SetUrl(std::string(connection_.GetOrthancUrl()) + "/patients/" + id_);
+    
+    std::string s;
+    if (!client.Apply(s))
+    {
+      throw OrthancClientException(Orthanc::ErrorCode_NetworkProtocol);
+    }
+  }
 }