WildFHIR R4 Enterprise Edition Testing Guide
1.0.0 - current
WildFHIR R4 Enterprise Edition Testing Guide - Local Development build (v1.0.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
Active as of 2025-03-26 |
{
"resourceType" : "TestScript",
"id" : "wildfhirr4patientpurgexml",
"text" : {
"status" : "extensions",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: TestScript wildfhirr4patientpurgexml</b></p><a name=\"wildfhirr4patientpurgexml\"> </a><a name=\"hcwildfhirr4patientpurgexml\"> </a><a name=\"wildfhirr4patientpurgexml-en-US\"> </a><p><b>org/fhir/StructureDefinition/scope</b>: <a href=\"file://D:\\GitHub\\Touchstone\\wildfhir4-ig\\output/ActorDefinition-wildfhir-responder.html\">http://wildfhir4.aegis.net/ig/wildfhir/ActorDefinition/wildfhir-responder</a></p><p><b>org/fhir/StructureDefinition/scope</b>: <a href=\"file://D:\\GitHub\\Touchstone\\wildfhir4-ig\\output/OperationDefinition-wildfhir-operation-patient-purge.html\">AEGIS WildFHIR R4 Patient Purge</a></p><p><b>url</b>: <a href=\"TestScript-wildfhirr4patientpurgexml.html\">TestScript WildFHIR R4 TestScript Patient/[id]/$purge XML</a></p><p><b>version</b>: 1.0.0</p><p><b>name</b>: WildFHIRR4PatientPurgeXML</p><p><b>title</b>: WildFHIR R4 TestScript Patient/[id]/$purge XML</p><p><b>status</b>: Active</p><p><b>date</b>: 2025-03-26</p><p><b>publisher</b>: AEGIS.net, Inc.</p><p><b>contact</b>: AEGIS.net, Inc.: <a href=\"https://www.aegis.net\">https://www.aegis.net</a>, Richard Ettema: <a href=\"mailto:mailto:richard.ettema@aegis.net\">mailto:richard.ettema@aegis.net</a></p><p><b>description</b>: </p><div><p>Test the WildFHIR R4 Patient/[id]/$purge operation using XML Format</p>\n</div><p><b>jurisdiction</b>: <span title=\"Codes:{http://unstats.un.org/unsd/methods/m49/m49.htm 001}\">World</span></p><p><b>copyright</b>: </p><div><p>(c) AEGIS.net, Inc. 2025</p>\n</div><h3>Origins</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Index</b></td><td><b>Profile</b></td></tr><tr><td style=\"display: none\">*</td><td>1</td><td><a href=\"http://terminology.hl7.org/6.2.0/CodeSystem-testscript-profile-origin-types.html#testscript-profile-origin-types-FHIR-Client\">Test script profile origin type FHIR-Client</a>: FHIR Client</td></tr></table><h3>Destinations</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Index</b></td><td><b>Profile</b></td></tr><tr><td style=\"display: none\">*</td><td>1</td><td><a href=\"http://terminology.hl7.org/6.2.0/CodeSystem-testscript-profile-destination-types.html#testscript-profile-destination-types-FHIR-Server\">Test script profile destination type FHIR-Server</a>: FHIR Server</td></tr></table><blockquote><p><b>fixture</b></p><blockquote><p><b>id</b></p>patient-update</blockquote><p><b>autocreate</b>: false</p><p><b>autodelete</b>: false</p><p><b>resource</b>: <code>./Patient-wildfhir-patient-purge.xml</code></p></blockquote><blockquote><p><b>fixture</b></p><blockquote><p><b>id</b></p>observation-update</blockquote><p><b>autocreate</b>: false</p><p><b>autodelete</b>: false</p><p><b>resource</b>: <code>./Observation-wildfhir-observation-purge.xml</code></p></blockquote><blockquote><p><b>variable</b></p><p><b>name</b>: updatePatientId</p><p><b>path</b>: /Patient/id</p><p><b>sourceId</b>: patient-update</p></blockquote><blockquote><p><b>variable</b></p><p><b>name</b>: updateObservationId</p><p><b>path</b>: /Observation/id</p><p><b>sourceId</b>: observation-update</p></blockquote><blockquote><p><b>setup</b></p><blockquote><p><b>action</b></p><h3>Operations</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>ContentType</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Origin</b></td><td><b>Params</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"http://terminology.hl7.org/6.2.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-delete\">Test script operation code delete</a>: Delete</td><td>Observation</td><td>Delete the known Observation to insure it does not exist, order matters for referential integrity</td><td>xml</td><td>xml</td><td>1</td><td>true</td><td>1</td><td>/${updateObservationId}</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Confirm that the returned HTTP response code is success.</td><td>response</td><td>in</td><td>200,204,404</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Operations</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>ContentType</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Origin</b></td><td><b>Params</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"http://terminology.hl7.org/6.2.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-delete\">Test script operation code delete</a>: Delete</td><td>Patient</td><td>Delete the known Patient to insure it does not exist, order matters for referential integrity</td><td>xml</td><td>xml</td><td>1</td><td>true</td><td>1</td><td>/${updatePatientId}</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Confirm that the returned HTTP response code is success.</td><td>response</td><td>in</td><td>200,204,404</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Operations</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>ContentType</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Origin</b></td><td><b>Params</b></td><td><b>SourceId</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"http://terminology.hl7.org/6.2.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-update\">Test script operation code update</a>: Update</td><td>Patient</td><td>Create the known Patient via an update, order matters for referential integrity</td><td>xml</td><td>xml</td><td>1</td><td>true</td><td>1</td><td>/${updatePatientId}</td><td>patient-update</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Confirm that the returned HTTP response code is success.</td><td>response</td><td>in</td><td>200,201</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Operations</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>ContentType</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Origin</b></td><td><b>Params</b></td><td><b>SourceId</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"http://terminology.hl7.org/6.2.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-update\">Test script operation code update</a>: Update</td><td>Observation</td><td>Create the known Observation via an update, order matters for referential integrity</td><td>xml</td><td>xml</td><td>1</td><td>true</td><td>1</td><td>/${updateObservationId}</td><td>observation-update</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Confirm that the returned HTTP response code is success.</td><td>response</td><td>in</td><td>200,201</td><td>false</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><blockquote><p><b>id</b></p>PatientPurge</blockquote><p><b>name</b>: PatientPurge</p><p><b>description</b>: Test the Patient/[id]/$purge operation using XML Format on destination server and assert successful response.</p><blockquote><p><b>action</b></p><h3>Operations</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>ContentType</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Origin</b></td><td><b>Params</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"http://terminology.hl7.org/6.2.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-process-message\">Test script operation code process-message</a>: $process-message</td><td>Patient</td><td>Patient $purge operation</td><td>xml</td><td>xml</td><td>1</td><td>true</td><td>1</td><td>/${updatePatientId}/$purge</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Description</b></td><td><b>Direction</b></td><td><b>ResponseCode</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Confirm that the returned response code is 200 OK.</td><td>response</td><td>200</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Resource</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Confirm that the returned response payload is an OperationOutcome resource.</td><td>response</td><td>OperationOutcome</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Confirm that the returned OperationOutcome contains an infomation issue.</td><td>response</td><td>OperationOutcome.issue.where(severity = 'infomation').exists()</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Operations</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>ContentType</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Origin</b></td><td><b>Params</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"http://terminology.hl7.org/6.2.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-read\">Test script operation code read</a>: Read</td><td>Observation</td><td>Attempt to read purged Observation</td><td>xml</td><td>xml</td><td>1</td><td>true</td><td>1</td><td>/${updateObservationId}</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Description</b></td><td><b>Direction</b></td><td><b>ResponseCode</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Confirm that the returned response code is 404 Not Found.</td><td>response</td><td>404</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Operations</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>ContentType</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Origin</b></td><td><b>Params</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"http://terminology.hl7.org/6.2.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-read\">Test script operation code read</a>: Read</td><td>Patient</td><td>Attempt to read purged Patient</td><td>xml</td><td>xml</td><td>1</td><td>true</td><td>1</td><td>/${updatePatientId}</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Description</b></td><td><b>Direction</b></td><td><b>ResponseCode</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Confirm that the returned response code is 404 Not Found.</td><td>response</td><td>404</td><td>false</td></tr></table></blockquote></blockquote></div>"
},
"extension" : [
{
"url" : "http://hl7.org/fhir/StructureDefinition/scope",
"valueCanonical" : "http://wildfhir4.aegis.net/ig/wildfhir/ActorDefinition/wildfhir-responder"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/scope",
"valueCanonical" : "http://wildfhir4.aegis.net/ig/wildfhir/OperationDefinition/wildfhir-operation-patient-purge"
}
],
"url" : "http://wildfhir4.aegis.net/tg/wildfhir/TestScript/wildfhirr4patientpurgexml",
"version" : "1.0.0",
"name" : "WildFHIRR4PatientPurgeXML",
"title" : "WildFHIR R4 TestScript Patient/[id]/$purge XML",
"status" : "active",
"date" : "2025-03-26",
"publisher" : "AEGIS.net, Inc.",
"contact" : [
{
"name" : "AEGIS.net, Inc.",
"telecom" : [
{
"system" : "url",
"value" : "https://www.aegis.net"
}
]
},
{
"name" : "Richard Ettema",
"telecom" : [
{
"system" : "email",
"value" : "mailto:richard.ettema@aegis.net"
}
]
}
],
"description" : "Test the WildFHIR R4 Patient/[id]/$purge operation using XML Format",
"jurisdiction" : [
{
"coding" : [
{
"system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
"code" : "001",
"display" : "World"
}
]
}
],
"copyright" : "(c) AEGIS.net, Inc. 2025",
"origin" : [
{
"index" : 1,
"profile" : {
"system" : "http://terminology.hl7.org/CodeSystem/testscript-profile-origin-types",
"code" : "FHIR-Client"
}
}
],
"destination" : [
{
"index" : 1,
"profile" : {
"system" : "http://terminology.hl7.org/CodeSystem/testscript-profile-destination-types",
"code" : "FHIR-Server"
}
}
],
"fixture" : [
{
"id" : "patient-update",
"autocreate" : false,
"autodelete" : false,
"resource" : {
"reference" : "./Patient-wildfhir-patient-purge.xml"
}
},
{
"id" : "observation-update",
"autocreate" : false,
"autodelete" : false,
"resource" : {
"reference" : "./Observation-wildfhir-observation-purge.xml"
}
}
],
"variable" : [
{
"name" : "updatePatientId",
"path" : "/Patient/id",
"sourceId" : "patient-update"
},
{
"name" : "updateObservationId",
"path" : "/Observation/id",
"sourceId" : "observation-update"
}
],
"setup" : {
"action" : [
{
"operation" : {
"type" : {
"system" : "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
"code" : "delete"
},
"resource" : "Observation",
"description" : "Delete the known Observation to insure it does not exist, order matters for referential integrity",
"accept" : "xml",
"contentType" : "xml",
"destination" : 1,
"encodeRequestUrl" : true,
"origin" : 1,
"params" : "/${updateObservationId}"
}
},
{
"assert" : {
"description" : "Confirm that the returned HTTP response code is success.",
"direction" : "response",
"operator" : "in",
"value" : "200,204,404",
"warningOnly" : false
}
},
{
"operation" : {
"type" : {
"system" : "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
"code" : "delete"
},
"resource" : "Patient",
"description" : "Delete the known Patient to insure it does not exist, order matters for referential integrity",
"accept" : "xml",
"contentType" : "xml",
"destination" : 1,
"encodeRequestUrl" : true,
"origin" : 1,
"params" : "/${updatePatientId}"
}
},
{
"assert" : {
"description" : "Confirm that the returned HTTP response code is success.",
"direction" : "response",
"operator" : "in",
"value" : "200,204,404",
"warningOnly" : false
}
},
{
"operation" : {
"type" : {
"system" : "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
"code" : "update"
},
"resource" : "Patient",
"description" : "Create the known Patient via an update, order matters for referential integrity",
"accept" : "xml",
"contentType" : "xml",
"destination" : 1,
"encodeRequestUrl" : true,
"origin" : 1,
"params" : "/${updatePatientId}",
"sourceId" : "patient-update"
}
},
{
"assert" : {
"description" : "Confirm that the returned HTTP response code is success.",
"direction" : "response",
"operator" : "in",
"value" : "200,201",
"warningOnly" : false
}
},
{
"operation" : {
"type" : {
"system" : "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
"code" : "update"
},
"resource" : "Observation",
"description" : "Create the known Observation via an update, order matters for referential integrity",
"accept" : "xml",
"contentType" : "xml",
"destination" : 1,
"encodeRequestUrl" : true,
"origin" : 1,
"params" : "/${updateObservationId}",
"sourceId" : "observation-update"
}
},
{
"assert" : {
"description" : "Confirm that the returned HTTP response code is success.",
"direction" : "response",
"operator" : "in",
"value" : "200,201",
"warningOnly" : false
}
}
]
},
"test" : [
{
"id" : "PatientPurge",
"name" : "PatientPurge",
"description" : "Test the Patient/[id]/$purge operation using XML Format on destination server and assert successful response.",
"action" : [
{
"operation" : {
"type" : {
"system" : "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
"code" : "process-message"
},
"resource" : "Patient",
"description" : "Patient $purge operation",
"accept" : "xml",
"contentType" : "xml",
"destination" : 1,
"encodeRequestUrl" : true,
"origin" : 1,
"params" : "/${updatePatientId}/$purge"
}
},
{
"assert" : {
"description" : "Confirm that the returned response code is 200 OK.",
"direction" : "response",
"responseCode" : "200",
"warningOnly" : false
}
},
{
"assert" : {
"description" : "Confirm that the returned response payload is an OperationOutcome resource.",
"direction" : "response",
"resource" : "OperationOutcome",
"warningOnly" : false
}
},
{
"assert" : {
"description" : "Confirm that the returned OperationOutcome contains an infomation issue.",
"direction" : "response",
"expression" : "OperationOutcome.issue.where(severity = 'infomation').exists()",
"warningOnly" : false
}
},
{
"operation" : {
"type" : {
"system" : "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
"code" : "read"
},
"resource" : "Observation",
"description" : "Attempt to read purged Observation",
"accept" : "xml",
"contentType" : "xml",
"destination" : 1,
"encodeRequestUrl" : true,
"origin" : 1,
"params" : "/${updateObservationId}"
}
},
{
"assert" : {
"description" : "Confirm that the returned response code is 404 Not Found.",
"direction" : "response",
"responseCode" : "404",
"warningOnly" : false
}
},
{
"operation" : {
"type" : {
"system" : "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
"code" : "read"
},
"resource" : "Patient",
"description" : "Attempt to read purged Patient",
"accept" : "xml",
"contentType" : "xml",
"destination" : 1,
"encodeRequestUrl" : true,
"origin" : 1,
"params" : "/${updatePatientId}"
}
},
{
"assert" : {
"description" : "Confirm that the returned response code is 404 Not Found.",
"direction" : "response",
"responseCode" : "404",
"warningOnly" : false
}
}
]
}
]
}