TestScript - FHIR Resource (stu3)


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

Resource Attributes

AttributeField is listTypeDescription
contacttrueContactDetail Contact details for the publisher
copyrightfalsemarkdown Use and/or publishing restrictions
datefalsedateTime Date this was last changed
descriptionfalsemarkdown Natural language description of the test script
destinationtrueData Type An abstract server representing a destination or receiver in a message exchange
experimentalfalseboolean For testing purposes, not real usage
fixturetrueData Type Fixture in the test script - by reference (uri)
identifierfalseIdentifier Additional identifier for the test script
jurisdictiontrueCodeableConcept Intended jurisdiction for test script (if applicable)
metadatafalseData Type Required capability that is assumed to function correctly on the FHIR server being tested
namefalsestring Name for this test script (computer friendly)
origintrueData Type An abstract server representing a client or sender in a message exchange
profiletrueReference FHIR-Client | FHIR-SDC-FormFiller
publisherfalsestring Name of the publisher (organization or individual)
purposefalsemarkdown Why this test script is defined
ruletrueData Type Assert rule used within the test script
rulesettrueData Type Assert ruleset used within the test script
setupfalseData Type A series of required setup operations before tests are executed
statusfalsecode draft | active | retired | unknown
teardownfalseData Type A series of required clean up steps
testtrueData Type A test in this script
titlefalsestring Name for this test script (human friendly)
urlfalseuri Logical URI to reference this test script (globally unique)
useContexttrueUsageContext Context the content is intended to support
variabletrueData Type Placeholder for evaluated elements
versionfalsestring Business version of the test script

TestScript Example

{
  "profile": [
    {
      "id": "patient-profile",
      "reference": "http://hl7.org/fhir/StructureDefinition/Patient"
    }
  ],
  "text": {
    "status": "generated",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: testscript-example</p><p><b>url</b>: <a>http://hl7.org/fhir/TestScript/testscript-example</a></p><p><b>identifier</b>: urn:oid:1.3.6.1.4.1.21367.2005.3.7.9876</p><p><b>version</b>: 1.0</p><p><b>name</b>: TestScript Example</p><p><b>status</b>: draft</p><p><b>experimental</b>: true</p><p><b>date</b>: 18/01/2017</p><p><b>publisher</b>: HL7</p><p><b>contact</b>: </p><p><b>description</b>: TestScript example resource with setup to delete if present and create a new instance of a Patient; and single test definition to read the created Patient with various asserts.</p><p><b>useContext</b>: </p><p><b>jurisdiction</b>: United States of America (the) <span>(Details : {urn:iso:std:iso:3166 code 'US' = 'United States', given as 'United States of America (the)'})</span></p><p><b>purpose</b>: Patient Conditional Create (Update), Read and Delete Operations</p><p><b>copyright</b>: © HL7.org 2011+</p><blockquote><p><b>metadata</b></p><h3>Links</h3><table><tr><td>-</td><td><b>Url</b></td><td><b>Description</b></td></tr><tr><td>*</td><td><a>http://hl7.org/fhir/patient.html</a></td><td>Demographics and other administrative information about an individual or animal receiving care or other health-related services.</td></tr></table><h3>Capabilities</h3><table><tr><td>-</td><td><b>Required</b></td><td><b>Description</b></td><td><b>Link</b></td><td><b>Capabilities</b></td></tr><tr><td>*</td><td>true</td><td>Patient Update, Read and Delete Operations</td><td><a>http://hl7.org/fhir/http.html#delete</a></td><td><a>CapabilityStatement/example</a></td></tr></table></blockquote><blockquote><p><b>fixture</b></p><p><b>autocreate</b>: false</p><p><b>autodelete</b>: false</p><p><b>resource</b>: <a>Peter Chalmers</a></p></blockquote><blockquote><p><b>fixture</b></p><p><b>autocreate</b>: false</p><p><b>autodelete</b>: false</p><p><b>resource</b>: <a>Peter Chalmers (minimum)</a></p></blockquote><p><b>profile</b>: <a>http://hl7.org/fhir/StructureDefinition/Patient</a></p><h3>Variables</h3><table><tr><td>-</td><td><b>Name</b></td><td><b>Path</b></td><td><b>SourceId</b></td></tr><tr><td>*</td><td>createResourceId</td><td>Patient/id</td><td>fixture-patient-create</td></tr></table><blockquote><p><b>setup</b></p><blockquote><p><b>action</b></p><h3>Operations</h3><table><tr><td>-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Label</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>Params</b></td></tr><tr><td>*</td><td>Delete (Details: http://hl7.org/fhir/testscript-operation-codes code delete = 'Delete', stated as 'null')</td><td>Patient</td><td>SetupDeletePatient</td><td>Execute a delete operation to insure the patient does not exist on the server.</td><td>json</td><td>/${createResourceId}</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table><tr><td>-</td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>ResponseCode</b></td></tr><tr><td>*</td><td>Confirm that the returned HTTP status is 200(OK) or 204(No Content).</td><td>response</td><td>in</td><td>200,204</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Operations</h3><table><tr><td>-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Label</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>ContentType</b></td><td><b>Params</b></td><td><b>SourceId</b></td></tr><tr><td>*</td><td>Update (Details: http://hl7.org/fhir/testscript-operation-codes code update = 'Update', stated as 'null')</td><td>Patient</td><td>SetupCreatePatient</td><td>Create patient resource on test server using the contents of fixture-patient-create</td><td>json</td><td>json</td><td>/${createResourceId}</td><td>fixture-patient-create</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table><tr><td>-</td><td><b>Description</b></td><td><b>Direction</b></td><td><b>ResponseCode</b></td></tr><tr><td>*</td><td>Confirm that the returned HTTP status is 201(Created).</td><td>response</td><td>201</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Operations</h3><table><tr><td>-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Description</b></td><td><b>TargetId</b></td></tr><tr><td>*</td><td>Read (Details: http://hl7.org/fhir/testscript-operation-codes code read = 'Read', stated as 'null')</td><td>Patient</td><td>Read the created patient resource on the test server using the id from fixture-patient-create. Verify contents.</td><td>fixture-patient-create</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table><tr><td>-</td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Response</b></td></tr><tr><td>*</td><td>Confirm that the returned HTTP status is 200(OK).</td><td>response</td><td>okay</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table><tr><td>-</td><td><b>Description</b></td><td><b>CompareToSourceId</b></td><td><b>CompareToSourceExpression</b></td><td><b>Operator</b></td></tr><tr><td>*</td><td>Confirm that the returned Patient contains the expected family name 'Chalmers'. Uses explicit compareToSourceId reference to fixture-patient-create used to create the Patient.</td><td>fixture-patient-create</td><td>Patient.name.first().family</td><td>equals</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><p><b>name</b>: Read Patient</p><p><b>description</b>: Read a Patient and validate response.</p><blockquote><p><b>action</b></p><h3>Operations</h3><table><tr><td>-</td></tr><tr><td>*</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table><tr><td>-</td></tr><tr><td>*</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table><tr><td>-</td></tr><tr><td>*</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table><tr><td>-</td></tr><tr><td>*</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table><tr><td>-</td></tr><tr><td>*</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table><tr><td>-</td></tr><tr><td>*</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table><tr><td>-</td></tr><tr><td>*</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table><tr><td>-</td></tr><tr><td>*</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table><tr><td>-</td></tr><tr><td>*</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table><tr><td>-</td></tr><tr><td>*</td></tr></table></blockquote></blockquote><blockquote><p><b>teardown</b></p><blockquote><p><b>action</b></p><h3>Operations</h3><table><tr><td>-</td></tr><tr><td>*</td></tr></table></blockquote></blockquote></div>"
  },
  "jurisdiction": [
    {
      "coding": [
        {
          "code": "US",
          "system": "urn:iso:std:iso:3166",
          "display": "United States of America (the)"
        }
      ]
    }
  ],
  "fixture": [
    {
      "resource": {
        "display": "Peter Chalmers",
        "reference": "Patient/example"
      },
      "id": "fixture-patient-create",
      "autodelete": false,
      "autocreate": false
    },
    {
      "resource": {
        "display": "Peter Chalmers (minimum)",
        "reference": "Patient/example"
      },
      "id": "fixture-patient-minimum",
      "autodelete": false,
      "autocreate": false
    }
  ],
  "date": "2017-01-18",
  "id": "testscript-example",
  "copyright": "© HL7.org 2011+",
  "teardown": {
    "action": [
      {
        "operation": {
          "resource": "Patient",
          "targetId": "fixture-patient-create",
          "type": {
            "code": "delete",
            "system": "http://hl7.org/fhir/testscript-operation-codes"
          },
          "description": "Delete the patient resource on the test server using the id from fixture-patient-create."
        }
      }
    ]
  },
  "version": "1.0",
  "test": [
    {
      "action": [
        {
          "operation": {
            "encodeRequestUrl": false,
            "resource": "Patient",
            "description": "Read the patient resource on the test server using the id from fixture-patient-create. Prevent URL encoding of the request.",
            "responseId": "fixture-patient-read",
            "targetId": "fixture-patient-create",
            "type": {
              "code": "read",
              "system": "http://hl7.org/fhir/testscript-operation-codes"
            }
          }
        },
        {
          "assert": {
            "response": "okay",
            "direction": "response",
            "description": "Confirm that the returned HTTP status is 200(OK).",
            "label": "01-ReadPatientOK"
          }
        },
        {
          "assert": {
            "operator": "notEmpty",
            "warningOnly": true,
            "direction": "response",
            "description": "Confirm that the returned HTTP Header Last-Modified is present. Warning only as the server may not support versioning.",
            "headerField": "Last-Modified"
          }
        },
        {
          "assert": {
            "resource": "Patient",
            "description": "Confirm that the returned resource type is Patient."
          }
        },
        {
          "assert": {
            "validateProfileId": "patient-profile",
            "description": "Confirm that the returned Patient conforms to the base FHIR specification."
          }
        },
        {
          "assert": {
            "operator": "equals",
            "path": "fhir:Patient/fhir:name/fhir:family/@value",
            "sourceId": "fixture-patient-read",
            "description": "Confirm that the returned Patient contains the expected family name 'Chalmers'. Uses explicit sourceId reference to read responseId fixture.",
            "value": "Chalmers"
          }
        },
        {
          "assert": {
            "operator": "equals",
            "path": "fhir:Patient/fhir:name/fhir:given/@value",
            "sourceId": "fixture-patient-read",
            "description": "Confirm that the returned Patient contains the expected given name 'Peter'. Uses explicit sourceId reference to read responseId fixture.",
            "value": "Peter"
          }
        },
        {
          "assert": {
            "operator": "equals",
            "path": "fhir:Patient/fhir:name/fhir:family/@value",
            "compareToSourcePath": "fhir:Patient/fhir:name/fhir:family/@value",
            "description": "Confirm that the returned Patient contains the expected family name 'Chalmers'. Uses explicit compareToSourceId reference to fixture-patient-create used to create the Patient and implicit reference to read response payload.",
            "compareToSourceId": "fixture-patient-create"
          }
        },
        {
          "assert": {
            "sourceId": "fixture-patient-read",
            "path": "fhir:Patient/fhir:name/fhir:given/@value",
            "compareToSourcePath": "fhir:Patient/fhir:name/fhir:given/@value",
            "description": "Confirm that the returned Patient contains the expected family name 'Chalmers'. Uses explicit compareToSourceId reference to fixture-patient-create used to create the Patient and explicit reference to read response payload and default operator of 'equals'.",
            "compareToSourceId": "fixture-patient-create"
          }
        },
        {
          "assert": {
            "warningOnly": true,
            "minimumId": "fixture-patient-minimum",
            "description": "Confirm that the returned resource contains the expected retained elements and values. Warning only to provide users with reviewable results."
          }
        }
      ],
      "description": "Read a Patient and validate response.",
      "id": "01-ReadPatient",
      "name": "Read Patient"
    }
  ],
  "metadata": {
    "capability": [
      {
        "required": true,
        "link": [
          "http://hl7.org/fhir/http.html#delete",
          "http://hl7.org/fhir/http.html#read",
          "http://hl7.org/fhir/http.html#update"
        ],
        "description": "Patient Update, Read and Delete Operations",
        "capabilities": {
          "reference": "CapabilityStatement/example"
        }
      }
    ],
    "link": [
      {
        "url": "http://hl7.org/fhir/patient.html",
        "description": "Demographics and other administrative information about an individual or animal receiving care or other health-related services."
      }
    ]
  },
  "status": "draft",
  "description": "TestScript example resource with setup to delete if present and create a new instance of a Patient; and single test definition to read the created Patient with various asserts.",
  "useContext": [
    {
      "valueCodeableConcept": {
        "coding": [
          {
            "code": "positive",
            "system": "http://hl7.org/fhir/variant-state"
          }
        ]
      },
      "code": {
        "code": "focus",
        "system": "http://hl7.org/fhir/usage-context-type"
      }
    }
  ],
  "purpose": "Patient Conditional Create (Update), Read and Delete Operations",
  "variable": [
    {
      "sourceId": "fixture-patient-create",
      "path": "Patient/id",
      "name": "createResourceId"
    }
  ],
  "publisher": "HL7",
  "name": "TestScript Example",
  "resourceType": "TestScript",
  "setup": {
    "action": [
      {
        "operation": {
          "resource": "Patient",
          "description": "Execute a delete operation to insure the patient does not exist on the server.",
          "accept": "json",
          "label": "SetupDeletePatient",
          "params": "/${createResourceId}",
          "type": {
            "code": "delete",
            "system": "http://hl7.org/fhir/testscript-operation-codes"
          }
        }
      },
      {
        "assert": {
          "operator": "in",
          "direction": "response",
          "description": "Confirm that the returned HTTP status is 200(OK) or 204(No Content).",
          "responseCode": "200,204"
        }
      },
      {
        "operation": {
          "contentType": "json",
          "description": "Create patient resource on test server using the contents of fixture-patient-create",
          "sourceId": "fixture-patient-create",
          "accept": "json",
          "label": "SetupCreatePatient",
          "params": "/${createResourceId}",
          "resource": "Patient",
          "type": {
            "code": "update",
            "system": "http://hl7.org/fhir/testscript-operation-codes"
          }
        }
      },
      {
        "assert": {
          "direction": "response",
          "description": "Confirm that the returned HTTP status is 201(Created).",
          "responseCode": "201"
        }
      },
      {
        "operation": {
          "resource": "Patient",
          "targetId": "fixture-patient-create",
          "type": {
            "code": "read",
            "system": "http://hl7.org/fhir/testscript-operation-codes"
          },
          "description": "Read the created patient resource on the test server using the id from fixture-patient-create. Verify contents."
        }
      },
      {
        "assert": {
          "direction": "response",
          "description": "Confirm that the returned HTTP status is 200(OK).",
          "response": "okay"
        }
      },
      {
        "assert": {
          "operator": "equals",
          "compareToSourceExpression": "Patient.name.first().family",
          "description": "Confirm that the returned Patient contains the expected family name 'Chalmers'. Uses explicit compareToSourceId reference to fixture-patient-create used to create the Patient.",
          "compareToSourceId": "fixture-patient-create"
        }
      }
    ]
  },
  "url": "http://hl7.org/fhir/TestScript/testscript-example",
  "contact": [
    {
      "telecom": [
        {
          "use": "work",
          "system": "email",
          "value": "support@HL7.org"
        }
      ],
      "name": "Support"
    }
  ],
  "identifier": {
    "system": "urn:ietf:rfc:3986",
    "value": "urn:oid:1.3.6.1.4.1.21367.2005.3.7.9876"
  },
  "experimental": true
}

TestScript Structure


  
{
  "resourceType" : "TestScript",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "url" : "<uri>", // R!  Logical URI to reference this test script (globally unique)
  "identifier" : { Identifier }, // Additional identifier for the test script
  "version" : "<string>", // Business version of the test script
  "name" : "<string>", // R!  Name for this test script (computer friendly)
  "title" : "<string>", // Name for this test script (human friendly)
  "status" : "<code>", // R!  draft | active | retired | unknown
  "experimental" : <boolean>, // For testing purposes, not real usage
  "date" : "<dateTime>", // Date this was last changed
  "publisher" : "<string>", // Name of the publisher (organization or individual)
  "contact" : [{ ContactDetail }], // Contact details for the publisher
  "description" : "<markdown>", // Natural language description of the test script
  "useContext" : [{ UsageContext }], // Context the content is intended to support
  "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for test script (if applicable)
  "purpose" : "<markdown>", // Why this test script is defined
  "copyright" : "<markdown>", // Use and/or publishing restrictions
  "origin" : [{ // An abstract server representing a client or sender in a message exchange
    "index" : <integer>, // R!  The index of the abstract origin server starting at 1
    "profile" : { Coding } // R!  FHIR-Client | FHIR-SDC-FormFiller
  }],
  "destination" : [{ // An abstract server representing a destination or receiver in a message exchange
    "index" : <integer>, // R!  The index of the abstract destination server starting at 1
    "profile" : { Coding } // R!  FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor
  }],
  "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
      "origin" : [<integer>], // Which origin server these requirements apply to
      "destination" : <integer>, // Which server these requirements apply to
      "link" : ["<uri>"], // Links to the FHIR specification
      "capabilities" : { Reference(CapabilityStatement) } // R!  Required Capability Statement
    }]
  },
  "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
    "defaultValue" : "<string>", // Default, hard-coded, or user-defined value for this variable
    "description" : "<string>", // Natural language description of the variable
    "expression" : "<string>", // The fluentpath expression against the fixture body
    "headerField" : "<string>", // HTTP header field name for source
    "hint" : "<string>", // Hint help text for default value to enter
    "path" : "<string>", // XPath or JSONPath against the fixture body
    "sourceId" : "<id>" // Fixture Id of source expression or headerField within this variable
  }],
  "rule" : [{ // Assert rule used within the test script
    "resource" : { Reference(Any) }, // R!  Assert rule resource reference
    "param" : [{ // Rule parameter template
      "name" : "<string>", // R!  Parameter name matching external assert rule parameter
      "value" : "<string>" // Parameter value defined either explicitly or dynamically
    }]
  }],
  "ruleset" : [{ // Assert ruleset used within the test script
    "resource" : { Reference(Any) }, // R!  Assert ruleset resource reference
    "rule" : [{ // R!  The referenced rule within the ruleset
      "ruleId" : "<id>", // R!  Id of referenced rule within the ruleset
      "param" : [{ // Ruleset rule parameter template
        "name" : "<string>", // R!  Parameter name matching external assert ruleset rule parameter
        "value" : "<string>" // Parameter value defined either explicitly or dynamically
      }]
    }]
  }],
  "setup" : { // A series of required setup operations before tests are executed
    "action" : [{ // R!  A setup operation or assert to perform
      "operation" : { // The setup operation to perform
        "type" : { Coding }, // The operation code 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 | ttl | none
        "contentType" : "<code>", // xml | json | ttl | none
        "destination" : <integer>, // Server responding to the request
        "encodeRequestUrl" : <boolean>, // Whether or not to send the request url in encoded format
        "origin" : <integer>, // Server initiating the request
        "params" : "<string>", // Explicitly defined path parameters
        "requestHeader" : [{ // Each operation can have one or more header elements
          "field" : "<string>", // R!  HTTP header field name
          "value" : "<string>" // R!  HTTP headerfield value
        }],
        "requestId" : "<id>", // Fixture Id of mapped request
        "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 the source fixture to be evaluated
        "compareToSourceExpression" : "<string>", // The fluentpath expression to evaluate against the source fixture
        "compareToSourcePath" : "<string>", // XPath or JSONPath expression to evaluate against the source fixture
        "contentType" : "<code>", // xml | json | ttl | none
        "expression" : "<string>", // The fluentpath expression to be evaluated
        "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 | eval
        "path" : "<string>", // XPath or JSONPath expression
        "requestMethod" : "<code>", // delete | get | options | patch | post | put
        "requestURL" : "<string>", // Request URL comparison value
        "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
        "rule" : { // The reference to a TestScript.rule
          "ruleId" : "<id>", // R!  Id of the TestScript.rule
          "param" : [{ // Rule parameter template
            "name" : "<string>", // R!  Parameter name matching external assert rule parameter
            "value" : "<string>" // R!  Parameter value defined either explicitly or dynamically
          }]
        },
        "ruleset" : { // The reference to a TestScript.ruleset
          "rulesetId" : "<id>", // R!  Id of the TestScript.ruleset
          "rule" : [{ // The referenced rule within the ruleset
            "ruleId" : "<id>", // R!  Id of referenced rule within the ruleset
            "param" : [{ // Rule parameter template
              "name" : "<string>", // R!  Parameter name matching external assert ruleset rule parameter
              "value" : "<string>" // R!  Parameter value defined either explicitly or dynamically
            }]
          }]
        },
        "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
    "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 } // R!  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/stu3/TestScript?query-param=queryvalue
Search ParameterField TypeResource Fields Searched
datedatedate
descriptiontextdescription
identifiertextidentifier
jurisdictiontextjurisdiction
nametextname
publishertextpublisher
statustextstatus
testscript-capabilitytextmetadata.capability.description
titletexttitle
urluriurl
versiontextversion