TestScript - FHIR Resource (dstu2)


This TestScript Resource uses the FHIR API standard for access and structure.

Resource Attributes

AttributeField is listTypeDescription
contacttrueData Type Contact details of the publisher
copyrightfalsestring Use and/or publishing restrictions
datefalsedateTime Date for this version of the TestScript
descriptionfalsestring Natural language description of the TestScript
experimentalfalseboolean If for testing purposes, not real usage
fixturetrueData Type Fixture in the test script - by reference (uri)
identifierfalseIdentifier External identifier
metadatafalseData Type Required capability that is assumed to function correctly on the FHIR server being tested
multiserverfalseboolean Whether or not the tests apply to more than one FHIR server
namefalsestring Informal name for this TestScript
profiletrueReference Reference of the validation profile
publisherfalsestring Name of the publisher (Organization or individual)
requirementsfalsestring Scope and Usage this Test Script is for
setupfalseData Type A series of required setup operations before tests are executed
statusfalsecode draft | active | retired
teardownfalseData Type A series of required clean up steps
testtrueData Type A test in this script
urlfalseuri Absolute URL used to reference this TestScript
useContexttrueCodeableConcept Content intends to support these contexts
variabletrueData Type Placeholder for evaluated elements
versionfalsestring Logical id for this version of the TestScript

TestScript Structure


  
{
  "resourceType" : "TestScript",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "url" : "<uri>", // R!  Absolute URL used to reference this TestScript
  "version" : "<string>", // Logical id for this version of the TestScript
  "name" : "<string>", // R!  Informal name for this TestScript
  "status" : "<code>", // R!  draft | active | retired
  "identifier" : { Identifier }, // External identifier
  "experimental" : <boolean>, // If for testing purposes, not real usage
  "publisher" : "<string>", // Name of the publisher (Organization or individual)
  "contact" : [{ // Contact details of the publisher
    "name" : "<string>", // Name of a individual to contact
    "telecom" : [{ ContactPoint }] // Contact details for individual or publisher
  }],
  "date" : "<dateTime>", // Date for this version of the TestScript
  "description" : "<string>", // Natural language description of the TestScript
  "useContext" : [{ CodeableConcept }], // Content intends to support these contexts
  "requirements" : "<string>", // Scope and Usage this Test Script is for
  "copyright" : "<string>", // Use and/or publishing restrictions
  "metadata" : { // Required capability that is assumed to function correctly on the FHIR server being tested
    "link" : [{ // Links to the FHIR specification
      "url" : "<uri>", // R!  URL to the specification
      "description" : "<string>" // Short description
    }],
    "capability" : [{ // R!  Capabilities  that are assumed to function correctly on the FHIR server being tested
      "required" : <boolean>, // Are the capabilities required?
      "validated" : <boolean>, // Are the capabilities validated?
      "description" : "<string>", // The expected capabilities of the server
      "destination" : <integer>, // Which server these requirements apply to
      "link" : ["<uri>"], // Links to the FHIR specification
      "conformance" : { Reference(Conformance) } // R!  Required Conformance
    }]
  },
  "multiserver" : <boolean>, // Whether or not the tests apply to more than one FHIR server
  "fixture" : [{ // Fixture in the test script - by reference (uri)
    "autocreate" : <boolean>, // Whether or not to implicitly create the fixture during setup
    "autodelete" : <boolean>, // Whether or not to implicitly delete the fixture during teardown
    "resource" : { Reference(Any) } // Reference of the resource
  }],
  "profile" : [{ Reference(Any) }], // Reference of the validation profile
  "variable" : [{ // Placeholder for evaluated elements
    "name" : "<string>", // R!  Descriptive name for this variable
    "headerField" : "<string>", // HTTP header field name for source
    "path" : "<string>", // XPath or JSONPath against the fixture body
    "sourceId" : "<id>" // Fixture Id of source expression or headerField within this variable
  }],
  "setup" : { // A series of required setup operations before tests are executed
    "metadata" : { Content as for TestScript.metadata }, // Capabilities  that are assumed to function correctly on the FHIR server being tested
    "action" : [{ // R!  A setup operation or assert to perform
      "operation" : { // The setup operation to perform
        "type" : { Coding }, // The setup operation type that will be executed
        "resource" : "<code>", // Resource type
        "label" : "<string>", // Tracking/logging operation label
        "description" : "<string>", // Tracking/reporting operation description
        "accept" : "<code>", // xml | json
        "contentType" : "<code>", // xml | json
        "destination" : <integer>, // Which server to perform the operation on
        "encodeRequestUrl" : <boolean>, // Whether or not to send the request url in encoded format
        "params" : "<string>", // Explicitly defined path parameters
        "requestHeader" : [{ // Each operation can have one ore more header elements
          "field" : "<string>", // R!  HTTP header field name
          "value" : "<string>" // R!  HTTP headerfield value
        }],
        "responseId" : "<id>", // Fixture Id of mapped response
        "sourceId" : "<id>", // Fixture Id of body for PUT and POST requests
        "targetId" : "<id>", // Id of fixture used for extracting the [id],  [type], and [vid] for GET requests
        "url" : "<string>" // Request URL
      },
      "assert" : { // The assertion to perform
        "label" : "<string>", // Tracking/logging assertion label
        "description" : "<string>", // Tracking/reporting assertion description
        "direction" : "<code>", // response | request
        "compareToSourceId" : "<string>", // Id of fixture used to compare the "sourceId/path" evaluations to
        "compareToSourcePath" : "<string>", // XPath or JSONPath expression against fixture used to compare the "sourceId/path" evaluations to
        "contentType" : "<code>", // xml | json
        "headerField" : "<string>", // HTTP header field name
        "minimumId" : "<string>", // Fixture Id of minimum content resource
        "navigationLinks" : <boolean>, // Perform validation on navigation links?
        "operator" : "<code>", // equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains
        "path" : "<string>", // XPath or JSONPath expression
        "resource" : "<code>", // Resource type
        "response" : "<code>", // okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable
        "responseCode" : "<string>", // HTTP response code to test
        "sourceId" : "<id>", // Fixture Id of source expression or headerField
        "validateProfileId" : "<id>", // Profile Id of validation profile reference
        "value" : "<string>", // The value to compare to
        "warningOnly" : <boolean> // Will this assert produce a warning only on error?
      }
    }]
  },
  "test" : [{ // A test in this script
    "name" : "<string>", // Tracking/logging name of this test
    "description" : "<string>", // Tracking/reporting short description of the test
    "metadata" : { Content as for TestScript.metadata }, // Capabilities  that are expected to function correctly on the FHIR server being tested
    "action" : [{ // R!  A test operation or assert to perform
      "operation" : { Content as for TestScript.setup.action.operation }, // The setup operation to perform
      "assert" : { Content as for TestScript.setup.action.assert } // The setup assertion to perform
    }]
  }],
  "teardown" : { // A series of required clean up steps
    "action" : [{ // R!  One or more teardown operations to perform
      "operation" : { Content as for TestScript.setup.action.operation } // The teardown operation to perform
    }]
  }
}


 

TestScript Search Parameters

The following search parameters can be used to query TestScript resources. Just submit the like so:

https://api.1up.health/fhir/dstu2/TestScript?query-param=queryvalue
Search ParameterField TypeResource Fields Searched
descriptiontextdescription
identifiertextidentifier
nametextname
testscript-capabilitytextmetadata.capability.description
testscript-setup-capabilitytextsetup.metadata.capability.description
testscript-test-capabilitytexttest.metadata.capability.description
urluriurl