US Core Testing Guide
3.1.1-1 - ci-build United States of America flag

US Core Testing Guide - Local Development build (v3.1.1-1). See the Directory of published versions

: HL7 FHIR R4 TestScript Dynamic Read Validate US Core AllergyIntolerance JSON - JSON Representation

Active as of 2023-08-25

Raw json | Download


{
  "resourceType" : "TestScript",
  "id" : "Allergydynamicreadvalidatejson",
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: TestScript</b><a name=\"Allergydynamicreadvalidatejson\"> </a></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource TestScript &quot;Allergydynamicreadvalidatejson&quot; </p></div><p><b>url</b>: <code>http://hl7.org/fhir/us/core-tg/TestScript/Allergydynamicreadvalidatejson</code></p><p><b>version</b>: 3.1.1-1</p><p><b>name</b>: Allergydynamicreadvalidatejson</p><p><b>title</b>: HL7 FHIR R4 TestScript Dynamic Read Validate US Core AllergyIntolerance JSON</p><p><b>status</b>: active</p><p><b>date</b>: 2023-08-25</p><p><b>publisher</b>: HL7 FHIR Infrastructure WG</p><p><b>contact</b>: HL7 FHIR Infrastructure WG: <a href=\"https://hl7.org/Special/committees/fiwg\">https://hl7.org/Special/committees/fiwg</a>, Richard Ettema: <a href=\"mailto:mailto:richard.ettema@aegis.net\">mailto:richard.ettema@aegis.net</a></p><p><b>description</b>: TestScript to test USCoreAllergyIntolerance resource read and profile validation using #json format</p><p><b>jurisdiction</b>: United States of America <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"http://terminology.hl7.org/5.0.0/CodeSystem-ISO3166Part1.html\">ISO 3166-1 Codes for the representation of names of countries and their subdivisions — Part 1: Country code</a>#US)</span></p><p><b>copyright</b>: (c) Health Level 7 (HL7) International 2023</p><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>FHIR Client (Details: http://terminology.hl7.org/CodeSystem/testscript-profile-origin-types code FHIR-Client = 'FHIR Client', stated as 'null')</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>FHIR Server (Details: http://terminology.hl7.org/CodeSystem/testscript-profile-destination-types code FHIR-Server = 'FHIR Server', stated as 'null')</td></tr></table><p><b>profile</b>: <a href=\"http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance\">http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance</a> &quot;USCoreAllergyIntolerance&quot;</p><h3>Variables</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Name</b></td><td><b>DefaultValue</b></td><td><b>Description</b></td><td><b>Hint</b></td></tr><tr><td style=\"display: none\">*</td><td>resource_id</td><td>example</td><td>Enter a known resource id on the destination system.</td><td>[resource.id]</td></tr></table><blockquote><p><b>test</b></p><blockquote><p><b>id</b></p>ReadValidate</blockquote><p><b>name</b>: ReadValidate</p><p><b>description</b>: Test USCoreAllergyIntolerance resource read on destination server and assert returned resource passes validation</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>Read (Details: http://terminology.hl7.org/CodeSystem/testscript-operation-codes code read = 'Read', stated as 'null')</td><td>AllergyIntolerance</td><td>ResourceRead</td><td>json</td><td>json</td><td>1</td><td>true</td><td>1</td><td>/${resource_id}</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 the specified resource.</td><td>response</td><td>AllergyIntolerance</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>ValidateProfileId</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Confirm that the returned resource conforms to the specified profile.</td><td>response</td><td>USCoreAllergyProfile</td><td>false</td></tr></table></blockquote></blockquote></div>"
  },
  "url" : "http://hl7.org/fhir/us/core-tg/TestScript/Allergydynamicreadvalidatejson",
  "version" : "3.1.1-1",
  "name" : "Allergydynamicreadvalidatejson",
  "title" : "HL7 FHIR R4 TestScript Dynamic Read Validate US Core AllergyIntolerance JSON",
  "status" : "active",
  "date" : "2023-08-25",
  "publisher" : "HL7 FHIR Infrastructure WG",
  "contact" : [
    {
      "name" : "HL7 FHIR Infrastructure WG",
      "telecom" : [
        {
          "system" : "url",
          "value" : "https://hl7.org/Special/committees/fiwg"
        }
      ]
    },
    {
      "name" : "Richard Ettema",
      "telecom" : [
        {
          "system" : "email",
          "value" : "mailto:richard.ettema@aegis.net"
        }
      ]
    }
  ],
  "description" : "TestScript to test USCoreAllergyIntolerance resource read and profile validation using #json format",
  "jurisdiction" : [
    {
      "coding" : [
        {
          "system" : "urn:iso:std:iso:3166",
          "code" : "US"
        }
      ]
    }
  ],
  "copyright" : "(c) Health Level 7 (HL7) International 2023",
  "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"
      }
    }
  ],
  "profile" : [
    {
      "id" : "USCoreAllergyProfile",
      "reference" : "http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance"
    }
  ],
  "variable" : [
    {
      "name" : "resource_id",
      "defaultValue" : "example",
      "description" : "Enter a known resource id on the destination system.",
      "hint" : "[resource.id]"
    }
  ],
  "test" : [
    {
      "id" : "ReadValidate",
      "name" : "ReadValidate",
      "description" : "Test USCoreAllergyIntolerance resource read on destination server and assert returned resource passes validation",
      "action" : [
        {
          "operation" : {
            "type" : {
              "system" : "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code" : "read"
            },
            "resource" : "AllergyIntolerance",
            "description" : "ResourceRead",
            "accept" : "json",
            "contentType" : "json",
            "destination" : 1,
            "encodeRequestUrl" : true,
            "origin" : 1,
            "params" : "/${resource_id}"
          }
        },
        {
          "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 the specified resource.",
            "direction" : "response",
            "resource" : "AllergyIntolerance",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "description" : "Confirm that the returned resource conforms to the specified profile.",
            "direction" : "response",
            "validateProfileId" : "USCoreAllergyProfile",
            "warningOnly" : false
          }
        }
      ]
    }
  ]
}