Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. prb112 created this gist Jun 16, 2021.
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,896 @@
    {
    "info": {
    "_postman_id": "60b5dfcc-28f6-4288-bff4-73e006dc2ebf",
    "name": "IBM FHIR Server - Operation: $erase - All Versions",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "item": [
    {
    "name": "0. Check the Metadata Endpoint",
    "event": [
    {
    "listen": "prerequest",
    "script": {
    "exec": [
    ""
    ],
    "type": "text/javascript"
    }
    },
    {
    "listen": "test",
    "script": {
    "exec": [
    "pm.test(\"Status code is 200\", function () {",
    " pm.response.to.have.status(200);",
    "});"
    ],
    "type": "text/javascript"
    }
    }
    ],
    "protocolProfileBehavior": {
    "disableBodyPruning": true
    },
    "request": {
    "method": "GET",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "{{FHIR_TENANT_ID}}",
    "type": "text"
    },
    {
    "key": "Content-Type",
    "value": "application/fhir+json",
    "type": "text"
    }
    ],
    "body": {
    "mode": "raw",
    "raw": "",
    "options": {
    "raw": {
    "language": "json"
    }
    }
    },
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/metadata",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "metadata"
    ]
    }
    },
    "response": []
    },
    {
    "name": "1. Confirm Authenticated Access using $healthcheck",
    "event": [
    {
    "listen": "prerequest",
    "script": {
    "exec": [
    ""
    ],
    "type": "text/javascript"
    }
    },
    {
    "listen": "test",
    "script": {
    "exec": [
    "pm.test(\"Status code is 200\", function () {",
    " pm.response.to.have.status(200);",
    "});"
    ],
    "type": "text/javascript"
    }
    }
    ],
    "protocolProfileBehavior": {
    "disableBodyPruning": true
    },
    "request": {
    "method": "GET",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "{{FHIR_TENANT_ID}}",
    "type": "text"
    },
    {
    "key": "Content-Type",
    "value": "application/fhir+json",
    "type": "text"
    }
    ],
    "body": {
    "mode": "raw",
    "raw": "",
    "options": {
    "raw": {
    "language": "json"
    }
    }
    },
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/$healthcheck",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "$healthcheck"
    ]
    }
    },
    "response": []
    },
    {
    "name": "2. Create Patient - version 1",
    "event": [
    {
    "listen": "test",
    "script": {
    "exec": [
    "pm.test(\"Status code is 201 - '\" + RESOURCE_ID + \"'\", function () {",
    " pm.response.to.have.status(201);",
    "});",
    "",
    "var locationHeader = postman.getResponseHeader(\"Location\");",
    "var location = locationHeader.split('/_history/')[0];",
    "var RESOURCE_ID = location.substring(location.lastIndexOf(\"/\")+1);",
    "pm.collectionVariables.set(\"RESOURCE_ID\", RESOURCE_ID);",
    "console.log(RESOURCE_ID);",
    "pm.collectionVariables.set(\"BODY\", pm.response.text());"
    ],
    "type": "text/javascript"
    }
    }
    ],
    "request": {
    "method": "POST",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "default",
    "type": "text"
    },
    {
    "key": "Prefer",
    "value": "return=representation",
    "type": "text"
    }
    ],
    "body": {
    "mode": "raw",
    "raw": "{\n \"resourceType\": \"Patient\",\n \"managingOrganization\": {\n \"reference\": \"Organization/1\",\n \"display\": \"Demo Org\"\n },\n \"contact\": [\n {\n \"relationship\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0131\",\n \"code\": \"E\"\n }\n ]\n }\n ],\n \"organization\": {\n \"reference\": \"Organization/1\",\n \"display\": \"Demo Org\"\n }\n }\n ],\n \"text\": {\n \"status\": \"generated\",\n \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\">\\n \\n <table>\\n \\n <tbody>\\n \\n <tr>\\n \\n <td>Name</td>\\n \\n <td>Peter James \\n <b>Chalmers</b> (&quot;Jim&quot;)\\n </td>\\n \\n </tr>\\n \\n <tr>\\n \\n <td>Address</td>\\n \\n <td>534 Erewhon, Pleasantville, Vic, 3999</td>\\n \\n </tr>\\n \\n <tr>\\n \\n <td>Contacts</td>\\n \\n <td>Home: unknown. Work: (03) 5555 6473</td>\\n \\n </tr>\\n \\n <tr>\\n \\n <td>Id</td>\\n \\n <td>MRN: 12345 (Acme Healthcare)</td>\\n \\n </tr>\\n \\n </tbody>\\n \\n </table> \\n \\n </div>\"\n },\n \"identifier\": [\n {\n \"use\": \"usual\",\n \"type\": {\n \"coding\": [\n {\n \"system\": \"http://hl7.org/fhir/v2/0203\",\n \"code\": \"MR\"\n }\n ]\n },\n \"system\": \"urn:oid:1.2.36.146.595.217.0.1\",\n \"value\": \"12345\",\n \"period\": {\n \"start\": \"2001-05-06\"\n },\n \"assigner\": {\n \"display\": \"Acme Healthcare\"\n }\n }\n ],\n \"active\": true,\n \"name\": [\n {\n \"use\": \"official\",\n \"family\": \"Chalmers\",\n \"given\": [\n \"Peter\",\n \"James\"\n ]\n },\n {\n \"use\": \"usual\",\n \"given\": [\n \"Jim\"\n ]\n }\n ],\n \"telecom\": [\n {\n \"use\": \"home\"\n },\n {\n \"system\": \"phone\",\n \"value\": \"(03) 5555 6473\",\n \"use\": \"work\"\n }\n ],\n \"gender\": \"male\",\n \"birthDate\": \"1974-12-25\",\n \"_birthDate\": {\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/patient-birthTime\",\n \"valueDateTime\": \"1974-12-25T14:35:45-05:00\"\n }\n ]\n },\n \"deceasedBoolean\": false,\n \"address\": [\n {\n \"use\": \"home\",\n \"type\": \"both\",\n \"line\": [\n \"534 Erewhon St\"\n ],\n \"city\": \"PleasantVille\",\n \"district\": \"Rainbow\",\n \"state\": \"Vic\",\n \"postalCode\": \"3999\",\n \"period\": {\n \"start\": \"1974-12-25\"\n }\n }\n ],\n \"extension\": [ \n {\n \"url\": \"http://com.ibm.fhir.sample/favorite-mlb\",\n \"valueString\": \"RedSox\"\n }\n ]\n}",
    "options": {
    "raw": {
    "language": "json"
    }
    }
    },
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/Patient",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "Patient"
    ]
    }
    },
    "response": []
    },
    {
    "name": "2. Update Patient - version 2",
    "event": [
    {
    "listen": "test",
    "script": {
    "exec": [
    "pm.test(\"Status code is 200\", function () {",
    " pm.response.to.have.status(200);",
    "});"
    ],
    "type": "text/javascript"
    }
    }
    ],
    "request": {
    "method": "PUT",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "default",
    "type": "text"
    },
    {
    "key": "Prefer",
    "value": "return=representation",
    "type": "text"
    }
    ],
    "body": {
    "mode": "raw",
    "raw": "{{BODY}}",
    "options": {
    "raw": {
    "language": "json"
    }
    }
    },
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/Patient/{{RESOURCE_ID}}",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "Patient",
    "{{RESOURCE_ID}}"
    ]
    }
    },
    "response": []
    },
    {
    "name": "3. Search for Patient",
    "event": [
    {
    "listen": "prerequest",
    "script": {
    "exec": [
    ""
    ],
    "type": "text/javascript"
    }
    },
    {
    "listen": "test",
    "script": {
    "exec": [
    "pm.test(\"Status code is 200\", function () {",
    " pm.response.to.have.status(200);",
    "});",
    "",
    "var total = pm.response.json()[\"total\"];",
    "",
    "pm.test(\"Checking the Bundle Has GTE 1 Entry\", function () {",
    " var jsonData = pm.response.json();",
    " pm.expect(jsonData.total).to.gte(1);",
    "});"
    ],
    "type": "text/javascript"
    }
    }
    ],
    "request": {
    "method": "GET",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "{{FHIR_TENANT_ID}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "Content-Type",
    "value": "application/fhir+json",
    "type": "text"
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER",
    "value": "{{BULKDATA_PROVIDER}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER-OUTCOME",
    "value": "{{BULKDATA_PROVIDER_OUTCOME}}",
    "type": "text",
    "disabled": true
    }
    ],
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/Patient?_id={{RESOURCE_ID}}",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "Patient"
    ],
    "query": [
    {
    "key": "_id",
    "value": "{{RESOURCE_ID}}"
    }
    ]
    }
    },
    "response": []
    },
    {
    "name": "4. Search for Patient - active",
    "event": [
    {
    "listen": "prerequest",
    "script": {
    "exec": [
    ""
    ],
    "type": "text/javascript"
    }
    },
    {
    "listen": "test",
    "script": {
    "exec": [
    "pm.test(\"Status code is 200\", function () {",
    " pm.response.to.have.status(200);",
    "});",
    "",
    "var total = pm.response.json()[\"total\"];",
    "",
    "pm.test(\"Checking the Bundle Has GTE 1 Entry\", function () {",
    " var jsonData = pm.response.json();",
    " pm.expect(jsonData.total).to.gte(1);",
    "});"
    ],
    "type": "text/javascript"
    }
    }
    ],
    "request": {
    "method": "GET",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "{{FHIR_TENANT_ID}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "Content-Type",
    "value": "application/fhir+json",
    "type": "text"
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER",
    "value": "{{BULKDATA_PROVIDER}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER-OUTCOME",
    "value": "{{BULKDATA_PROVIDER_OUTCOME}}",
    "type": "text",
    "disabled": true
    }
    ],
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/Patient?_id={{RESOURCE_ID}}&active=true",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "Patient"
    ],
    "query": [
    {
    "key": "_id",
    "value": "{{RESOURCE_ID}}"
    },
    {
    "key": "active",
    "value": "true"
    }
    ]
    }
    },
    "response": []
    },
    {
    "name": "5. Get Patient",
    "event": [
    {
    "listen": "prerequest",
    "script": {
    "exec": [
    ""
    ],
    "type": "text/javascript"
    }
    },
    {
    "listen": "test",
    "script": {
    "exec": [
    "pm.test(\"Status code is 200\", function () {",
    " pm.response.to.have.status(200);",
    "});",
    "",
    "pm.test(\"Checking the IDs match\", function () {",
    " var jsonData = pm.response.json();",
    " pm.expect(jsonData.id).to.eq(pm.variables.get(\"RESOURCE_ID\"));",
    "});"
    ],
    "type": "text/javascript"
    }
    }
    ],
    "request": {
    "method": "GET",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "{{FHIR_TENANT_ID}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "Content-Type",
    "value": "application/fhir+json",
    "type": "text"
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER",
    "value": "{{BULKDATA_PROVIDER}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER-OUTCOME",
    "value": "{{BULKDATA_PROVIDER_OUTCOME}}",
    "type": "text",
    "disabled": true
    }
    ],
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/Patient/{{RESOURCE_ID}}",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "Patient",
    "{{RESOURCE_ID}}"
    ]
    }
    },
    "response": []
    },
    {
    "name": "6. Execute Operation - $erase Patient",
    "event": [
    {
    "listen": "prerequest",
    "script": {
    "exec": [
    ""
    ],
    "type": "text/javascript"
    }
    },
    {
    "listen": "test",
    "script": {
    "exec": [
    "pm.test(\"Status code is 200\", function () {",
    " pm.response.to.have.status(200);",
    "});",
    "",
    "pm.test(\"Checking total is 2\", function () {",
    " var jsonData = pm.response.json();",
    " pm.expect(jsonData.parameter[2].valueInteger).to.eql(2);",
    " pm.collectionVariables.set(\"HISTORY_ID\", jsonData.parameter[1].valueString);",
    "});"
    ],
    "type": "text/javascript"
    }
    }
    ],
    "request": {
    "method": "POST",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "{{FHIR_TENANT_ID}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "Content-Type",
    "value": "application/fhir+json",
    "type": "text"
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER",
    "value": "{{BULKDATA_PROVIDER}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER-OUTCOME",
    "value": "{{BULKDATA_PROVIDER_OUTCOME}}",
    "type": "text",
    "disabled": true
    }
    ],
    "body": {
    "mode": "raw",
    "raw": "{\n \"resourceType\": \"Parameters\",\n \"parameter\": [\n {\n \"name\": \"patient\",\n \"valueString\": \"patient-id-is-this-id\"\n },\n {\n \"name\": \"reason\",\n \"valueString\": \"My Reason for removing this resource\"\n }\n ]\n}",
    "options": {
    "raw": {
    "language": "json"
    }
    }
    },
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/Patient/{{RESOURCE_ID}}/$erase",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "Patient",
    "{{RESOURCE_ID}}",
    "$erase"
    ]
    }
    },
    "response": []
    },
    {
    "name": "7. Search for Patient - Should not exist",
    "event": [
    {
    "listen": "prerequest",
    "script": {
    "exec": [
    ""
    ],
    "type": "text/javascript"
    }
    },
    {
    "listen": "test",
    "script": {
    "exec": [
    "pm.test(\"Status code is 200\", function () {",
    " pm.response.to.have.status(200);",
    "});",
    "",
    "var total = pm.response.json()[\"total\"];",
    "",
    "pm.test(\"Checking the Bundle Has EQ 0\", function () {",
    " var jsonData = pm.response.json();",
    " pm.expect(jsonData.total).to.eql(0);",
    "});"
    ],
    "type": "text/javascript"
    }
    }
    ],
    "protocolProfileBehavior": {
    "disableBodyPruning": true
    },
    "request": {
    "method": "GET",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "{{FHIR_TENANT_ID}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "Content-Type",
    "value": "application/fhir+json",
    "type": "text"
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER",
    "value": "{{BULKDATA_PROVIDER}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER-OUTCOME",
    "value": "{{BULKDATA_PROVIDER_OUTCOME}}",
    "type": "text",
    "disabled": true
    }
    ],
    "body": {
    "mode": "raw",
    "raw": "",
    "options": {
    "raw": {
    "language": "json"
    }
    }
    },
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/Patient?_id={{RESOURCE_ID}}",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "Patient"
    ],
    "query": [
    {
    "key": "_id",
    "value": "{{RESOURCE_ID}}"
    }
    ]
    }
    },
    "response": []
    },
    {
    "name": "8. Search for Patient - Should not exist",
    "event": [
    {
    "listen": "prerequest",
    "script": {
    "exec": [
    ""
    ],
    "type": "text/javascript"
    }
    },
    {
    "listen": "test",
    "script": {
    "exec": [
    "pm.test(\"Status code is 200\", function () {",
    " pm.response.to.have.status(200);",
    "});",
    "",
    "var total = pm.response.json()[\"total\"];",
    "",
    "pm.test(\"Checking the Bundle Has EQ 0\", function () {",
    " var jsonData = pm.response.json();",
    " pm.expect(jsonData.total).to.eql(0);",
    "});"
    ],
    "type": "text/javascript"
    }
    }
    ],
    "request": {
    "method": "GET",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "{{FHIR_TENANT_ID}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "Content-Type",
    "value": "application/fhir+json",
    "type": "text"
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER",
    "value": "{{BULKDATA_PROVIDER}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER-OUTCOME",
    "value": "{{BULKDATA_PROVIDER_OUTCOME}}",
    "type": "text",
    "disabled": true
    }
    ],
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/Patient?_id={{RESOURCE_ID}}&active=true",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "Patient"
    ],
    "query": [
    {
    "key": "_id",
    "value": "{{RESOURCE_ID}}"
    },
    {
    "key": "active",
    "value": "true"
    }
    ]
    }
    },
    "response": []
    },
    {
    "name": "9. Get Patient Copy - Should not exist",
    "event": [
    {
    "listen": "prerequest",
    "script": {
    "exec": [
    ""
    ],
    "type": "text/javascript"
    }
    },
    {
    "listen": "test",
    "script": {
    "exec": [
    "pm.test(\"Status code is 404\", function () {",
    " pm.response.to.have.status(404);",
    "});"
    ],
    "type": "text/javascript"
    }
    }
    ],
    "protocolProfileBehavior": {
    "disableBodyPruning": true
    },
    "request": {
    "method": "GET",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "{{FHIR_TENANT_ID}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "Content-Type",
    "value": "application/fhir+json",
    "type": "text"
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER",
    "value": "{{BULKDATA_PROVIDER}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER-OUTCOME",
    "value": "{{BULKDATA_PROVIDER_OUTCOME}}",
    "type": "text",
    "disabled": true
    }
    ],
    "body": {
    "mode": "raw",
    "raw": "{\n \"resourceType\": \"Parameters\",\n \"parameter\": [\n {\n \"name\": \"patient\",\n \"valueString\": \"patient-id-is-this-id\"\n },\n {\n \"name\": \"reason\",\n \"valueString\": \"My Reason for removing this resource\"\n }\n ]\n}",
    "options": {
    "raw": {
    "language": "json"
    }
    }
    },
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/Patient/{{RESOURCE_ID}}",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "Patient",
    "{{RESOURCE_ID}}"
    ]
    }
    },
    "response": []
    }
    ],
    "auth": {
    "type": "basic",
    "basic": [
    {
    "key": "password",
    "value": "change-password",
    "type": "string"
    },
    {
    "key": "username",
    "value": "fhiruser",
    "type": "string"
    }
    ]
    },
    "event": [
    {
    "listen": "prerequest",
    "script": {
    "type": "text/javascript",
    "exec": [
    ""
    ]
    }
    },
    {
    "listen": "test",
    "script": {
    "type": "text/javascript",
    "exec": [
    ""
    ]
    }
    }
    ],
    "variable": [
    {
    "key": "FHIR_TENANT_ID",
    "value": "default"
    },
    {
    "key": "SERVER_URL",
    "value": "localhost:9443"
    },
    {
    "key": "LOC",
    "value": "",
    "disabled": true
    },
    {
    "key": "RESOURCE_ID",
    "value": ""
    },
    {
    "key": "BODY",
    "value": ""
    },
    {
    "key": "HISTORY_ID",
    "value": ""
    }
    ]
    }
    1,099 changes: 1,099 additions & 0 deletions IBM FHIR Server - Operation- $erase - Specific Version.postman_collection.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,1099 @@
    {
    "info": {
    "_postman_id": "362b999e-1816-4fb8-a835-589963e85aea",
    "name": "IBM FHIR Server - Operation: $erase - Specific Version",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "item": [
    {
    "name": "0. Check the Metadata Endpoint",
    "event": [
    {
    "listen": "prerequest",
    "script": {
    "exec": [
    ""
    ],
    "type": "text/javascript"
    }
    },
    {
    "listen": "test",
    "script": {
    "exec": [
    "pm.test(\"Status code is 200\", function () {",
    " pm.response.to.have.status(200);",
    "});"
    ],
    "type": "text/javascript"
    }
    }
    ],
    "protocolProfileBehavior": {
    "disableBodyPruning": true
    },
    "request": {
    "method": "GET",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "{{FHIR_TENANT_ID}}",
    "type": "text"
    },
    {
    "key": "Content-Type",
    "value": "application/fhir+json",
    "type": "text"
    }
    ],
    "body": {
    "mode": "raw",
    "raw": "",
    "options": {
    "raw": {
    "language": "json"
    }
    }
    },
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/metadata",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "metadata"
    ]
    }
    },
    "response": []
    },
    {
    "name": "1. Confirm Authenticated Access using $healthcheck",
    "event": [
    {
    "listen": "prerequest",
    "script": {
    "exec": [
    ""
    ],
    "type": "text/javascript"
    }
    },
    {
    "listen": "test",
    "script": {
    "exec": [
    "pm.test(\"Status code is 200\", function () {",
    " pm.response.to.have.status(200);",
    "});"
    ],
    "type": "text/javascript"
    }
    }
    ],
    "protocolProfileBehavior": {
    "disableBodyPruning": true
    },
    "request": {
    "method": "GET",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "{{FHIR_TENANT_ID}}",
    "type": "text"
    },
    {
    "key": "Content-Type",
    "value": "application/fhir+json",
    "type": "text"
    }
    ],
    "body": {
    "mode": "raw",
    "raw": "",
    "options": {
    "raw": {
    "language": "json"
    }
    }
    },
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/$healthcheck",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "$healthcheck"
    ]
    }
    },
    "response": []
    },
    {
    "name": "2. Create Patient - version 1",
    "event": [
    {
    "listen": "test",
    "script": {
    "exec": [
    "pm.test(\"Status code is 201\", function () {",
    " pm.response.to.have.status(201);",
    "});",
    "",
    "var locationHeader = postman.getResponseHeader(\"Location\");",
    "var location = locationHeader.split('/_history/')[0];",
    "var RESOURCE_ID = location.substring(location.lastIndexOf(\"/\")+1);",
    "pm.collectionVariables.set(\"RESOURCE_ID\", RESOURCE_ID);",
    "",
    "pm.collectionVariables.set(\"BODY\", pm.response.text());"
    ],
    "type": "text/javascript"
    }
    }
    ],
    "request": {
    "method": "POST",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "default",
    "type": "text"
    },
    {
    "key": "Prefer",
    "value": "return=representation",
    "type": "text"
    }
    ],
    "body": {
    "mode": "raw",
    "raw": "{\n \"resourceType\": \"Patient\",\n \"managingOrganization\": {\n \"reference\": \"Organization/1\",\n \"display\": \"Demo Org\"\n },\n \"contact\": [\n {\n \"relationship\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0131\",\n \"code\": \"E\"\n }\n ]\n }\n ],\n \"organization\": {\n \"reference\": \"Organization/1\",\n \"display\": \"Demo Org\"\n }\n }\n ],\n \"text\": {\n \"status\": \"generated\",\n \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\">\\n \\n <table>\\n \\n <tbody>\\n \\n <tr>\\n \\n <td>Name</td>\\n \\n <td>Peter James \\n <b>Chalmers</b> (&quot;Jim&quot;)\\n </td>\\n \\n </tr>\\n \\n <tr>\\n \\n <td>Address</td>\\n \\n <td>534 Erewhon, Pleasantville, Vic, 3999</td>\\n \\n </tr>\\n \\n <tr>\\n \\n <td>Contacts</td>\\n \\n <td>Home: unknown. Work: (03) 5555 6473</td>\\n \\n </tr>\\n \\n <tr>\\n \\n <td>Id</td>\\n \\n <td>MRN: 12345 (Acme Healthcare)</td>\\n \\n </tr>\\n \\n </tbody>\\n \\n </table> \\n \\n </div>\"\n },\n \"identifier\": [\n {\n \"use\": \"usual\",\n \"type\": {\n \"coding\": [\n {\n \"system\": \"http://hl7.org/fhir/v2/0203\",\n \"code\": \"MR\"\n }\n ]\n },\n \"system\": \"urn:oid:1.2.36.146.595.217.0.1\",\n \"value\": \"12345\",\n \"period\": {\n \"start\": \"2001-05-06\"\n },\n \"assigner\": {\n \"display\": \"Acme Healthcare\"\n }\n }\n ],\n \"active\": true,\n \"name\": [\n {\n \"use\": \"official\",\n \"family\": \"Chalmers\",\n \"given\": [\n \"Peter\",\n \"James\"\n ]\n },\n {\n \"use\": \"usual\",\n \"given\": [\n \"Jim\"\n ]\n }\n ],\n \"telecom\": [\n {\n \"use\": \"home\"\n },\n {\n \"system\": \"phone\",\n \"value\": \"(03) 5555 6473\",\n \"use\": \"work\"\n }\n ],\n \"gender\": \"male\",\n \"birthDate\": \"1974-12-25\",\n \"_birthDate\": {\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/patient-birthTime\",\n \"valueDateTime\": \"1974-12-25T14:35:45-05:00\"\n }\n ]\n },\n \"deceasedBoolean\": false,\n \"address\": [\n {\n \"use\": \"home\",\n \"type\": \"both\",\n \"line\": [\n \"534 Erewhon St\"\n ],\n \"city\": \"PleasantVille\",\n \"district\": \"Rainbow\",\n \"state\": \"Vic\",\n \"postalCode\": \"3999\",\n \"period\": {\n \"start\": \"1974-12-25\"\n }\n }\n ],\n \"extension\": [ \n {\n \"url\": \"http://com.ibm.fhir.sample/favorite-mlb\",\n \"valueString\": \"RedSox\"\n }\n ]\n}",
    "options": {
    "raw": {
    "language": "json"
    }
    }
    },
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/Patient",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "Patient"
    ]
    }
    },
    "response": []
    },
    {
    "name": "2. Update Patient - version 2",
    "event": [
    {
    "listen": "test",
    "script": {
    "exec": [
    "pm.test(\"Status code is 200\", function () {",
    " pm.response.to.have.status(200);",
    "});"
    ],
    "type": "text/javascript"
    }
    }
    ],
    "request": {
    "method": "PUT",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "default",
    "type": "text"
    },
    {
    "key": "Prefer",
    "value": "return=representation",
    "type": "text"
    }
    ],
    "body": {
    "mode": "raw",
    "raw": "{{BODY}}",
    "options": {
    "raw": {
    "language": "json"
    }
    }
    },
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/Patient/{{RESOURCE_ID}}",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "Patient",
    "{{RESOURCE_ID}}"
    ]
    }
    },
    "response": []
    },
    {
    "name": "3. Search for Patient",
    "event": [
    {
    "listen": "prerequest",
    "script": {
    "exec": [
    ""
    ],
    "type": "text/javascript"
    }
    },
    {
    "listen": "test",
    "script": {
    "exec": [
    "pm.test(\"Status code is 200\", function () {",
    " pm.response.to.have.status(200);",
    "});",
    "",
    "var total = pm.response.json()[\"total\"];",
    "",
    "pm.test(\"Checking the Bundle Has GTE 1 Entry\", function () {",
    " var jsonData = pm.response.json();",
    " pm.expect(jsonData.total).to.gte(1);",
    "});"
    ],
    "type": "text/javascript"
    }
    }
    ],
    "request": {
    "method": "GET",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "{{FHIR_TENANT_ID}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "Content-Type",
    "value": "application/fhir+json",
    "type": "text"
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER",
    "value": "{{BULKDATA_PROVIDER}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER-OUTCOME",
    "value": "{{BULKDATA_PROVIDER_OUTCOME}}",
    "type": "text",
    "disabled": true
    }
    ],
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/Patient?_id={{RESOURCE_ID}}",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "Patient"
    ],
    "query": [
    {
    "key": "_id",
    "value": "{{RESOURCE_ID}}"
    }
    ]
    }
    },
    "response": []
    },
    {
    "name": "4. Search for Patient - active",
    "event": [
    {
    "listen": "prerequest",
    "script": {
    "exec": [
    ""
    ],
    "type": "text/javascript"
    }
    },
    {
    "listen": "test",
    "script": {
    "exec": [
    "pm.test(\"Status code is 200\", function () {",
    " pm.response.to.have.status(200);",
    "});",
    "",
    "var total = pm.response.json()[\"total\"];",
    "",
    "pm.test(\"Checking the Bundle Has GTE 1 Entry\", function () {",
    " var jsonData = pm.response.json();",
    " pm.expect(jsonData.total).to.gte(1);",
    "});"
    ],
    "type": "text/javascript"
    }
    }
    ],
    "request": {
    "method": "GET",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "{{FHIR_TENANT_ID}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "Content-Type",
    "value": "application/fhir+json",
    "type": "text"
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER",
    "value": "{{BULKDATA_PROVIDER}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER-OUTCOME",
    "value": "{{BULKDATA_PROVIDER_OUTCOME}}",
    "type": "text",
    "disabled": true
    }
    ],
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/Patient?_id={{RESOURCE_ID}}&active=true",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "Patient"
    ],
    "query": [
    {
    "key": "_id",
    "value": "{{RESOURCE_ID}}"
    },
    {
    "key": "active",
    "value": "true"
    }
    ]
    }
    },
    "response": []
    },
    {
    "name": "5. Get Patient",
    "event": [
    {
    "listen": "prerequest",
    "script": {
    "exec": [
    ""
    ],
    "type": "text/javascript"
    }
    },
    {
    "listen": "test",
    "script": {
    "exec": [
    "pm.test(\"Status code is 200\", function () {",
    " pm.response.to.have.status(200);",
    "});",
    "",
    "pm.test(\"Checking the IDs match\", function () {",
    " var jsonData = pm.response.json();",
    " pm.expect(jsonData.id).to.eq(pm.variables.get(\"RESOURCE_ID\"));",
    "});"
    ],
    "type": "text/javascript"
    }
    }
    ],
    "request": {
    "method": "GET",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "{{FHIR_TENANT_ID}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "Content-Type",
    "value": "application/fhir+json",
    "type": "text"
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER",
    "value": "{{BULKDATA_PROVIDER}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER-OUTCOME",
    "value": "{{BULKDATA_PROVIDER_OUTCOME}}",
    "type": "text",
    "disabled": true
    }
    ],
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/Patient/{{RESOURCE_ID}}",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "Patient",
    "{{RESOURCE_ID}}"
    ]
    }
    },
    "response": []
    },
    {
    "name": "6. Execute Operation - $erase Patient - Latest Version",
    "event": [
    {
    "listen": "prerequest",
    "script": {
    "exec": [
    ""
    ],
    "type": "text/javascript"
    }
    },
    {
    "listen": "test",
    "script": {
    "exec": [
    "pm.test(\"Status code is 400\", function () {",
    " pm.response.to.have.status(400);",
    "});"
    ],
    "type": "text/javascript"
    }
    }
    ],
    "request": {
    "method": "POST",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "{{FHIR_TENANT_ID}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "Content-Type",
    "value": "application/fhir+json",
    "type": "text"
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER",
    "value": "{{BULKDATA_PROVIDER}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER-OUTCOME",
    "value": "{{BULKDATA_PROVIDER_OUTCOME}}",
    "type": "text",
    "disabled": true
    }
    ],
    "body": {
    "mode": "raw",
    "raw": "{\n \"resourceType\": \"Parameters\",\n \"parameter\": [\n {\n \"name\": \"patient\",\n \"valueString\": \"patient-id-is-this-id\"\n },\n {\n \"name\": \"reason\",\n \"valueString\": \"My Reason for removing this resource\"\n },\n {\n \"name\": \"version\",\n \"valueInteger\": 2\n }\n ]\n}",
    "options": {
    "raw": {
    "language": "json"
    }
    }
    },
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/Patient/{{RESOURCE_ID}}/$erase",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "Patient",
    "{{RESOURCE_ID}}",
    "$erase"
    ]
    }
    },
    "response": []
    },
    {
    "name": "7. Execute Operation - $erase Patient - Too High",
    "event": [
    {
    "listen": "prerequest",
    "script": {
    "exec": [
    ""
    ],
    "type": "text/javascript"
    }
    },
    {
    "listen": "test",
    "script": {
    "exec": [
    "pm.test(\"Status code is 400\", function () {",
    " pm.response.to.have.status(400);",
    "});"
    ],
    "type": "text/javascript"
    }
    }
    ],
    "request": {
    "method": "POST",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "{{FHIR_TENANT_ID}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "Content-Type",
    "value": "application/fhir+json",
    "type": "text"
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER",
    "value": "{{BULKDATA_PROVIDER}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER-OUTCOME",
    "value": "{{BULKDATA_PROVIDER_OUTCOME}}",
    "type": "text",
    "disabled": true
    }
    ],
    "body": {
    "mode": "raw",
    "raw": "{\n \"resourceType\": \"Parameters\",\n \"parameter\": [\n {\n \"name\": \"patient\",\n \"valueString\": \"patient-id-is-this-id\"\n },\n {\n \"name\": \"reason\",\n \"valueString\": \"My Reason for removing this resource\"\n },\n {\n \"name\": \"version\",\n \"valueInteger\": 300\n }\n ]\n}",
    "options": {
    "raw": {
    "language": "json"
    }
    }
    },
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/Patient/{{RESOURCE_ID}}/$erase",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "Patient",
    "{{RESOURCE_ID}}",
    "$erase"
    ]
    }
    },
    "response": []
    },
    {
    "name": "8. Execute Operation - $erase Patient - Version 1",
    "event": [
    {
    "listen": "prerequest",
    "script": {
    "exec": [
    ""
    ],
    "type": "text/javascript"
    }
    },
    {
    "listen": "test",
    "script": {
    "exec": [
    "pm.test(\"Status code is 200\", function () {",
    " pm.response.to.have.status(200);",
    "});",
    "",
    "pm.test(\"Checking total is 1\", function () {",
    " var jsonData = pm.response.json();",
    " pm.expect(jsonData.parameter[2].valueInteger).to.eql(1);",
    " pm.collectionVariables.set(\"HISTORY_ID\", jsonData.parameter[1].valueString);",
    "});"
    ],
    "type": "text/javascript"
    }
    }
    ],
    "request": {
    "method": "POST",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "{{FHIR_TENANT_ID}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "Content-Type",
    "value": "application/fhir+json",
    "type": "text"
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER",
    "value": "{{BULKDATA_PROVIDER}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER-OUTCOME",
    "value": "{{BULKDATA_PROVIDER_OUTCOME}}",
    "type": "text",
    "disabled": true
    }
    ],
    "body": {
    "mode": "raw",
    "raw": "{\n \"resourceType\": \"Parameters\",\n \"parameter\": [\n {\n \"name\": \"patient\",\n \"valueString\": \"patient-id-is-this-id\"\n },\n {\n \"name\": \"reason\",\n \"valueString\": \"My Reason for removing this resource\"\n },\n {\n \"name\": \"version\",\n \"valueInteger\": 1\n }\n ]\n}",
    "options": {
    "raw": {
    "language": "json"
    }
    }
    },
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/Patient/{{RESOURCE_ID}}/$erase",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "Patient",
    "{{RESOURCE_ID}}",
    "$erase"
    ]
    }
    },
    "response": []
    },
    {
    "name": "9. Search for Patient - Should exist",
    "event": [
    {
    "listen": "prerequest",
    "script": {
    "exec": [
    ""
    ],
    "type": "text/javascript"
    }
    },
    {
    "listen": "test",
    "script": {
    "exec": [
    "pm.test(\"Status code is 200\", function () {",
    " pm.response.to.have.status(200);",
    "});",
    "",
    "var total = pm.response.json()[\"total\"];",
    "",
    "pm.test(\"Checking the Bundle Has EQ 1\", function () {",
    " var jsonData = pm.response.json();",
    " pm.expect(jsonData.total).to.eql(1);",
    "});"
    ],
    "type": "text/javascript"
    }
    }
    ],
    "request": {
    "method": "GET",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "{{FHIR_TENANT_ID}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "Content-Type",
    "value": "application/fhir+json",
    "type": "text"
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER",
    "value": "{{BULKDATA_PROVIDER}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER-OUTCOME",
    "value": "{{BULKDATA_PROVIDER_OUTCOME}}",
    "type": "text",
    "disabled": true
    }
    ],
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/Patient?_id={{RESOURCE_ID}}",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "Patient"
    ],
    "query": [
    {
    "key": "_id",
    "value": "{{RESOURCE_ID}}"
    }
    ]
    }
    },
    "response": []
    },
    {
    "name": "10. Search for Patient - Should exist",
    "event": [
    {
    "listen": "prerequest",
    "script": {
    "exec": [
    ""
    ],
    "type": "text/javascript"
    }
    },
    {
    "listen": "test",
    "script": {
    "exec": [
    ""
    ],
    "type": "text/javascript"
    }
    }
    ],
    "request": {
    "method": "GET",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "{{FHIR_TENANT_ID}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "Content-Type",
    "value": "application/fhir+json",
    "type": "text"
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER",
    "value": "{{BULKDATA_PROVIDER}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER-OUTCOME",
    "value": "{{BULKDATA_PROVIDER_OUTCOME}}",
    "type": "text",
    "disabled": true
    }
    ],
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/Patient?_id={{RESOURCE_ID}}&active=true",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "Patient"
    ],
    "query": [
    {
    "key": "_id",
    "value": "{{RESOURCE_ID}}"
    },
    {
    "key": "active",
    "value": "true"
    }
    ]
    }
    },
    "response": []
    },
    {
    "name": "11. Get Patient - Should exist",
    "event": [
    {
    "listen": "prerequest",
    "script": {
    "exec": [
    ""
    ],
    "type": "text/javascript"
    }
    },
    {
    "listen": "test",
    "script": {
    "exec": [
    "pm.test(\"Status code is 200\", function () {",
    " pm.response.to.have.status(200);",
    "});"
    ],
    "type": "text/javascript"
    }
    }
    ],
    "request": {
    "method": "GET",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "{{FHIR_TENANT_ID}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "Content-Type",
    "value": "application/fhir+json",
    "type": "text"
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER",
    "value": "{{BULKDATA_PROVIDER}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER-OUTCOME",
    "value": "{{BULKDATA_PROVIDER_OUTCOME}}",
    "type": "text",
    "disabled": true
    }
    ],
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/Patient/{{RESOURCE_ID}}",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "Patient",
    "{{RESOURCE_ID}}"
    ]
    }
    },
    "response": []
    },
    {
    "name": "12. Get Patient History - Should not exist",
    "event": [
    {
    "listen": "prerequest",
    "script": {
    "exec": [
    ""
    ],
    "type": "text/javascript"
    }
    },
    {
    "listen": "test",
    "script": {
    "exec": [
    "pm.test(\"Status code is 404\", function () {",
    " pm.response.to.have.status(404);",
    "});"
    ],
    "type": "text/javascript"
    }
    }
    ],
    "protocolProfileBehavior": {
    "disableBodyPruning": true
    },
    "request": {
    "method": "GET",
    "header": [
    {
    "key": "X-FHIR-TENANT-ID",
    "value": "{{FHIR_TENANT_ID}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "Content-Type",
    "value": "application/fhir+json",
    "type": "text"
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER",
    "value": "{{BULKDATA_PROVIDER}}",
    "type": "text",
    "disabled": true
    },
    {
    "key": "X-FHIR-BULKDATA-PROVIDER-OUTCOME",
    "value": "{{BULKDATA_PROVIDER_OUTCOME}}",
    "type": "text",
    "disabled": true
    }
    ],
    "body": {
    "mode": "raw",
    "raw": "{\n \"resourceType\": \"Parameters\",\n \"parameter\": [\n {\n \"name\": \"patient\",\n \"valueString\": \"patient-id-is-this-id\"\n },\n {\n \"name\": \"reason\",\n \"valueString\": \"My Reason for removing this resource\"\n }\n ]\n}",
    "options": {
    "raw": {
    "language": "json"
    }
    }
    },
    "url": {
    "raw": "https://{{SERVER_URL}}/fhir-server/api/v4/Patient/{{HISTORY_ID}}",
    "protocol": "https",
    "host": [
    "{{SERVER_URL}}"
    ],
    "path": [
    "fhir-server",
    "api",
    "v4",
    "Patient",
    "{{HISTORY_ID}}"
    ]
    }
    },
    "response": []
    }
    ],
    "auth": {
    "type": "basic",
    "basic": [
    {
    "key": "password",
    "value": "change-password",
    "type": "string"
    },
    {
    "key": "username",
    "value": "fhiruser",
    "type": "string"
    }
    ]
    },
    "event": [
    {
    "listen": "prerequest",
    "script": {
    "type": "text/javascript",
    "exec": [
    ""
    ]
    }
    },
    {
    "listen": "test",
    "script": {
    "type": "text/javascript",
    "exec": [
    ""
    ]
    }
    }
    ],
    "variable": [
    {
    "key": "FHIR_TENANT_ID",
    "value": "default"
    },
    {
    "key": "SERVER_URL",
    "value": "localhost:9443"
    },
    {
    "key": "LOC",
    "value": "",
    "disabled": true
    },
    {
    "key": "RESOURCE_ID",
    "value": ""
    },
    {
    "key": "BODY",
    "value": ""
    },
    {
    "key": "HISTORY_ID",
    "value": ""
    }
    ]
    }