This page is part of the FHIR Specification (v1.4.0: STU 3 Ballot 3). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R2
StructureDefinition for testscript
{ "resourceType": "StructureDefinition", "id": "TestScript", "meta": { "lastUpdated": "2016-03-31T08:01:25.570+11:00" }, "text": { "status": "generated", "div": "<div>!-- Snipped for Brevity --></div>" }, "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm", "valueInteger": 0 } ], "url": "http://hl7.org/fhir/StructureDefinition/TestScript", "name": "TestScript", "status": "draft", "publisher": "Health Level Seven International (FHIR Infrastructure)", "contact": [ { "telecom": [ { "system": "other", "value": "http://hl7.org/fhir" } ] }, { "telecom": [ { "system": "other", "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" } ] } ], "date": "2016-03-31T08:01:25+11:00", "description": "Base StructureDefinition for TestScript Resource", "fhirVersion": "1.4.0", "mapping": [ { "identity": "w5", "uri": "http://hl7.org/fhir/w5", "name": "W5 Mapping" }, { "identity": "rim", "uri": "http://hl7.org/v3", "name": "RIM" } ], "kind": "resource", "abstract": false, "baseType": "DomainResource", "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DomainResource", "derivation": "specialization", "snapshot": { "element": [ { "path": "TestScript", "short": "Describes a set of tests", "definition": "TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification.", "min": 0, "max": "*", "type": [ { "code": "DomainResource" } ], "mapping": [ { "identity": "w5", "map": "conformance.misc" } ] }, { "path": "TestScript.id", "short": "Logical id of this artifact", "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", "comments": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation. Bundles always have an id, though it is usually a generated UUID.", "min": 0, "max": "1", "base": { "path": "Resource.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "isSummary": true }, { "path": "TestScript.meta", "short": "Metadata about the resource", "definition": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.", "min": 0, "max": "1", "base": { "path": "Resource.meta", "min": 0, "max": "*" }, "type": [ { "code": "Meta" } ], "isSummary": true }, { "path": "TestScript.implicitRules", "short": "A set of rules under which this content was created", "definition": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.", "comments": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element as much as possible.", "min": 0, "max": "1", "base": { "path": "Resource.implicitRules", "min": 0, "max": "*" }, "type": [ { "code": "uri" } ], "isModifier": true, "isSummary": true }, { "path": "TestScript.language", "short": "Language of the resource content", "definition": "The base language in which the resource is written.", "comments": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).", "min": 0, "max": "1", "base": { "path": "Resource.language", "min": 0, "max": "*" }, "type": [ { "code": "code" } ], "binding": { "strength": "required", "description": "A human language.", "valueSetUri": "http://tools.ietf.org/html/bcp47" } }, { "path": "TestScript.text", "short": "Text summary of the resource, for human interpretation", "definition": "A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.", "comments": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative.", "alias": [ "narrative", "html", "xhtml", "display" ], "min": 0, "max": "1", "base": { "path": "DomainResource.text", "min": 0, "max": "*" }, "type": [ { "code": "Narrative" } ], "condition": [ "dom-1" ], "mapping": [ { "identity": "rim", "map": "Act.text?" } ] }, { "path": "TestScript.contained", "short": "Contained, inline Resources", "definition": "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.", "comments": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.", "alias": [ "inline resources", "anonymous resources", "contained resources" ], "min": 0, "max": "*", "base": { "path": "DomainResource.contained", "min": 0, "max": "*" }, "type": [ { "code": "Resource" } ], "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "DomainResource.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "DomainResource.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.url", "short": "Absolute URL used to reference this TestScript", "definition": "An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published.", "alias": [ "url", "authoritative-url", "destination", "identity" ], "min": 1, "max": "1", "type": [ { "code": "uri" } ], "isSummary": true, "mapping": [ { "identity": "w5", "map": "id" } ] }, { "path": "TestScript.version", "short": "Logical id for this version of the TestScript", "definition": "The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually.", "requirements": "There may be multiple resource versions of the TestScript that have this same identifier. The resource version id will change for technical reasons, whereas the stated version number needs to be under the author's control.", "min": 0, "max": "1", "type": [ { "code": "string" } ], "isSummary": true, "mapping": [ { "identity": "w5", "map": "id.version" } ] }, { "path": "TestScript.name", "short": "Informal name for this TestScript", "definition": "A free text natural language name identifying the TestScript.", "comments": "Not expected to be globally unique.", "min": 1, "max": "1", "type": [ { "code": "string" } ], "isSummary": true }, { "path": "TestScript.status", "short": "draft | active | retired", "definition": "The status of the TestScript.", "requirements": "Allows filtering of TestScripts that are appropriate for use vs. not.", "min": 1, "max": "1", "type": [ { "code": "code" } ], "isModifier": true, "isSummary": true, "binding": { "strength": "required", "description": "The lifecycle status of a Value Set or Concept Map.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/conformance-resource-status" } }, "mapping": [ { "identity": "w5", "map": "status" } ] }, { "path": "TestScript.identifier", "short": "External identifier", "definition": "Identifier for the TestScript assigned for external purposes outside the context of FHIR.", "min": 0, "max": "1", "type": [ { "code": "Identifier" } ], "isSummary": true, "mapping": [ { "identity": "w5", "map": "id" } ] }, { "path": "TestScript.experimental", "short": "If for testing purposes, not real usage", "definition": "This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", "requirements": "Allows filtering of TestScripts that are appropriate for use vs. not.", "min": 0, "max": "1", "type": [ { "code": "boolean" } ], "isSummary": true, "mapping": [ { "identity": "w5", "map": "class" } ] }, { "path": "TestScript.publisher", "short": "Name of the publisher (Organization or individual)", "definition": "The name of the individual or organization that published the Test Script.", "comments": "Usually an organization, but may be an individual. This item SHOULD be populated unless the information is available from context.", "requirements": "Helps establish the \"authority/credibility\" of the Test Script. May also allow for contact.", "min": 0, "max": "1", "type": [ { "code": "string" } ], "isSummary": true, "mapping": [ { "identity": "w5", "map": "who.witness" } ] }, { "path": "TestScript.contact", "short": "Contact details of the publisher", "definition": "Contacts to assist a user in finding and communicating with the publisher.", "comments": "May be a web site, an email address, a telephone number (tel:), etc.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ], "isSummary": true }, { "path": "TestScript.contact.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.contact.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.contact.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.contact.name", "short": "Name of an individual to contact", "definition": "The name of an individual to contact regarding the Test Script.", "comments": "If there is no named individual, the telecom is for the organization as a whole.", "min": 0, "max": "1", "type": [ { "code": "string" } ], "isSummary": true }, { "path": "TestScript.contact.telecom", "short": "Contact details for individual or publisher", "definition": "Contact details for individual (if a name was provided) or the publisher.", "min": 0, "max": "*", "type": [ { "code": "ContactPoint" } ], "isSummary": true }, { "path": "TestScript.date", "short": "Date for this version of the TestScript", "definition": "The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change.", "comments": "Additional specific dates may be added as extensions.", "min": 0, "max": "1", "type": [ { "code": "dateTime" } ], "isSummary": true, "mapping": [ { "identity": "w5", "map": "when.recorded" } ] }, { "path": "TestScript.description", "short": "Natural language description of the TestScript", "definition": "A free text natural language description of the TestScript and its use.", "comments": "This field can be used for things such as why the TestScript was written, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is *not* a rendering of the TestScript as conveyed in TestScript.text. This item SHOULD be populated unless the information is available from context.", "min": 0, "max": "1", "type": [ { "code": "string" } ], "isSummary": true }, { "path": "TestScript.useContext", "short": "Content intends to support these contexts", "definition": "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of Test Scripts.", "requirements": "Assist in searching for appropriate content.", "min": 0, "max": "*", "type": [ { "code": "CodeableConcept" } ], "isSummary": true, "binding": { "strength": "extensible", "description": "Indicates the countries, regions, disciplines and other aspects of use within which this artifact is targeted for use.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/use-context" } } }, { "path": "TestScript.requirements", "short": "Scope and Usage this Test Script is for", "definition": "Explains why this Test Script is needed and why it's been constrained as it has.", "comments": "This element does not describe the usage of the Test Script (that's done in comments), rather it's for traceability of *why* the element is either needed or why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this data element.", "min": 0, "max": "1", "type": [ { "code": "string" } ], "mapping": [ { "identity": "w5", "map": "why" } ] }, { "path": "TestScript.copyright", "short": "Use and/or publishing restrictions", "definition": "A copyright statement relating to the Test Script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.", "alias": [ "License", "Restrictions" ], "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.origin", "short": "An abstract server representing a client or sender in a message exchange", "definition": "An abstract server used in operations within this test script in the origin element.", "comments": "The purpose of this element is to define the profile of an origin element used elsewhere in the script. Test engines could then use the origin-profile mapping to offer a filtered list of test systems that can serve as the sender for the interaction.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.origin.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.origin.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.origin.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.origin.index", "short": "The index of the abstract origin server starting at 1", "definition": "Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.", "comments": "A given origin index (e.g. 1) can appear only once in the list (e.g. Origin 1 cannot be specified twice ... once as FormFiller and and again as FormProcessor within the same script as that could get confusing during test configuration). \n\nDifferent origin indices could play the same actor in the same test script (e.g. You could have two different test systems acting as Form-Filler).\n\nThe origin indices provided elsewhere in the test script must be one of these origin indices.", "min": 1, "max": "1", "type": [ { "code": "integer" } ] }, { "path": "TestScript.origin.profile", "short": "FHIR-Client | FHIR-SDC-FormFiller", "definition": "The type of origin profile the test system supports.", "comments": "Must be a \"sender\"/\"client\" profile.", "min": 1, "max": "1", "type": [ { "code": "Coding" } ], "meaningWhenMissing": "FHIR-Client", "binding": { "strength": "extensible", "description": "The type of origin profile the test system supports.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/testscript-profile-origin-types" } } }, { "path": "TestScript.destination", "short": "An abstract server representing a destination or receiver in a message exchange", "definition": "An abstract server used in operations within this test script in the destination element.", "comments": "The purpose of this element is to define the profile of an destination element used elsewhere in the script. Test engines could then use the destination-profile mapping to offer a filtered list of test systems that can serve as the receiver for the interaction.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.destination.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.destination.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.destination.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.destination.index", "short": "The index of the abstract destination server starting at 1", "definition": "Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.", "comments": "A given destination index (e.g. 1) can appear only once in the list (e.g. Destination 1 cannot be specified twice ... once as Form-Manager and and again as Form-Processor within the same script as that could get confusing during test configuration). \n\nDifferent destination indices could play the same actor in the same test script (e.g. You could have two different test systems acting as Form-Manager).\n\nThe destination indices provided elsewhere in the test script must be one of these destination indices.", "min": 1, "max": "1", "type": [ { "code": "integer" } ] }, { "path": "TestScript.destination.profile", "short": "FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor", "definition": "The type of destination profile the test system supports.", "comments": "Must be a \"receiver\"/\"server\" profile.", "min": 1, "max": "1", "type": [ { "code": "Coding" } ], "meaningWhenMissing": "FHIR-Server", "binding": { "strength": "extensible", "description": "The type of destination profile the test system supports.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/testscript-profile-destination-types" } } }, { "id": "metadata", "path": "TestScript.metadata", "short": "Required capability that is assumed to function correctly on the FHIR server being tested", "definition": "The required capability must exist and are assumed to function correctly on the FHIR server being tested.", "min": 0, "max": "1", "type": [ { "code": "BackboneElement" } ], "constraint": [ { "key": "inv-5", "severity": "error", "human": "TestScript metadata capability SHALL contain required or validated or both.", "expression": "capability.required or capability.validated", "xpath": "f:capability/f:required or f:capability/f:validated or (f:capability/f:required and f:capability/f:validated)" } ] }, { "path": "TestScript.metadata.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.metadata.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.metadata.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.metadata.link", "short": "Links to the FHIR specification", "definition": "A link to the FHIR specification that this test is covering.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.metadata.link.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.metadata.link.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.metadata.link.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.metadata.link.url", "short": "URL to the specification", "definition": "URL to a particular requirement or feature within the FHIR specification.", "min": 1, "max": "1", "type": [ { "code": "uri" } ] }, { "path": "TestScript.metadata.link.description", "short": "Short description", "definition": "Short description of the link.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.metadata.capability", "short": "Capabilities that are assumed to function correctly on the FHIR server being tested", "definition": "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.", "comments": "When the metadata capabilities section is defined at TestScript.metadata or at TestScript.setup.metadata, and the server's conformance statement does not contain the elements defined in the minimal conformance statement, then all the tests in the TestScript are skipped. When the metadata capabilities section is defined at TestScript.test.metadata and the server's conformance statement does not contain the elements defined in the minimal conformance statement, then only that test is skipped. The \"metadata.capabilities.required\" and \"metadata.capabilities.validated\" elements only indicate whether the capabilities are the primary focus of the test script or not. The do not impact the skipping logic. Capabilities whose \"metadata.capabilities.validated\" flag is true are the primary focus of the test script.", "min": 1, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.metadata.capability.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.metadata.capability.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.metadata.capability.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.metadata.capability.required", "short": "Are the capabilities required?", "definition": "Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.", "min": 0, "max": "1", "type": [ { "code": "boolean" } ], "defaultValueBoolean": false }, { "path": "TestScript.metadata.capability.validated", "short": "Are the capabilities validated?", "definition": "Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.", "min": 0, "max": "1", "type": [ { "code": "boolean" } ], "defaultValueBoolean": false }, { "path": "TestScript.metadata.capability.description", "short": "The expected capabilities of the server", "definition": "Description of the capabilities that this test script is requiring the server to support.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.metadata.capability.origin", "short": "Which origin server these requirements apply to", "definition": "Which origin server these requirements apply to.", "min": 0, "max": "*", "type": [ { "code": "integer" } ] }, { "path": "TestScript.metadata.capability.destination", "short": "Which server these requirements apply to", "definition": "Which server these requirements apply to.", "min": 0, "max": "1", "type": [ { "code": "integer" } ] }, { "path": "TestScript.metadata.capability.link", "short": "Links to the FHIR specification", "definition": "Links to the FHIR specification that describes this interaction and the resources involved in more detail.", "min": 0, "max": "*", "type": [ { "code": "uri" } ] }, { "path": "TestScript.metadata.capability.conformance", "short": "Required Conformance", "definition": "Minimum conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped.", "comments": "The conformance statement of the server has to contain at a minimum the contents of the reference pointed to by this element.", "min": 1, "max": "1", "type": [ { "code": "Reference", "profile": [ "http://hl7.org/fhir/StructureDefinition/Conformance" ] } ] }, { "path": "TestScript.fixture", "short": "Fixture in the test script - by reference (uri)", "definition": "Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.fixture.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.fixture.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.fixture.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.fixture.autocreate", "short": "Whether or not to implicitly create the fixture during setup", "definition": "Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.", "min": 0, "max": "1", "type": [ { "code": "boolean" } ], "defaultValueBoolean": false }, { "path": "TestScript.fixture.autodelete", "short": "Whether or not to implicitly delete the fixture during teardown", "definition": "Whether or not to implicitly delete the fixture during teardown If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.", "min": 0, "max": "1", "type": [ { "code": "boolean" } ], "defaultValueBoolean": false }, { "path": "TestScript.fixture.resource", "short": "Reference of the resource", "definition": "Reference to the resource (containing the contents of the resource needed for operations).", "comments": "See http://hl7-fhir.github.io/resourcelist.html for complete list of resource types.", "min": 0, "max": "1", "type": [ { "code": "Reference", "profile": [ "http://hl7.org/fhir/StructureDefinition/Resource" ] } ] }, { "path": "TestScript.profile", "short": "Reference of the validation profile", "definition": "Reference to the profile to be used for validation.", "comments": "See http://hl7-fhir.github.io/resourcelist.html for complete list of resource types.", "min": 0, "max": "*", "type": [ { "code": "Reference", "profile": [ "http://hl7.org/fhir/StructureDefinition/Resource" ] } ] }, { "path": "TestScript.variable", "short": "Placeholder for evaluated elements", "definition": "Variable is set based either on element value in response body or on header field value in the response headers.", "comments": "Variables would be set based either on XPath/JsonPath expressions against fixtures (static and response), or headerField evaluations against response headers. If variable evaluates to nodelist or anything other than a primitive value, then test engine would report error. Variables would be used to perform clean replacements in \"operation.params\", \"operation.requestHeader.value\", and \"operation.url\" element values during operation calls and in \"assert.value\" during assertion evaluations. This limits the places that test engines would need to look for placeholders \"${}\". Variables are scoped to the whole script. They are NOT evaluated at declaration. They are evaluated by test engine when used for substitutions in \"operation.params\", \"operation.requestHeader.value\", and \"operation.url\" element values during operation calls and in \"assert.value\" during assertion evaluations. See example testscript-search.xml.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ], "constraint": [ { "key": "inv-4", "severity": "error", "human": "Variable cannot contain both headerField and path.", "expression": "headerField.empty() or path.empty()", "xpath": "not(f:headerField and f:path)" } ] }, { "path": "TestScript.variable.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.variable.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.variable.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.variable.name", "short": "Descriptive name for this variable", "definition": "Descriptive name for this variable.", "comments": "Placeholders would contain the variable name wrapped in ${} in \"operation.params\", \"operation.requestHeader.value\", and \"operation.url\" elements. These placeholders would need to be replaced by the variable value before the operation is executed.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.variable.defaultValue", "short": "Default, hard-coded, or user-defined value for this variable", "definition": "A default, hard-coded, or user-defined value for this variable.", "comments": "The purpose of this element is to allow for a pre-defined value that can be used as a default or as an override value. Test engines can optionally use this as a placeholder for user-defined execution time values.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.variable.headerField", "short": "HTTP header field name for source", "definition": "Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.", "comments": "If headerField is defined, then the variable will be evaluated against the headers that sourceId is pointing to. If path is defined, then the variable will be evaluated against the fixture body that sourceId is pointing to. It is an error to define both headerField and path.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.variable.path", "short": "XPath or JSONPath against the fixture body", "definition": "XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both.", "comments": "If headerField is defined, then the variable will be evaluated against the headers that sourceId is pointing to. If path is defined, then the variable will be evaluated against the fixture body that sourceId is pointing to. It is an error to define both headerField and path.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.variable.sourceId", "short": "Fixture Id of source expression or headerField within this variable", "definition": "Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.", "comments": "This can be a statically defined fixture (at the top of the testscript) or a dynamically set fixture created by responseId of the action.operation element.", "min": 0, "max": "1", "type": [ { "code": "id" } ] }, { "path": "TestScript.rule", "short": "Assert rule used within the test script", "definition": "Assert rule to be used in one or more asserts within the test script.", "comments": "Each rule should be treated by test engines as one assertion regardless of how many assertions are contained within the external rule template. The impact of negative rule evaluation on test script execution is the same as an assertion failure which is descibed elsewhere in the TestScript resource.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.rule.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.rule.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.rule.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.rule.resource", "short": "Assert rule resource reference", "definition": "Reference to the resource (containing the contents of the rule needed for assertions).", "min": 1, "max": "1", "type": [ { "code": "Reference", "profile": [ "http://hl7.org/fhir/StructureDefinition/Resource" ] } ] }, { "path": "TestScript.rule.param", "short": "Rule parameter template", "definition": "Each rule template can take one or more parameters for rule evaluation.", "comments": "The parameter value can be dynamic at runtime.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.rule.param.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.rule.param.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.rule.param.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.rule.param.name", "short": "Parameter name matching external assert rule parameter", "definition": "Descriptive name for this parameter that matches the external assert rule parameter name.", "comments": "The external rule template would be looking for the parameter by this name.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.rule.param.value", "short": "Parameter value defined either explicitly or dynamically", "definition": "The explict or dynamic value for the parameter that will be passed on to the external rule template.", "comments": "This value can be overwritten by the assert.rule.param.value i.e. TestScript.rule.param.value will be used if assert.rule.param.value is not specified. The param value can be a string-representation of a number, string, or boolean that is expected. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before supplying this value to the external rule template.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.ruleset", "short": "Assert ruleset used within the test script", "definition": "Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied.", "comments": "Each rule within a ruleset should be treated by test engines as one assertion regardless of how many assertions are contained within the external rule template. The impact of negative rule evaluation on test script execution is the same as an assertion failure which is descibed elsewhere in the TestScript resource.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.ruleset.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.ruleset.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.ruleset.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.ruleset.resource", "short": "Assert ruleset resource reference", "definition": "Reference to the resource (containing the contents of the ruleset needed for assertions).", "min": 1, "max": "1", "type": [ { "code": "Reference", "profile": [ "http://hl7.org/fhir/StructureDefinition/Resource" ] } ] }, { "path": "TestScript.ruleset.rule", "short": "Id of referenced rule within the ruleset", "definition": "Id of the referenced rule within the external ruleset template.", "comments": "This qualifies each param name so that a parameter with the same name can be used differently by the different rules with the ruleset.", "min": 1, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.ruleset.rule.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.ruleset.rule.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.ruleset.rule.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.ruleset.rule.param", "short": "Ruleset rule parameter template", "definition": "Each rule template can take one or more parameters for rule evaluation.", "comments": "The parameter value can be dynamic at runtime.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.ruleset.rule.param.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.ruleset.rule.param.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.ruleset.rule.param.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.ruleset.rule.param.name", "short": "Parameter name matching external assert ruleset rule parameter", "definition": "Descriptive name for this parameter that matches the external assert ruleset rule parameter name.", "comments": "The external rule template would be looking for the parameter by this name.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.ruleset.rule.param.value", "short": "Parameter value defined either explicitly or dynamically", "definition": "The value for the parameter that will be passed on to the external ruleset rule template.", "comments": "This value can be overwritten by the assert.ruleset.rule.param.value i.e. TestScript.ruleset.rule.param.value will be used if assert.ruleset.rule.param.value is not specified. The param value can be a string-representation of a number, string, or boolean that is expected. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before supplying this value to the external rule template.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup", "short": "A series of required setup operations before tests are executed", "definition": "A series of required setup operations before tests are executed.", "min": 0, "max": "1", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.setup.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.setup.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.setup.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.setup.metadata", "short": "Capabilities that are assumed to function correctly on the FHIR server being tested", "definition": "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.", "min": 0, "max": "1", "contentReference": "#metadata", "constraint": [ { "key": "inv-6", "severity": "error", "human": "Setup metadata capability SHALL contain required or validated or both.", "expression": "capability.required or capability.validated", "xpath": "f:capability/f:required or f:capability/f:validated or (f:capability/f:required and f:capability/f:validated)" } ] }, { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", "valueString": "SetupAction" } ], "path": "TestScript.setup.action", "short": "A setup operation or assert to perform", "definition": "Action would contain either an operation or an assertion.", "comments": "An action should contain either an operation or an assertion but not both. It can contain any number of variables.", "min": 1, "max": "*", "type": [ { "code": "BackboneElement" } ], "constraint": [ { "key": "inv-1", "severity": "error", "human": "Setup action SHALL contain either an operation or assert but not both.", "expression": "operation xor assert", "xpath": "(f:operation or f:assert) and not(f:operation and f:assert)" } ] }, { "path": "TestScript.setup.action.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.setup.action.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.setup.action.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "id": "operation", "path": "TestScript.setup.action.operation", "short": "The setup operation to perform", "definition": "The operation to perform.", "min": 0, "max": "1", "type": [ { "code": "BackboneElement" } ], "constraint": [ { "key": "inv-10", "severity": "error", "human": "Setup operation SHALL contain either sourceId or targetId or params or url.", "expression": "sourceId or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('conformance' |'search' | 'transaction' | 'history'))", "xpath": "f:sourceId or ((f:targetId or f:url or f:params) and (count(f:targetId) + count(f:url) + count(f:params) =1)) or (f:type/f:code/@value='conformance' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')" } ] }, { "path": "TestScript.setup.action.operation.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.setup.action.operation.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.setup.action.operation.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.setup.action.operation.type", "short": "The operation code type that will be executed", "definition": "Server interaction or operation type.", "comments": "See http://hl7-fhir.github.io/http.html for list of server interactions.", "min": 0, "max": "1", "type": [ { "code": "Coding" } ], "binding": { "strength": "extensible", "description": "The allowable operation code types.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/testscript-operation-codes" } } }, { "path": "TestScript.setup.action.operation.resource", "short": "Resource type", "definition": "The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.", "comments": "If \"url\" element is specified, then \"targetId\", \"params\", and \"resource\" elements will be ignored as \"url\" element will have everything needed for constructing the request url. If \"params\" element is specified, then \"targetId\" element is ignored. For FHIR operations that require a resource (e.g. \"read\" and \"vread\" operations), the \"resource\" element must be specified when \"params\" element is specified. If \"url\" and \"params\" elements are absent, then the request url will be constructed from \"targetId\" fixture if present. For \"read\" operation, the resource and id values will be extracted from \"targetId\" fixture and used to construct the url. For \"vread\" and \"history\" operations, the versionId value will also be used.", "min": 0, "max": "1", "type": [ { "code": "code" } ], "binding": { "strength": "required", "description": "Either a resource or a data type.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/defined-types" } } }, { "path": "TestScript.setup.action.operation.label", "short": "Tracking/logging operation label", "definition": "The label would be used for tracking/logging purposes by test engines.", "comments": "This has no impact on the verification itself.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.operation.description", "short": "Tracking/reporting operation description", "definition": "The description would be used by test engines for tracking and reporting purposes.", "comments": "This has no impact on the verification itself.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.operation.accept", "short": "xml | json", "definition": "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", "comments": "If this is specified, then test engine shall set the 'Accept' header to the corresponding value. If 'xml' is specified, then 'Accept' header of 'application/xml+fhir' will be set. If 'json' is specified, then 'application/json+fhir' will be used. If you'd like to explicitly set the 'Accept' to some other value then use the 'requestHeader' element.", "min": 0, "max": "1", "type": [ { "code": "code" } ], "meaningWhenMissing": "xml", "binding": { "strength": "required", "description": "The content or mime type.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/content-type" } } }, { "path": "TestScript.setup.action.operation.contentType", "short": "xml | json", "definition": "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", "comments": "If this is specified, then test engine shall set the 'Content-Type' header to the corresponding value. If 'xml' is specified, then 'Content-Type' header of 'application/xml+fhir' will be set. If 'json' is specified, then 'application/json+fhir' will be used. If you'd like to explicitly set the 'Content-Type' to some other value then use the 'requestHeader' element.", "min": 0, "max": "1", "type": [ { "code": "code" } ], "meaningWhenMissing": "xml", "binding": { "strength": "required", "description": "The content or mime type.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/content-type" } } }, { "path": "TestScript.setup.action.operation.destination", "short": "Server responding to the request", "definition": "The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section.", "comments": "If multiple TestScript.destination elements are defined and operation.destination is undefined, test engine will error as it cannot determine what destination to use for the exchange.", "min": 0, "max": "1", "type": [ { "code": "integer" } ] }, { "path": "TestScript.setup.action.operation.encodeRequestUrl", "short": "Whether or not to send the request url in encoded format", "definition": "Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.", "min": 0, "max": "1", "type": [ { "code": "boolean" } ], "defaultValueBoolean": true }, { "path": "TestScript.setup.action.operation.origin", "short": "Server initiating the request", "definition": "The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section.", "comments": "If absent, test engine will send the message. When present, test engine will not send the request message but will wait for the request message to be sent from this origin server.", "min": 0, "max": "1", "type": [ { "code": "integer" } ] }, { "path": "TestScript.setup.action.operation.params", "short": "Explicitly defined path parameters", "definition": "Path plus parameters after [type]. Used to set parts of the request URL explicitly.", "comments": "If \"url\" element is specified, then \"targetId\", \"params\", and \"resource\" elements will be ignored as \"url\" element will have everything needed for constructing the request url. If \"params\" element is specified, then \"targetId\" element is ignored. For FHIR operations that require a resource (e.g. \"read\" and \"vread\" operations), the \"resource\" element must be specified when \"params\" element is specified. If \"url\" and \"params\" elements are absent, then the request url will be constructed from \"targetId\" fixture if present. For \"read\" operation, the resource and id values will be extracted from \"targetId\" fixture and used to construct the url. For \"vread\" and \"history\" operations, the versionId value will also be used. Test engines would append whatever is specified for \"params\" to the URL after the resource type without tampering with the string (beyond encoding the URL for HTTP). The \"params\" element does not correspond exactly to \"search parameters\". Nor is it the \"path\". It corresponds to the part of the URL that comes after the [type] (when \"resource\" element is specified); e.g. It corresponds to \"/[id]/_history/[vid] {?_format=[mime-type]}\" in the following operation: GET [base]/[type]/[id]/_history/[vid] {?_format=[mime-type]} Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.operation.requestHeader", "short": "Each operation can have one ore more header elements", "definition": "Header elements would be used to set HTTP headers.", "comments": "This gives control to test-script writers to set headers explicitly based on test requirements. It will allow for testing using: - \"If-Modified-Since\" and \"If-None-Match\" headers. See http://hl7-fhir.github.io/http.html#2.1.0.5.1 - \"If-Match\" header. See http://hl7-fhir.github.io/http.html#2.1.0.11 - Conditional Create using \"If-None-Exist\". See http://hl7-fhir.github.io/http.html#2.1.0.13.1 - Invalid \"Content-Type\" header for negative testing. - etc.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.setup.action.operation.requestHeader.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.setup.action.operation.requestHeader.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.setup.action.operation.requestHeader.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.setup.action.operation.requestHeader.field", "short": "HTTP header field name", "definition": "The HTTP header field e.g. \"Accept\".", "comments": "If header element is specified, then field is required.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.operation.requestHeader.value", "short": "HTTP headerfield value", "definition": "The value of the header e.g. \"application/xml\".", "comments": "If header element is specified, then value is required. No conversions will be done by Test Engine e.g. \"xml\" to \"application/xml+fhir\". The values will be set in HTTP headers \"as-is\". Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.operation.responseId", "short": "Fixture Id of mapped response", "definition": "The fixture id (maybe new) to map to the response.", "comments": "If a responseId is supplied, and the server responds, then the resulting response (both headers and body) is mapped to the fixture ID (which may be entirely new and previously undeclared) designated by \"responseId\". If responseId is not specified, it is the Test Engine's responsibility to store the response and use it as sourceId in subsequent assertions when assertion path and/or headerField is specified and sourceId is not specified.", "min": 0, "max": "1", "type": [ { "code": "id" } ] }, { "path": "TestScript.setup.action.operation.sourceId", "short": "Fixture Id of body for PUT and POST requests", "definition": "The id of the fixture used as the body of a PUT or POST request.", "min": 0, "max": "1", "type": [ { "code": "id" } ] }, { "path": "TestScript.setup.action.operation.targetId", "short": "Id of fixture used for extracting the [id], [type], and [vid] for GET requests", "definition": "Id of fixture used for extracting the [id], [type], and [vid] for GET requests.", "comments": "If \"url\" element is specified, then \"targetId\", \"params\", and \"resource\" elements will be ignored as \"url\" element will have everything needed for constructing the request url. If \"params\" element is specified, then \"targetId\" element is ignored. For FHIR operations that require a resource (e.g. \"read\" and \"vread\" operations), the \"resource\" element must be specified when \"params\" element is specified. If \"url\" and \"params\" elements are absent, then the request url will be constructed from \"targetId\" fixture if present. For \"read\" operation, the resource and id values will be extracted from \"targetId\" fixture and used to construct the url. For \"vread\" and \"history\" operations, the versionId value will also be used.", "min": 0, "max": "1", "type": [ { "code": "id" } ] }, { "path": "TestScript.setup.action.operation.url", "short": "Request URL", "definition": "Complete request URL.", "comments": "Used to set the request URL explicitly. If \"url\" element is defined, then \"targetId\", \"resource\", and \"params\" elements will be ignored. Test engines would use whatever is specified in \"url\" without tampering with the string (beyond encoding the URL for HTTP). Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "assert", "path": "TestScript.setup.action.assert", "short": "The assertion to perform", "definition": "Evaluates the results of previous operations to determine if the server under test behaves appropriately.", "comments": "In order to evaluate an assertion, the request, response, and results of the most recently executed operation must always be maintained by the test engine.", "min": 0, "max": "1", "type": [ { "code": "BackboneElement" } ], "constraint": [ { "key": "inv-13", "severity": "error", "human": "Setup action assert shall contain both compareToSourceId and compareToSourcePath or neither.", "expression": "compareToSourceId.empty() xor compareToSourcePath", "xpath": "(f:compareToSourceId and f:compareToSourcePath) or not(f:compareToSourceId or f:compareToSourcePath)" }, { "key": "inv-8", "severity": "error", "human": "Only a single assertion SHALL be present within setup action assert element.", "expression": "contentType.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + resource.count() + responseCode.count() + response.count() + rule.count() + ruleset.count() + validateProfileId.count() <=1", "xpath": "count(f:contentType) + count(f:headerField) + count(f:minimumId) + count(f:navigationLinks) + count(f:path) + count(f:resource) + count(f:responseCode) + count(f:response) + count(f:rule) + count(f:ruleset) + count(f:validateProfileId) <=1" } ] }, { "path": "TestScript.setup.action.assert.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.setup.action.assert.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.setup.action.assert.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.setup.action.assert.label", "short": "Tracking/logging assertion label", "definition": "The label would be used for tracking/logging purposes by test engines.", "comments": "This has no impact on the verification itself.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.description", "short": "Tracking/reporting assertion description", "definition": "The description would be used by test engines for tracking and reporting purposes.", "comments": "This has no impact on the verification itself.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.direction", "short": "response | request", "definition": "The direction to use for the assertion.", "min": 0, "max": "1", "type": [ { "code": "code" } ], "binding": { "strength": "required", "description": "The type of direction to use for assertion.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/assert-direction-codes" } } }, { "path": "TestScript.setup.action.assert.compareToSourceId", "short": "Id of fixture used to compare the \"sourceId/path\" evaluations to", "definition": "Id of fixture used to compare the \"sourceId/path\" evaluations to.", "comments": "The id of the fixture used to make comparisons to.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.compareToSourcePath", "short": "XPath or JSONPath expression against fixture used to compare the \"sourceId/path\" evaluations to", "definition": "XPath or JSONPath expression against fixture used to compare the \"sourceId/path\" evaluations to.", "comments": "The XPath or JSONPath expression to be evaluated against the expected fixture to compare to. Ignored if \"assert.value\" is used. The evaluation will be done before the assertion is evaluated.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.contentType", "short": "xml | json", "definition": "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", "comments": "If this is specified, then test engine shall confirm that the content-type of the last operation's headers is set to this value. If \"assert.sourceId\" element is specified, then the evaluation will be done against the headers mapped to that sourceId (and not the last operation's headers). If 'xml' is specified, then 'Content-Type' header of 'application/xml+fhir' will be confirmed. If 'json' is specified, then 'application/json+fhir' will be used. If you'd like to have more control over the string, then use 'assert.headerField' instead.", "min": 0, "max": "1", "type": [ { "code": "code" } ], "meaningWhenMissing": "xml", "binding": { "strength": "required", "description": "The content or mime type.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/content-type" } } }, { "path": "TestScript.setup.action.assert.headerField", "short": "HTTP header field name", "definition": "The HTTP header field name e.g. 'Location'.", "comments": "If \"headerField\" is specified then \"value\" must be specified. If \"sourceId\" is not specified, then \"headerField\" will be evaluated against the last operation's response headers. Test engines are to keep track of the last operation's response body and response headers.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.minimumId", "short": "Fixture Id of minimum content resource", "definition": "The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.", "comments": "Asserts that the response contains all the element/content in another fixture pointed to by minimumId. This can be a statically defined fixture or one that is dynamically set via responseId.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.navigationLinks", "short": "Perform validation on navigation links?", "definition": "Whether or not the test execution performs validation on the bundle navigation links.", "comments": "Asserts that the Bundle contains first, last, and next links.", "min": 0, "max": "1", "type": [ { "code": "boolean" } ] }, { "path": "TestScript.setup.action.assert.operator", "short": "equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains", "definition": "The operator type.", "comments": "Operators are useful especially for negative testing. If operator is not specified, then the \"equals\" operator is assumed; e.g. <code> <assert> <operator value=\"in\" /> <responseCode value=\"200,201,204\" /> </assert> <assert> <operator value=\"notEquals\" /> <response value=\"okay\"/> </assert> <assert> <operator value=\"greaterThan\" /> <responseHeader> <field value=\"Content-Length\" /> <value value=\"0\" /> <responseHeader/> </assert> </code>.", "min": 0, "max": "1", "type": [ { "code": "code" } ], "binding": { "strength": "required", "description": "The type of operator to use for assertion.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/assert-operator-codes" } } }, { "path": "TestScript.setup.action.assert.path", "short": "XPath or JSONPath expression", "definition": "The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.", "comments": "If both \"path\" and \"fixtureId\" are specified, then the path will be evaluated against the responseBody mapped to the fixtureId. If \"path\" is specified and \"fixtureId\" is not, then the path will be evaluated against the responseBody of the last operation. Test engines are to store the response body and headers of the last operation at all times for subsequent assertions.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.resource", "short": "Resource type", "definition": "The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.", "comments": "This will be expected resource type in response body e.g. in read, vread, search, etc. See http://hl7-fhir.github.io/resourcelist.html for complete list of resource types; e.g. <assert > <resourceType value=\"Patient\" </assert>.", "min": 0, "max": "1", "type": [ { "code": "code" } ], "binding": { "strength": "required", "description": "Either a resource or a data type.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/defined-types" } } }, { "path": "TestScript.setup.action.assert.response", "short": "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable", "definition": "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.", "comments": "This is a shorter way of achieving similar verifications via \"assert.responseCode\". If you need more control, then use \"assert.responseCode\" e.g. <assert> <contentType value=\"json\" /> <response value=\"okay\"/> </assert>.", "min": 0, "max": "1", "type": [ { "code": "code" } ], "binding": { "strength": "required", "description": "The type of response code to use for assertion.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/assert-response-code-types" } } }, { "path": "TestScript.setup.action.assert.responseCode", "short": "HTTP response code to test", "definition": "The value of the HTTP response code to be tested.", "comments": "To be used with \"operator\" attribute value. Asserts that the response code equals this value if \"operator\" is not specified. If the operator is \"in\" or \"notIn\" then the responseCode would be a comma-separated list of values e.g. \"200,201\". Otherwise, it's expected to be a numeric value. If \"fixture\" is not specified, then the \"responseBodyId\" value of the last operation is assumed.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.rule", "short": "Id of the TestScript.rule", "definition": "The TestScript.rule id value this assert will evaluate.", "comments": "Each rule should get evaluated by test engines as one assertion regardless of how many assertions are contained within the external rule template. The impact of negative rule evaluation on test script execution is the same as an assertion failure which is descibed elsewhere in the TestScript resource.", "min": 0, "max": "1", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.setup.action.assert.rule.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.setup.action.assert.rule.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.setup.action.assert.rule.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.setup.action.assert.rule.param", "short": "Rule parameter template", "definition": "Each rule template can take one or more parameters for rule evaluation.", "comments": "The parameter value can be dynamic at runtime.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.setup.action.assert.rule.param.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.setup.action.assert.rule.param.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.setup.action.assert.rule.param.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.setup.action.assert.rule.param.name", "short": "Parameter name matching external assert rule parameter", "definition": "Descriptive name for this parameter that matches the external assert rule parameter name.", "comments": "The external rule template would be looking for the parameter by this name.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.rule.param.value", "short": "Parameter value defined either explicitly or dynamically", "definition": "The value for the parameter that will be passed on to the external rule template.", "comments": "This value overwrites the value (if any) specified in TestScript.rule.param.value. The param value can be a string-representation of a number, string, or boolean that is expected. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before supplying this value to the external rule template.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.ruleset", "short": "Id of the TestScript.ruleset", "definition": "The TestScript.ruleset id value this assert will evaluate.", "comments": "Each rule within a ruleset should get evaluated by test engines as a separate assertion. The impact of negative rule evaluation on test script execution is the same as an assertion failure which is descibed elsewhere in the TestScript resource. If the first rule within the ruleset results in a failed assertion, then test engines do not have to evaluate the rest of the rules within the ruleset.", "min": 0, "max": "1", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.setup.action.assert.ruleset.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.setup.action.assert.ruleset.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.setup.action.assert.ruleset.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.setup.action.assert.ruleset.rule", "short": "Id of referenced rule within the ruleset", "definition": "Id of the referenced rule within the external ruleset template.", "comments": "This qualifies each param name so that a parameter with the same name can be used differently by the different rules with the ruleset.", "min": 1, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.setup.action.assert.ruleset.rule.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.setup.action.assert.ruleset.rule.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.setup.action.assert.ruleset.rule.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.setup.action.assert.ruleset.rule.param", "short": "Rule parameter template", "definition": "Each rule template can take one or more parameters for rule evaluation.", "comments": "The parameter value can be dynamic at runtime.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.setup.action.assert.ruleset.rule.param.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.setup.action.assert.ruleset.rule.param.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.setup.action.assert.ruleset.rule.param.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.setup.action.assert.ruleset.rule.param.name", "short": "Parameter name matching external assert ruleset rule parameter", "definition": "Descriptive name for this parameter that matches the external assert ruleset rule parameter name.", "comments": "The external rule template would be looking for the parameter by this name.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.ruleset.rule.param.value", "short": "Parameter value defined either explicitly or dynamically", "definition": "The value for the parameter that will be passed on to the external ruleset rule template.", "comments": "This value overwrites the value (if any) specified in TestScript.ruleset.rule.param.value. The param value can be a string-representation of a number, string, or boolean that is expected. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before supplying this value to the external rule template.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.sourceId", "short": "Fixture Id of source expression or headerField", "definition": "Fixture to evaluate the XPath/JSONPath expression or the headerField against.", "comments": "This can be a statically defined fixture (at the top of the testscript) or a dynamically set fixture created by responseId of the action.operation element.", "min": 0, "max": "1", "type": [ { "code": "id" } ] }, { "path": "TestScript.setup.action.assert.validateProfileId", "short": "Profile Id of validation profile reference", "definition": "The ID of the Profile to validate against.", "comments": "The ID of a Profile fixture. Asserts that the response is valid according to the Profile specified by validateProfileId.", "min": 0, "max": "1", "type": [ { "code": "id" } ] }, { "path": "TestScript.setup.action.assert.value", "short": "The value to compare to", "definition": "The value to compare to.", "comments": "The string-representation of a number, string, or boolean that is expected. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before comparing this value to the actual value.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.warningOnly", "short": "Will this assert produce a warning only on error?", "definition": "Whether or not the test execution will produce a warning only on error for this assert.", "comments": "If this element is specified and it is true, then assertion failures can be logged by test engine but should not stop the test script execution from proceeding. There are likely cases where the spec is not clear on what should happen. If the spec says something is optional (maybe a response header for example), but a server doesn’t do it, we could choose to issue a warning.", "min": 0, "max": "1", "type": [ { "code": "boolean" } ], "defaultValueBoolean": false }, { "path": "TestScript.test", "short": "A test in this script", "definition": "A test in this script.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.test.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.test.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.test.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.test.name", "short": "Tracking/logging name of this test", "definition": "The name of this test used for tracking/logging purposes by test engines.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.test.description", "short": "Tracking/reporting short description of the test", "definition": "A short description of the test used by test engines for tracking and reporting purposes.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.test.metadata", "short": "Capabilities that are expected to function correctly on the FHIR server being tested", "definition": "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.", "min": 0, "max": "1", "contentReference": "#metadata", "constraint": [ { "key": "inv-7", "severity": "error", "human": "Test metadata capability SHALL contain required or validated or both.", "expression": "capability.required or capability.validated", "xpath": "f:capability/f:required or f:capability/f:validated or (f:capability/f:required and f:capability/f:validated)" } ] }, { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", "valueString": "TestAction" } ], "path": "TestScript.test.action", "short": "A test operation or assert to perform", "definition": "Action would contain either an operation or an assertion.", "comments": "An action should contain either an operation or an assertion but not both. It can contain any number of variables.", "min": 1, "max": "*", "type": [ { "code": "BackboneElement" } ], "constraint": [ { "key": "inv-2", "severity": "error", "human": "Test action SHALL contain either an operation or assert but not both.", "expression": "operation xor assert", "xpath": "(f:operation or f:assert) and not(f:operation and f:assert)" } ] }, { "path": "TestScript.test.action.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.test.action.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.test.action.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.test.action.operation", "short": "The setup operation to perform", "definition": "An operation would involve a REST request to a server.", "min": 0, "max": "1", "contentReference": "#operation", "constraint": [ { "key": "inv-11", "severity": "error", "human": "Test operation SHALL contain either sourceId or targetId or params or url.", "expression": "sourceId or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('conformance' | 'search' | 'transaction' | 'history'))", "xpath": "f:sourceId or (f:targetId or f:url or f:params) and (count(f:targetId) + count(f:url) + count(f:params) =1) or (f:type/f:code/@value='conformance' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')" } ] }, { "path": "TestScript.test.action.assert", "short": "The setup assertion to perform", "definition": "Evaluates the results of previous operations to determine if the server under test behaves appropriately.", "comments": "In order to evaluate an assertion, the request, response, and results of the most recently executed operation must always be maintained by the test engine.", "min": 0, "max": "1", "contentReference": "#assert", "constraint": [ { "key": "inv-14", "severity": "error", "human": "Test action assert shall contain both compareToSourceId and compareToSourcePath or neither.", "expression": "compareToSourceId.empty() xor compareToSourcePath", "xpath": "(f:compareToSourceId and f:compareToSourcePath) or not(f:compareToSourceId or f:compareToSourcePath)" }, { "key": "inv-9", "severity": "error", "human": "Only a single assertion SHALL be present within test action assert element.", "expression": "contentType.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + resource.count() + responseCode.count() + response.count() + rule.count() + ruleset.count() + validateProfileId.count() <=1", "xpath": "count(f:contentType) + count(f:headerField) + count(f:minimumId) + count(f:navigationLinks) + count(f:path) + count(f:resource) + count(f:responseCode) + count(f:response) + count(f:rule) + count(f:ruleset) + count(f:validateProfileId) <=1" } ] }, { "path": "TestScript.teardown", "short": "A series of required clean up steps", "definition": "A series of operations required to clean up after the all the tests are executed (successfully or otherwise).", "min": 0, "max": "1", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.teardown.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.teardown.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.teardown.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", "valueString": "TeardownAction" } ], "path": "TestScript.teardown.action", "short": "One or more teardown operations to perform", "definition": "The teardown action will only contain an operation.", "comments": "An action should contain either an operation or an assertion but not both. It can contain any number of variables.", "min": 1, "max": "*", "type": [ { "code": "BackboneElement" } ], "constraint": [ { "key": "inv-3", "severity": "error", "human": "Teardown action SHALL contain an operation.", "expression": "operation", "xpath": "f:operation" } ] }, { "path": "TestScript.teardown.action.id", "representation": [ "xmlAttr" ], "short": "xml:id (or equivalent in JSON)", "definition": "unique id for the element within a resource (for internal references).", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "*" }, "type": [ { "code": "id" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.teardown.action.extension", "short": "Additional Content defined by implementations", "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content" ], "min": 0, "max": "*", "base": { "path": "Element.extension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "path": "TestScript.teardown.action.modifierExtension", "short": "Extensions that cannot be ignored", "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", "alias": [ "extensions", "user content", "modifiers" ], "min": 0, "max": "*", "base": { "path": "BackboneElement.modifierExtension", "min": 0, "max": "*" }, "type": [ { "code": "Extension" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "rim", "map": "N/A" } ] }, { "path": "TestScript.teardown.action.operation", "short": "The teardown operation to perform", "definition": "An operation would involve a REST request to a server.", "min": 0, "max": "1", "contentReference": "#operation", "constraint": [ { "key": "inv-12", "severity": "error", "human": "Teardown operation SHALL contain either sourceId or targetId or params or url.", "expression": "sourceId or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('conformance' | 'search' | 'transaction' | 'history'))", "xpath": "f:sourceId or (f:targetId or f:url or (f:params and f:resource)) and (count(f:targetId) + count(f:url) + count(f:params) =1) or (f:type/f:code/@value='conformance' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')" } ] } ] }, "differential": { "element": [ { "path": "TestScript", "short": "Describes a set of tests", "definition": "TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification.", "min": 0, "max": "*", "type": [ { "code": "DomainResource" } ], "mapping": [ { "identity": "w5", "map": "conformance.misc" } ] }, { "path": "TestScript.url", "short": "Absolute URL used to reference this TestScript", "definition": "An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published.", "alias": [ "url", "authoritative-url", "destination", "identity" ], "min": 1, "max": "1", "type": [ { "code": "uri" } ], "isSummary": true, "mapping": [ { "identity": "w5", "map": "id" } ] }, { "path": "TestScript.version", "short": "Logical id for this version of the TestScript", "definition": "The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually.", "requirements": "There may be multiple resource versions of the TestScript that have this same identifier. The resource version id will change for technical reasons, whereas the stated version number needs to be under the author's control.", "min": 0, "max": "1", "type": [ { "code": "string" } ], "isSummary": true, "mapping": [ { "identity": "w5", "map": "id.version" } ] }, { "path": "TestScript.name", "short": "Informal name for this TestScript", "definition": "A free text natural language name identifying the TestScript.", "comments": "Not expected to be globally unique.", "min": 1, "max": "1", "type": [ { "code": "string" } ], "isSummary": true }, { "path": "TestScript.status", "short": "draft | active | retired", "definition": "The status of the TestScript.", "requirements": "Allows filtering of TestScripts that are appropriate for use vs. not.", "min": 1, "max": "1", "type": [ { "code": "code" } ], "isModifier": true, "isSummary": true, "binding": { "strength": "required", "description": "The lifecycle status of a Value Set or Concept Map.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/conformance-resource-status" } }, "mapping": [ { "identity": "w5", "map": "status" } ] }, { "path": "TestScript.identifier", "short": "External identifier", "definition": "Identifier for the TestScript assigned for external purposes outside the context of FHIR.", "min": 0, "max": "1", "type": [ { "code": "Identifier" } ], "isSummary": true, "mapping": [ { "identity": "w5", "map": "id" } ] }, { "path": "TestScript.experimental", "short": "If for testing purposes, not real usage", "definition": "This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", "requirements": "Allows filtering of TestScripts that are appropriate for use vs. not.", "min": 0, "max": "1", "type": [ { "code": "boolean" } ], "isSummary": true, "mapping": [ { "identity": "w5", "map": "class" } ] }, { "path": "TestScript.publisher", "short": "Name of the publisher (Organization or individual)", "definition": "The name of the individual or organization that published the Test Script.", "comments": "Usually an organization, but may be an individual. This item SHOULD be populated unless the information is available from context.", "requirements": "Helps establish the \"authority/credibility\" of the Test Script. May also allow for contact.", "min": 0, "max": "1", "type": [ { "code": "string" } ], "isSummary": true, "mapping": [ { "identity": "w5", "map": "who.witness" } ] }, { "path": "TestScript.contact", "short": "Contact details of the publisher", "definition": "Contacts to assist a user in finding and communicating with the publisher.", "comments": "May be a web site, an email address, a telephone number (tel:), etc.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ], "isSummary": true }, { "path": "TestScript.contact.name", "short": "Name of an individual to contact", "definition": "The name of an individual to contact regarding the Test Script.", "comments": "If there is no named individual, the telecom is for the organization as a whole.", "min": 0, "max": "1", "type": [ { "code": "string" } ], "isSummary": true }, { "path": "TestScript.contact.telecom", "short": "Contact details for individual or publisher", "definition": "Contact details for individual (if a name was provided) or the publisher.", "min": 0, "max": "*", "type": [ { "code": "ContactPoint" } ], "isSummary": true }, { "path": "TestScript.date", "short": "Date for this version of the TestScript", "definition": "The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change.", "comments": "Additional specific dates may be added as extensions.", "min": 0, "max": "1", "type": [ { "code": "dateTime" } ], "isSummary": true, "mapping": [ { "identity": "w5", "map": "when.recorded" } ] }, { "path": "TestScript.description", "short": "Natural language description of the TestScript", "definition": "A free text natural language description of the TestScript and its use.", "comments": "This field can be used for things such as why the TestScript was written, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is *not* a rendering of the TestScript as conveyed in TestScript.text. This item SHOULD be populated unless the information is available from context.", "min": 0, "max": "1", "type": [ { "code": "string" } ], "isSummary": true }, { "path": "TestScript.useContext", "short": "Content intends to support these contexts", "definition": "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of Test Scripts.", "requirements": "Assist in searching for appropriate content.", "min": 0, "max": "*", "type": [ { "code": "CodeableConcept" } ], "isSummary": true, "binding": { "strength": "extensible", "description": "Indicates the countries, regions, disciplines and other aspects of use within which this artifact is targeted for use.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/use-context" } } }, { "path": "TestScript.requirements", "short": "Scope and Usage this Test Script is for", "definition": "Explains why this Test Script is needed and why it's been constrained as it has.", "comments": "This element does not describe the usage of the Test Script (that's done in comments), rather it's for traceability of *why* the element is either needed or why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this data element.", "min": 0, "max": "1", "type": [ { "code": "string" } ], "mapping": [ { "identity": "w5", "map": "why" } ] }, { "path": "TestScript.copyright", "short": "Use and/or publishing restrictions", "definition": "A copyright statement relating to the Test Script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.", "alias": [ "License", "Restrictions" ], "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.origin", "short": "An abstract server representing a client or sender in a message exchange", "definition": "An abstract server used in operations within this test script in the origin element.", "comments": "The purpose of this element is to define the profile of an origin element used elsewhere in the script. Test engines could then use the origin-profile mapping to offer a filtered list of test systems that can serve as the sender for the interaction.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.origin.index", "short": "The index of the abstract origin server starting at 1", "definition": "Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.", "comments": "A given origin index (e.g. 1) can appear only once in the list (e.g. Origin 1 cannot be specified twice ... once as FormFiller and and again as FormProcessor within the same script as that could get confusing during test configuration). \n\nDifferent origin indices could play the same actor in the same test script (e.g. You could have two different test systems acting as Form-Filler).\n\nThe origin indices provided elsewhere in the test script must be one of these origin indices.", "min": 1, "max": "1", "type": [ { "code": "integer" } ] }, { "path": "TestScript.origin.profile", "short": "FHIR-Client | FHIR-SDC-FormFiller", "definition": "The type of origin profile the test system supports.", "comments": "Must be a \"sender\"/\"client\" profile.", "min": 1, "max": "1", "type": [ { "code": "Coding" } ], "meaningWhenMissing": "FHIR-Client", "binding": { "strength": "extensible", "description": "The type of origin profile the test system supports.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/testscript-profile-origin-types" } } }, { "path": "TestScript.destination", "short": "An abstract server representing a destination or receiver in a message exchange", "definition": "An abstract server used in operations within this test script in the destination element.", "comments": "The purpose of this element is to define the profile of an destination element used elsewhere in the script. Test engines could then use the destination-profile mapping to offer a filtered list of test systems that can serve as the receiver for the interaction.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.destination.index", "short": "The index of the abstract destination server starting at 1", "definition": "Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.", "comments": "A given destination index (e.g. 1) can appear only once in the list (e.g. Destination 1 cannot be specified twice ... once as Form-Manager and and again as Form-Processor within the same script as that could get confusing during test configuration). \n\nDifferent destination indices could play the same actor in the same test script (e.g. You could have two different test systems acting as Form-Manager).\n\nThe destination indices provided elsewhere in the test script must be one of these destination indices.", "min": 1, "max": "1", "type": [ { "code": "integer" } ] }, { "path": "TestScript.destination.profile", "short": "FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor", "definition": "The type of destination profile the test system supports.", "comments": "Must be a \"receiver\"/\"server\" profile.", "min": 1, "max": "1", "type": [ { "code": "Coding" } ], "meaningWhenMissing": "FHIR-Server", "binding": { "strength": "extensible", "description": "The type of destination profile the test system supports.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/testscript-profile-destination-types" } } }, { "id": "metadata", "path": "TestScript.metadata", "short": "Required capability that is assumed to function correctly on the FHIR server being tested", "definition": "The required capability must exist and are assumed to function correctly on the FHIR server being tested.", "min": 0, "max": "1", "type": [ { "code": "BackboneElement" } ], "constraint": [ { "key": "inv-5", "severity": "error", "human": "TestScript metadata capability SHALL contain required or validated or both.", "expression": "capability.required or capability.validated", "xpath": "f:capability/f:required or f:capability/f:validated or (f:capability/f:required and f:capability/f:validated)" } ] }, { "path": "TestScript.metadata.link", "short": "Links to the FHIR specification", "definition": "A link to the FHIR specification that this test is covering.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.metadata.link.url", "short": "URL to the specification", "definition": "URL to a particular requirement or feature within the FHIR specification.", "min": 1, "max": "1", "type": [ { "code": "uri" } ] }, { "path": "TestScript.metadata.link.description", "short": "Short description", "definition": "Short description of the link.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.metadata.capability", "short": "Capabilities that are assumed to function correctly on the FHIR server being tested", "definition": "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.", "comments": "When the metadata capabilities section is defined at TestScript.metadata or at TestScript.setup.metadata, and the server's conformance statement does not contain the elements defined in the minimal conformance statement, then all the tests in the TestScript are skipped. When the metadata capabilities section is defined at TestScript.test.metadata and the server's conformance statement does not contain the elements defined in the minimal conformance statement, then only that test is skipped. The \"metadata.capabilities.required\" and \"metadata.capabilities.validated\" elements only indicate whether the capabilities are the primary focus of the test script or not. The do not impact the skipping logic. Capabilities whose \"metadata.capabilities.validated\" flag is true are the primary focus of the test script.", "min": 1, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.metadata.capability.required", "short": "Are the capabilities required?", "definition": "Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.", "min": 0, "max": "1", "type": [ { "code": "boolean" } ], "defaultValueBoolean": false }, { "path": "TestScript.metadata.capability.validated", "short": "Are the capabilities validated?", "definition": "Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.", "min": 0, "max": "1", "type": [ { "code": "boolean" } ], "defaultValueBoolean": false }, { "path": "TestScript.metadata.capability.description", "short": "The expected capabilities of the server", "definition": "Description of the capabilities that this test script is requiring the server to support.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.metadata.capability.origin", "short": "Which origin server these requirements apply to", "definition": "Which origin server these requirements apply to.", "min": 0, "max": "*", "type": [ { "code": "integer" } ] }, { "path": "TestScript.metadata.capability.destination", "short": "Which server these requirements apply to", "definition": "Which server these requirements apply to.", "min": 0, "max": "1", "type": [ { "code": "integer" } ] }, { "path": "TestScript.metadata.capability.link", "short": "Links to the FHIR specification", "definition": "Links to the FHIR specification that describes this interaction and the resources involved in more detail.", "min": 0, "max": "*", "type": [ { "code": "uri" } ] }, { "path": "TestScript.metadata.capability.conformance", "short": "Required Conformance", "definition": "Minimum conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped.", "comments": "The conformance statement of the server has to contain at a minimum the contents of the reference pointed to by this element.", "min": 1, "max": "1", "type": [ { "code": "Reference", "profile": [ "http://hl7.org/fhir/StructureDefinition/Conformance" ] } ] }, { "path": "TestScript.fixture", "short": "Fixture in the test script - by reference (uri)", "definition": "Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.fixture.autocreate", "short": "Whether or not to implicitly create the fixture during setup", "definition": "Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.", "min": 0, "max": "1", "type": [ { "code": "boolean" } ], "defaultValueBoolean": false }, { "path": "TestScript.fixture.autodelete", "short": "Whether or not to implicitly delete the fixture during teardown", "definition": "Whether or not to implicitly delete the fixture during teardown If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.", "min": 0, "max": "1", "type": [ { "code": "boolean" } ], "defaultValueBoolean": false }, { "path": "TestScript.fixture.resource", "short": "Reference of the resource", "definition": "Reference to the resource (containing the contents of the resource needed for operations).", "comments": "See http://hl7-fhir.github.io/resourcelist.html for complete list of resource types.", "min": 0, "max": "1", "type": [ { "code": "Reference", "profile": [ "http://hl7.org/fhir/StructureDefinition/Resource" ] } ] }, { "path": "TestScript.profile", "short": "Reference of the validation profile", "definition": "Reference to the profile to be used for validation.", "comments": "See http://hl7-fhir.github.io/resourcelist.html for complete list of resource types.", "min": 0, "max": "*", "type": [ { "code": "Reference", "profile": [ "http://hl7.org/fhir/StructureDefinition/Resource" ] } ] }, { "path": "TestScript.variable", "short": "Placeholder for evaluated elements", "definition": "Variable is set based either on element value in response body or on header field value in the response headers.", "comments": "Variables would be set based either on XPath/JsonPath expressions against fixtures (static and response), or headerField evaluations against response headers. If variable evaluates to nodelist or anything other than a primitive value, then test engine would report error. Variables would be used to perform clean replacements in \"operation.params\", \"operation.requestHeader.value\", and \"operation.url\" element values during operation calls and in \"assert.value\" during assertion evaluations. This limits the places that test engines would need to look for placeholders \"${}\". Variables are scoped to the whole script. They are NOT evaluated at declaration. They are evaluated by test engine when used for substitutions in \"operation.params\", \"operation.requestHeader.value\", and \"operation.url\" element values during operation calls and in \"assert.value\" during assertion evaluations. See example testscript-search.xml.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ], "constraint": [ { "key": "inv-4", "severity": "error", "human": "Variable cannot contain both headerField and path.", "expression": "headerField.empty() or path.empty()", "xpath": "not(f:headerField and f:path)" } ] }, { "path": "TestScript.variable.name", "short": "Descriptive name for this variable", "definition": "Descriptive name for this variable.", "comments": "Placeholders would contain the variable name wrapped in ${} in \"operation.params\", \"operation.requestHeader.value\", and \"operation.url\" elements. These placeholders would need to be replaced by the variable value before the operation is executed.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.variable.defaultValue", "short": "Default, hard-coded, or user-defined value for this variable", "definition": "A default, hard-coded, or user-defined value for this variable.", "comments": "The purpose of this element is to allow for a pre-defined value that can be used as a default or as an override value. Test engines can optionally use this as a placeholder for user-defined execution time values.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.variable.headerField", "short": "HTTP header field name for source", "definition": "Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.", "comments": "If headerField is defined, then the variable will be evaluated against the headers that sourceId is pointing to. If path is defined, then the variable will be evaluated against the fixture body that sourceId is pointing to. It is an error to define both headerField and path.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.variable.path", "short": "XPath or JSONPath against the fixture body", "definition": "XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both.", "comments": "If headerField is defined, then the variable will be evaluated against the headers that sourceId is pointing to. If path is defined, then the variable will be evaluated against the fixture body that sourceId is pointing to. It is an error to define both headerField and path.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.variable.sourceId", "short": "Fixture Id of source expression or headerField within this variable", "definition": "Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.", "comments": "This can be a statically defined fixture (at the top of the testscript) or a dynamically set fixture created by responseId of the action.operation element.", "min": 0, "max": "1", "type": [ { "code": "id" } ] }, { "path": "TestScript.rule", "short": "Assert rule used within the test script", "definition": "Assert rule to be used in one or more asserts within the test script.", "comments": "Each rule should be treated by test engines as one assertion regardless of how many assertions are contained within the external rule template. The impact of negative rule evaluation on test script execution is the same as an assertion failure which is descibed elsewhere in the TestScript resource.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.rule.resource", "short": "Assert rule resource reference", "definition": "Reference to the resource (containing the contents of the rule needed for assertions).", "min": 1, "max": "1", "type": [ { "code": "Reference", "profile": [ "http://hl7.org/fhir/StructureDefinition/Resource" ] } ] }, { "path": "TestScript.rule.param", "short": "Rule parameter template", "definition": "Each rule template can take one or more parameters for rule evaluation.", "comments": "The parameter value can be dynamic at runtime.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.rule.param.name", "short": "Parameter name matching external assert rule parameter", "definition": "Descriptive name for this parameter that matches the external assert rule parameter name.", "comments": "The external rule template would be looking for the parameter by this name.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.rule.param.value", "short": "Parameter value defined either explicitly or dynamically", "definition": "The explict or dynamic value for the parameter that will be passed on to the external rule template.", "comments": "This value can be overwritten by the assert.rule.param.value i.e. TestScript.rule.param.value will be used if assert.rule.param.value is not specified. The param value can be a string-representation of a number, string, or boolean that is expected. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before supplying this value to the external rule template.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.ruleset", "short": "Assert ruleset used within the test script", "definition": "Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied.", "comments": "Each rule within a ruleset should be treated by test engines as one assertion regardless of how many assertions are contained within the external rule template. The impact of negative rule evaluation on test script execution is the same as an assertion failure which is descibed elsewhere in the TestScript resource.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.ruleset.resource", "short": "Assert ruleset resource reference", "definition": "Reference to the resource (containing the contents of the ruleset needed for assertions).", "min": 1, "max": "1", "type": [ { "code": "Reference", "profile": [ "http://hl7.org/fhir/StructureDefinition/Resource" ] } ] }, { "path": "TestScript.ruleset.rule", "short": "Id of referenced rule within the ruleset", "definition": "Id of the referenced rule within the external ruleset template.", "comments": "This qualifies each param name so that a parameter with the same name can be used differently by the different rules with the ruleset.", "min": 1, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.ruleset.rule.param", "short": "Ruleset rule parameter template", "definition": "Each rule template can take one or more parameters for rule evaluation.", "comments": "The parameter value can be dynamic at runtime.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.ruleset.rule.param.name", "short": "Parameter name matching external assert ruleset rule parameter", "definition": "Descriptive name for this parameter that matches the external assert ruleset rule parameter name.", "comments": "The external rule template would be looking for the parameter by this name.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.ruleset.rule.param.value", "short": "Parameter value defined either explicitly or dynamically", "definition": "The value for the parameter that will be passed on to the external ruleset rule template.", "comments": "This value can be overwritten by the assert.ruleset.rule.param.value i.e. TestScript.ruleset.rule.param.value will be used if assert.ruleset.rule.param.value is not specified. The param value can be a string-representation of a number, string, or boolean that is expected. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before supplying this value to the external rule template.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup", "short": "A series of required setup operations before tests are executed", "definition": "A series of required setup operations before tests are executed.", "min": 0, "max": "1", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.setup.metadata", "short": "Capabilities that are assumed to function correctly on the FHIR server being tested", "definition": "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.", "min": 0, "max": "1", "contentReference": "#metadata", "constraint": [ { "key": "inv-6", "severity": "error", "human": "Setup metadata capability SHALL contain required or validated or both.", "expression": "capability.required or capability.validated", "xpath": "f:capability/f:required or f:capability/f:validated or (f:capability/f:required and f:capability/f:validated)" } ] }, { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", "valueString": "SetupAction" } ], "path": "TestScript.setup.action", "short": "A setup operation or assert to perform", "definition": "Action would contain either an operation or an assertion.", "comments": "An action should contain either an operation or an assertion but not both. It can contain any number of variables.", "min": 1, "max": "*", "type": [ { "code": "BackboneElement" } ], "constraint": [ { "key": "inv-1", "severity": "error", "human": "Setup action SHALL contain either an operation or assert but not both.", "expression": "operation xor assert", "xpath": "(f:operation or f:assert) and not(f:operation and f:assert)" } ] }, { "id": "operation", "path": "TestScript.setup.action.operation", "short": "The setup operation to perform", "definition": "The operation to perform.", "min": 0, "max": "1", "type": [ { "code": "BackboneElement" } ], "constraint": [ { "key": "inv-10", "severity": "error", "human": "Setup operation SHALL contain either sourceId or targetId or params or url.", "expression": "sourceId or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('conformance' |'search' | 'transaction' | 'history'))", "xpath": "f:sourceId or ((f:targetId or f:url or f:params) and (count(f:targetId) + count(f:url) + count(f:params) =1)) or (f:type/f:code/@value='conformance' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')" } ] }, { "path": "TestScript.setup.action.operation.type", "short": "The operation code type that will be executed", "definition": "Server interaction or operation type.", "comments": "See http://hl7-fhir.github.io/http.html for list of server interactions.", "min": 0, "max": "1", "type": [ { "code": "Coding" } ], "binding": { "strength": "extensible", "description": "The allowable operation code types.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/testscript-operation-codes" } } }, { "path": "TestScript.setup.action.operation.resource", "short": "Resource type", "definition": "The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.", "comments": "If \"url\" element is specified, then \"targetId\", \"params\", and \"resource\" elements will be ignored as \"url\" element will have everything needed for constructing the request url. If \"params\" element is specified, then \"targetId\" element is ignored. For FHIR operations that require a resource (e.g. \"read\" and \"vread\" operations), the \"resource\" element must be specified when \"params\" element is specified. If \"url\" and \"params\" elements are absent, then the request url will be constructed from \"targetId\" fixture if present. For \"read\" operation, the resource and id values will be extracted from \"targetId\" fixture and used to construct the url. For \"vread\" and \"history\" operations, the versionId value will also be used.", "min": 0, "max": "1", "type": [ { "code": "code" } ], "binding": { "strength": "required", "description": "Either a resource or a data type.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/defined-types" } } }, { "path": "TestScript.setup.action.operation.label", "short": "Tracking/logging operation label", "definition": "The label would be used for tracking/logging purposes by test engines.", "comments": "This has no impact on the verification itself.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.operation.description", "short": "Tracking/reporting operation description", "definition": "The description would be used by test engines for tracking and reporting purposes.", "comments": "This has no impact on the verification itself.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.operation.accept", "short": "xml | json", "definition": "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", "comments": "If this is specified, then test engine shall set the 'Accept' header to the corresponding value. If 'xml' is specified, then 'Accept' header of 'application/xml+fhir' will be set. If 'json' is specified, then 'application/json+fhir' will be used. If you'd like to explicitly set the 'Accept' to some other value then use the 'requestHeader' element.", "min": 0, "max": "1", "type": [ { "code": "code" } ], "meaningWhenMissing": "xml", "binding": { "strength": "required", "description": "The content or mime type.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/content-type" } } }, { "path": "TestScript.setup.action.operation.contentType", "short": "xml | json", "definition": "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", "comments": "If this is specified, then test engine shall set the 'Content-Type' header to the corresponding value. If 'xml' is specified, then 'Content-Type' header of 'application/xml+fhir' will be set. If 'json' is specified, then 'application/json+fhir' will be used. If you'd like to explicitly set the 'Content-Type' to some other value then use the 'requestHeader' element.", "min": 0, "max": "1", "type": [ { "code": "code" } ], "meaningWhenMissing": "xml", "binding": { "strength": "required", "description": "The content or mime type.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/content-type" } } }, { "path": "TestScript.setup.action.operation.destination", "short": "Server responding to the request", "definition": "The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section.", "comments": "If multiple TestScript.destination elements are defined and operation.destination is undefined, test engine will error as it cannot determine what destination to use for the exchange.", "min": 0, "max": "1", "type": [ { "code": "integer" } ] }, { "path": "TestScript.setup.action.operation.encodeRequestUrl", "short": "Whether or not to send the request url in encoded format", "definition": "Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.", "min": 0, "max": "1", "type": [ { "code": "boolean" } ], "defaultValueBoolean": true }, { "path": "TestScript.setup.action.operation.origin", "short": "Server initiating the request", "definition": "The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section.", "comments": "If absent, test engine will send the message. When present, test engine will not send the request message but will wait for the request message to be sent from this origin server.", "min": 0, "max": "1", "type": [ { "code": "integer" } ] }, { "path": "TestScript.setup.action.operation.params", "short": "Explicitly defined path parameters", "definition": "Path plus parameters after [type]. Used to set parts of the request URL explicitly.", "comments": "If \"url\" element is specified, then \"targetId\", \"params\", and \"resource\" elements will be ignored as \"url\" element will have everything needed for constructing the request url. If \"params\" element is specified, then \"targetId\" element is ignored. For FHIR operations that require a resource (e.g. \"read\" and \"vread\" operations), the \"resource\" element must be specified when \"params\" element is specified. If \"url\" and \"params\" elements are absent, then the request url will be constructed from \"targetId\" fixture if present. For \"read\" operation, the resource and id values will be extracted from \"targetId\" fixture and used to construct the url. For \"vread\" and \"history\" operations, the versionId value will also be used. Test engines would append whatever is specified for \"params\" to the URL after the resource type without tampering with the string (beyond encoding the URL for HTTP). The \"params\" element does not correspond exactly to \"search parameters\". Nor is it the \"path\". It corresponds to the part of the URL that comes after the [type] (when \"resource\" element is specified); e.g. It corresponds to \"/[id]/_history/[vid] {?_format=[mime-type]}\" in the following operation: GET [base]/[type]/[id]/_history/[vid] {?_format=[mime-type]} Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.operation.requestHeader", "short": "Each operation can have one ore more header elements", "definition": "Header elements would be used to set HTTP headers.", "comments": "This gives control to test-script writers to set headers explicitly based on test requirements. It will allow for testing using: - \"If-Modified-Since\" and \"If-None-Match\" headers. See http://hl7-fhir.github.io/http.html#2.1.0.5.1 - \"If-Match\" header. See http://hl7-fhir.github.io/http.html#2.1.0.11 - Conditional Create using \"If-None-Exist\". See http://hl7-fhir.github.io/http.html#2.1.0.13.1 - Invalid \"Content-Type\" header for negative testing. - etc.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.setup.action.operation.requestHeader.field", "short": "HTTP header field name", "definition": "The HTTP header field e.g. \"Accept\".", "comments": "If header element is specified, then field is required.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.operation.requestHeader.value", "short": "HTTP headerfield value", "definition": "The value of the header e.g. \"application/xml\".", "comments": "If header element is specified, then value is required. No conversions will be done by Test Engine e.g. \"xml\" to \"application/xml+fhir\". The values will be set in HTTP headers \"as-is\". Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.operation.responseId", "short": "Fixture Id of mapped response", "definition": "The fixture id (maybe new) to map to the response.", "comments": "If a responseId is supplied, and the server responds, then the resulting response (both headers and body) is mapped to the fixture ID (which may be entirely new and previously undeclared) designated by \"responseId\". If responseId is not specified, it is the Test Engine's responsibility to store the response and use it as sourceId in subsequent assertions when assertion path and/or headerField is specified and sourceId is not specified.", "min": 0, "max": "1", "type": [ { "code": "id" } ] }, { "path": "TestScript.setup.action.operation.sourceId", "short": "Fixture Id of body for PUT and POST requests", "definition": "The id of the fixture used as the body of a PUT or POST request.", "min": 0, "max": "1", "type": [ { "code": "id" } ] }, { "path": "TestScript.setup.action.operation.targetId", "short": "Id of fixture used for extracting the [id], [type], and [vid] for GET requests", "definition": "Id of fixture used for extracting the [id], [type], and [vid] for GET requests.", "comments": "If \"url\" element is specified, then \"targetId\", \"params\", and \"resource\" elements will be ignored as \"url\" element will have everything needed for constructing the request url. If \"params\" element is specified, then \"targetId\" element is ignored. For FHIR operations that require a resource (e.g. \"read\" and \"vread\" operations), the \"resource\" element must be specified when \"params\" element is specified. If \"url\" and \"params\" elements are absent, then the request url will be constructed from \"targetId\" fixture if present. For \"read\" operation, the resource and id values will be extracted from \"targetId\" fixture and used to construct the url. For \"vread\" and \"history\" operations, the versionId value will also be used.", "min": 0, "max": "1", "type": [ { "code": "id" } ] }, { "path": "TestScript.setup.action.operation.url", "short": "Request URL", "definition": "Complete request URL.", "comments": "Used to set the request URL explicitly. If \"url\" element is defined, then \"targetId\", \"resource\", and \"params\" elements will be ignored. Test engines would use whatever is specified in \"url\" without tampering with the string (beyond encoding the URL for HTTP). Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "assert", "path": "TestScript.setup.action.assert", "short": "The assertion to perform", "definition": "Evaluates the results of previous operations to determine if the server under test behaves appropriately.", "comments": "In order to evaluate an assertion, the request, response, and results of the most recently executed operation must always be maintained by the test engine.", "min": 0, "max": "1", "type": [ { "code": "BackboneElement" } ], "constraint": [ { "key": "inv-13", "severity": "error", "human": "Setup action assert shall contain both compareToSourceId and compareToSourcePath or neither.", "expression": "compareToSourceId.empty() xor compareToSourcePath", "xpath": "(f:compareToSourceId and f:compareToSourcePath) or not(f:compareToSourceId or f:compareToSourcePath)" }, { "key": "inv-8", "severity": "error", "human": "Only a single assertion SHALL be present within setup action assert element.", "expression": "contentType.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + resource.count() + responseCode.count() + response.count() + rule.count() + ruleset.count() + validateProfileId.count() <=1", "xpath": "count(f:contentType) + count(f:headerField) + count(f:minimumId) + count(f:navigationLinks) + count(f:path) + count(f:resource) + count(f:responseCode) + count(f:response) + count(f:rule) + count(f:ruleset) + count(f:validateProfileId) <=1" } ] }, { "path": "TestScript.setup.action.assert.label", "short": "Tracking/logging assertion label", "definition": "The label would be used for tracking/logging purposes by test engines.", "comments": "This has no impact on the verification itself.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.description", "short": "Tracking/reporting assertion description", "definition": "The description would be used by test engines for tracking and reporting purposes.", "comments": "This has no impact on the verification itself.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.direction", "short": "response | request", "definition": "The direction to use for the assertion.", "min": 0, "max": "1", "type": [ { "code": "code" } ], "binding": { "strength": "required", "description": "The type of direction to use for assertion.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/assert-direction-codes" } } }, { "path": "TestScript.setup.action.assert.compareToSourceId", "short": "Id of fixture used to compare the \"sourceId/path\" evaluations to", "definition": "Id of fixture used to compare the \"sourceId/path\" evaluations to.", "comments": "The id of the fixture used to make comparisons to.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.compareToSourcePath", "short": "XPath or JSONPath expression against fixture used to compare the \"sourceId/path\" evaluations to", "definition": "XPath or JSONPath expression against fixture used to compare the \"sourceId/path\" evaluations to.", "comments": "The XPath or JSONPath expression to be evaluated against the expected fixture to compare to. Ignored if \"assert.value\" is used. The evaluation will be done before the assertion is evaluated.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.contentType", "short": "xml | json", "definition": "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", "comments": "If this is specified, then test engine shall confirm that the content-type of the last operation's headers is set to this value. If \"assert.sourceId\" element is specified, then the evaluation will be done against the headers mapped to that sourceId (and not the last operation's headers). If 'xml' is specified, then 'Content-Type' header of 'application/xml+fhir' will be confirmed. If 'json' is specified, then 'application/json+fhir' will be used. If you'd like to have more control over the string, then use 'assert.headerField' instead.", "min": 0, "max": "1", "type": [ { "code": "code" } ], "meaningWhenMissing": "xml", "binding": { "strength": "required", "description": "The content or mime type.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/content-type" } } }, { "path": "TestScript.setup.action.assert.headerField", "short": "HTTP header field name", "definition": "The HTTP header field name e.g. 'Location'.", "comments": "If \"headerField\" is specified then \"value\" must be specified. If \"sourceId\" is not specified, then \"headerField\" will be evaluated against the last operation's response headers. Test engines are to keep track of the last operation's response body and response headers.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.minimumId", "short": "Fixture Id of minimum content resource", "definition": "The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.", "comments": "Asserts that the response contains all the element/content in another fixture pointed to by minimumId. This can be a statically defined fixture or one that is dynamically set via responseId.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.navigationLinks", "short": "Perform validation on navigation links?", "definition": "Whether or not the test execution performs validation on the bundle navigation links.", "comments": "Asserts that the Bundle contains first, last, and next links.", "min": 0, "max": "1", "type": [ { "code": "boolean" } ] }, { "path": "TestScript.setup.action.assert.operator", "short": "equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains", "definition": "The operator type.", "comments": "Operators are useful especially for negative testing. If operator is not specified, then the \"equals\" operator is assumed; e.g. <code> <assert> <operator value=\"in\" /> <responseCode value=\"200,201,204\" /> </assert> <assert> <operator value=\"notEquals\" /> <response value=\"okay\"/> </assert> <assert> <operator value=\"greaterThan\" /> <responseHeader> <field value=\"Content-Length\" /> <value value=\"0\" /> <responseHeader/> </assert> </code>.", "min": 0, "max": "1", "type": [ { "code": "code" } ], "binding": { "strength": "required", "description": "The type of operator to use for assertion.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/assert-operator-codes" } } }, { "path": "TestScript.setup.action.assert.path", "short": "XPath or JSONPath expression", "definition": "The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.", "comments": "If both \"path\" and \"fixtureId\" are specified, then the path will be evaluated against the responseBody mapped to the fixtureId. If \"path\" is specified and \"fixtureId\" is not, then the path will be evaluated against the responseBody of the last operation. Test engines are to store the response body and headers of the last operation at all times for subsequent assertions.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.resource", "short": "Resource type", "definition": "The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.", "comments": "This will be expected resource type in response body e.g. in read, vread, search, etc. See http://hl7-fhir.github.io/resourcelist.html for complete list of resource types; e.g. <assert > <resourceType value=\"Patient\" </assert>.", "min": 0, "max": "1", "type": [ { "code": "code" } ], "binding": { "strength": "required", "description": "Either a resource or a data type.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/defined-types" } } }, { "path": "TestScript.setup.action.assert.response", "short": "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable", "definition": "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.", "comments": "This is a shorter way of achieving similar verifications via \"assert.responseCode\". If you need more control, then use \"assert.responseCode\" e.g. <assert> <contentType value=\"json\" /> <response value=\"okay\"/> </assert>.", "min": 0, "max": "1", "type": [ { "code": "code" } ], "binding": { "strength": "required", "description": "The type of response code to use for assertion.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/assert-response-code-types" } } }, { "path": "TestScript.setup.action.assert.responseCode", "short": "HTTP response code to test", "definition": "The value of the HTTP response code to be tested.", "comments": "To be used with \"operator\" attribute value. Asserts that the response code equals this value if \"operator\" is not specified. If the operator is \"in\" or \"notIn\" then the responseCode would be a comma-separated list of values e.g. \"200,201\". Otherwise, it's expected to be a numeric value. If \"fixture\" is not specified, then the \"responseBodyId\" value of the last operation is assumed.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.rule", "short": "Id of the TestScript.rule", "definition": "The TestScript.rule id value this assert will evaluate.", "comments": "Each rule should get evaluated by test engines as one assertion regardless of how many assertions are contained within the external rule template. The impact of negative rule evaluation on test script execution is the same as an assertion failure which is descibed elsewhere in the TestScript resource.", "min": 0, "max": "1", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.setup.action.assert.rule.param", "short": "Rule parameter template", "definition": "Each rule template can take one or more parameters for rule evaluation.", "comments": "The parameter value can be dynamic at runtime.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.setup.action.assert.rule.param.name", "short": "Parameter name matching external assert rule parameter", "definition": "Descriptive name for this parameter that matches the external assert rule parameter name.", "comments": "The external rule template would be looking for the parameter by this name.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.rule.param.value", "short": "Parameter value defined either explicitly or dynamically", "definition": "The value for the parameter that will be passed on to the external rule template.", "comments": "This value overwrites the value (if any) specified in TestScript.rule.param.value. The param value can be a string-representation of a number, string, or boolean that is expected. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before supplying this value to the external rule template.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.ruleset", "short": "Id of the TestScript.ruleset", "definition": "The TestScript.ruleset id value this assert will evaluate.", "comments": "Each rule within a ruleset should get evaluated by test engines as a separate assertion. The impact of negative rule evaluation on test script execution is the same as an assertion failure which is descibed elsewhere in the TestScript resource. If the first rule within the ruleset results in a failed assertion, then test engines do not have to evaluate the rest of the rules within the ruleset.", "min": 0, "max": "1", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.setup.action.assert.ruleset.rule", "short": "Id of referenced rule within the ruleset", "definition": "Id of the referenced rule within the external ruleset template.", "comments": "This qualifies each param name so that a parameter with the same name can be used differently by the different rules with the ruleset.", "min": 1, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.setup.action.assert.ruleset.rule.param", "short": "Rule parameter template", "definition": "Each rule template can take one or more parameters for rule evaluation.", "comments": "The parameter value can be dynamic at runtime.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.setup.action.assert.ruleset.rule.param.name", "short": "Parameter name matching external assert ruleset rule parameter", "definition": "Descriptive name for this parameter that matches the external assert ruleset rule parameter name.", "comments": "The external rule template would be looking for the parameter by this name.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.ruleset.rule.param.value", "short": "Parameter value defined either explicitly or dynamically", "definition": "The value for the parameter that will be passed on to the external ruleset rule template.", "comments": "This value overwrites the value (if any) specified in TestScript.ruleset.rule.param.value. The param value can be a string-representation of a number, string, or boolean that is expected. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before supplying this value to the external rule template.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.sourceId", "short": "Fixture Id of source expression or headerField", "definition": "Fixture to evaluate the XPath/JSONPath expression or the headerField against.", "comments": "This can be a statically defined fixture (at the top of the testscript) or a dynamically set fixture created by responseId of the action.operation element.", "min": 0, "max": "1", "type": [ { "code": "id" } ] }, { "path": "TestScript.setup.action.assert.validateProfileId", "short": "Profile Id of validation profile reference", "definition": "The ID of the Profile to validate against.", "comments": "The ID of a Profile fixture. Asserts that the response is valid according to the Profile specified by validateProfileId.", "min": 0, "max": "1", "type": [ { "code": "id" } ] }, { "path": "TestScript.setup.action.assert.value", "short": "The value to compare to", "definition": "The value to compare to.", "comments": "The string-representation of a number, string, or boolean that is expected. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before comparing this value to the actual value.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.setup.action.assert.warningOnly", "short": "Will this assert produce a warning only on error?", "definition": "Whether or not the test execution will produce a warning only on error for this assert.", "comments": "If this element is specified and it is true, then assertion failures can be logged by test engine but should not stop the test script execution from proceeding. There are likely cases where the spec is not clear on what should happen. If the spec says something is optional (maybe a response header for example), but a server doesn’t do it, we could choose to issue a warning.", "min": 0, "max": "1", "type": [ { "code": "boolean" } ], "defaultValueBoolean": false }, { "path": "TestScript.test", "short": "A test in this script", "definition": "A test in this script.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "path": "TestScript.test.name", "short": "Tracking/logging name of this test", "definition": "The name of this test used for tracking/logging purposes by test engines.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.test.description", "short": "Tracking/reporting short description of the test", "definition": "A short description of the test used by test engines for tracking and reporting purposes.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "path": "TestScript.test.metadata", "short": "Capabilities that are expected to function correctly on the FHIR server being tested", "definition": "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.", "min": 0, "max": "1", "contentReference": "#metadata", "constraint": [ { "key": "inv-7", "severity": "error", "human": "Test metadata capability SHALL contain required or validated or both.", "expression": "capability.required or capability.validated", "xpath": "f:capability/f:required or f:capability/f:validated or (f:capability/f:required and f:capability/f:validated)" } ] }, { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", "valueString": "TestAction" } ], "path": "TestScript.test.action", "short": "A test operation or assert to perform", "definition": "Action would contain either an operation or an assertion.", "comments": "An action should contain either an operation or an assertion but not both. It can contain any number of variables.", "min": 1, "max": "*", "type": [ { "code": "BackboneElement" } ], "constraint": [ { "key": "inv-2", "severity": "error", "human": "Test action SHALL contain either an operation or assert but not both.", "expression": "operation xor assert", "xpath": "(f:operation or f:assert) and not(f:operation and f:assert)" } ] }, { "path": "TestScript.test.action.operation", "short": "The setup operation to perform", "definition": "An operation would involve a REST request to a server.", "min": 0, "max": "1", "contentReference": "#operation", "constraint": [ { "key": "inv-11", "severity": "error", "human": "Test operation SHALL contain either sourceId or targetId or params or url.", "expression": "sourceId or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('conformance' | 'search' | 'transaction' | 'history'))", "xpath": "f:sourceId or (f:targetId or f:url or f:params) and (count(f:targetId) + count(f:url) + count(f:params) =1) or (f:type/f:code/@value='conformance' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')" } ] }, { "path": "TestScript.test.action.assert", "short": "The setup assertion to perform", "definition": "Evaluates the results of previous operations to determine if the server under test behaves appropriately.", "comments": "In order to evaluate an assertion, the request, response, and results of the most recently executed operation must always be maintained by the test engine.", "min": 0, "max": "1", "contentReference": "#assert", "constraint": [ { "key": "inv-14", "severity": "error", "human": "Test action assert shall contain both compareToSourceId and compareToSourcePath or neither.", "expression": "compareToSourceId.empty() xor compareToSourcePath", "xpath": "(f:compareToSourceId and f:compareToSourcePath) or not(f:compareToSourceId or f:compareToSourcePath)" }, { "key": "inv-9", "severity": "error", "human": "Only a single assertion SHALL be present within test action assert element.", "expression": "contentType.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + resource.count() + responseCode.count() + response.count() + rule.count() + ruleset.count() + validateProfileId.count() <=1", "xpath": "count(f:contentType) + count(f:headerField) + count(f:minimumId) + count(f:navigationLinks) + count(f:path) + count(f:resource) + count(f:responseCode) + count(f:response) + count(f:rule) + count(f:ruleset) + count(f:validateProfileId) <=1" } ] }, { "path": "TestScript.teardown", "short": "A series of required clean up steps", "definition": "A series of operations required to clean up after the all the tests are executed (successfully or otherwise).", "min": 0, "max": "1", "type": [ { "code": "BackboneElement" } ] }, { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", "valueString": "TeardownAction" } ], "path": "TestScript.teardown.action", "short": "One or more teardown operations to perform", "definition": "The teardown action will only contain an operation.", "comments": "An action should contain either an operation or an assertion but not both. It can contain any number of variables.", "min": 1, "max": "*", "type": [ { "code": "BackboneElement" } ], "constraint": [ { "key": "inv-3", "severity": "error", "human": "Teardown action SHALL contain an operation.", "expression": "operation", "xpath": "f:operation" } ] }, { "path": "TestScript.teardown.action.operation", "short": "The teardown operation to perform", "definition": "An operation would involve a REST request to a server.", "min": 0, "max": "1", "contentReference": "#operation", "constraint": [ { "key": "inv-12", "severity": "error", "human": "Teardown operation SHALL contain either sourceId or targetId or params or url.", "expression": "sourceId or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('conformance' | 'search' | 'transaction' | 'history'))", "xpath": "f:sourceId or (f:targetId or f:url or (f:params and f:resource)) and (count(f:targetId) + count(f:url) + count(f:params) =1) or (f:type/f:code/@value='conformance' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')" } ] } ] } }
Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.