On this page:

4.3FHIR CRUD Operations

 

This section outlines how to use the FHIR Endpoint to perform basic CRUD (Create/Read/Update/Delete) Operations.

4.3.1Testing Tools

 

All of the examples on this page can be performed on your own computer, pointing at a demonstration instance of Smile CDR, or at your own self-hosted instance.

Because FHIR is based on the HTTP protocol, you can do some testing right in a browser. The search and read operations are particularly well suited for this. However, if you want to try other features out, you may need a more advanced testing tool. For example, FHIR create operations require you to use an HTTP POST operation. Secured endpoints may require you to add special Authorization headers.

For many of the examples below, a sample curl command is shown. curl is a tool which can be used to execute HTTP requests from the command line, and is commonly installed on Linux/OSX systems.

A friendlier way of testing is to use Postman (website: http://getpostman.com. Postman is a free GUI-based testing UI for executing REST requests. It can be installed as a standalone application, or as a Chrome App.

Executing a RESTful FHIR call using Postman is fairly straightforward, as shown in the screenshot below.

  • Place a URL (such as http://localhost:8000 ) in the URL bar
  • Set the verb to POST or PUT or whatever the operation calls for
  • On the body tab:
  • Choose a body type of raw
  • Set the type dropdown to JSON
  • Paste in your resource body
  • Click Send

Postman

4.3.2FHIR Create

 

A client may create a new resource on a FHIR server by performing a Create operation. The create uses an HTTP POST against the URL [baseUrl]/[resourceType]. This POST should have (at a minimum) a Content-Type header which specifies the mimetype of the payload.

The following example shows a simple create using a JSON Payload.

Request

HTTP Method:

POST

Address:

Public Test Server
https://try.smilecdr.com:8000/Patient
Self-Hosted Instance
http://localhost:8000/Patient
Cloud-Hosted Instance
https://example.smilecdr.com:8000/Patient

Headers:

Content-Type: application/fhir+json

Request Body:

{
  "resourceType": "Patient",
  "identifier": [ { "system": "urn:oid:1.2.36.146.595.217.0.1", "value": "12345" } ],
  "name": [ {
      "family": "Chalmers",
      "given": [ "Peter", "James" ]
  } ],
  "gender": "male",
  "birthDate": "1974-12-25"
}

Response

The FHIR endpoint will respond with a response similar to the following:

Public Test Server
```http HTTP/1.1 201 Created ETag: W/"1" Location: https://try.smilecdr.com:8000/Patient/37078/_history/1

{ "resourceType": "Patient", "id": "37078", "meta": { "versionId": "1", "lastUpdated": "2019-07-12T01:43:59.381+00:00" }, "identifier": [ { "system": "urn:oid:1.2.36.146.595.217.0.1", "value": "12345" } ], "name": [ { "family": "Chalmers", "given": [ "Peter", "James" ] } ], "gender": "male", "birthDate": "1974-12-25" }


<div><i class="fa fa-bicycle fa-border" aria-hidden="true" style="text-align: center; width: 2em"></i> <span class="helpTutorialTrailIconCaption">Self-Hosted Instance</span></div>
```http
HTTP/1.1 201 Created
ETag: W/"1"
Location: http://localhost:8000/Patient/37078/_history/1

{
    "resourceType": "Patient",
    "id": "37078",
    "meta": {
        "versionId": "1",
        "lastUpdated": "2019-07-12T01:43:59.381+00:00"
    },
    "identifier": [
        {
            "system": "urn:oid:1.2.36.146.595.217.0.1",
            "value": "12345"
        }
    ],
    "name": [
        {
            "family": "Chalmers",
            "given": [
                "Peter",
                "James"
            ]
        }
    ],
    "gender": "male",
    "birthDate": "1974-12-25"
}
Cloud-Hosted Instance
```http HTTP/1.1 201 Created ETag: W/"1" Location: https://example.smilecdr.com:8000/Patient/37078/_history/1

{ "resourceType": "Patient", "id": "37078", "meta": { "versionId": "1", "lastUpdated": "2019-07-12T01:43:59.381+00:00" }, "identifier": [ { "system": "urn:oid:1.2.36.146.595.217.0.1", "value": "12345" } ], "name": [ { "family": "Chalmers", "given": [ "Peter", "James" ] } ], "gender": "male", "birthDate": "1974-12-25" }


Note the `Location` header, which indicates the ID that was assigned to this resource by Smile CDR when the resource was saved in the database. In this case, the assigned ID was `37078`. Also note the version assigned to the newly created resource, which was `1` since this is the first version.

## Try It Out!

You can execute this request using cURL with the following command:

<div><i class="fa fa-bus fa-border" aria-hidden="true" style="text-align: center; width: 2em"></i> <span class="helpTutorialTrailIconCaption">Public Test Server</span></div>
```bash
curl -v -X POST --header "Content-Type: application/fhir+json" --data '{
  "resourceType": "Patient",
  "identifier": [ { "system": "urn:oid:1.2.36.146.595.217.0.1", "value": "12345" } ],
  "name": [ {
      "family": "Chalmers",
      "given": [ "Peter", "James" ]
  } ],
  "gender": "male",
  "birthDate": "1974-12-25"
}' https://try.smilecdr.com:8000/Patient
Self-Hosted Instance
```bash curl -v -X POST --header "Content-Type: application/fhir+json" --data '{ "resourceType": "Patient", "identifier": [ { "system": "urn:oid:1.2.36.146.595.217.0.1", "value": "12345" } ], "name": [ { "family": "Chalmers", "given": [ "Peter", "James" ] } ], "gender": "male", "birthDate": "1974-12-25" }' http://localhost:8000/Patient ```
Cloud-Hosted Instance
```bash curl -v -X POST --header "Content-Type: application/fhir+json" --data '{ "resourceType": "Patient", "identifier": [ { "system": "urn:oid:1.2.36.146.595.217.0.1", "value": "12345" } ], "name": [ { "family": "Chalmers", "given": [ "Peter", "James" ] } ], "gender": "male", "birthDate": "1974-12-25" }' https://example.smilecdr.com:8000/Patient ```

4.3.3FHIR Update

 

You can update an existing resource on a FHIR server by performing an update operation. The update uses an HTTP PUT against the URL [baseUrl]/[resourceType]/[id]. This PUT should have (at a minimum) a Content-Type header that specifies the MIME type of the payload.

The following example shows a simple update using a JSON payload.

In this example, we are taking the previously created resource from above and updating it. We will change the birth date and add an address. Note the ID 37078 in the URL, resource body and headers. When you are trying this yourself, make sure to use the ID that was returned from the server in the steps above.

Request

HTTP Method:

PUT

Address:

Public Test Server
https://try.smilecdr.com:8000/Patient/37078
Self-Hosted Instance
http://localhost:8000/Patient/37078
Cloud-Hosted Instance
https://example.smilecdr.com:8000/Patient/37078

Headers:

Content-Type: application/fhir+json

Request Body:

{
  "resourceType": "Patient",
  "id": "37078",
  "identifier": [ { "system": "urn:oid:1.2.36.146.595.217.0.1", "value": "12345" } ],
  "name": [ {
      "family": "Chalmers",
      "given": [ "Peter", "James" ]
  } ],
  "gender": "male",
  "birthDate": "1974-01-13",
  "address": [ {
      "line": [ "534 Erewhon St" ],
      "city": "PleasantVille",
      "state": "Vic",
      "postalCode": "3999"
  } ]
}

Response

The FHIR endpoint will respond with a response similar to the following:

Public Test Server
```http HTTP/1.1 200 OK ETag: W/"2" Location: https://try.smilecdr.com:8000/Patient/37078/_history/2

{ "resourceType": "Patient", "id": "37078", "meta": { "versionId": "2", "lastUpdated": "2019-07-12T01:46:17.950+00:00" }, "identifier": [ { "system": "urn:oid:1.2.36.146.595.217.0.1", "value": "12345" } ], "name": [ { "family": "Chalmers", "given": [ "Peter", "James" ] } ], "gender": "male", "birthDate": "1974-01-13", "address": [ { "line": [ "534 Erewhon St" ], "city": "PleasantVille", "state": "Vic", "postalCode": "3999" } ] }


<div><i class="fa fa-bicycle fa-border" aria-hidden="true" style="text-align: center; width: 2em"></i> <span class="helpTutorialTrailIconCaption">Self-Hosted Instance</span></div>
```http
HTTP/1.1 200 OK
ETag: W/"2"
Location: http://localhost:8000/Patient/37078/_history/2

{
    "resourceType": "Patient",
    "id": "37078",
    "meta": {
        "versionId": "2",
        "lastUpdated": "2019-07-12T01:46:17.950+00:00"
    },
    "identifier": [
        {
            "system": "urn:oid:1.2.36.146.595.217.0.1",
            "value": "12345"
        }
    ],
    "name": [
        {
            "family": "Chalmers",
            "given": [
                "Peter",
                "James"
            ]
        }
    ],
    "gender": "male",
    "birthDate": "1974-01-13",
    "address": [
        {
            "line": [
                "534 Erewhon St"
            ],
            "city": "PleasantVille",
            "state": "Vic",
            "postalCode": "3999"
        }
    ]
}
Cloud-Hosted Instance
```http HTTP/1.1 200 OK ETag: W/"2" Location: https://example.smilecdr.com:8000/Patient/37078/_history/2

{ "resourceType": "Patient", "id": "37078", "meta": { "versionId": "2", "lastUpdated": "2019-07-12T01:46:17.950+00:00" }, "identifier": [ { "system": "urn:oid:1.2.36.146.595.217.0.1", "value": "12345" } ], "name": [ { "family": "Chalmers", "given": [ "Peter", "James" ] } ], "gender": "male", "birthDate": "1974-01-13", "address": [ { "line": [ "534 Erewhon St" ], "city": "PleasantVille", "state": "Vic", "postalCode": "3999" } ] }


## Try It Out!

You can execute this request with cURL using the following command:

<div><i class="fa fa-bus fa-border" aria-hidden="true" style="text-align: center; width: 2em"></i> <span class="helpTutorialTrailIconCaption">Public Test Server</span></div>
```bash
curl -v -X PUT --header "Content-Type: application/fhir+json" --data '{
  "resourceType": "Patient",
  "id": "37078",
  "identifier": [ { "system": "urn:oid:1.2.36.146.595.217.0.1", "value": "12345" } ],
  "name": [ {
      "family": "Chalmers",
      "given": [ "Peter", "James" ]
  } ],
  "gender": "male",
  "birthDate": "1974-01-13",
  "address": [ {
      "line": [ "534 Erewhon St" ],
      "city": "PleasantVille",
      "state": "Vic",
      "postalCode": "3999"
  } ]
}' https://try.smilecdr.com:8000/Patient/37078
Self-Hosted Instance
```bash curl -v -X PUT --header "Content-Type: application/fhir+json" --data '{ "resourceType": "Patient", "id": "37078", "identifier": [ { "system": "urn:oid:1.2.36.146.595.217.0.1", "value": "12345" } ], "name": [ { "family": "Chalmers", "given": [ "Peter", "James" ] } ], "gender": "male", "birthDate": "1974-01-13", "address": [ { "line": [ "534 Erewhon St" ], "city": "PleasantVille", "state": "Vic", "postalCode": "3999" } ] }' http://localhost:8000/Patient/37078 ```
Cloud-Hosted Instance
```bash curl -v -X PUT --header "Content-Type: application/fhir+json" --data '{ "resourceType": "Patient", "id": "37078", "identifier": [ { "system": "urn:oid:1.2.36.146.595.217.0.1", "value": "12345" } ], "name": [ { "family": "Chalmers", "given": [ "Peter", "James" ] } ], "gender": "male", "birthDate": "1974-01-13", "address": [ { "line": [ "534 Erewhon St" ], "city": "PleasantVille", "state": "Vic", "postalCode": "3999" } ] }' https://example.smilecdr.com:8000/Patient/37078 ```

4.3.4FHIR Patch

 

You can patch a resource on a FHIR server by performing a patch operation. The patch uses an HTTP PATCH agaisnt the URL [baseUrl]/[resourceType]/[id]. This operation requries a Content-Type header that specifies the MIME type of the payload.

  • For a JSON patch payload the header value would be: application/json-patch+json.
  • For a XML patch payload the header value would be: application/xml-patch+xml.

The body of the PATCH payload must be in a specific format for JSON and XML requests.

  • JavaScript Object Notation (JSON) Patch structure for JSON. For more information please review RFC 6902.
  • An Extensible Markup Language (XML) Patch Operations Framework Utilizing XML Path Language (XPath) Selectors. For more information please review RFC 5261.

The following example shows a simple patch of the resource created and updated in the examples above.

Request

HTTP Method:

PATCH

Address:

Public Test Server
https://try.smilecdr.com:8000/Patient/37078
Self-Hosted Instance
http://localhost:8000/Patient/37078
Cloud-Hosted Instance
https://example.smilecdr.com:8000/Patient/37078

Headers:

Content-Type: application/json-patch+json

Request Body:

[
 { 
   "op": "replace", 
   "path": "/address/0/postalCode", 
   "value": "M5C 2X8" 
 },
 { 
   "op": "replace", 
   "path": "/birthDate", 
   "value": "1974-02-13" 
 }
]

Response

The FHIR endpoint will respond with a response similar to the following:

Public Test Server
```http HTTP/1.1 200 OK ETag: W/"2" Location: https://try.smilecdr.com:8000/Patient/37078/_history/3

{ "resourceType": "Patient", "id": "37078", "meta": { "versionId": "3", "lastUpdated": "2019-07-12T01:58:07.164+00:00" }, "identifier": [ { "system": "urn:oid:1.2.36.146.595.217.0.1", "value": "12345" } ], "name": [ { "family": "Chalmers", "given": [ "Peter", "James" ] } ], "gender": "male", "birthDate": "1974-02-13", "address": [ { "line": [ "534 Erewhon St" ], "city": "PleasantVille", "state": "Vic", "postalCode": "M5C 2X8" } ] }


<div><i class="fa fa-bicycle fa-border" aria-hidden="true" style="text-align: center; width: 2em"></i> <span class="helpTutorialTrailIconCaption">Self-Hosted Instance</span></div>
```http
HTTP/1.1 200 OK
ETag: W/"2"
Location: http://localhost:8000/Patient/37078/_history/3

{
    "resourceType": "Patient",
    "id": "37078",
    "meta": {
        "versionId": "3",
        "lastUpdated": "2019-07-12T01:58:07.164+00:00"
    },
    "identifier": [
        {
            "system": "urn:oid:1.2.36.146.595.217.0.1",
            "value": "12345"
        }
    ],
    "name": [
        {
            "family": "Chalmers",
            "given": [
                "Peter",
                "James"
            ]
        }
    ],
    "gender": "male",
    "birthDate": "1974-02-13",
    "address": [
        {
            "line": [
                "534 Erewhon St"
            ],
            "city": "PleasantVille",
            "state": "Vic",
            "postalCode": "M5C 2X8"
        }
    ]
}
Cloud-Hosted Instance
```http HTTP/1.1 200 OK ETag: W/"2" Location: https://example.smilecdr.com:8000/Patient/37078/_history/3

{ "resourceType": "Patient", "id": "37078", "meta": { "versionId": "3", "lastUpdated": "2019-07-12T01:58:07.164+00:00" }, "identifier": [ { "system": "urn:oid:1.2.36.146.595.217.0.1", "value": "12345" } ], "name": [ { "family": "Chalmers", "given": [ "Peter", "James" ] } ], "gender": "male", "birthDate": "1974-02-13", "address": [ { "line": [ "534 Erewhon St" ], "city": "PleasantVille", "state": "Vic", "postalCode": "M5C 2X8" } ] }


## Try It Out!

You can execute this request with cURL using the following command:

<div><i class="fa fa-bus fa-border" aria-hidden="true" style="text-align: center; width: 2em"></i> <span class="helpTutorialTrailIconCaption">Public Test Server</span></div>
```bash
curl -v -X PATCH --header 'Content-Type: application/json-patch+json' --data '[
 { 
   "op": "replace", 
   "path": "/address/0/postalCode", 
   "value": "M5C 2X8" 
 },
 { 
   "op": "replace", 
   "path": "/birthDate", 
   "value": "1974-02-13" 
 }
]' https://try.smilecdr.com:8000/Patient/37078
Self-Hosted Instance
```bash curl -v -X PATCH --header 'Content-Type: application/json-patch+json' --data '[ { "op": "replace", "path": "/address/0/postalCode", "value": "M5C 2X8" }, { "op": "replace", "path": "/birthDate", "value": "1974-02-13" } ]' http://localhost:8000/Patient/37078 ```
Cloud-Hosted Instance
```bash curl -v -X PATCH --header 'Content-Type: application/json-patch+json' --data '[ { "op": "replace", "path": "/address/0/postalCode", "value": "M5C 2X8" }, { "op": "replace", "path": "/birthDate", "value": "1974-02-13" } ]' https://example.smilecdr.com:8000/Patient/37078 ```

4.3.5FHIR Read / vRead

 

FHIR Read

If you know the ID of a resource on a FHIR server, you can read back the most recent version of that resource by performing a read operation. The read uses an HTTP GET against the URL [baseUrl]/[resourceType]/[id].

The following example shows a simple read of the resource created and updated in the examples above.

Request

HTTP Method:

GET

Address:

Public Test Server
https://try.smilecdr.com:8000/Patient/37078
Self-Hosted Instance
http://localhost:8000/Patient/37078
Cloud-Hosted Instance
https://example.smilecdr.com:8000/Patient/37078

Response

The FHIR endpoint will respond with a response similar to the following:

Public Test Server
```http HTTP/1.1 200 OK ETag: W/"2" Location: https://try.smilecdr.com:8000/Patient/37078/_history/3

{ "resourceType": "Patient", "id": "37078", "meta": { "versionId": "3", "lastUpdated": "2019-07-12T01:58:07.164+00:00" }, "identifier": [ { "system": "urn:oid:1.2.36.146.595.217.0.1", "value": "12345" } ], "name": [ { "family": "Chalmers", "given": [ "Peter", "James" ] } ], "gender": "male", "birthDate": "1974-02-13", "address": [ { "line": [ "534 Erewhon St" ], "city": "PleasantVille", "state": "Vic", "postalCode": "M5C 2X8" } ] }


<div><i class="fa fa-bicycle fa-border" aria-hidden="true" style="text-align: center; width: 2em"></i> <span class="helpTutorialTrailIconCaption">Self-Hosted Instance</span></div>
```http
HTTP/1.1 200 OK
ETag: W/"2"
Location: http://localhost:8000/Patient/37078/_history/3

{
    "resourceType": "Patient",
    "id": "37078",
    "meta": {
        "versionId": "3",
        "lastUpdated": "2019-07-12T01:58:07.164+00:00"
    },
    "identifier": [
        {
            "system": "urn:oid:1.2.36.146.595.217.0.1",
            "value": "12345"
        }
    ],
    "name": [
        {
            "family": "Chalmers",
            "given": [
                "Peter",
                "James"
            ]
        }
    ],
    "gender": "male",
    "birthDate": "1974-02-13",
    "address": [
        {
            "line": [
                "534 Erewhon St"
            ],
            "city": "PleasantVille",
            "state": "Vic",
            "postalCode": "M5C 2X8"
        }
    ]
}
Cloud-Hosted Instance
```http HTTP/1.1 200 OK ETag: W/"2" Location: https://example.smilecdr.com:8000/Patient/37078/_history/3

{ "resourceType": "Patient", "id": "37078", "meta": { "versionId": "3", "lastUpdated": "2019-07-12T01:58:07.164+00:00" }, "identifier": [ { "system": "urn:oid:1.2.36.146.595.217.0.1", "value": "12345" } ], "name": [ { "family": "Chalmers", "given": [ "Peter", "James" ] } ], "gender": "male", "birthDate": "1974-02-13", "address": [ { "line": [ "534 Erewhon St" ], "city": "PleasantVille", "state": "Vic", "postalCode": "M5C 2X8" } ] }


## Try It Out!

You can execute this request with cURL using the following command or you can simply click on the appropriate link:

<div><i class="fa fa-bus fa-border" aria-hidden="true" style="text-align: center; width: 2em"></i> <span class="helpTutorialTrailIconCaption">Public Test Server</span></div>
```bash
curl -v -X GET https://try.smilecdr.com:8000/Patient/37078

https://try.smilecdr.com:8000/Patient/37078

Self-Hosted Instance
```bash curl -v -X GET http://localhost:8000/Patient/37078 ```

http://localhost:8000/Patient/37078

Cloud-Hosted Instance
```bash curl -v -X GET https://example.smilecdr.com:8000/Patient/37078 ```

https://example.smilecdr.com:8000/Patient/37078

FHIR vRead

You can also include a version string in the URL in order to request a specific version of the resource by performing a vread operation. The vread uses an HTTP GET against the URL [baseUrl]/[resourceType]/[id]/_history/[versionId].

The following example shows a simple vread of the original resource created in the first example above.

Request

HTTP Method:

GET

Address:

Public Test Server
https://try.smilecdr.com:8000/Patient/37078/_history/1
Self-Hosted Instance
http://localhost:8000/Patient/37078/_history/1
Cloud-Hosted Instance
https://example.smilecdr.com:8000/Patient/37078/_history/1

Response

The FHIR endpoint will respond with a response similar to the following:

Public Test Server
```http HTTP/1.1 200 OK ETag: W/"1" Location: https://try.smilecdr.com:8000/Patient/37078/_history/1

{ "resourceType": "Patient", "id": "37078", "meta": { "versionId": "1", "lastUpdated": "2019-07-12T01:43:59.381+00:00" }, "identifier": [ { "system": "urn:oid:1.2.36.146.595.217.0.1", "value": "12345" } ], "name": [ { "family": "Chalmers", "given": [ "Peter", "James" ] } ], "gender": "male", "birthDate": "1974-12-25" }


<div><i class="fa fa-bicycle fa-border" aria-hidden="true" style="text-align: center; width: 2em"></i> <span class="helpTutorialTrailIconCaption">Self-Hosted Instance</span></div>
```http
HTTP/1.1 200 OK
ETag: W/"1"
Location: http://localhost:8000/Patient/37078/_history/1

{
    "resourceType": "Patient",
    "id": "37078",
    "meta": {
        "versionId": "1",
        "lastUpdated": "2019-07-12T01:43:59.381+00:00"
    },
    "identifier": [
        {
            "system": "urn:oid:1.2.36.146.595.217.0.1",
            "value": "12345"
        }
    ],
    "name": [
        {
            "family": "Chalmers",
            "given": [
                "Peter",
                "James"
            ]
        }
    ],
    "gender": "male",
    "birthDate": "1974-12-25"
}
Cloud-Hosted Instance
```http HTTP/1.1 200 OK ETag: W/"1" Location: https://example.smilecdr.com:8000/Patient/37078/_history/1

{ "resourceType": "Patient", "id": "37078", "meta": { "versionId": "1", "lastUpdated": "2019-07-12T01:43:59.381+00:00" }, "identifier": [ { "system": "urn:oid:1.2.36.146.595.217.0.1", "value": "12345" } ], "name": [ { "family": "Chalmers", "given": [ "Peter", "James" ] } ], "gender": "male", "birthDate": "1974-12-25" }


## Try It Out!

You can execute this request with cURL using the following command or you can simply click on the appropriate link:

<div><i class="fa fa-bus fa-border" aria-hidden="true" style="text-align: center; width: 2em"></i> <span class="helpTutorialTrailIconCaption">Public Test Server</span></div>
```bash
curl -v -X GET https://try.smilecdr.com:8000/Patient/37078/_history/1

https://try.smilecdr.com:8000/Patient/37078/_history/1

Self-Hosted Instance
```bash curl -v -X GET http://localhost:8000/Patient/37078/_history/1 ```

http://localhost:8000/Patient/37078/_history/1

Cloud-Hosted Instance
```bash curl -v -X GET https://example.smilecdr.com:8000/Patient/37078/_history/1 ```

https://example.smilecdr.com:8000/Patient/37078/_history/1

4.3.6FHIR Delete

 

You can delete a resource on a FHIR server by performing a delete operation. The delete uses an HTTP DELETE against the URL [baseUrl]/[resourceType]/[id]. This operation performs a logical delete, which has a specific set of semantics:

  • The resource is marked as deleted, and it will no longer appear in search results.
  • The version number of the resource is incremented (essentially, a new deleted version is created).
  • Previous versions of the resource are not physically deleted.
  • The resource may be un-deleted by updating it again.

The following example shows a simple delete of the resource created and updated in the examples above.

Request

HTTP Method:

DELETE

Address:

Public Test Server
https://try.smilecdr.com:8000/Patient/37078
Self-Hosted Instance
http://localhost:8000/Patient/37078
Cloud-Hosted Instance
https://example.smilecdr.com:8000/Patient/37078

Response

The FHIR endpoint will respond with a response similar to the following:

Public Test Server
```http HTTP/1.1 200 OK ETag: W/"3" Location: https://try.smilecdr.com:8000/Patient/37078/_history/3

{ "resourceType": "OperationOutcome", "issue": [ { "severity": "information", "code": "informational", "diagnostics": "Successfully deleted 1 resource(s) in 29ms" } ] }


<div><i class="fa fa-bicycle fa-border" aria-hidden="true" style="text-align: center; width: 2em"></i> <span class="helpTutorialTrailIconCaption">Self-Hosted Instance</span></div>
```http
HTTP/1.1 200 OK
ETag: W/"3"
Location: http://localhost:8000/Patient/37078/_history/3

{
    "resourceType": "OperationOutcome",
    "issue": [
        {
            "severity": "information",
            "code": "informational",
            "diagnostics": "Successfully deleted 1 resource(s) in 29ms"
        }
    ]
}
Cloud-Hosted Instance
```http HTTP/1.1 200 OK ETag: W/"3" Location: https://example.smilecdr.com:8000/Patient/37078/_history/3

{ "resourceType": "OperationOutcome", "issue": [ { "severity": "information", "code": "informational", "diagnostics": "Successfully deleted 1 resource(s) in 29ms" } ] }


## Try It Out!

You can execute this request with cURL using the following command:

<div><i class="fa fa-bus fa-border" aria-hidden="true" style="text-align: center; width: 2em"></i> <span class="helpTutorialTrailIconCaption">Public Test Server</span></div>
```bash
curl -v -X DELETE https://try.smilecdr.com:8000/Patient/37078
Self-Hosted Instance
```bash curl -v -X DELETE http://localhost:8000/Patient/37078 ```
Cloud-Hosted Instance
```bash curl -v -X DELETE https://example.smilecdr.com:8000/Patient/37078 ```