0.0.1 - CI Build

SequoiaProjectHealthcareDirectoryImplementationGuideSTU3 - Local Development build (v0.0.1). See the Directory of published versions

Delete Operation

Previous Page - Update Operation

Reference: https://www.hl7.org/fhir/http.html#delete

Functionality: Potentially remove one Organization resource, with a specified Organization.id, from the directory. Note that a delete operation does not remove the FHIR resource from the directory internal database. Instead, it marks the entry as logically deleted by changing its Organization.active value to false. If a given organization is to be undeleted then the Organization.active status should be set back to true. This behavior is required in order to preserve referential integrity with external systems, and internal data. For example, ensuring that the Organization.id that may be stored in various log files remain valid forever. If an Organization entry is imported from an external file, then the Organization.active element is set from that import. If an Organization is updated or deleted using the Sequoia directory RESTful API, then the Organization is not removed from the directory persistent data (YAML) file, and it is not removed from the in-memory orgs[] database. Instead, the Organization.active value is set to false.

Request: Request URL: delete /Organization Params: apikey: ApiKey to check permission of delete operation _format: xml _id: ID of Organization to delete

Internal Ruby Source Code Function: removeOrganization(orgs, org_id)

Success Response: HTTP status code: 200 body:

Operation Outcome Delete Success Example

Error Response: HTTP status code: 403 Body:

Operation Outcome Delete Error Example

CURL Example

curl -i -X DELETE ‘http://localhost:80/fhir-stu3/1.0.1/Organization/’

Should result in the following response: HTTP/1.1 200 OK Content-Type: text/html;charset=utf-8 Access-Control-Allow-Origin: * ETag: “fbf3b0a0-86f7-0136-bd4b-5481d7f50949” X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN Content-Length: 0

To return XML in the response, with an operation outcome, append _format=xml to the RESTful command: curl -i -X DELETE ‘http://localhost:80/fhir-stu3/1.0.1/Organization/’

And now the response will have an HTTP body: HTTP/1.1 200 OK Content-Type: application/xml; charset=utf-8 Access-Control-Allow-Origin: * X-Custom-Value: Copyright(c) 2016-18 The Sequoia Project. All rights reserved. Business confidential. X-Powered-By: The Sequoia Project Healthcare Directory Server Server: Undisclosed Cache-Control: public, must-revalidate, max-age=3600 Expires: 2018-08-20 18:42:15 -0500 ETag: “35a80590-86f8-0136-bd4c-5481d7f50949” X-Content-Type-Options: nosniff Content-Length: 747

Operation Outcome Delete Error Example2

Next Page - Validate Operation