This page is part of the FHIR Specification (v3.0.2: STU 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
FHIR Infrastructure Work Group | Maturity Level: N/A | Ballot Status: Informative | Compartments: Not linked to any defined compartments |
StructureDefinition for testscript
{ "resourceType": "StructureDefinition", "id": "TestScript", "meta": { "lastUpdated": "2019-10-24T11:53:00+11:00" }, "text": { "status": "generated", "div": "<div>!-- Snipped for Brevity --></div>" }, "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm", "valueInteger": 2 }, { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg", "valueCode": "fhir" } ], "url": "http://hl7.org/fhir/StructureDefinition/TestScript", "name": "TestScript", "status": "draft", "date": "2019-10-24T11:53:00+11:00", "publisher": "Health Level Seven International (FHIR Infrastructure)", "contact": [ { "telecom": [ { "system": "url", "value": "http://hl7.org/fhir" } ] }, { "telecom": [ { "system": "url", "value": "http://www.hl7.org/Special/committees/fiwg/index.cfm" } ] } ], "description": "Base StructureDefinition for TestScript Resource", "fhirVersion": "3.0.2", "mapping": [ { "identity": "rim", "uri": "http://hl7.org/v3", "name": "RIM Mapping" }, { "identity": "w5", "uri": "http://hl7.org/fhir/w5", "name": "W5 Mapping" }, { "identity": "objimpl", "uri": "http://hl7.org/fhir/object-implementation", "name": "Object Implementation Information" } ], "kind": "resource", "abstract": false, "type": "TestScript", "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DomainResource", "_baseDefinition": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-codegen-super", "valueString": "MetadataResource" } ] }, "derivation": "specialization", "snapshot": { "element": [ { "id": "TestScript", "path": "TestScript", "short": "Describes a set of tests", "definition": "A structured set of tests against a FHIR server implementation to determine compliance against the FHIR specification.", "min": 0, "max": "*", "constraint": [ { "key": "dom-2", "severity": "error", "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources", "expression": "contained.contained.empty()", "xpath": "not(parent::f:contained and f:contained)", "source": "DomainResource" }, { "key": "dom-1", "severity": "error", "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative", "expression": "contained.text.empty()", "xpath": "not(parent::f:contained and f:text)", "source": "DomainResource" }, { "key": "dom-4", "severity": "error", "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated", "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()", "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))", "source": "DomainResource" }, { "key": "dom-3", "severity": "error", "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource", "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()", "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))", "source": "DomainResource" } ], "mapping": [ { "identity": "rim", "map": "Entity. Role, or Act" }, { "identity": "rim", "map": "n/a" }, { "identity": "w5", "map": "conformance.misc" } ] }, { "id": "TestScript.id", "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.", "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.", "min": 0, "max": "1", "base": { "path": "Resource.id", "min": 0, "max": "1" }, "type": [ { "code": "id" } ], "isSummary": true }, { "id": "TestScript.meta", "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": "1" }, "type": [ { "code": "Meta" } ], "isSummary": true }, { "id": "TestScript.implicitRules", "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.", "comment": "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. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.", "min": 0, "max": "1", "base": { "path": "Resource.implicitRules", "min": 0, "max": "1" }, "type": [ { "code": "uri" } ], "isModifier": true, "isSummary": true }, { "id": "TestScript.language", "path": "TestScript.language", "short": "Language of the resource content", "definition": "The base language in which the resource is written.", "comment": "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": "1" }, "type": [ { "code": "code" } ], "binding": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", "valueReference": { "reference": "http://hl7.org/fhir/ValueSet/all-languages" } }, { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "Language" }, { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", "valueBoolean": true } ], "strength": "extensible", "description": "A human language.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/languages" } } }, { "id": "TestScript.text", "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.", "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied). This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.", "alias": [ "narrative", "html", "xhtml", "display" ], "min": 0, "max": "1", "base": { "path": "DomainResource.text", "min": 0, "max": "1" }, "type": [ { "code": "Narrative" } ], "condition": [ "dom-1" ], "mapping": [ { "identity": "rim", "map": "Act.text?" } ] }, { "id": "TestScript.contained", "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.", "comment": "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" } ] }, { "id": "TestScript.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.modifierExtension", "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.", "comment": "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" } ] }, { "id": "TestScript.url", "path": "TestScript.url", "short": "Logical URI to reference this test script (globally unique)", "definition": "An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions).", "comment": "Can be a urn:uuid: or a urn:oid:, but real http: addresses are preferred. Multiple instances may share the same url if they have a distinct version.", "requirements": "Allows the test script to be referenced by a single globally unique identifier.", "alias": [ "url", "authoritative-url", "destination", "identity" ], "min": 1, "max": "1", "type": [ { "code": "uri" } ], "isSummary": true, "mapping": [ { "identity": "w5", "map": "id" } ] }, { "id": "TestScript.identifier", "path": "TestScript.identifier", "short": "Additional identifier for the test script", "definition": "A formal identifier that is used to identify this test script when it is represented in other formats, or referenced in a specification, model, design or an instance.", "comment": "Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, e.g., to identify this test script outside of FHIR, where it is not possible to use the logical URI.", "requirements": "Allows externally provided and/or usable business identifiers to be easily associated with the module.", "min": 0, "max": "1", "type": [ { "code": "Identifier" } ], "isSummary": true, "mapping": [ { "identity": "objimpl", "map": "no-gen-base" }, { "identity": "w5", "map": "id" } ] }, { "id": "TestScript.version", "path": "TestScript.version", "short": "Business version of the test script", "definition": "The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", "comment": "There may be different test script instances that have the same identifier but different versions. The version can be appended to the url in a reference to allow a refrence to a particular business version of the test script with the format [url]|[version].", "min": 0, "max": "1", "type": [ { "code": "string" } ], "isSummary": true, "mapping": [ { "identity": "w5", "map": "id.version" } ] }, { "id": "TestScript.name", "path": "TestScript.name", "short": "Name for this test script (computer friendly)", "definition": "A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation.", "comment": "The name is not expected to be globally unique. The name should be a simple alpha-numeric type name to ensure that it is computable friendly.", "requirements": "Support human navigation and code generation.", "min": 1, "max": "1", "type": [ { "code": "string" } ], "isSummary": true }, { "id": "TestScript.title", "path": "TestScript.title", "short": "Name for this test script (human friendly)", "definition": "A short, descriptive, user-friendly title for the test script.", "comment": "This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc.", "min": 0, "max": "1", "type": [ { "code": "string" } ], "isSummary": true }, { "id": "TestScript.status", "path": "TestScript.status", "short": "draft | active | retired | unknown", "definition": "The status of this test script. Enables tracking the life-cycle of the content.", "comment": "Allows filtering of test scripts that are appropriate for use vs. not. \nThis is labeled as \"Is Modifier\" because applications should not use a retired test script without due consideration.", "min": 1, "max": "1", "type": [ { "code": "code" } ], "isModifier": true, "isSummary": true, "binding": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "PublicationStatus" }, { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", "valueBoolean": true } ], "strength": "required", "description": "The lifecycle status of a Value Set or Concept Map.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/publication-status" } }, "mapping": [ { "identity": "w5", "map": "status" } ] }, { "id": "TestScript.experimental", "path": "TestScript.experimental", "short": "For testing purposes, not real usage", "definition": "A boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", "comment": "Allows filtering of test script that are appropriate for use vs. not. This is labeled as \"Is Modifier\" because applications should not use an experimental test script in production.", "requirements": "Enables experimental content to be developed following the same lifecycle that would be used for a production-level test script.", "min": 0, "max": "1", "type": [ { "code": "boolean" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "w5", "map": "class" } ] }, { "id": "TestScript.date", "path": "TestScript.date", "short": "Date this was last changed", "definition": "The date (and optionally time) when the test script was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.", "comment": "Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the test script. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource.", "alias": [ "Revision Date" ], "min": 0, "max": "1", "type": [ { "code": "dateTime" } ], "isSummary": true, "mapping": [ { "identity": "w5", "map": "when.recorded" } ] }, { "id": "TestScript.publisher", "path": "TestScript.publisher", "short": "Name of the publisher (organization or individual)", "definition": "The name of the individual or organization that published the test script.", "comment": "Usually an organization, but may be an individual. The publisher (or steward) of the test script is the organization or individual primarily responsible for the maintenance and upkeep of the test script. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the test script. 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" } ] }, { "id": "TestScript.contact", "path": "TestScript.contact", "short": "Contact details for the publisher", "definition": "Contact details to assist a user in finding and communicating with the publisher.", "comment": "May be a web site, an email address, a telephone number, etc.", "min": 0, "max": "*", "type": [ { "code": "ContactDetail" } ], "isSummary": true }, { "id": "TestScript.description", "path": "TestScript.description", "short": "Natural language description of the test script", "definition": "A free text natural language description of the test script from a consumer's perspective.", "comment": "This description can be used to capture details such as why the test script was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the test script as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the profile is presumed to be the predominant language in the place the profile was created).", "min": 0, "max": "1", "type": [ { "code": "markdown" } ] }, { "id": "TestScript.useContext", "path": "TestScript.useContext", "short": "Context the content is intended to support", "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 for appropriate test script instances.", "comment": "When multiple useContexts are specified, there is no expectation whether all or any of the contexts apply.", "requirements": "Assist in searching for appropriate content.", "min": 0, "max": "*", "type": [ { "code": "UsageContext" } ], "isSummary": true }, { "id": "TestScript.jurisdiction", "path": "TestScript.jurisdiction", "short": "Intended jurisdiction for test script (if applicable)", "definition": "A legal or geographic region in which the test script is intended to be used.", "comment": "It may be possible for the test script to be used in jurisdictions other than those for which it was originally designed or intended.", "min": 0, "max": "*", "type": [ { "code": "CodeableConcept" } ], "isSummary": true, "binding": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "Jurisdiction" }, { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", "valueBoolean": true } ], "strength": "extensible", "description": "Countries and regions within which this artifact is targeted for use", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/jurisdiction" } } }, { "id": "TestScript.purpose", "path": "TestScript.purpose", "short": "Why this test script is defined", "definition": "Explaination of why this test script is needed and why it has been designed as it has.", "comment": "This element does not describe the usage of the test script Instead it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is. This may be used to point to source materials or specifications that drove the structure of this test script.", "min": 0, "max": "1", "type": [ { "code": "markdown" } ], "mapping": [ { "identity": "objimpl", "map": "no-gen-base" }, { "identity": "w5", "map": "why" } ] }, { "id": "TestScript.copyright", "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 test script.", "requirements": "Consumers must be able to determine any legal restrictions on the use of the test script and/or its content.", "alias": [ "License", "Restrictions" ], "min": 0, "max": "1", "type": [ { "code": "markdown" } ], "mapping": [ { "identity": "objimpl", "map": "no-gen-base" } ] }, { "id": "TestScript.origin", "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.", "comment": "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" } ], "constraint": [ { "key": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" } ] }, { "id": "TestScript.origin.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.origin.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.origin.modifierExtension", "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.", "comment": "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": "TestScript.origin.index", "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.", "comment": "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" } ] }, { "id": "TestScript.origin.profile", "path": "TestScript.origin.profile", "short": "FHIR-Client | FHIR-SDC-FormFiller", "definition": "The type of origin profile the test system supports.", "comment": "Must be a \"sender\"/\"client\" profile.", "min": 1, "max": "1", "type": [ { "code": "Coding" } ], "meaningWhenMissing": "FHIR-Client", "binding": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "TestScriptProfileOriginType" } ], "strength": "extensible", "description": "The type of origin profile the test system supports.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/testscript-profile-origin-types" } } }, { "id": "TestScript.destination", "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.", "comment": "The purpose of this element is to define the profile of a 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" } ], "constraint": [ { "key": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" } ] }, { "id": "TestScript.destination.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.destination.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.destination.modifierExtension", "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.", "comment": "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": "TestScript.destination.index", "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.", "comment": "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 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" } ] }, { "id": "TestScript.destination.profile", "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.", "comment": "Must be a \"receiver\"/\"server\" profile.", "min": 1, "max": "1", "type": [ { "code": "Coding" } ], "meaningWhenMissing": "FHIR-Server", "binding": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "TestScriptProfileDestinationType" } ], "strength": "extensible", "description": "The type of destination profile the test system supports.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/testscript-profile-destination-types" } } }, { "id": "TestScript.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": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" }, { "key": "inv-4", "severity": "error", "human": "TestScript metadata capability SHALL contain required or validated or both.", "expression": "capability.required.exists() or capability.validated.exists()", "xpath": "f:capability/f:required or f:capability/f:validated or (f:capability/f:required and f:capability/f:validated)" } ] }, { "id": "TestScript.metadata.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.metadata.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.metadata.modifierExtension", "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.", "comment": "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": "TestScript.metadata.link", "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" } ], "constraint": [ { "key": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" } ] }, { "id": "TestScript.metadata.link.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.metadata.link.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.metadata.link.modifierExtension", "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.", "comment": "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": "TestScript.metadata.link.url", "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" } ] }, { "id": "TestScript.metadata.link.description", "path": "TestScript.metadata.link.description", "short": "Short description", "definition": "Short description of the link.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.metadata.capability", "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.", "comment": "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. They 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" } ], "constraint": [ { "key": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" } ] }, { "id": "TestScript.metadata.capability.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.metadata.capability.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.metadata.capability.modifierExtension", "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.", "comment": "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": "TestScript.metadata.capability.required", "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 }, { "id": "TestScript.metadata.capability.validated", "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 }, { "id": "TestScript.metadata.capability.description", "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" } ] }, { "id": "TestScript.metadata.capability.origin", "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" } ] }, { "id": "TestScript.metadata.capability.destination", "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" } ] }, { "id": "TestScript.metadata.capability.link", "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" } ] }, { "id": "TestScript.metadata.capability.capabilities", "path": "TestScript.metadata.capability.capabilities", "short": "Required Capability Statement", "definition": "Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.", "comment": "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", "targetProfile": "http://hl7.org/fhir/StructureDefinition/CapabilityStatement" } ] }, { "id": "TestScript.fixture", "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" } ], "constraint": [ { "key": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" } ] }, { "id": "TestScript.fixture.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.fixture.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.fixture.modifierExtension", "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.", "comment": "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": "TestScript.fixture.autocreate", "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 }, { "id": "TestScript.fixture.autodelete", "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 }, { "id": "TestScript.fixture.resource", "path": "TestScript.fixture.resource", "short": "Reference of the resource", "definition": "Reference to the resource (containing the contents of the resource needed for operations).", "comment": "See http://hl7.org/fhir/STU3/resourcelist.html for complete list of resource types.", "min": 0, "max": "1", "type": [ { "code": "Reference", "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource" } ] }, { "id": "TestScript.profile", "path": "TestScript.profile", "short": "Reference of the validation profile", "definition": "Reference to the profile to be used for validation.", "comment": "See http://hl7.org/fhir/STU3/resourcelist.html for complete list of resource types.", "min": 0, "max": "*", "type": [ { "code": "Reference", "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource" } ] }, { "id": "TestScript.variable", "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.", "comment": "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 an 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": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" }, { "key": "inv-3", "severity": "error", "human": "Variable can only contain one of expression, headerField or path.", "expression": "expression.empty() or headerField.empty() or path.empty()", "xpath": "not(f:expression and f:headerField and f:path)" } ] }, { "id": "TestScript.variable.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.variable.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.variable.modifierExtension", "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.", "comment": "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": "TestScript.variable.name", "path": "TestScript.variable.name", "short": "Descriptive name for this variable", "definition": "Descriptive name for this variable.", "comment": "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" } ] }, { "id": "TestScript.variable.defaultValue", "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.", "comment": "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" } ] }, { "id": "TestScript.variable.description", "path": "TestScript.variable.description", "short": "Natural language description of the variable", "definition": "A free text natural language description of the variable and its purpose.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.variable.expression", "path": "TestScript.variable.expression", "short": "The fluentpath expression against the fixture body", "definition": "The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.", "comment": "If headerField is defined, then the variable will be evaluated against the headers that sourceId is pointing to. If expression or path is defined, then the variable will be evaluated against the fixture body that sourceId is pointing to. It is an error to define any combination of expression, headerField and path.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.variable.headerField", "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.", "comment": "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" } ] }, { "id": "TestScript.variable.hint", "path": "TestScript.variable.hint", "short": "Hint help text for default value to enter", "definition": "Displayable text string with hint help information to the user when entering a default value.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.variable.path", "path": "TestScript.variable.path", "short": "XPath or JSONPath against the fixture body", "definition": "XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.", "comment": "If headerField is defined, then the variable will be evaluated against the headers that sourceId is pointing to. If expression or path is defined, then the variable will be evaluated against the fixture body that sourceId is pointing to. It is an error to define any combination of expression, headerField and path.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.variable.sourceId", "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.", "comment": "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" } ] }, { "id": "TestScript.rule", "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.", "comment": "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 described elsewhere in the TestScript resource.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ], "constraint": [ { "key": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" } ] }, { "id": "TestScript.rule.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.rule.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.rule.modifierExtension", "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.", "comment": "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": "TestScript.rule.resource", "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", "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource" } ] }, { "id": "TestScript.rule.param", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", "valueString": "RuleParam" } ], "path": "TestScript.rule.param", "short": "Rule parameter template", "definition": "Each rule template can take one or more parameters for rule evaluation.", "comment": "The parameter value can be dynamic at runtime.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ], "constraint": [ { "key": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" } ] }, { "id": "TestScript.rule.param.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.rule.param.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.rule.param.modifierExtension", "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.", "comment": "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": "TestScript.rule.param.name", "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.", "comment": "The external rule template would be looking for the parameter by this name.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.rule.param.value", "path": "TestScript.rule.param.value", "short": "Parameter value defined either explicitly or dynamically", "definition": "The explicit or dynamic value for the parameter that will be passed on to the external rule template.", "comment": "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" } ] }, { "id": "TestScript.ruleset", "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.", "comment": "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 described elsewhere in the TestScript resource.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ], "constraint": [ { "key": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" } ] }, { "id": "TestScript.ruleset.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.ruleset.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.ruleset.modifierExtension", "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.", "comment": "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": "TestScript.ruleset.resource", "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", "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource" } ] }, { "id": "TestScript.ruleset.rule", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", "valueString": "RulesetRule" } ], "path": "TestScript.ruleset.rule", "short": "The referenced rule within the ruleset", "definition": "The referenced rule within the external ruleset template.", "comment": "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" } ], "constraint": [ { "key": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" } ] }, { "id": "TestScript.ruleset.rule.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.ruleset.rule.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.ruleset.rule.modifierExtension", "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.", "comment": "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": "TestScript.ruleset.rule.ruleId", "path": "TestScript.ruleset.rule.ruleId", "short": "Id of referenced rule within the ruleset", "definition": "Id of the referenced rule within the external ruleset template.", "min": 1, "max": "1", "type": [ { "code": "id" } ] }, { "id": "TestScript.ruleset.rule.param", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", "valueString": "RulesetRuleParam" } ], "path": "TestScript.ruleset.rule.param", "short": "Ruleset rule parameter template", "definition": "Each rule template can take one or more parameters for rule evaluation.", "comment": "The parameter value can be dynamic at runtime.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ], "constraint": [ { "key": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" } ] }, { "id": "TestScript.ruleset.rule.param.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.ruleset.rule.param.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.ruleset.rule.param.modifierExtension", "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.", "comment": "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": "TestScript.ruleset.rule.param.name", "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.", "comment": "The external rule template would be looking for the parameter by this name.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.ruleset.rule.param.value", "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.", "comment": "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" } ] }, { "id": "TestScript.setup", "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" } ], "constraint": [ { "key": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" } ] }, { "id": "TestScript.setup.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.setup.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.setup.modifierExtension", "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.", "comment": "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": "TestScript.setup.action", "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.", "comment": "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": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" }, { "key": "inv-1", "severity": "error", "human": "Setup action SHALL contain either an operation or assert but not both.", "expression": "operation.exists() xor assert.exists()", "xpath": "(f:operation or f:assert) and not(f:operation and f:assert)" } ] }, { "id": "TestScript.setup.action.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.setup.action.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.setup.action.modifierExtension", "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.", "comment": "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": "TestScript.setup.action.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": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" }, { "key": "inv-7", "severity": "error", "human": "Setup operation SHALL contain either sourceId or targetId or params or url.", "expression": "sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' |'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='capabilities' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')" } ] }, { "id": "TestScript.setup.action.operation.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.setup.action.operation.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.setup.action.operation.modifierExtension", "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.", "comment": "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": "TestScript.setup.action.operation.type", "path": "TestScript.setup.action.operation.type", "short": "The operation code type that will be executed", "definition": "Server interaction or operation type.", "comment": "See http://hl7.org/fhir/STU3/http.html for list of server interactions.", "min": 0, "max": "1", "type": [ { "code": "Coding" } ], "binding": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "TestScriptOperationCode" } ], "strength": "extensible", "description": "The allowable operation code types.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/testscript-operation-codes" } } }, { "id": "TestScript.setup.action.operation.resource", "path": "TestScript.setup.action.operation.resource", "short": "Resource type", "definition": "The type of the resource. See http://hl7.org/fhir/STU3/resourcelist.html.", "comment": "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": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "FHIRDefinedType" }, { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", "valueBoolean": true } ], "strength": "required", "description": "Either a resource or a data type.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/defined-types" } } }, { "id": "TestScript.setup.action.operation.label", "path": "TestScript.setup.action.operation.label", "short": "Tracking/logging operation label", "definition": "The label would be used for tracking/logging purposes by test engines.", "comment": "This has no impact on the verification itself.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.setup.action.operation.description", "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.", "comment": "This has no impact on the verification itself.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.setup.action.operation.accept", "path": "TestScript.setup.action.operation.accept", "short": "xml | json | ttl | none", "definition": "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", "comment": "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/fhir+xml' will be set. If 'json' is specified, then 'application/fhir+json' 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": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "ContentType" } ], "strength": "required", "description": "The content or mime type.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/content-type" } } }, { "id": "TestScript.setup.action.operation.contentType", "path": "TestScript.setup.action.operation.contentType", "short": "xml | json | ttl | none", "definition": "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", "comment": "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/fhir+xml' will be set. If 'json' is specified, then 'application/fhir+json' 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": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "ContentType" } ], "strength": "required", "description": "The content or mime type.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/content-type" } } }, { "id": "TestScript.setup.action.operation.destination", "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.", "comment": "If multiple TestScript.destination elements are defined and operation.destination is undefined, test engine will report an error as it cannot determine what destination to use for the exchange.", "min": 0, "max": "1", "type": [ { "code": "integer" } ] }, { "id": "TestScript.setup.action.operation.encodeRequestUrl", "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 }, { "id": "TestScript.setup.action.operation.origin", "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.", "comment": "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" } ] }, { "id": "TestScript.setup.action.operation.params", "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.", "comment": "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" } ] }, { "id": "TestScript.setup.action.operation.requestHeader", "path": "TestScript.setup.action.operation.requestHeader", "short": "Each operation can have one or more header elements", "definition": "Header elements would be used to set HTTP headers.", "comment": "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.org/fhir/STU3/http.html#2.1.0.5.1 - \"If-Match\" header. See http://hl7.org/fhir/STU3/http.html#2.1.0.11 - Conditional Create using \"If-None-Exist\". See http://hl7.org/fhir/STU3/http.html#2.1.0.13.1 - Invalid \"Content-Type\" header for negative testing. - etc.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ], "constraint": [ { "key": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" } ] }, { "id": "TestScript.setup.action.operation.requestHeader.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.setup.action.operation.requestHeader.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.setup.action.operation.requestHeader.modifierExtension", "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.", "comment": "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": "TestScript.setup.action.operation.requestHeader.field", "path": "TestScript.setup.action.operation.requestHeader.field", "short": "HTTP header field name", "definition": "The HTTP header field e.g. \"Accept\".", "comment": "If header element is specified, then field is required.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.setup.action.operation.requestHeader.value", "path": "TestScript.setup.action.operation.requestHeader.value", "short": "HTTP headerfield value", "definition": "The value of the header e.g. \"application/fhir+xml\".", "comment": "If header element is specified, then value is required. No conversions will be done by the test engine e.g. \"xml\" to \"application/fhir+xml\". 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" } ] }, { "id": "TestScript.setup.action.operation.requestId", "path": "TestScript.setup.action.operation.requestId", "short": "Fixture Id of mapped request", "definition": "The fixture id (maybe new) to map to the request.", "comment": "If a requestId is supplied, then the resulting request (both headers and body) is mapped to the fixture ID (which may be entirely new and previously undeclared) designated by \"requestId\". If requestId is not specified, it is the test engine's responsibility to store the request and use it as the requestId in subsequent assertions when assertion path and/or headerField is specified, direction is equal to request, and the requestId in not specified.", "min": 0, "max": "1", "type": [ { "code": "id" } ] }, { "id": "TestScript.setup.action.operation.responseId", "path": "TestScript.setup.action.operation.responseId", "short": "Fixture Id of mapped response", "definition": "The fixture id (maybe new) to map to the response.", "comment": "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 the responseId in subsequent assertions when assertion path and/or headerField is specified and the responseId is not specified.", "min": 0, "max": "1", "type": [ { "code": "id" } ] }, { "id": "TestScript.setup.action.operation.sourceId", "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" } ] }, { "id": "TestScript.setup.action.operation.targetId", "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.", "comment": "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" } ] }, { "id": "TestScript.setup.action.operation.url", "path": "TestScript.setup.action.operation.url", "short": "Request URL", "definition": "Complete request URL.", "comment": "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": "TestScript.setup.action.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.", "comment": "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": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" }, { "key": "inv-5", "severity": "error", "human": "Only a single assertion SHALL be present within setup action assert element.", "expression": "contentType.count() + expression.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + requestMethod.count() + resource.count() + responseCode.count() + response.count() + rule.count() + ruleset.count() + validateProfileId.count() <=1", "xpath": "count(f:contentType) + count(f:expression) + count(f:headerField) + count(f:minimumId) + count(f:navigationLinks) + count(f:path) + count(f:requestMethod) + count(f:resource) + count(f:responseCode) + count(f:response) + count(f:rule) + count(f:ruleset) + count(f:validateProfileId) <=1" }, { "key": "inv-10", "severity": "error", "human": "Setup action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.", "expression": "compareToSourceId.empty() xor (compareToSourceExpression.exists() or compareToSourcePath.exists())", "xpath": "(f:compareToSourceId and f:compareToSourceExpression) or (f:compareToSourceId and f:compareToSourcePath) or not(f:compareToSourceId or f:compareToSourceExpression or f:compareToSourcePath)" }, { "key": "inv-12", "severity": "error", "human": "Setup action assert response and responseCode SHALL be empty when direction equals request", "expression": "(response.empty() and responseCode.empty() and direction = 'request') or direction.empty() or direction = 'response'", "xpath": "((count(f:response) + count(f:responseCode)) = 0 and (f:direction/@value='request')) or (count(f:direction) = 0) or (f:direction/@value='response')" } ] }, { "id": "TestScript.setup.action.assert.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.setup.action.assert.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.modifierExtension", "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.", "comment": "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": "TestScript.setup.action.assert.label", "path": "TestScript.setup.action.assert.label", "short": "Tracking/logging assertion label", "definition": "The label would be used for tracking/logging purposes by test engines.", "comment": "This has no impact on the verification itself.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.setup.action.assert.description", "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.", "comment": "This has no impact on the verification itself.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.setup.action.assert.direction", "path": "TestScript.setup.action.assert.direction", "short": "response | request", "definition": "The direction to use for the assertion.", "comment": "If the direction is specified as \"response\" (the default), then the processing of this assert is against the received response message. If the direction is specified as \"request\", then the processing of this assert is against the sent request message.", "min": 0, "max": "1", "type": [ { "code": "code" } ], "binding": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "AssertionDirectionType" } ], "strength": "required", "description": "The type of direction to use for assertion.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/assert-direction-codes" } } }, { "id": "TestScript.setup.action.assert.compareToSourceId", "path": "TestScript.setup.action.assert.compareToSourceId", "short": "Id of the source fixture to be evaluated", "definition": "Id of the source fixture used as the contents to be evaluated by either the \"source/expression\" or \"sourceId/path\" definition.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.setup.action.assert.compareToSourceExpression", "path": "TestScript.setup.action.assert.compareToSourceExpression", "short": "The fluentpath expression to evaluate against the source fixture", "definition": "The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.", "comment": "Thefhirpath 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" } ] }, { "id": "TestScript.setup.action.assert.compareToSourcePath", "path": "TestScript.setup.action.assert.compareToSourcePath", "short": "XPath or JSONPath expression to evaluate against the source fixture", "definition": "XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.contentType", "path": "TestScript.setup.action.assert.contentType", "short": "xml | json | ttl | none", "definition": "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", "comment": "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/fhir+xml' will be confirmed. If 'json' is specified, then 'application/fhir+json' 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": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "ContentType" } ], "strength": "required", "description": "The content or mime type.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/content-type" } } }, { "id": "TestScript.setup.action.assert.expression", "path": "TestScript.setup.action.assert.expression", "short": "The fluentpath expression to be evaluated", "definition": "The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload.", "comment": "If both \"expression\" and a \"fixtureId\" are specified, then the expression will be evaluated against the request or response body mapped to the fixtureId. If \"expression\" is specified and a \"fixtureId\" is not, then the expression will be evaluated against the response body of the last operation. Test engines are to store the request and response body and headers of the last operation at all times for subsequent assertions.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.setup.action.assert.headerField", "path": "TestScript.setup.action.assert.headerField", "short": "HTTP header field name", "definition": "The HTTP header field name e.g. 'Location'.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.minimumId", "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.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.navigationLinks", "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.", "comment": "Asserts that the Bundle contains first, last, and next links.", "min": 0, "max": "1", "type": [ { "code": "boolean" } ] }, { "id": "TestScript.setup.action.assert.operator", "path": "TestScript.setup.action.assert.operator", "short": "equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval", "definition": "The operator type defines the conditional behavior of the assert. If not defined, the default is equals.", "comment": "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": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "AssertionOperatorType" } ], "strength": "required", "description": "The type of operator to use for assertion.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/assert-operator-codes" } } }, { "id": "TestScript.setup.action.assert.path", "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.", "comment": "If both \"path\" and a \"fixtureId\" are specified, then the path will be evaluated against the request or response body mapped to the fixtureId. If \"path\" is specified and a \"fixtureId\" is not, then the path will be evaluated against the response body of the last operation. Test engines are to store the request and response body and headers of the last operation at all times for subsequent assertions.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.setup.action.assert.requestMethod", "path": "TestScript.setup.action.assert.requestMethod", "short": "delete | get | options | patch | post | put", "definition": "The request method or HTTP operation code to compare against that used by the client system under test.", "comment": "If \"requestMethod\" is specified then it will be used in place of \"value\". The \"requestMethod\" will evaluate against the last operation's request HTTP operation.", "min": 0, "max": "1", "type": [ { "code": "code" } ], "binding": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "TestScriptRequestMethodCode" } ], "strength": "required", "description": "The allowable request method or HTTP operation codes.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/http-operations" } } }, { "id": "TestScript.setup.action.assert.requestURL", "path": "TestScript.setup.action.assert.requestURL", "short": "Request URL comparison value", "definition": "The value to use in a comparison against the request URL path string.", "comment": "If \"requestURL\" is specified then it will be used in place of \"value\". The \"requestURL\" will evaluate against the last operation's full request URL path string.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.setup.action.assert.resource", "path": "TestScript.setup.action.assert.resource", "short": "Resource type", "definition": "The type of the resource. See http://hl7.org/fhir/STU3/resourcelist.html.", "comment": "This will be expected resource type in response body e.g. in read, vread, search, etc. See http://hl7.org/fhir/STU3/resourcelist.html for complete list of resource types; e.g. <assert > <resourceType value=\"Patient\" </assert>.", "min": 0, "max": "1", "type": [ { "code": "code" } ], "binding": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "FHIRDefinedType" }, { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", "valueBoolean": true } ], "strength": "required", "description": "Either a resource or a data type.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/defined-types" } } }, { "id": "TestScript.setup.action.assert.response", "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.", "comment": "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": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "AssertionResponseTypes" } ], "strength": "required", "description": "The type of response code to use for assertion.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/assert-response-code-types" } } }, { "id": "TestScript.setup.action.assert.responseCode", "path": "TestScript.setup.action.assert.responseCode", "short": "HTTP response code to test", "definition": "The value of the HTTP response code to be tested.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.rule", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", "valueString": "ActionAssertRule" } ], "path": "TestScript.setup.action.assert.rule", "short": "The reference to a TestScript.rule", "definition": "The TestScript.rule this assert will evaluate.", "comment": "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" } ], "constraint": [ { "key": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" } ] }, { "id": "TestScript.setup.action.assert.rule.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.setup.action.assert.rule.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.rule.modifierExtension", "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.", "comment": "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": "TestScript.setup.action.assert.rule.ruleId", "path": "TestScript.setup.action.assert.rule.ruleId", "short": "Id of the TestScript.rule", "definition": "The TestScript.rule id value this assert will evaluate.", "min": 1, "max": "1", "type": [ { "code": "id" } ] }, { "id": "TestScript.setup.action.assert.rule.param", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", "valueString": "ActionAssertRuleParam" } ], "path": "TestScript.setup.action.assert.rule.param", "short": "Rule parameter template", "definition": "Each rule template can take one or more parameters for rule evaluation.", "comment": "The parameter value can be dynamic at runtime.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ], "constraint": [ { "key": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" } ] }, { "id": "TestScript.setup.action.assert.rule.param.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.setup.action.assert.rule.param.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.rule.param.modifierExtension", "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.", "comment": "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": "TestScript.setup.action.assert.rule.param.name", "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.", "comment": "The external rule template would be looking for the parameter by this name.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.setup.action.assert.rule.param.value", "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.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.ruleset", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", "valueString": "ActionAssertRuleset" } ], "path": "TestScript.setup.action.assert.ruleset", "short": "The reference to a TestScript.ruleset", "definition": "The TestScript.ruleset this assert will evaluate.", "comment": "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" } ], "constraint": [ { "key": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" } ] }, { "id": "TestScript.setup.action.assert.ruleset.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.setup.action.assert.ruleset.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.ruleset.modifierExtension", "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.", "comment": "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": "TestScript.setup.action.assert.ruleset.rulesetId", "path": "TestScript.setup.action.assert.ruleset.rulesetId", "short": "Id of the TestScript.ruleset", "definition": "The TestScript.ruleset id value this assert will evaluate.", "min": 1, "max": "1", "type": [ { "code": "id" } ] }, { "id": "TestScript.setup.action.assert.ruleset.rule", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", "valueString": "ActionAssertRulesetRule" } ], "path": "TestScript.setup.action.assert.ruleset.rule", "short": "The referenced rule within the ruleset", "definition": "The referenced rule within the external ruleset template.", "comment": "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": 0, "max": "*", "type": [ { "code": "BackboneElement" } ], "constraint": [ { "key": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" } ] }, { "id": "TestScript.setup.action.assert.ruleset.rule.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.setup.action.assert.ruleset.rule.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.ruleset.rule.modifierExtension", "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.", "comment": "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": "TestScript.setup.action.assert.ruleset.rule.ruleId", "path": "TestScript.setup.action.assert.ruleset.rule.ruleId", "short": "Id of referenced rule within the ruleset", "definition": "Id of the referenced rule within the external ruleset template.", "min": 1, "max": "1", "type": [ { "code": "id" } ] }, { "id": "TestScript.setup.action.assert.ruleset.rule.param", "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.", "comment": "The parameter value can be dynamic at runtime.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ], "constraint": [ { "key": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" } ] }, { "id": "TestScript.setup.action.assert.ruleset.rule.param.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.setup.action.assert.ruleset.rule.param.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.ruleset.rule.param.modifierExtension", "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.", "comment": "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": "TestScript.setup.action.assert.ruleset.rule.param.name", "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.", "comment": "The external rule template would be looking for the parameter by this name.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.setup.action.assert.ruleset.rule.param.value", "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.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.sourceId", "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.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.validateProfileId", "path": "TestScript.setup.action.assert.validateProfileId", "short": "Profile Id of validation profile reference", "definition": "The ID of the Profile to validate against.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.value", "path": "TestScript.setup.action.assert.value", "short": "The value to compare to", "definition": "The value to compare to.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.warningOnly", "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.", "comment": "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 }, { "id": "TestScript.test", "path": "TestScript.test", "short": "A test in this script", "definition": "A test in this script.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ], "constraint": [ { "key": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" } ] }, { "id": "TestScript.test.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.test.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.test.modifierExtension", "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.", "comment": "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": "TestScript.test.name", "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" } ] }, { "id": "TestScript.test.description", "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" } ] }, { "id": "TestScript.test.action", "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.", "comment": "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": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" }, { "key": "inv-2", "severity": "error", "human": "Test action SHALL contain either an operation or assert but not both.", "expression": "operation.exists() xor assert.exists()", "xpath": "(f:operation or f:assert) and not(f:operation and f:assert)" } ] }, { "id": "TestScript.test.action.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.test.action.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.test.action.modifierExtension", "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.", "comment": "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": "TestScript.test.action.operation", "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": "#TestScript.setup.action.operation", "constraint": [ { "key": "inv-8", "severity": "error", "human": "Test operation SHALL contain either sourceId or targetId or params or url.", "expression": "sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' | '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='capabilities' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')" } ] }, { "id": "TestScript.test.action.assert", "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.", "comment": "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": "#TestScript.setup.action.assert", "constraint": [ { "key": "inv-6", "severity": "error", "human": "Only a single assertion SHALL be present within test action assert element.", "expression": "contentType.count() + expression.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + requestMethod.count() + resource.count() + responseCode.count() + response.count() + rule.count() + ruleset.count() + validateProfileId.count() <=1", "xpath": "count(f:contentType) + count(f:expression) + count(f:headerField) + count(f:minimumId) + count(f:navigationLinks) + count(f:path) + count(f:requestMethod) + count(f:resource) + count(f:responseCode) + count(f:response) + count(f:rule) + count(f:ruleset) + count(f:validateProfileId) <=1" }, { "key": "inv-11", "severity": "error", "human": "Test action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.", "expression": "compareToSourceId.empty() xor (compareToSourceExpression.exists() or compareToSourcePath.exists())", "xpath": "(f:compareToSourceId and f:compareToSourceExpression) or (f:compareToSourceId and f:compareToSourcePath) or not(f:compareToSourceId or f:compareToSourceExpression or f:compareToSourcePath)" }, { "key": "inv-13", "severity": "error", "human": "Test action assert response and response and responseCode SHALL be empty when direction equals request", "expression": "(response.empty() and responseCode.empty() and direction = 'request') or direction.empty() or direction = 'response'", "xpath": "((count(f:response) + count(f:responseCode)) = 0 and (f:direction/@value='request')) or (count(f:direction) = 0) or (f:direction/@value='response')" } ] }, { "id": "TestScript.teardown", "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" } ], "constraint": [ { "key": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" } ] }, { "id": "TestScript.teardown.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.teardown.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.teardown.modifierExtension", "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.", "comment": "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": "TestScript.teardown.action", "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.", "comment": "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": "ele-1", "severity": "error", "human": "All FHIR elements must have a @value or children", "expression": "hasValue() | (children().count() > id.count())", "xpath": "@value|f:*|h:div", "source": "Element" } ] }, { "id": "TestScript.teardown.action.id", "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). This may be any string value that does not contain spaces.", "min": 0, "max": "1", "base": { "path": "Element.id", "min": 0, "max": "1" }, "type": [ { "code": "string" } ], "mapping": [ { "identity": "rim", "map": "n/a" } ] }, { "id": "TestScript.teardown.action.extension", "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.", "comment": "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" } ] }, { "id": "TestScript.teardown.action.modifierExtension", "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.", "comment": "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": "TestScript.teardown.action.operation", "path": "TestScript.teardown.action.operation", "short": "The teardown operation to perform", "definition": "An operation would involve a REST request to a server.", "min": 1, "max": "1", "contentReference": "#TestScript.setup.action.operation", "constraint": [ { "key": "inv-9", "severity": "error", "human": "Teardown operation SHALL contain either sourceId or targetId or params or url.", "expression": "sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' | '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='capabilities' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')" } ] } ] }, "differential": { "element": [ { "id": "TestScript", "path": "TestScript", "short": "Describes a set of tests", "definition": "A structured set of tests against a FHIR server implementation to determine compliance against the FHIR specification.", "min": 0, "max": "*", "mapping": [ { "identity": "rim", "map": "n/a" }, { "identity": "w5", "map": "conformance.misc" } ] }, { "id": "TestScript.url", "path": "TestScript.url", "short": "Logical URI to reference this test script (globally unique)", "definition": "An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions).", "comment": "Can be a urn:uuid: or a urn:oid:, but real http: addresses are preferred. Multiple instances may share the same url if they have a distinct version.", "requirements": "Allows the test script to be referenced by a single globally unique identifier.", "alias": [ "url", "authoritative-url", "destination", "identity" ], "min": 1, "max": "1", "type": [ { "code": "uri" } ], "isSummary": true, "mapping": [ { "identity": "w5", "map": "id" } ] }, { "id": "TestScript.identifier", "path": "TestScript.identifier", "short": "Additional identifier for the test script", "definition": "A formal identifier that is used to identify this test script when it is represented in other formats, or referenced in a specification, model, design or an instance.", "comment": "Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, e.g., to identify this test script outside of FHIR, where it is not possible to use the logical URI.", "requirements": "Allows externally provided and/or usable business identifiers to be easily associated with the module.", "min": 0, "max": "1", "type": [ { "code": "Identifier" } ], "isSummary": true, "mapping": [ { "identity": "objimpl", "map": "no-gen-base" }, { "identity": "w5", "map": "id" } ] }, { "id": "TestScript.version", "path": "TestScript.version", "short": "Business version of the test script", "definition": "The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", "comment": "There may be different test script instances that have the same identifier but different versions. The version can be appended to the url in a reference to allow a refrence to a particular business version of the test script with the format [url]|[version].", "min": 0, "max": "1", "type": [ { "code": "string" } ], "isSummary": true, "mapping": [ { "identity": "w5", "map": "id.version" } ] }, { "id": "TestScript.name", "path": "TestScript.name", "short": "Name for this test script (computer friendly)", "definition": "A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation.", "comment": "The name is not expected to be globally unique. The name should be a simple alpha-numeric type name to ensure that it is computable friendly.", "requirements": "Support human navigation and code generation.", "min": 1, "max": "1", "type": [ { "code": "string" } ], "isSummary": true }, { "id": "TestScript.title", "path": "TestScript.title", "short": "Name for this test script (human friendly)", "definition": "A short, descriptive, user-friendly title for the test script.", "comment": "This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc.", "min": 0, "max": "1", "type": [ { "code": "string" } ], "isSummary": true }, { "id": "TestScript.status", "path": "TestScript.status", "short": "draft | active | retired | unknown", "definition": "The status of this test script. Enables tracking the life-cycle of the content.", "comment": "Allows filtering of test scripts that are appropriate for use vs. not. \nThis is labeled as \"Is Modifier\" because applications should not use a retired test script without due consideration.", "min": 1, "max": "1", "type": [ { "code": "code" } ], "isModifier": true, "isSummary": true, "binding": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "PublicationStatus" }, { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", "valueBoolean": true } ], "strength": "required", "description": "The lifecycle status of a Value Set or Concept Map.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/publication-status" } }, "mapping": [ { "identity": "w5", "map": "status" } ] }, { "id": "TestScript.experimental", "path": "TestScript.experimental", "short": "For testing purposes, not real usage", "definition": "A boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", "comment": "Allows filtering of test script that are appropriate for use vs. not. This is labeled as \"Is Modifier\" because applications should not use an experimental test script in production.", "requirements": "Enables experimental content to be developed following the same lifecycle that would be used for a production-level test script.", "min": 0, "max": "1", "type": [ { "code": "boolean" } ], "isModifier": true, "isSummary": true, "mapping": [ { "identity": "w5", "map": "class" } ] }, { "id": "TestScript.date", "path": "TestScript.date", "short": "Date this was last changed", "definition": "The date (and optionally time) when the test script was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.", "comment": "Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the test script. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource.", "alias": [ "Revision Date" ], "min": 0, "max": "1", "type": [ { "code": "dateTime" } ], "isSummary": true, "mapping": [ { "identity": "w5", "map": "when.recorded" } ] }, { "id": "TestScript.publisher", "path": "TestScript.publisher", "short": "Name of the publisher (organization or individual)", "definition": "The name of the individual or organization that published the test script.", "comment": "Usually an organization, but may be an individual. The publisher (or steward) of the test script is the organization or individual primarily responsible for the maintenance and upkeep of the test script. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the test script. 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" } ] }, { "id": "TestScript.contact", "path": "TestScript.contact", "short": "Contact details for the publisher", "definition": "Contact details to assist a user in finding and communicating with the publisher.", "comment": "May be a web site, an email address, a telephone number, etc.", "min": 0, "max": "*", "type": [ { "code": "ContactDetail" } ], "isSummary": true }, { "id": "TestScript.description", "path": "TestScript.description", "short": "Natural language description of the test script", "definition": "A free text natural language description of the test script from a consumer's perspective.", "comment": "This description can be used to capture details such as why the test script was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the test script as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the profile is presumed to be the predominant language in the place the profile was created).", "min": 0, "max": "1", "type": [ { "code": "markdown" } ] }, { "id": "TestScript.useContext", "path": "TestScript.useContext", "short": "Context the content is intended to support", "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 for appropriate test script instances.", "comment": "When multiple useContexts are specified, there is no expectation whether all or any of the contexts apply.", "requirements": "Assist in searching for appropriate content.", "min": 0, "max": "*", "type": [ { "code": "UsageContext" } ], "isSummary": true }, { "id": "TestScript.jurisdiction", "path": "TestScript.jurisdiction", "short": "Intended jurisdiction for test script (if applicable)", "definition": "A legal or geographic region in which the test script is intended to be used.", "comment": "It may be possible for the test script to be used in jurisdictions other than those for which it was originally designed or intended.", "min": 0, "max": "*", "type": [ { "code": "CodeableConcept" } ], "isSummary": true, "binding": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "Jurisdiction" }, { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", "valueBoolean": true } ], "strength": "extensible", "description": "Countries and regions within which this artifact is targeted for use", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/jurisdiction" } } }, { "id": "TestScript.purpose", "path": "TestScript.purpose", "short": "Why this test script is defined", "definition": "Explaination of why this test script is needed and why it has been designed as it has.", "comment": "This element does not describe the usage of the test script Instead it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is. This may be used to point to source materials or specifications that drove the structure of this test script.", "min": 0, "max": "1", "type": [ { "code": "markdown" } ], "mapping": [ { "identity": "objimpl", "map": "no-gen-base" }, { "identity": "w5", "map": "why" } ] }, { "id": "TestScript.copyright", "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 test script.", "requirements": "Consumers must be able to determine any legal restrictions on the use of the test script and/or its content.", "alias": [ "License", "Restrictions" ], "min": 0, "max": "1", "type": [ { "code": "markdown" } ], "mapping": [ { "identity": "objimpl", "map": "no-gen-base" } ] }, { "id": "TestScript.origin", "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.", "comment": "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" } ] }, { "id": "TestScript.origin.index", "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.", "comment": "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" } ] }, { "id": "TestScript.origin.profile", "path": "TestScript.origin.profile", "short": "FHIR-Client | FHIR-SDC-FormFiller", "definition": "The type of origin profile the test system supports.", "comment": "Must be a \"sender\"/\"client\" profile.", "min": 1, "max": "1", "type": [ { "code": "Coding" } ], "meaningWhenMissing": "FHIR-Client", "binding": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "TestScriptProfileOriginType" } ], "strength": "extensible", "description": "The type of origin profile the test system supports.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/testscript-profile-origin-types" } } }, { "id": "TestScript.destination", "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.", "comment": "The purpose of this element is to define the profile of a 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" } ] }, { "id": "TestScript.destination.index", "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.", "comment": "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 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" } ] }, { "id": "TestScript.destination.profile", "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.", "comment": "Must be a \"receiver\"/\"server\" profile.", "min": 1, "max": "1", "type": [ { "code": "Coding" } ], "meaningWhenMissing": "FHIR-Server", "binding": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "TestScriptProfileDestinationType" } ], "strength": "extensible", "description": "The type of destination profile the test system supports.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/testscript-profile-destination-types" } } }, { "id": "TestScript.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-4", "severity": "error", "human": "TestScript metadata capability SHALL contain required or validated or both.", "expression": "capability.required.exists() or capability.validated.exists()", "xpath": "f:capability/f:required or f:capability/f:validated or (f:capability/f:required and f:capability/f:validated)" } ] }, { "id": "TestScript.metadata.link", "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" } ] }, { "id": "TestScript.metadata.link.url", "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" } ] }, { "id": "TestScript.metadata.link.description", "path": "TestScript.metadata.link.description", "short": "Short description", "definition": "Short description of the link.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.metadata.capability", "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.", "comment": "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. They 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" } ] }, { "id": "TestScript.metadata.capability.required", "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 }, { "id": "TestScript.metadata.capability.validated", "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 }, { "id": "TestScript.metadata.capability.description", "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" } ] }, { "id": "TestScript.metadata.capability.origin", "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" } ] }, { "id": "TestScript.metadata.capability.destination", "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" } ] }, { "id": "TestScript.metadata.capability.link", "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" } ] }, { "id": "TestScript.metadata.capability.capabilities", "path": "TestScript.metadata.capability.capabilities", "short": "Required Capability Statement", "definition": "Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.", "comment": "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", "targetProfile": "http://hl7.org/fhir/StructureDefinition/CapabilityStatement" } ] }, { "id": "TestScript.fixture", "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" } ] }, { "id": "TestScript.fixture.autocreate", "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 }, { "id": "TestScript.fixture.autodelete", "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 }, { "id": "TestScript.fixture.resource", "path": "TestScript.fixture.resource", "short": "Reference of the resource", "definition": "Reference to the resource (containing the contents of the resource needed for operations).", "comment": "See http://hl7.org/fhir/STU3/resourcelist.html for complete list of resource types.", "min": 0, "max": "1", "type": [ { "code": "Reference", "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource" } ] }, { "id": "TestScript.profile", "path": "TestScript.profile", "short": "Reference of the validation profile", "definition": "Reference to the profile to be used for validation.", "comment": "See http://hl7.org/fhir/STU3/resourcelist.html for complete list of resource types.", "min": 0, "max": "*", "type": [ { "code": "Reference", "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource" } ] }, { "id": "TestScript.variable", "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.", "comment": "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 an 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-3", "severity": "error", "human": "Variable can only contain one of expression, headerField or path.", "expression": "expression.empty() or headerField.empty() or path.empty()", "xpath": "not(f:expression and f:headerField and f:path)" } ] }, { "id": "TestScript.variable.name", "path": "TestScript.variable.name", "short": "Descriptive name for this variable", "definition": "Descriptive name for this variable.", "comment": "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" } ] }, { "id": "TestScript.variable.defaultValue", "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.", "comment": "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" } ] }, { "id": "TestScript.variable.description", "path": "TestScript.variable.description", "short": "Natural language description of the variable", "definition": "A free text natural language description of the variable and its purpose.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.variable.expression", "path": "TestScript.variable.expression", "short": "The fluentpath expression against the fixture body", "definition": "The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.", "comment": "If headerField is defined, then the variable will be evaluated against the headers that sourceId is pointing to. If expression or path is defined, then the variable will be evaluated against the fixture body that sourceId is pointing to. It is an error to define any combination of expression, headerField and path.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.variable.headerField", "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.", "comment": "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" } ] }, { "id": "TestScript.variable.hint", "path": "TestScript.variable.hint", "short": "Hint help text for default value to enter", "definition": "Displayable text string with hint help information to the user when entering a default value.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.variable.path", "path": "TestScript.variable.path", "short": "XPath or JSONPath against the fixture body", "definition": "XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.", "comment": "If headerField is defined, then the variable will be evaluated against the headers that sourceId is pointing to. If expression or path is defined, then the variable will be evaluated against the fixture body that sourceId is pointing to. It is an error to define any combination of expression, headerField and path.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.variable.sourceId", "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.", "comment": "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" } ] }, { "id": "TestScript.rule", "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.", "comment": "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 described elsewhere in the TestScript resource.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "id": "TestScript.rule.resource", "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", "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource" } ] }, { "id": "TestScript.rule.param", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", "valueString": "RuleParam" } ], "path": "TestScript.rule.param", "short": "Rule parameter template", "definition": "Each rule template can take one or more parameters for rule evaluation.", "comment": "The parameter value can be dynamic at runtime.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "id": "TestScript.rule.param.name", "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.", "comment": "The external rule template would be looking for the parameter by this name.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.rule.param.value", "path": "TestScript.rule.param.value", "short": "Parameter value defined either explicitly or dynamically", "definition": "The explicit or dynamic value for the parameter that will be passed on to the external rule template.", "comment": "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" } ] }, { "id": "TestScript.ruleset", "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.", "comment": "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 described elsewhere in the TestScript resource.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "id": "TestScript.ruleset.resource", "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", "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource" } ] }, { "id": "TestScript.ruleset.rule", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", "valueString": "RulesetRule" } ], "path": "TestScript.ruleset.rule", "short": "The referenced rule within the ruleset", "definition": "The referenced rule within the external ruleset template.", "comment": "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" } ] }, { "id": "TestScript.ruleset.rule.ruleId", "path": "TestScript.ruleset.rule.ruleId", "short": "Id of referenced rule within the ruleset", "definition": "Id of the referenced rule within the external ruleset template.", "min": 1, "max": "1", "type": [ { "code": "id" } ] }, { "id": "TestScript.ruleset.rule.param", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", "valueString": "RulesetRuleParam" } ], "path": "TestScript.ruleset.rule.param", "short": "Ruleset rule parameter template", "definition": "Each rule template can take one or more parameters for rule evaluation.", "comment": "The parameter value can be dynamic at runtime.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "id": "TestScript.ruleset.rule.param.name", "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.", "comment": "The external rule template would be looking for the parameter by this name.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.ruleset.rule.param.value", "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.", "comment": "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" } ] }, { "id": "TestScript.setup", "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" } ] }, { "id": "TestScript.setup.action", "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.", "comment": "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.exists() xor assert.exists()", "xpath": "(f:operation or f:assert) and not(f:operation and f:assert)" } ] }, { "id": "TestScript.setup.action.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-7", "severity": "error", "human": "Setup operation SHALL contain either sourceId or targetId or params or url.", "expression": "sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' |'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='capabilities' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')" } ] }, { "id": "TestScript.setup.action.operation.type", "path": "TestScript.setup.action.operation.type", "short": "The operation code type that will be executed", "definition": "Server interaction or operation type.", "comment": "See http://hl7.org/fhir/STU3/http.html for list of server interactions.", "min": 0, "max": "1", "type": [ { "code": "Coding" } ], "binding": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "TestScriptOperationCode" } ], "strength": "extensible", "description": "The allowable operation code types.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/testscript-operation-codes" } } }, { "id": "TestScript.setup.action.operation.resource", "path": "TestScript.setup.action.operation.resource", "short": "Resource type", "definition": "The type of the resource. See http://hl7.org/fhir/STU3/resourcelist.html.", "comment": "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": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "FHIRDefinedType" }, { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", "valueBoolean": true } ], "strength": "required", "description": "Either a resource or a data type.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/defined-types" } } }, { "id": "TestScript.setup.action.operation.label", "path": "TestScript.setup.action.operation.label", "short": "Tracking/logging operation label", "definition": "The label would be used for tracking/logging purposes by test engines.", "comment": "This has no impact on the verification itself.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.setup.action.operation.description", "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.", "comment": "This has no impact on the verification itself.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.setup.action.operation.accept", "path": "TestScript.setup.action.operation.accept", "short": "xml | json | ttl | none", "definition": "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", "comment": "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/fhir+xml' will be set. If 'json' is specified, then 'application/fhir+json' 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": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "ContentType" } ], "strength": "required", "description": "The content or mime type.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/content-type" } } }, { "id": "TestScript.setup.action.operation.contentType", "path": "TestScript.setup.action.operation.contentType", "short": "xml | json | ttl | none", "definition": "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", "comment": "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/fhir+xml' will be set. If 'json' is specified, then 'application/fhir+json' 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": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "ContentType" } ], "strength": "required", "description": "The content or mime type.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/content-type" } } }, { "id": "TestScript.setup.action.operation.destination", "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.", "comment": "If multiple TestScript.destination elements are defined and operation.destination is undefined, test engine will report an error as it cannot determine what destination to use for the exchange.", "min": 0, "max": "1", "type": [ { "code": "integer" } ] }, { "id": "TestScript.setup.action.operation.encodeRequestUrl", "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 }, { "id": "TestScript.setup.action.operation.origin", "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.", "comment": "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" } ] }, { "id": "TestScript.setup.action.operation.params", "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.", "comment": "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" } ] }, { "id": "TestScript.setup.action.operation.requestHeader", "path": "TestScript.setup.action.operation.requestHeader", "short": "Each operation can have one or more header elements", "definition": "Header elements would be used to set HTTP headers.", "comment": "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.org/fhir/STU3/http.html#2.1.0.5.1 - \"If-Match\" header. See http://hl7.org/fhir/STU3/http.html#2.1.0.11 - Conditional Create using \"If-None-Exist\". See http://hl7.org/fhir/STU3/http.html#2.1.0.13.1 - Invalid \"Content-Type\" header for negative testing. - etc.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "id": "TestScript.setup.action.operation.requestHeader.field", "path": "TestScript.setup.action.operation.requestHeader.field", "short": "HTTP header field name", "definition": "The HTTP header field e.g. \"Accept\".", "comment": "If header element is specified, then field is required.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.setup.action.operation.requestHeader.value", "path": "TestScript.setup.action.operation.requestHeader.value", "short": "HTTP headerfield value", "definition": "The value of the header e.g. \"application/fhir+xml\".", "comment": "If header element is specified, then value is required. No conversions will be done by the test engine e.g. \"xml\" to \"application/fhir+xml\". 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" } ] }, { "id": "TestScript.setup.action.operation.requestId", "path": "TestScript.setup.action.operation.requestId", "short": "Fixture Id of mapped request", "definition": "The fixture id (maybe new) to map to the request.", "comment": "If a requestId is supplied, then the resulting request (both headers and body) is mapped to the fixture ID (which may be entirely new and previously undeclared) designated by \"requestId\". If requestId is not specified, it is the test engine's responsibility to store the request and use it as the requestId in subsequent assertions when assertion path and/or headerField is specified, direction is equal to request, and the requestId in not specified.", "min": 0, "max": "1", "type": [ { "code": "id" } ] }, { "id": "TestScript.setup.action.operation.responseId", "path": "TestScript.setup.action.operation.responseId", "short": "Fixture Id of mapped response", "definition": "The fixture id (maybe new) to map to the response.", "comment": "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 the responseId in subsequent assertions when assertion path and/or headerField is specified and the responseId is not specified.", "min": 0, "max": "1", "type": [ { "code": "id" } ] }, { "id": "TestScript.setup.action.operation.sourceId", "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" } ] }, { "id": "TestScript.setup.action.operation.targetId", "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.", "comment": "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" } ] }, { "id": "TestScript.setup.action.operation.url", "path": "TestScript.setup.action.operation.url", "short": "Request URL", "definition": "Complete request URL.", "comment": "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": "TestScript.setup.action.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.", "comment": "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-5", "severity": "error", "human": "Only a single assertion SHALL be present within setup action assert element.", "expression": "contentType.count() + expression.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + requestMethod.count() + resource.count() + responseCode.count() + response.count() + rule.count() + ruleset.count() + validateProfileId.count() <=1", "xpath": "count(f:contentType) + count(f:expression) + count(f:headerField) + count(f:minimumId) + count(f:navigationLinks) + count(f:path) + count(f:requestMethod) + count(f:resource) + count(f:responseCode) + count(f:response) + count(f:rule) + count(f:ruleset) + count(f:validateProfileId) <=1" }, { "key": "inv-10", "severity": "error", "human": "Setup action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.", "expression": "compareToSourceId.empty() xor (compareToSourceExpression.exists() or compareToSourcePath.exists())", "xpath": "(f:compareToSourceId and f:compareToSourceExpression) or (f:compareToSourceId and f:compareToSourcePath) or not(f:compareToSourceId or f:compareToSourceExpression or f:compareToSourcePath)" }, { "key": "inv-12", "severity": "error", "human": "Setup action assert response and responseCode SHALL be empty when direction equals request", "expression": "(response.empty() and responseCode.empty() and direction = 'request') or direction.empty() or direction = 'response'", "xpath": "((count(f:response) + count(f:responseCode)) = 0 and (f:direction/@value='request')) or (count(f:direction) = 0) or (f:direction/@value='response')" } ] }, { "id": "TestScript.setup.action.assert.label", "path": "TestScript.setup.action.assert.label", "short": "Tracking/logging assertion label", "definition": "The label would be used for tracking/logging purposes by test engines.", "comment": "This has no impact on the verification itself.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.setup.action.assert.description", "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.", "comment": "This has no impact on the verification itself.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.setup.action.assert.direction", "path": "TestScript.setup.action.assert.direction", "short": "response | request", "definition": "The direction to use for the assertion.", "comment": "If the direction is specified as \"response\" (the default), then the processing of this assert is against the received response message. If the direction is specified as \"request\", then the processing of this assert is against the sent request message.", "min": 0, "max": "1", "type": [ { "code": "code" } ], "binding": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "AssertionDirectionType" } ], "strength": "required", "description": "The type of direction to use for assertion.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/assert-direction-codes" } } }, { "id": "TestScript.setup.action.assert.compareToSourceId", "path": "TestScript.setup.action.assert.compareToSourceId", "short": "Id of the source fixture to be evaluated", "definition": "Id of the source fixture used as the contents to be evaluated by either the \"source/expression\" or \"sourceId/path\" definition.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.setup.action.assert.compareToSourceExpression", "path": "TestScript.setup.action.assert.compareToSourceExpression", "short": "The fluentpath expression to evaluate against the source fixture", "definition": "The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.", "comment": "Thefhirpath 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" } ] }, { "id": "TestScript.setup.action.assert.compareToSourcePath", "path": "TestScript.setup.action.assert.compareToSourcePath", "short": "XPath or JSONPath expression to evaluate against the source fixture", "definition": "XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.contentType", "path": "TestScript.setup.action.assert.contentType", "short": "xml | json | ttl | none", "definition": "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", "comment": "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/fhir+xml' will be confirmed. If 'json' is specified, then 'application/fhir+json' 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": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "ContentType" } ], "strength": "required", "description": "The content or mime type.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/content-type" } } }, { "id": "TestScript.setup.action.assert.expression", "path": "TestScript.setup.action.assert.expression", "short": "The fluentpath expression to be evaluated", "definition": "The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload.", "comment": "If both \"expression\" and a \"fixtureId\" are specified, then the expression will be evaluated against the request or response body mapped to the fixtureId. If \"expression\" is specified and a \"fixtureId\" is not, then the expression will be evaluated against the response body of the last operation. Test engines are to store the request and response body and headers of the last operation at all times for subsequent assertions.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.setup.action.assert.headerField", "path": "TestScript.setup.action.assert.headerField", "short": "HTTP header field name", "definition": "The HTTP header field name e.g. 'Location'.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.minimumId", "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.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.navigationLinks", "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.", "comment": "Asserts that the Bundle contains first, last, and next links.", "min": 0, "max": "1", "type": [ { "code": "boolean" } ] }, { "id": "TestScript.setup.action.assert.operator", "path": "TestScript.setup.action.assert.operator", "short": "equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval", "definition": "The operator type defines the conditional behavior of the assert. If not defined, the default is equals.", "comment": "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": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "AssertionOperatorType" } ], "strength": "required", "description": "The type of operator to use for assertion.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/assert-operator-codes" } } }, { "id": "TestScript.setup.action.assert.path", "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.", "comment": "If both \"path\" and a \"fixtureId\" are specified, then the path will be evaluated against the request or response body mapped to the fixtureId. If \"path\" is specified and a \"fixtureId\" is not, then the path will be evaluated against the response body of the last operation. Test engines are to store the request and response body and headers of the last operation at all times for subsequent assertions.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.setup.action.assert.requestMethod", "path": "TestScript.setup.action.assert.requestMethod", "short": "delete | get | options | patch | post | put", "definition": "The request method or HTTP operation code to compare against that used by the client system under test.", "comment": "If \"requestMethod\" is specified then it will be used in place of \"value\". The \"requestMethod\" will evaluate against the last operation's request HTTP operation.", "min": 0, "max": "1", "type": [ { "code": "code" } ], "binding": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "TestScriptRequestMethodCode" } ], "strength": "required", "description": "The allowable request method or HTTP operation codes.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/http-operations" } } }, { "id": "TestScript.setup.action.assert.requestURL", "path": "TestScript.setup.action.assert.requestURL", "short": "Request URL comparison value", "definition": "The value to use in a comparison against the request URL path string.", "comment": "If \"requestURL\" is specified then it will be used in place of \"value\". The \"requestURL\" will evaluate against the last operation's full request URL path string.", "min": 0, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.setup.action.assert.resource", "path": "TestScript.setup.action.assert.resource", "short": "Resource type", "definition": "The type of the resource. See http://hl7.org/fhir/STU3/resourcelist.html.", "comment": "This will be expected resource type in response body e.g. in read, vread, search, etc. See http://hl7.org/fhir/STU3/resourcelist.html for complete list of resource types; e.g. <assert > <resourceType value=\"Patient\" </assert>.", "min": 0, "max": "1", "type": [ { "code": "code" } ], "binding": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "FHIRDefinedType" }, { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", "valueBoolean": true } ], "strength": "required", "description": "Either a resource or a data type.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/defined-types" } } }, { "id": "TestScript.setup.action.assert.response", "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.", "comment": "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": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", "valueString": "AssertionResponseTypes" } ], "strength": "required", "description": "The type of response code to use for assertion.", "valueSetReference": { "reference": "http://hl7.org/fhir/ValueSet/assert-response-code-types" } } }, { "id": "TestScript.setup.action.assert.responseCode", "path": "TestScript.setup.action.assert.responseCode", "short": "HTTP response code to test", "definition": "The value of the HTTP response code to be tested.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.rule", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", "valueString": "ActionAssertRule" } ], "path": "TestScript.setup.action.assert.rule", "short": "The reference to a TestScript.rule", "definition": "The TestScript.rule this assert will evaluate.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.rule.ruleId", "path": "TestScript.setup.action.assert.rule.ruleId", "short": "Id of the TestScript.rule", "definition": "The TestScript.rule id value this assert will evaluate.", "min": 1, "max": "1", "type": [ { "code": "id" } ] }, { "id": "TestScript.setup.action.assert.rule.param", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", "valueString": "ActionAssertRuleParam" } ], "path": "TestScript.setup.action.assert.rule.param", "short": "Rule parameter template", "definition": "Each rule template can take one or more parameters for rule evaluation.", "comment": "The parameter value can be dynamic at runtime.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "id": "TestScript.setup.action.assert.rule.param.name", "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.", "comment": "The external rule template would be looking for the parameter by this name.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.setup.action.assert.rule.param.value", "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.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.ruleset", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", "valueString": "ActionAssertRuleset" } ], "path": "TestScript.setup.action.assert.ruleset", "short": "The reference to a TestScript.ruleset", "definition": "The TestScript.ruleset this assert will evaluate.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.ruleset.rulesetId", "path": "TestScript.setup.action.assert.ruleset.rulesetId", "short": "Id of the TestScript.ruleset", "definition": "The TestScript.ruleset id value this assert will evaluate.", "min": 1, "max": "1", "type": [ { "code": "id" } ] }, { "id": "TestScript.setup.action.assert.ruleset.rule", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", "valueString": "ActionAssertRulesetRule" } ], "path": "TestScript.setup.action.assert.ruleset.rule", "short": "The referenced rule within the ruleset", "definition": "The referenced rule within the external ruleset template.", "comment": "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": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "id": "TestScript.setup.action.assert.ruleset.rule.ruleId", "path": "TestScript.setup.action.assert.ruleset.rule.ruleId", "short": "Id of referenced rule within the ruleset", "definition": "Id of the referenced rule within the external ruleset template.", "min": 1, "max": "1", "type": [ { "code": "id" } ] }, { "id": "TestScript.setup.action.assert.ruleset.rule.param", "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.", "comment": "The parameter value can be dynamic at runtime.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "id": "TestScript.setup.action.assert.ruleset.rule.param.name", "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.", "comment": "The external rule template would be looking for the parameter by this name.", "min": 1, "max": "1", "type": [ { "code": "string" } ] }, { "id": "TestScript.setup.action.assert.ruleset.rule.param.value", "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.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.sourceId", "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.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.validateProfileId", "path": "TestScript.setup.action.assert.validateProfileId", "short": "Profile Id of validation profile reference", "definition": "The ID of the Profile to validate against.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.value", "path": "TestScript.setup.action.assert.value", "short": "The value to compare to", "definition": "The value to compare to.", "comment": "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" } ] }, { "id": "TestScript.setup.action.assert.warningOnly", "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.", "comment": "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 }, { "id": "TestScript.test", "path": "TestScript.test", "short": "A test in this script", "definition": "A test in this script.", "min": 0, "max": "*", "type": [ { "code": "BackboneElement" } ] }, { "id": "TestScript.test.name", "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" } ] }, { "id": "TestScript.test.description", "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" } ] }, { "id": "TestScript.test.action", "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.", "comment": "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.exists() xor assert.exists()", "xpath": "(f:operation or f:assert) and not(f:operation and f:assert)" } ] }, { "id": "TestScript.test.action.operation", "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": "#TestScript.setup.action.operation", "constraint": [ { "key": "inv-8", "severity": "error", "human": "Test operation SHALL contain either sourceId or targetId or params or url.", "expression": "sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' | '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='capabilities' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')" } ] }, { "id": "TestScript.test.action.assert", "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.", "comment": "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": "#TestScript.setup.action.assert", "constraint": [ { "key": "inv-6", "severity": "error", "human": "Only a single assertion SHALL be present within test action assert element.", "expression": "contentType.count() + expression.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + requestMethod.count() + resource.count() + responseCode.count() + response.count() + rule.count() + ruleset.count() + validateProfileId.count() <=1", "xpath": "count(f:contentType) + count(f:expression) + count(f:headerField) + count(f:minimumId) + count(f:navigationLinks) + count(f:path) + count(f:requestMethod) + count(f:resource) + count(f:responseCode) + count(f:response) + count(f:rule) + count(f:ruleset) + count(f:validateProfileId) <=1" }, { "key": "inv-11", "severity": "error", "human": "Test action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither.", "expression": "compareToSourceId.empty() xor (compareToSourceExpression.exists() or compareToSourcePath.exists())", "xpath": "(f:compareToSourceId and f:compareToSourceExpression) or (f:compareToSourceId and f:compareToSourcePath) or not(f:compareToSourceId or f:compareToSourceExpression or f:compareToSourcePath)" }, { "key": "inv-13", "severity": "error", "human": "Test action assert response and response and responseCode SHALL be empty when direction equals request", "expression": "(response.empty() and responseCode.empty() and direction = 'request') or direction.empty() or direction = 'response'", "xpath": "((count(f:response) + count(f:responseCode)) = 0 and (f:direction/@value='request')) or (count(f:direction) = 0) or (f:direction/@value='response')" } ] }, { "id": "TestScript.teardown", "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" } ] }, { "id": "TestScript.teardown.action", "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.", "comment": "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" } ] }, { "id": "TestScript.teardown.action.operation", "path": "TestScript.teardown.action.operation", "short": "The teardown operation to perform", "definition": "An operation would involve a REST request to a server.", "min": 1, "max": "1", "contentReference": "#TestScript.setup.action.operation", "constraint": [ { "key": "inv-9", "severity": "error", "human": "Teardown operation SHALL contain either sourceId or targetId or params or url.", "expression": "sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' | '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='capabilities' 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.