{
"description": "Base StructureDefinition for TestScript Resource",
"_filename": "StructureDefinition-TestScript.json",
"package_name": "hl7.fhir.r2.examples",
"date": "2015-10-24T07:41:03+11:00",
"meta": {
"lastUpdated": "2015-10-24T07:41:03.495+11:00"
},
"publisher": "Health Level Seven International (FHIR Infrastructure)",
"fhirVersion": "1.0.2",
"name": "TestScript",
"mapping": [ {
"uri": "http://hl7.org/fhir/w5",
"name": "W5 Mapping",
"identity": "w5"
}, {
"uri": "http://hl7.org/v3",
"name": "RIM",
"identity": "rim"
} ],
"abstract": false,
"type": null,
"experimental": null,
"resourceType": "StructureDefinition",
"title": null,
"package_version": "1.0.2",
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
"valueInteger": 0
} ],
"snapshot": {
"element": [ {
"max": "*",
"min": 0,
"path": "TestScript",
"type": [ {
"code": "DomainResource"
} ],
"short": "Describes a set of tests",
"mapping": [ {
"map": "conformance.misc",
"identity": "w5"
} ],
"definition": "TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification."
}, {
"max": "1",
"min": 0,
"path": "TestScript.id",
"type": [ {
"code": "id"
} ],
"short": "Logical id of this artifact",
"comments": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation. Bundles always have an id, though it is usually a generated UUID.",
"isSummary": true,
"definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."
}, {
"max": "1",
"min": 0,
"path": "TestScript.meta",
"type": [ {
"code": "Meta"
} ],
"short": "Metadata about the resource",
"isSummary": true,
"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."
}, {
"path": "TestScript.implicitRules",
"min": 0,
"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.",
"isModifier": true,
"short": "A set of rules under which this content was created",
"comments": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element as much as possible.",
"type": [ {
"code": "uri"
} ],
"max": "1",
"isSummary": true
}, {
"max": "1",
"min": 0,
"path": "TestScript.language",
"type": [ {
"code": "code"
} ],
"short": "Language of the resource content",
"binding": {
"strength": "required",
"description": "A human language.",
"valueSetUri": "http://tools.ietf.org/html/bcp47"
},
"comments": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
"definition": "The base language in which the resource is written."
}, {
"path": "TestScript.text",
"min": 0,
"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.",
"short": "Text summary of the resource, for human interpretation",
"comments": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative.",
"mapping": [ {
"map": "Act.text?",
"identity": "rim"
} ],
"type": [ {
"code": "Narrative"
} ],
"alias": [ "narrative", "html", "xhtml", "display" ],
"max": "1",
"condition": [ "dom-1" ]
}, {
"path": "TestScript.contained",
"min": 0,
"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.",
"short": "Contained, inline Resources",
"comments": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
"mapping": [ {
"map": "N/A",
"identity": "rim"
} ],
"type": [ {
"code": "Resource"
} ],
"alias": [ "inline resources", "anonymous resources", "contained resources" ],
"max": "*"
}, {
"path": "TestScript.extension",
"min": 0,
"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.",
"short": "Additional Content defined by implementations",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "N/A",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content" ],
"max": "*"
}, {
"path": "TestScript.modifierExtension",
"min": 0,
"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.",
"isModifier": true,
"short": "Extensions that cannot be ignored",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "N/A",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content" ],
"max": "*"
}, {
"path": "TestScript.url",
"min": 1,
"definition": "An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published.",
"short": "Absolute URL used to reference this TestScript",
"mapping": [ {
"map": "id",
"identity": "w5"
} ],
"type": [ {
"code": "uri"
} ],
"alias": [ "url", "authoritative-url", "destination", "identity" ],
"max": "1",
"isSummary": true
}, {
"path": "TestScript.version",
"requirements": "There may be multiple resource versions of the TestScript that have this same identifier. The resource version id will change for technical reasons, whereas the stated version number needs to be under the author's control.",
"min": 0,
"definition": "The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually.",
"short": "Logical id for this version of the TestScript",
"mapping": [ {
"map": "id.version",
"identity": "w5"
} ],
"type": [ {
"code": "string"
} ],
"max": "1",
"isSummary": true
}, {
"max": "1",
"min": 1,
"path": "TestScript.name",
"type": [ {
"code": "string"
} ],
"short": "Informal name for this TestScript",
"comments": "Not expected to be globally unique.",
"isSummary": true,
"definition": "A free text natural language name identifying the TestScript."
}, {
"path": "TestScript.status",
"requirements": "Allows filtering of TestScripts that are appropriate for use vs. not.",
"min": 1,
"definition": "The status of the TestScript.",
"isModifier": true,
"short": "draft | active | retired",
"mapping": [ {
"map": "status",
"identity": "w5"
} ],
"type": [ {
"code": "code"
} ],
"binding": {
"strength": "required",
"description": "The lifecycle status of a Value Set or Concept Map.",
"valueSetReference": {
"reference": "http://hl7.org/fhir/ValueSet/conformance-resource-status"
}
},
"max": "1",
"isSummary": true
}, {
"max": "1",
"min": 0,
"path": "TestScript.identifier",
"type": [ {
"code": "Identifier"
} ],
"short": "External identifier",
"mapping": [ {
"map": "id",
"identity": "w5"
} ],
"isSummary": true,
"definition": "Identifier for the TestScript assigned for external purposes outside the context of FHIR."
}, {
"path": "TestScript.experimental",
"requirements": "Allows filtering of TestScripts that are appropriate for use vs. not.",
"min": 0,
"definition": "This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.",
"short": "If for testing purposes, not real usage",
"mapping": [ {
"map": "class",
"identity": "w5"
} ],
"type": [ {
"code": "boolean"
} ],
"max": "1",
"isSummary": true
}, {
"path": "TestScript.publisher",
"requirements": "Helps establish the \"authority/credibility\" of the Test Script. May also allow for contact.",
"min": 0,
"definition": "The name of the individual or organization that published the Test Script.",
"short": "Name of the publisher (Organization or individual)",
"comments": "Usually an organization, but may be an individual. This item SHOULD be populated unless the information is available from context.",
"mapping": [ {
"map": "who.witness",
"identity": "w5"
} ],
"type": [ {
"code": "string"
} ],
"max": "1",
"isSummary": true
}, {
"max": "*",
"min": 0,
"path": "TestScript.contact",
"type": [ {
"code": "BackboneElement"
} ],
"short": "Contact details of the publisher",
"comments": "May be a web site, an email address, a telephone number (tel:), etc.",
"isSummary": true,
"definition": "Contacts to assist a user in finding and communicating with the publisher."
}, {
"max": "1",
"min": 0,
"path": "TestScript.contact.id",
"type": [ {
"code": "id"
} ],
"short": "xml:id (or equivalent in JSON)",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"definition": "unique id for the element within a resource (for internal references).",
"representation": [ "xmlAttr" ]
}, {
"path": "TestScript.contact.extension",
"min": 0,
"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.",
"short": "Additional Content defined by implementations",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content" ],
"max": "*"
}, {
"path": "TestScript.contact.modifierExtension",
"min": 0,
"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.",
"isModifier": true,
"short": "Extensions that cannot be ignored",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "N/A",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content", "modifiers" ],
"max": "*"
}, {
"max": "1",
"min": 0,
"path": "TestScript.contact.name",
"type": [ {
"code": "string"
} ],
"short": "Name of a individual to contact",
"comments": "If there is no named individual, the telecom is for the organization as a whole.",
"isSummary": true,
"definition": "The name of an individual to contact regarding the Test Script."
}, {
"max": "*",
"min": 0,
"path": "TestScript.contact.telecom",
"type": [ {
"code": "ContactPoint"
} ],
"short": "Contact details for individual or publisher",
"isSummary": true,
"definition": "Contact details for individual (if a name was provided) or the publisher."
}, {
"path": "TestScript.date",
"min": 0,
"definition": "The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change.",
"short": "Date for this version of the TestScript",
"comments": "Additional specific dates may be added as extensions.",
"mapping": [ {
"map": "when.recorded",
"identity": "w5"
} ],
"type": [ {
"code": "dateTime"
} ],
"max": "1",
"isSummary": true
}, {
"max": "1",
"min": 0,
"path": "TestScript.description",
"type": [ {
"code": "string"
} ],
"short": "Natural language description of the TestScript",
"comments": "This field can be used for things such as why the TestScript was written, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is *not* a rendering of the TestScript as conveyed in TestScript.text. This item SHOULD be populated unless the information is available from context.",
"isSummary": true,
"definition": "A free text natural language description of the TestScript and its use."
}, {
"path": "TestScript.useContext",
"requirements": "Assist in searching for appropriate content.",
"min": 0,
"definition": "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of Test Scripts.",
"short": "Content intends to support these contexts",
"type": [ {
"code": "CodeableConcept"
} ],
"binding": {
"strength": "extensible",
"description": "Indicates the countries, regions, disciplines and other aspects of use within which this artifact is targeted for use.",
"valueSetReference": {
"reference": "http://hl7.org/fhir/ValueSet/use-context"
}
},
"max": "*",
"isSummary": true
}, {
"max": "1",
"min": 0,
"path": "TestScript.requirements",
"type": [ {
"code": "string"
} ],
"short": "Scope and Usage this Test Script is for",
"mapping": [ {
"map": "why",
"identity": "w5"
} ],
"comments": "This element does not describe the usage of the Test Script (that's done in comments), rather it's for traceability of *why* the element is either needed or why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this data element.",
"definition": "Explains why this Test Script is needed and why it's been constrained as it has."
}, {
"max": "1",
"min": 0,
"path": "TestScript.copyright",
"type": [ {
"code": "string"
} ],
"alias": [ "License", "Restrictions" ],
"short": "Use and/or publishing restrictions",
"definition": "A copyright statement relating to the Test Script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings."
}, {
"max": "1",
"min": 0,
"name": "metadata",
"path": "TestScript.metadata",
"type": [ {
"code": "BackboneElement"
} ],
"short": "Required capability that is assumed to function correctly on the FHIR server being tested",
"constraint": [ {
"key": "inv-5",
"human": "TestScript metadata capability SHALL contain required or validated or both.",
"xpath": "f:capability/f:required or f:capability/f:validated or (f:capability/f:required and f:capability/f:validated)",
"severity": "error"
} ],
"definition": "The required capability must exist and are assumed to function correctly on the FHIR server being tested."
}, {
"max": "1",
"min": 0,
"path": "TestScript.metadata.id",
"type": [ {
"code": "id"
} ],
"short": "xml:id (or equivalent in JSON)",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"definition": "unique id for the element within a resource (for internal references).",
"representation": [ "xmlAttr" ]
}, {
"path": "TestScript.metadata.extension",
"min": 0,
"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.",
"short": "Additional Content defined by implementations",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content" ],
"max": "*"
}, {
"path": "TestScript.metadata.modifierExtension",
"min": 0,
"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.",
"isModifier": true,
"short": "Extensions that cannot be ignored",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "N/A",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content", "modifiers" ],
"max": "*"
}, {
"max": "*",
"min": 0,
"path": "TestScript.metadata.link",
"type": [ {
"code": "BackboneElement"
} ],
"short": "Links to the FHIR specification",
"definition": "A link to the FHIR specification that this test is covering."
}, {
"max": "1",
"min": 0,
"path": "TestScript.metadata.link.id",
"type": [ {
"code": "id"
} ],
"short": "xml:id (or equivalent in JSON)",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"definition": "unique id for the element within a resource (for internal references).",
"representation": [ "xmlAttr" ]
}, {
"path": "TestScript.metadata.link.extension",
"min": 0,
"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.",
"short": "Additional Content defined by implementations",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content" ],
"max": "*"
}, {
"path": "TestScript.metadata.link.modifierExtension",
"min": 0,
"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.",
"isModifier": true,
"short": "Extensions that cannot be ignored",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "N/A",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content", "modifiers" ],
"max": "*"
}, {
"max": "1",
"min": 1,
"path": "TestScript.metadata.link.url",
"type": [ {
"code": "uri"
} ],
"short": "URL to the specification",
"definition": "URL to a particular requirement or feature within the FHIR specification."
}, {
"max": "1",
"min": 0,
"path": "TestScript.metadata.link.description",
"type": [ {
"code": "string"
} ],
"short": "Short description",
"definition": "Short description of the link."
}, {
"max": "*",
"min": 1,
"path": "TestScript.metadata.capability",
"type": [ {
"code": "BackboneElement"
} ],
"short": "Capabilities that are assumed to function correctly on the FHIR server being tested",
"comments": "When the metadata capabilities section is defined at TestScript.metadata or at TestScript.setup.metadata, and the server's conformance statement does not contain the elements defined in the minimal conformance statement, then all the tests in the TestScript are skipped. When the metadata capabilities section is defined at TestScript.test.metadata and the server's conformance statement does not contain the elements defined in the minimal conformance statement, then only that test is skipped. The \"metadata.capabilities.required\" and \"metadata.capabilities.validated\" elements only indicate whether the capabilities are the primary focus of the test script or not. The do not impact the skipping logic. Capabilities whose \"metadata.capabilities.validated\" flag is true are the primary focus of the test script.",
"definition": "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested."
}, {
"max": "1",
"min": 0,
"path": "TestScript.metadata.capability.id",
"type": [ {
"code": "id"
} ],
"short": "xml:id (or equivalent in JSON)",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"definition": "unique id for the element within a resource (for internal references).",
"representation": [ "xmlAttr" ]
}, {
"path": "TestScript.metadata.capability.extension",
"min": 0,
"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.",
"short": "Additional Content defined by implementations",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content" ],
"max": "*"
}, {
"path": "TestScript.metadata.capability.modifierExtension",
"min": 0,
"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.",
"isModifier": true,
"short": "Extensions that cannot be ignored",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "N/A",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content", "modifiers" ],
"max": "*"
}, {
"max": "1",
"min": 0,
"path": "TestScript.metadata.capability.required",
"type": [ {
"code": "boolean"
} ],
"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.",
"defaultValueBoolean": false
}, {
"max": "1",
"min": 0,
"path": "TestScript.metadata.capability.validated",
"type": [ {
"code": "boolean"
} ],
"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.",
"defaultValueBoolean": false
}, {
"max": "1",
"min": 0,
"path": "TestScript.metadata.capability.description",
"type": [ {
"code": "string"
} ],
"short": "The expected capabilities of the server",
"definition": "Description of the capabilities that this test script is requiring the server to support."
}, {
"max": "1",
"min": 0,
"path": "TestScript.metadata.capability.destination",
"type": [ {
"code": "integer"
} ],
"short": "Which server these requirements apply to",
"definition": "Which server these requirements apply to."
}, {
"max": "*",
"min": 0,
"path": "TestScript.metadata.capability.link",
"type": [ {
"code": "uri"
} ],
"short": "Links to the FHIR specification",
"definition": "Links to the FHIR specification that describes this interaction and the resources involved in more detail."
}, {
"max": "1",
"min": 1,
"path": "TestScript.metadata.capability.conformance",
"type": [ {
"code": "Reference",
"profile": [ "http://hl7.org/fhir/StructureDefinition/Conformance" ]
} ],
"short": "Required Conformance",
"comments": "The conformance statement of the server has to contain at a minimum the contents of the reference pointed to by this element.",
"definition": "Minimum conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped."
}, {
"max": "1",
"min": 0,
"path": "TestScript.multiserver",
"type": [ {
"code": "boolean"
} ],
"short": "Whether or not the tests apply to more than one FHIR server",
"definition": "If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified.",
"meaningWhenMissing": "False"
}, {
"max": "*",
"min": 0,
"path": "TestScript.fixture",
"type": [ {
"code": "BackboneElement"
} ],
"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."
}, {
"max": "1",
"min": 0,
"path": "TestScript.fixture.id",
"type": [ {
"code": "id"
} ],
"short": "xml:id (or equivalent in JSON)",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"definition": "unique id for the element within a resource (for internal references).",
"representation": [ "xmlAttr" ]
}, {
"path": "TestScript.fixture.extension",
"min": 0,
"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.",
"short": "Additional Content defined by implementations",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content" ],
"max": "*"
}, {
"path": "TestScript.fixture.modifierExtension",
"min": 0,
"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.",
"isModifier": true,
"short": "Extensions that cannot be ignored",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "N/A",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content", "modifiers" ],
"max": "*"
}, {
"max": "1",
"min": 0,
"path": "TestScript.fixture.autocreate",
"type": [ {
"code": "boolean"
} ],
"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.",
"meaningWhenMissing": "False"
}, {
"max": "1",
"min": 0,
"path": "TestScript.fixture.autodelete",
"type": [ {
"code": "boolean"
} ],
"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.",
"meaningWhenMissing": "False"
}, {
"max": "1",
"min": 0,
"path": "TestScript.fixture.resource",
"type": [ {
"code": "Reference",
"profile": [ "http://hl7.org/fhir/StructureDefinition/Resource" ]
} ],
"short": "Reference of the resource",
"comments": "See http://hl7-fhir.github.io/resourcelist.html for complete list of resource types.",
"definition": "Reference to the resource (containing the contents of the resource needed for operations)."
}, {
"max": "*",
"min": 0,
"path": "TestScript.profile",
"type": [ {
"code": "Reference",
"profile": [ "http://hl7.org/fhir/StructureDefinition/Resource" ]
} ],
"short": "Reference of the validation profile",
"comments": "See http://hl7-fhir.github.io/resourcelist.html for complete list of resource types.",
"definition": "Reference to the profile to be used for validation."
}, {
"max": "*",
"min": 0,
"path": "TestScript.variable",
"type": [ {
"code": "BackboneElement"
} ],
"short": "Placeholder for evaluated elements",
"comments": "Variables would be set based either on XPath/JsonPath expressions against fixtures (static and response), or headerField evaluations against response headers. If variable evaluates to nodelist or anything other than a primitive value, then test engine would report error. Variables would be used to perform clean replacements in \"operation.params\", \"operation.requestHeader.value\", and \"operation.url\" element values during operation calls and in \"assert.value\" during assertion evaluations. This limits the places that test engines would need to look for placeholders \"${}\". Variables are scoped to the whole script. They are NOT evaluated at declaration. They are evaluated by test engine when used for substitutions in \"operation.params\", \"operation.requestHeader.value\", and \"operation.url\" element values during operation calls and in \"assert.value\" during assertion evaluations. See example testscript-search.xml.",
"constraint": [ {
"key": "inv-4",
"human": "Variable cannot contain both headerField and path.",
"xpath": "not(f:headerField and f:path)",
"severity": "error"
} ],
"definition": "Variable is set based either on element value in response body or on header field value in the response headers."
}, {
"max": "1",
"min": 0,
"path": "TestScript.variable.id",
"type": [ {
"code": "id"
} ],
"short": "xml:id (or equivalent in JSON)",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"definition": "unique id for the element within a resource (for internal references).",
"representation": [ "xmlAttr" ]
}, {
"path": "TestScript.variable.extension",
"min": 0,
"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.",
"short": "Additional Content defined by implementations",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content" ],
"max": "*"
}, {
"path": "TestScript.variable.modifierExtension",
"min": 0,
"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.",
"isModifier": true,
"short": "Extensions that cannot be ignored",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "N/A",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content", "modifiers" ],
"max": "*"
}, {
"max": "1",
"min": 1,
"path": "TestScript.variable.name",
"type": [ {
"code": "string"
} ],
"short": "Descriptive name for this variable",
"comments": "Placeholders would contain the variable name wrapped in ${} in \"operation.params\", \"operation.requestHeader.value\", and \"operation.url\" elements. These placeholders would need to be replaced by the variable value before the operation is executed.",
"definition": "Descriptive name for this variable."
}, {
"max": "1",
"min": 0,
"path": "TestScript.variable.headerField",
"type": [ {
"code": "string"
} ],
"short": "HTTP header field name for source",
"comments": "If headerField is defined, then the variable will be evaluated against the headers that sourceId is pointing to. If path is defined, then the variable will be evaluated against the fixture body that sourceId is pointing to. It is an error to define both headerField and path.",
"definition": "Will be used to grab the HTTP header field value from the headers that sourceId is pointing to."
}, {
"max": "1",
"min": 0,
"path": "TestScript.variable.path",
"type": [ {
"code": "string"
} ],
"short": "XPath or JSONPath against the fixture body",
"comments": "If headerField is defined, then the variable will be evaluated against the headers that sourceId is pointing to. If path is defined, then the variable will be evaluated against the fixture body that sourceId is pointing to. It is an error to define both headerField and path.",
"definition": "XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both."
}, {
"max": "1",
"min": 0,
"path": "TestScript.variable.sourceId",
"type": [ {
"code": "id"
} ],
"short": "Fixture Id of source expression or headerField within this variable",
"comments": "This can be a statically defined fixture (at the top of the testscript) or a dynamically set fixture created by responseId of the action.operation element.",
"definition": "Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup",
"type": [ {
"code": "BackboneElement"
} ],
"short": "A series of required setup operations before tests are executed",
"definition": "A series of required setup operations before tests are executed."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.id",
"type": [ {
"code": "id"
} ],
"short": "xml:id (or equivalent in JSON)",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"definition": "unique id for the element within a resource (for internal references).",
"representation": [ "xmlAttr" ]
}, {
"path": "TestScript.setup.extension",
"min": 0,
"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.",
"short": "Additional Content defined by implementations",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content" ],
"max": "*"
}, {
"path": "TestScript.setup.modifierExtension",
"min": 0,
"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.",
"isModifier": true,
"short": "Extensions that cannot be ignored",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "N/A",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content", "modifiers" ],
"max": "*"
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.metadata",
"short": "Capabilities that are assumed to function correctly on the FHIR server being tested",
"constraint": [ {
"key": "inv-6",
"human": "Setup metadata capability SHALL contain required or validated or both.",
"xpath": "f:capability/f:required or f:capability/f:validated or (f:capability/f:required and f:capability/f:validated)",
"severity": "error"
} ],
"definition": "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.",
"nameReference": "metadata"
}, {
"max": "*",
"min": 1,
"path": "TestScript.setup.action",
"type": [ {
"code": "BackboneElement"
} ],
"short": "A setup operation or assert to perform",
"comments": "An action should contain either an operation or an assertion but not both. It can contain any number of variables.",
"constraint": [ {
"key": "inv-1",
"human": "Setup action SHALL contain either an operation or assert but not both.",
"xpath": "(f:operation or f:assert) and not(f:operation and f:assert)",
"severity": "error"
} ],
"definition": "Action would contain either an operation or an assertion."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.id",
"type": [ {
"code": "id"
} ],
"short": "xml:id (or equivalent in JSON)",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"definition": "unique id for the element within a resource (for internal references).",
"representation": [ "xmlAttr" ]
}, {
"path": "TestScript.setup.action.extension",
"min": 0,
"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.",
"short": "Additional Content defined by implementations",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content" ],
"max": "*"
}, {
"path": "TestScript.setup.action.modifierExtension",
"min": 0,
"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.",
"isModifier": true,
"short": "Extensions that cannot be ignored",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "N/A",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content", "modifiers" ],
"max": "*"
}, {
"max": "1",
"min": 0,
"name": "operation",
"path": "TestScript.setup.action.operation",
"type": [ {
"code": "BackboneElement"
} ],
"short": "The setup operation to perform",
"constraint": [ {
"key": "inv-10",
"human": "Setup operation SHALL contain either sourceId or targetId or params or url.",
"xpath": "f:sourceId or ((f:targetId or f:url or f:params) and (count(f:targetId) + count(f:url) + count(f:params) =1)) or (f:type/f:code/@value='conformance' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')",
"severity": "error"
} ],
"definition": "The operation to perform."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.operation.id",
"type": [ {
"code": "id"
} ],
"short": "xml:id (or equivalent in JSON)",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"definition": "unique id for the element within a resource (for internal references).",
"representation": [ "xmlAttr" ]
}, {
"path": "TestScript.setup.action.operation.extension",
"min": 0,
"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.",
"short": "Additional Content defined by implementations",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content" ],
"max": "*"
}, {
"path": "TestScript.setup.action.operation.modifierExtension",
"min": 0,
"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.",
"isModifier": true,
"short": "Extensions that cannot be ignored",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "N/A",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content", "modifiers" ],
"max": "*"
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.operation.type",
"type": [ {
"code": "Coding"
} ],
"short": "The setup operation type that will be executed",
"binding": {
"strength": "extensible",
"description": "The allowable operation types.",
"valueSetReference": {
"reference": "http://hl7.org/fhir/ValueSet/testscript-operation-codes"
}
},
"comments": "See http://hl7-fhir.github.io/http.html for list of server interactions.",
"definition": "Server interaction or operation type."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.operation.resource",
"type": [ {
"code": "code"
} ],
"short": "Resource type",
"binding": {
"strength": "required",
"description": "Either a resource or a data type.",
"valueSetReference": {
"reference": "http://hl7.org/fhir/ValueSet/defined-types"
}
},
"comments": "If \"url\" element is specified, then \"targetId\", \"params\", and \"resource\" elements will be ignored as \"url\" element will have everything needed for constructing the request url. If \"params\" element is specified, then \"targetId\" element is ignored. For FHIR operations that require a resource (e.g. \"read\" and \"vread\" operations), the \"resource\" element must be specified when \"params\" element is specified. If \"url\" and \"params\" elements are absent, then the request url will be constructed from \"targetId\" fixture if present. For \"read\" operation, the resource and id values will be extracted from \"targetId\" fixture and used to construct the url. For \"vread\" and \"history\" operations, the versionId value will also be used.",
"definition": "The type of the resource. See http://hl7-fhir.github.io/resourcelist.html."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.operation.label",
"type": [ {
"code": "string"
} ],
"short": "Tracking/logging operation label",
"comments": "This has no impact on the verification itself.",
"definition": "The label would be used for tracking/logging purposes by test engines."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.operation.description",
"type": [ {
"code": "string"
} ],
"short": "Tracking/reporting operation description",
"comments": "This has no impact on the verification itself.",
"definition": "The description would be used by test engines for tracking and reporting purposes."
}, {
"path": "TestScript.setup.action.operation.accept",
"min": 0,
"definition": "The content-type or mime-type to use for RESTful operation in the 'Accept' header.",
"short": "xml | json",
"comments": "If this is specified, then test engine shall set the 'Accept' header to the corresponding value. If 'xml' is specified, then 'Accept' header of 'application/xml+fhir' will be set. If 'json' is specified, then 'application/json+fhir' will be used. If you'd like to explicitly set the 'Accept' to some other value then use the 'requestHeader' element.",
"type": [ {
"code": "code"
} ],
"meaningWhenMissing": "xml",
"binding": {
"strength": "required",
"description": "The content or mime type.",
"valueSetReference": {
"reference": "http://hl7.org/fhir/ValueSet/content-type"
}
},
"max": "1"
}, {
"path": "TestScript.setup.action.operation.contentType",
"min": 0,
"definition": "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.",
"short": "xml | json",
"comments": "If this is specified, then test engine shall set the 'Content-Type' header to the corresponding value. If 'xml' is specified, then 'Content-Type' header of 'application/xml+fhir' will be set. If 'json' is specified, then 'application/json+fhir' will be used. If you'd like to explicitly set the 'Content-Type' to some other value then use the 'requestHeader' element.",
"type": [ {
"code": "code"
} ],
"meaningWhenMissing": "xml",
"binding": {
"strength": "required",
"description": "The content or mime type.",
"valueSetReference": {
"reference": "http://hl7.org/fhir/ValueSet/content-type"
}
},
"max": "1"
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.operation.destination",
"type": [ {
"code": "integer"
} ],
"short": "Which server to perform the operation on",
"definition": "Which server to perform the operation on.",
"defaultValueInteger": 0
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.operation.encodeRequestUrl",
"type": [ {
"code": "boolean"
} ],
"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.",
"defaultValueBoolean": true
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.operation.params",
"type": [ {
"code": "string"
} ],
"short": "Explicitly defined path parameters",
"comments": "If \"url\" element is specified, then \"targetId\", \"params\", and \"resource\" elements will be ignored as \"url\" element will have everything needed for constructing the request url. If \"params\" element is specified, then \"targetId\" element is ignored. For FHIR operations that require a resource (e.g. \"read\" and \"vread\" operations), the \"resource\" element must be specified when \"params\" element is specified. If \"url\" and \"params\" elements are absent, then the request url will be constructed from \"targetId\" fixture if present. For \"read\" operation, the resource and id values will be extracted from \"targetId\" fixture and used to construct the url. For \"vread\" and \"history\" operations, the versionId value will also be used. Test engines would append whatever is specified for \"params\" to the URL after the resource type without tampering with the string (beyond encoding the URL for HTTP). The \"params\" element does not correspond exactly to \"search parameters\". Nor is it the \"path\". It corresponds to the part of the URL that comes after the [type] (when \"resource\" element is specified); e.g. It corresponds to \"/[id]/_history/[vid] {?_format=[mime-type]}\" in the following operation: GET [base]/[type]/[id]/_history/[vid] {?_format=[mime-type]} Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request.",
"definition": "Path plus parameters after [type]. Used to set parts of the request URL explicitly."
}, {
"max": "*",
"min": 0,
"path": "TestScript.setup.action.operation.requestHeader",
"type": [ {
"code": "BackboneElement"
} ],
"short": "Each operation can have one ore more header elements",
"comments": "This gives control to test-script writers to set headers explicitly based on test requirements. It will allow for testing using: - \"If-Modified-Since\" and \"If-None-Match\" headers. See http://hl7-fhir.github.io/http.html#2.1.0.5.1 - \"If-Match\" header. See http://hl7-fhir.github.io/http.html#2.1.0.11 - Conditional Create using \"If-None-Exist\". See http://hl7-fhir.github.io/http.html#2.1.0.13.1 - Invalid \"Content-Type\" header for negative testing. - etc.",
"definition": "Header elements would be used to set HTTP headers."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.operation.requestHeader.id",
"type": [ {
"code": "id"
} ],
"short": "xml:id (or equivalent in JSON)",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"definition": "unique id for the element within a resource (for internal references).",
"representation": [ "xmlAttr" ]
}, {
"path": "TestScript.setup.action.operation.requestHeader.extension",
"min": 0,
"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.",
"short": "Additional Content defined by implementations",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content" ],
"max": "*"
}, {
"path": "TestScript.setup.action.operation.requestHeader.modifierExtension",
"min": 0,
"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.",
"isModifier": true,
"short": "Extensions that cannot be ignored",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "N/A",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content", "modifiers" ],
"max": "*"
}, {
"max": "1",
"min": 1,
"path": "TestScript.setup.action.operation.requestHeader.field",
"type": [ {
"code": "string"
} ],
"short": "HTTP header field name",
"comments": "If header element is specified, then field is required.",
"definition": "The HTTP header field e.g. \"Accept\"."
}, {
"max": "1",
"min": 1,
"path": "TestScript.setup.action.operation.requestHeader.value",
"type": [ {
"code": "string"
} ],
"short": "HTTP headerfield value",
"comments": "If header element is specified, then value is required. No conversions will be done by Test Engine e.g. \"xml\" to \"application/xml+fhir\". The values will be set in HTTP headers \"as-is\". Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request.",
"definition": "The value of the header e.g. \"application/xml\"."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.operation.responseId",
"type": [ {
"code": "id"
} ],
"short": "Fixture Id of mapped response",
"comments": "If a responseId is supplied, and the server responds, then the resulting response (both headers and body) is mapped to the fixture ID (which may be entirely new and previously undeclared) designated by \"responseId\". If responseId is not specified, it is the Test Engine's responsibility to store the response and use it as sourceId in subsequent assertions when assertion path and/or headerField is specified and sourceId is not specified.",
"definition": "The fixture id (maybe new) to map to the response."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.operation.sourceId",
"type": [ {
"code": "id"
} ],
"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."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.operation.targetId",
"type": [ {
"code": "id"
} ],
"short": "Id of fixture used for extracting the [id], [type], and [vid] for GET requests",
"comments": "If \"url\" element is specified, then \"targetId\", \"params\", and \"resource\" elements will be ignored as \"url\" element will have everything needed for constructing the request url. If \"params\" element is specified, then \"targetId\" element is ignored. For FHIR operations that require a resource (e.g. \"read\" and \"vread\" operations), the \"resource\" element must be specified when \"params\" element is specified. If \"url\" and \"params\" elements are absent, then the request url will be constructed from \"targetId\" fixture if present. For \"read\" operation, the resource and id values will be extracted from \"targetId\" fixture and used to construct the url. For \"vread\" and \"history\" operations, the versionId value will also be used.",
"definition": "Id of fixture used for extracting the [id], [type], and [vid] for GET requests."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.operation.url",
"type": [ {
"code": "string"
} ],
"short": "Request URL",
"comments": "Used to set the request URL explicitly. If \"url\" element is defined, then \"targetId\", \"resource\", and \"params\" elements will be ignored. Test engines would use whatever is specified in \"url\" without tampering with the string (beyond encoding the URL for HTTP). Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request.",
"definition": "Complete request URL."
}, {
"constraint": [ {
"key": "inv-13",
"human": "Setup action assert shall contain both compareToSourceId and compareToSourcePath or neither.",
"xpath": "(f:compareToSourceId and f:compareToSourcePath) or not(f:compareToSourceId or f:compareToSourcePath)",
"severity": "error"
}, {
"key": "inv-8",
"human": "Only a single assertion SHALL be present within setup action assert element.",
"xpath": "count(f:contentType) + count(f:headerField) + count(f:minimumId) + count(f:navigationLinks) + count(f:path) + count(f:resource) + count(f:responseCode) + count(f:response) + count(f:validateProfileId) <=1",
"severity": "error"
} ],
"path": "TestScript.setup.action.assert",
"min": 0,
"definition": "Evaluates the results of previous operations to determine if the server under test behaves appropriately.",
"short": "The assertion to perform",
"name": "assert",
"comments": "In order to evaluate an assertion, the request, response, and results of the most recently executed operation must always be maintained by the test engine.",
"type": [ {
"code": "BackboneElement"
} ],
"max": "1"
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.id",
"type": [ {
"code": "id"
} ],
"short": "xml:id (or equivalent in JSON)",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"definition": "unique id for the element within a resource (for internal references).",
"representation": [ "xmlAttr" ]
}, {
"path": "TestScript.setup.action.assert.extension",
"min": 0,
"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.",
"short": "Additional Content defined by implementations",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content" ],
"max": "*"
}, {
"path": "TestScript.setup.action.assert.modifierExtension",
"min": 0,
"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.",
"isModifier": true,
"short": "Extensions that cannot be ignored",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "N/A",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content", "modifiers" ],
"max": "*"
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.label",
"type": [ {
"code": "string"
} ],
"short": "Tracking/logging assertion label",
"comments": "This has no impact on the verification itself.",
"definition": "The label would be used for tracking/logging purposes by test engines."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.description",
"type": [ {
"code": "string"
} ],
"short": "Tracking/reporting assertion description",
"comments": "This has no impact on the verification itself.",
"definition": "The description would be used by test engines for tracking and reporting purposes."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.direction",
"type": [ {
"code": "code"
} ],
"short": "response | request",
"binding": {
"strength": "required",
"description": "The type of direction to use for assertion.",
"valueSetReference": {
"reference": "http://hl7.org/fhir/ValueSet/assert-direction-codes"
}
},
"definition": "The direction to use for the assertion."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.compareToSourceId",
"type": [ {
"code": "string"
} ],
"short": "Id of fixture used to compare the \"sourceId/path\" evaluations to",
"comments": "The id of the fixture used to make comparisons to.",
"definition": "Id of fixture used to compare the \"sourceId/path\" evaluations to."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.compareToSourcePath",
"type": [ {
"code": "string"
} ],
"short": "XPath or JSONPath expression against fixture used to compare the \"sourceId/path\" evaluations to",
"comments": "The XPath or JSONPath expression to be evaluated against the expected fixture to compare to. Ignored if \"assert.value\" is used. The evaluation will be done before the assertion is evaluated.",
"definition": "XPath or JSONPath expression against fixture used to compare the \"sourceId/path\" evaluations to."
}, {
"path": "TestScript.setup.action.assert.contentType",
"min": 0,
"definition": "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.",
"short": "xml | json",
"comments": "If this is specified, then test engine shall confirm that the content-type of the last operation's headers is set to this value. If \"assert.sourceId\" element is specified, then the evaluation will be done against the headers mapped to that sourceId (and not the last operation's headers). If 'xml' is specified, then 'Content-Type' header of 'application/xml+fhir' will be confirmed. If 'json' is specified, then 'application/json+fhir' will be used. If you'd like to have more control over the string, then use 'assert.headerField' instead.",
"type": [ {
"code": "code"
} ],
"meaningWhenMissing": "xml",
"binding": {
"strength": "required",
"description": "The content or mime type.",
"valueSetReference": {
"reference": "http://hl7.org/fhir/ValueSet/content-type"
}
},
"max": "1"
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.headerField",
"type": [ {
"code": "string"
} ],
"short": "HTTP header field name",
"comments": "If \"headerField\" is specified then \"value\" must be specified. If \"sourceId\" is not specified, then \"headerField\" will be evaluated against the last operation's response headers. Test engines are to keep track of the last operation's response body and response headers.",
"definition": "The HTTP header field name e.g. 'Location'."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.minimumId",
"type": [ {
"code": "string"
} ],
"short": "Fixture Id of minimum content resource",
"comments": "Asserts that the response contains all the element/content in another fixture pointed to by minimumId. This can be a statically defined fixture or one that is dynamically set via responseId.",
"definition": "The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.navigationLinks",
"type": [ {
"code": "boolean"
} ],
"short": "Perform validation on navigation links?",
"comments": "Asserts that the Bundle contains first, last, and next links.",
"definition": "Whether or not the test execution performs validation on the bundle navigation links."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.operator",
"type": [ {
"code": "code"
} ],
"short": "equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains",
"binding": {
"strength": "required",
"description": "The type of operator to use for assertion.",
"valueSetReference": {
"reference": "http://hl7.org/fhir/ValueSet/assert-operator-codes"
}
},
"comments": "Operators come handy especially for negative testing. If operator is not specified, then the \"equals\" operator is assumed; e.g. ,201,204\" /> .",
"definition": "The operator type."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.path",
"type": [ {
"code": "string"
} ],
"short": "XPath or JSONPath expression",
"comments": "If both \"path\" and \"fixtureId\" are specified, then the path will be evaluated against the responseBody mapped to the fixtureId. If \"path\" is specified and \"fixtureId\" is not, then the path will be evaluated against the responseBody of the last operation. Test engines are to store the response body and headers of the last operation at all times for subsequent assertions.",
"definition": "The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.resource",
"type": [ {
"code": "code"
} ],
"short": "Resource type",
"binding": {
"strength": "required",
"description": "Either a resource or a data type.",
"valueSetReference": {
"reference": "http://hl7.org/fhir/ValueSet/defined-types"
}
},
"comments": "This will be expected resource type in response body e.g. in read, vread, search, etc. See http://hl7-fhir.github.io/resourcelist.html for complete list of resource types; e.g. .",
"definition": "The type of the resource. See http://hl7-fhir.github.io/resourcelist.html."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.response",
"type": [ {
"code": "code"
} ],
"short": "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable",
"binding": {
"strength": "required",
"description": "The type of response code to use for assertion.",
"valueSetReference": {
"reference": "http://hl7.org/fhir/ValueSet/assert-response-code-types"
}
},
"comments": "This is a shorter way of achieving similar verifications via \"assert.responseCode\". If you need more control, then use \"assert.responseCode\" e.g. .",
"definition": "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.responseCode",
"type": [ {
"code": "string"
} ],
"short": "HTTP response code to test",
"comments": "To be used with \"operator\" attribute value. Asserts that the response code equals this value if \"operator\" is not specified. If the operator is \"in\" or \"notIn\" then the responseCode would be a comma-separated list of values e.g. \"200,201\". Otherwise, it's expected to be a numeric value. If \"fixture\" is not specified, then the \"responseBodyId\" value of the last operation is assumed.",
"definition": "The value of the HTTP response code to be tested."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.sourceId",
"type": [ {
"code": "id"
} ],
"short": "Fixture Id of source expression or headerField",
"comments": "This can be a statically defined fixture (at the top of the testscript) or a dynamically set fixture created by responseId of the action.operation element.",
"definition": "Fixture to evaluate the XPath/JSONPath expression or the headerField against."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.validateProfileId",
"type": [ {
"code": "id"
} ],
"short": "Profile Id of validation profile reference",
"comments": "The ID of a Profile fixture. Asserts that the response is valid according to the Profile specified by validateProfileId.",
"definition": "The ID of the Profile to validate against."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.value",
"type": [ {
"code": "string"
} ],
"short": "The value to compare to",
"comments": "The string-representation of a number, string, or boolean that is expected. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before comparing this value to the actual value.",
"definition": "The value to compare to."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.warningOnly",
"type": [ {
"code": "boolean"
} ],
"short": "Will this assert produce a warning only on error?",
"comments": "If this element is specified and it is true, then assertion failures can be logged by test engine but should not stop the test script execution from proceeding. There are likely cases where the spec is not clear on what should happen. If the spec says something is optional (maybe a response header for example), but a server doesn’t do it, we could choose to issue a warning.",
"definition": "Whether or not the test execution will produce a warning only on error for this assert.",
"defaultValueBoolean": false
}, {
"max": "*",
"min": 0,
"path": "TestScript.test",
"type": [ {
"code": "BackboneElement"
} ],
"short": "A test in this script",
"definition": "A test in this script."
}, {
"max": "1",
"min": 0,
"path": "TestScript.test.id",
"type": [ {
"code": "id"
} ],
"short": "xml:id (or equivalent in JSON)",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"definition": "unique id for the element within a resource (for internal references).",
"representation": [ "xmlAttr" ]
}, {
"path": "TestScript.test.extension",
"min": 0,
"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.",
"short": "Additional Content defined by implementations",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content" ],
"max": "*"
}, {
"path": "TestScript.test.modifierExtension",
"min": 0,
"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.",
"isModifier": true,
"short": "Extensions that cannot be ignored",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "N/A",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content", "modifiers" ],
"max": "*"
}, {
"max": "1",
"min": 0,
"path": "TestScript.test.name",
"type": [ {
"code": "string"
} ],
"short": "Tracking/logging name of this test",
"definition": "The name of this test used for tracking/logging purposes by test engines."
}, {
"max": "1",
"min": 0,
"path": "TestScript.test.description",
"type": [ {
"code": "string"
} ],
"short": "Tracking/reporting short description of the test",
"definition": "A short description of the test used by test engines for tracking and reporting purposes."
}, {
"max": "1",
"min": 0,
"path": "TestScript.test.metadata",
"short": "Capabilities that are expected to function correctly on the FHIR server being tested",
"constraint": [ {
"key": "inv-7",
"human": "Test metadata capability SHALL contain required or validated or both.",
"xpath": "f:capability/f:required or f:capability/f:validated or (f:capability/f:required and f:capability/f:validated)",
"severity": "error"
} ],
"definition": "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.",
"nameReference": "metadata"
}, {
"max": "*",
"min": 1,
"path": "TestScript.test.action",
"type": [ {
"code": "BackboneElement"
} ],
"short": "A test operation or assert to perform",
"comments": "An action should contain either an operation or an assertion but not both. It can contain any number of variables.",
"constraint": [ {
"key": "inv-2",
"human": "Test action SHALL contain either an operation or assert but not both.",
"xpath": "(f:operation or f:assert) and not(f:operation and f:assert)",
"severity": "error"
} ],
"definition": "Action would contain either an operation or an assertion."
}, {
"max": "1",
"min": 0,
"path": "TestScript.test.action.id",
"type": [ {
"code": "id"
} ],
"short": "xml:id (or equivalent in JSON)",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"definition": "unique id for the element within a resource (for internal references).",
"representation": [ "xmlAttr" ]
}, {
"path": "TestScript.test.action.extension",
"min": 0,
"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.",
"short": "Additional Content defined by implementations",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content" ],
"max": "*"
}, {
"path": "TestScript.test.action.modifierExtension",
"min": 0,
"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.",
"isModifier": true,
"short": "Extensions that cannot be ignored",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "N/A",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content", "modifiers" ],
"max": "*"
}, {
"max": "1",
"min": 0,
"path": "TestScript.test.action.operation",
"short": "The setup operation to perform",
"constraint": [ {
"key": "inv-11",
"human": "Test operation SHALL contain either sourceId or targetId or params or url.",
"xpath": "f:sourceId or (f:targetId or f:url or f:params) and (count(f:targetId) + count(f:url) + count(f:params) =1) or (f:type/f:code/@value='conformance' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')",
"severity": "error"
} ],
"definition": "An operation would involve a REST request to a server.",
"nameReference": "operation"
}, {
"max": "1",
"min": 0,
"path": "TestScript.test.action.assert",
"short": "The setup assertion to perform",
"comments": "In order to evaluate an assertion, the request, response, and results of the most recently executed operation must always be maintained by the test engine.",
"constraint": [ {
"key": "inv-14",
"human": "Test action assert shall contain both compareToSourceId and compareToSourcePath or neither.",
"xpath": "(f:compareToSourceId and f:compareToSourcePath) or not(f:compareToSourceId or f:compareToSourcePath)",
"severity": "error"
}, {
"key": "inv-9",
"human": "Only a single assertion SHALL be present within test action assert element.",
"xpath": "count(f:contentType) + count(f:headerField) + count(f:minimumId) + count(f:navigationLinks) + count(f:path) + count(f:resource) + count(f:responseCode) + count(f:response) + count(f:validateProfileId) <=1",
"severity": "error"
} ],
"definition": "Evaluates the results of previous operations to determine if the server under test behaves appropriately.",
"nameReference": "assert"
}, {
"max": "1",
"min": 0,
"path": "TestScript.teardown",
"type": [ {
"code": "BackboneElement"
} ],
"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)."
}, {
"max": "1",
"min": 0,
"path": "TestScript.teardown.id",
"type": [ {
"code": "id"
} ],
"short": "xml:id (or equivalent in JSON)",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"definition": "unique id for the element within a resource (for internal references).",
"representation": [ "xmlAttr" ]
}, {
"path": "TestScript.teardown.extension",
"min": 0,
"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.",
"short": "Additional Content defined by implementations",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content" ],
"max": "*"
}, {
"path": "TestScript.teardown.modifierExtension",
"min": 0,
"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.",
"isModifier": true,
"short": "Extensions that cannot be ignored",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "N/A",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content", "modifiers" ],
"max": "*"
}, {
"max": "*",
"min": 1,
"path": "TestScript.teardown.action",
"type": [ {
"code": "BackboneElement"
} ],
"short": "One or more teardown operations to perform",
"comments": "An action should contain either an operation or an assertion but not both. It can contain any number of variables.",
"constraint": [ {
"key": "inv-3",
"human": "Teardown action SHALL contain an operation.",
"xpath": "f:operation",
"severity": "error"
} ],
"definition": "The teardown action will only contain an operation."
}, {
"max": "1",
"min": 0,
"path": "TestScript.teardown.action.id",
"type": [ {
"code": "id"
} ],
"short": "xml:id (or equivalent in JSON)",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"definition": "unique id for the element within a resource (for internal references).",
"representation": [ "xmlAttr" ]
}, {
"path": "TestScript.teardown.action.extension",
"min": 0,
"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.",
"short": "Additional Content defined by implementations",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content" ],
"max": "*"
}, {
"path": "TestScript.teardown.action.modifierExtension",
"min": 0,
"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.",
"isModifier": true,
"short": "Extensions that cannot be ignored",
"comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
"mapping": [ {
"map": "N/A",
"identity": "rim"
} ],
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content", "modifiers" ],
"max": "*"
}, {
"max": "1",
"min": 0,
"path": "TestScript.teardown.action.operation",
"short": "The teardown operation to perform",
"constraint": [ {
"key": "inv-12",
"human": "Teardown operation SHALL contain either sourceId or targetId or params or url.",
"xpath": "f:sourceId or (f:targetId or f:url or (f:params and f:resource)) and (count(f:targetId) + count(f:url) + count(f:params) =1) or (f:type/f:code/@value='conformance' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')",
"severity": "error"
} ],
"definition": "An operation would involve a REST request to a server.",
"nameReference": "operation"
} ]
},
"status": "draft",
"id": "59823870-4786-45af-8b7c-aa0aaccf0240",
"kind": "resource",
"url": "http://hl7.org/fhir/StructureDefinition/TestScript",
"base": "http://hl7.org/fhir/StructureDefinition/DomainResource",
"version": null,
"differential": {
"element": [ {
"max": "*",
"min": 0,
"path": "TestScript",
"type": [ {
"code": "DomainResource"
} ],
"short": "Describes a set of tests",
"mapping": [ {
"map": "conformance.misc",
"identity": "w5"
} ],
"definition": "TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification."
}, {
"path": "TestScript.url",
"min": 1,
"definition": "An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published.",
"short": "Absolute URL used to reference this TestScript",
"mapping": [ {
"map": "id",
"identity": "w5"
} ],
"type": [ {
"code": "uri"
} ],
"alias": [ "url", "authoritative-url", "destination", "identity" ],
"max": "1",
"isSummary": true
}, {
"path": "TestScript.version",
"requirements": "There may be multiple resource versions of the TestScript that have this same identifier. The resource version id will change for technical reasons, whereas the stated version number needs to be under the author's control.",
"min": 0,
"definition": "The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually.",
"short": "Logical id for this version of the TestScript",
"mapping": [ {
"map": "id.version",
"identity": "w5"
} ],
"type": [ {
"code": "string"
} ],
"max": "1",
"isSummary": true
}, {
"max": "1",
"min": 1,
"path": "TestScript.name",
"type": [ {
"code": "string"
} ],
"short": "Informal name for this TestScript",
"comments": "Not expected to be globally unique.",
"isSummary": true,
"definition": "A free text natural language name identifying the TestScript."
}, {
"path": "TestScript.status",
"requirements": "Allows filtering of TestScripts that are appropriate for use vs. not.",
"min": 1,
"definition": "The status of the TestScript.",
"isModifier": true,
"short": "draft | active | retired",
"mapping": [ {
"map": "status",
"identity": "w5"
} ],
"type": [ {
"code": "code"
} ],
"binding": {
"strength": "required",
"description": "The lifecycle status of a Value Set or Concept Map.",
"valueSetReference": {
"reference": "http://hl7.org/fhir/ValueSet/conformance-resource-status"
}
},
"max": "1",
"isSummary": true
}, {
"max": "1",
"min": 0,
"path": "TestScript.identifier",
"type": [ {
"code": "Identifier"
} ],
"short": "External identifier",
"mapping": [ {
"map": "id",
"identity": "w5"
} ],
"isSummary": true,
"definition": "Identifier for the TestScript assigned for external purposes outside the context of FHIR."
}, {
"path": "TestScript.experimental",
"requirements": "Allows filtering of TestScripts that are appropriate for use vs. not.",
"min": 0,
"definition": "This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.",
"short": "If for testing purposes, not real usage",
"mapping": [ {
"map": "class",
"identity": "w5"
} ],
"type": [ {
"code": "boolean"
} ],
"max": "1",
"isSummary": true
}, {
"path": "TestScript.publisher",
"requirements": "Helps establish the \"authority/credibility\" of the Test Script. May also allow for contact.",
"min": 0,
"definition": "The name of the individual or organization that published the Test Script.",
"short": "Name of the publisher (Organization or individual)",
"comments": "Usually an organization, but may be an individual. This item SHOULD be populated unless the information is available from context.",
"mapping": [ {
"map": "who.witness",
"identity": "w5"
} ],
"type": [ {
"code": "string"
} ],
"max": "1",
"isSummary": true
}, {
"max": "*",
"min": 0,
"path": "TestScript.contact",
"type": [ {
"code": "BackboneElement"
} ],
"short": "Contact details of the publisher",
"comments": "May be a web site, an email address, a telephone number (tel:), etc.",
"isSummary": true,
"definition": "Contacts to assist a user in finding and communicating with the publisher."
}, {
"max": "1",
"min": 0,
"path": "TestScript.contact.name",
"type": [ {
"code": "string"
} ],
"short": "Name of a individual to contact",
"comments": "If there is no named individual, the telecom is for the organization as a whole.",
"isSummary": true,
"definition": "The name of an individual to contact regarding the Test Script."
}, {
"max": "*",
"min": 0,
"path": "TestScript.contact.telecom",
"type": [ {
"code": "ContactPoint"
} ],
"short": "Contact details for individual or publisher",
"isSummary": true,
"definition": "Contact details for individual (if a name was provided) or the publisher."
}, {
"path": "TestScript.date",
"min": 0,
"definition": "The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change.",
"short": "Date for this version of the TestScript",
"comments": "Additional specific dates may be added as extensions.",
"mapping": [ {
"map": "when.recorded",
"identity": "w5"
} ],
"type": [ {
"code": "dateTime"
} ],
"max": "1",
"isSummary": true
}, {
"max": "1",
"min": 0,
"path": "TestScript.description",
"type": [ {
"code": "string"
} ],
"short": "Natural language description of the TestScript",
"comments": "This field can be used for things such as why the TestScript was written, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is *not* a rendering of the TestScript as conveyed in TestScript.text. This item SHOULD be populated unless the information is available from context.",
"isSummary": true,
"definition": "A free text natural language description of the TestScript and its use."
}, {
"path": "TestScript.useContext",
"requirements": "Assist in searching for appropriate content.",
"min": 0,
"definition": "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of Test Scripts.",
"short": "Content intends to support these contexts",
"type": [ {
"code": "CodeableConcept"
} ],
"binding": {
"strength": "extensible",
"description": "Indicates the countries, regions, disciplines and other aspects of use within which this artifact is targeted for use.",
"valueSetReference": {
"reference": "http://hl7.org/fhir/ValueSet/use-context"
}
},
"max": "*",
"isSummary": true
}, {
"max": "1",
"min": 0,
"path": "TestScript.requirements",
"type": [ {
"code": "string"
} ],
"short": "Scope and Usage this Test Script is for",
"mapping": [ {
"map": "why",
"identity": "w5"
} ],
"comments": "This element does not describe the usage of the Test Script (that's done in comments), rather it's for traceability of *why* the element is either needed or why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this data element.",
"definition": "Explains why this Test Script is needed and why it's been constrained as it has."
}, {
"max": "1",
"min": 0,
"path": "TestScript.copyright",
"type": [ {
"code": "string"
} ],
"alias": [ "License", "Restrictions" ],
"short": "Use and/or publishing restrictions",
"definition": "A copyright statement relating to the Test Script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings."
}, {
"max": "1",
"min": 0,
"name": "metadata",
"path": "TestScript.metadata",
"type": [ {
"code": "BackboneElement"
} ],
"short": "Required capability that is assumed to function correctly on the FHIR server being tested",
"constraint": [ {
"key": "inv-5",
"human": "TestScript metadata capability SHALL contain required or validated or both.",
"xpath": "f:capability/f:required or f:capability/f:validated or (f:capability/f:required and f:capability/f:validated)",
"severity": "error"
} ],
"definition": "The required capability must exist and are assumed to function correctly on the FHIR server being tested."
}, {
"max": "*",
"min": 0,
"path": "TestScript.metadata.link",
"type": [ {
"code": "BackboneElement"
} ],
"short": "Links to the FHIR specification",
"definition": "A link to the FHIR specification that this test is covering."
}, {
"max": "1",
"min": 1,
"path": "TestScript.metadata.link.url",
"type": [ {
"code": "uri"
} ],
"short": "URL to the specification",
"definition": "URL to a particular requirement or feature within the FHIR specification."
}, {
"max": "1",
"min": 0,
"path": "TestScript.metadata.link.description",
"type": [ {
"code": "string"
} ],
"short": "Short description",
"definition": "Short description of the link."
}, {
"max": "*",
"min": 1,
"path": "TestScript.metadata.capability",
"type": [ {
"code": "BackboneElement"
} ],
"short": "Capabilities that are assumed to function correctly on the FHIR server being tested",
"comments": "When the metadata capabilities section is defined at TestScript.metadata or at TestScript.setup.metadata, and the server's conformance statement does not contain the elements defined in the minimal conformance statement, then all the tests in the TestScript are skipped. When the metadata capabilities section is defined at TestScript.test.metadata and the server's conformance statement does not contain the elements defined in the minimal conformance statement, then only that test is skipped. The \"metadata.capabilities.required\" and \"metadata.capabilities.validated\" elements only indicate whether the capabilities are the primary focus of the test script or not. The do not impact the skipping logic. Capabilities whose \"metadata.capabilities.validated\" flag is true are the primary focus of the test script.",
"definition": "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested."
}, {
"max": "1",
"min": 0,
"path": "TestScript.metadata.capability.required",
"type": [ {
"code": "boolean"
} ],
"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.",
"defaultValueBoolean": false
}, {
"max": "1",
"min": 0,
"path": "TestScript.metadata.capability.validated",
"type": [ {
"code": "boolean"
} ],
"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.",
"defaultValueBoolean": false
}, {
"max": "1",
"min": 0,
"path": "TestScript.metadata.capability.description",
"type": [ {
"code": "string"
} ],
"short": "The expected capabilities of the server",
"definition": "Description of the capabilities that this test script is requiring the server to support."
}, {
"max": "1",
"min": 0,
"path": "TestScript.metadata.capability.destination",
"type": [ {
"code": "integer"
} ],
"short": "Which server these requirements apply to",
"definition": "Which server these requirements apply to."
}, {
"max": "*",
"min": 0,
"path": "TestScript.metadata.capability.link",
"type": [ {
"code": "uri"
} ],
"short": "Links to the FHIR specification",
"definition": "Links to the FHIR specification that describes this interaction and the resources involved in more detail."
}, {
"max": "1",
"min": 1,
"path": "TestScript.metadata.capability.conformance",
"type": [ {
"code": "Reference",
"profile": [ "http://hl7.org/fhir/StructureDefinition/Conformance" ]
} ],
"short": "Required Conformance",
"comments": "The conformance statement of the server has to contain at a minimum the contents of the reference pointed to by this element.",
"definition": "Minimum conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped."
}, {
"max": "1",
"min": 0,
"path": "TestScript.multiserver",
"type": [ {
"code": "boolean"
} ],
"short": "Whether or not the tests apply to more than one FHIR server",
"definition": "If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified.",
"meaningWhenMissing": "False"
}, {
"max": "*",
"min": 0,
"path": "TestScript.fixture",
"type": [ {
"code": "BackboneElement"
} ],
"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."
}, {
"max": "1",
"min": 0,
"path": "TestScript.fixture.autocreate",
"type": [ {
"code": "boolean"
} ],
"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.",
"meaningWhenMissing": "False"
}, {
"max": "1",
"min": 0,
"path": "TestScript.fixture.autodelete",
"type": [ {
"code": "boolean"
} ],
"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.",
"meaningWhenMissing": "False"
}, {
"max": "1",
"min": 0,
"path": "TestScript.fixture.resource",
"type": [ {
"code": "Reference",
"profile": [ "http://hl7.org/fhir/StructureDefinition/Resource" ]
} ],
"short": "Reference of the resource",
"comments": "See http://hl7-fhir.github.io/resourcelist.html for complete list of resource types.",
"definition": "Reference to the resource (containing the contents of the resource needed for operations)."
}, {
"max": "*",
"min": 0,
"path": "TestScript.profile",
"type": [ {
"code": "Reference",
"profile": [ "http://hl7.org/fhir/StructureDefinition/Resource" ]
} ],
"short": "Reference of the validation profile",
"comments": "See http://hl7-fhir.github.io/resourcelist.html for complete list of resource types.",
"definition": "Reference to the profile to be used for validation."
}, {
"max": "*",
"min": 0,
"path": "TestScript.variable",
"type": [ {
"code": "BackboneElement"
} ],
"short": "Placeholder for evaluated elements",
"comments": "Variables would be set based either on XPath/JsonPath expressions against fixtures (static and response), or headerField evaluations against response headers. If variable evaluates to nodelist or anything other than a primitive value, then test engine would report error. Variables would be used to perform clean replacements in \"operation.params\", \"operation.requestHeader.value\", and \"operation.url\" element values during operation calls and in \"assert.value\" during assertion evaluations. This limits the places that test engines would need to look for placeholders \"${}\". Variables are scoped to the whole script. They are NOT evaluated at declaration. They are evaluated by test engine when used for substitutions in \"operation.params\", \"operation.requestHeader.value\", and \"operation.url\" element values during operation calls and in \"assert.value\" during assertion evaluations. See example testscript-search.xml.",
"constraint": [ {
"key": "inv-4",
"human": "Variable cannot contain both headerField and path.",
"xpath": "not(f:headerField and f:path)",
"severity": "error"
} ],
"definition": "Variable is set based either on element value in response body or on header field value in the response headers."
}, {
"max": "1",
"min": 1,
"path": "TestScript.variable.name",
"type": [ {
"code": "string"
} ],
"short": "Descriptive name for this variable",
"comments": "Placeholders would contain the variable name wrapped in ${} in \"operation.params\", \"operation.requestHeader.value\", and \"operation.url\" elements. These placeholders would need to be replaced by the variable value before the operation is executed.",
"definition": "Descriptive name for this variable."
}, {
"max": "1",
"min": 0,
"path": "TestScript.variable.headerField",
"type": [ {
"code": "string"
} ],
"short": "HTTP header field name for source",
"comments": "If headerField is defined, then the variable will be evaluated against the headers that sourceId is pointing to. If path is defined, then the variable will be evaluated against the fixture body that sourceId is pointing to. It is an error to define both headerField and path.",
"definition": "Will be used to grab the HTTP header field value from the headers that sourceId is pointing to."
}, {
"max": "1",
"min": 0,
"path": "TestScript.variable.path",
"type": [ {
"code": "string"
} ],
"short": "XPath or JSONPath against the fixture body",
"comments": "If headerField is defined, then the variable will be evaluated against the headers that sourceId is pointing to. If path is defined, then the variable will be evaluated against the fixture body that sourceId is pointing to. It is an error to define both headerField and path.",
"definition": "XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both."
}, {
"max": "1",
"min": 0,
"path": "TestScript.variable.sourceId",
"type": [ {
"code": "id"
} ],
"short": "Fixture Id of source expression or headerField within this variable",
"comments": "This can be a statically defined fixture (at the top of the testscript) or a dynamically set fixture created by responseId of the action.operation element.",
"definition": "Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup",
"type": [ {
"code": "BackboneElement"
} ],
"short": "A series of required setup operations before tests are executed",
"definition": "A series of required setup operations before tests are executed."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.metadata",
"short": "Capabilities that are assumed to function correctly on the FHIR server being tested",
"constraint": [ {
"key": "inv-6",
"human": "Setup metadata capability SHALL contain required or validated or both.",
"xpath": "f:capability/f:required or f:capability/f:validated or (f:capability/f:required and f:capability/f:validated)",
"severity": "error"
} ],
"definition": "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.",
"nameReference": "metadata"
}, {
"max": "*",
"min": 1,
"path": "TestScript.setup.action",
"type": [ {
"code": "BackboneElement"
} ],
"short": "A setup operation or assert to perform",
"comments": "An action should contain either an operation or an assertion but not both. It can contain any number of variables.",
"constraint": [ {
"key": "inv-1",
"human": "Setup action SHALL contain either an operation or assert but not both.",
"xpath": "(f:operation or f:assert) and not(f:operation and f:assert)",
"severity": "error"
} ],
"definition": "Action would contain either an operation or an assertion."
}, {
"max": "1",
"min": 0,
"name": "operation",
"path": "TestScript.setup.action.operation",
"type": [ {
"code": "BackboneElement"
} ],
"short": "The setup operation to perform",
"constraint": [ {
"key": "inv-10",
"human": "Setup operation SHALL contain either sourceId or targetId or params or url.",
"xpath": "f:sourceId or ((f:targetId or f:url or f:params) and (count(f:targetId) + count(f:url) + count(f:params) =1)) or (f:type/f:code/@value='conformance' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')",
"severity": "error"
} ],
"definition": "The operation to perform."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.operation.type",
"type": [ {
"code": "Coding"
} ],
"short": "The setup operation type that will be executed",
"binding": {
"strength": "extensible",
"description": "The allowable operation types.",
"valueSetReference": {
"reference": "http://hl7.org/fhir/ValueSet/testscript-operation-codes"
}
},
"comments": "See http://hl7-fhir.github.io/http.html for list of server interactions.",
"definition": "Server interaction or operation type."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.operation.resource",
"type": [ {
"code": "code"
} ],
"short": "Resource type",
"binding": {
"strength": "required",
"description": "Either a resource or a data type.",
"valueSetReference": {
"reference": "http://hl7.org/fhir/ValueSet/defined-types"
}
},
"comments": "If \"url\" element is specified, then \"targetId\", \"params\", and \"resource\" elements will be ignored as \"url\" element will have everything needed for constructing the request url. If \"params\" element is specified, then \"targetId\" element is ignored. For FHIR operations that require a resource (e.g. \"read\" and \"vread\" operations), the \"resource\" element must be specified when \"params\" element is specified. If \"url\" and \"params\" elements are absent, then the request url will be constructed from \"targetId\" fixture if present. For \"read\" operation, the resource and id values will be extracted from \"targetId\" fixture and used to construct the url. For \"vread\" and \"history\" operations, the versionId value will also be used.",
"definition": "The type of the resource. See http://hl7-fhir.github.io/resourcelist.html."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.operation.label",
"type": [ {
"code": "string"
} ],
"short": "Tracking/logging operation label",
"comments": "This has no impact on the verification itself.",
"definition": "The label would be used for tracking/logging purposes by test engines."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.operation.description",
"type": [ {
"code": "string"
} ],
"short": "Tracking/reporting operation description",
"comments": "This has no impact on the verification itself.",
"definition": "The description would be used by test engines for tracking and reporting purposes."
}, {
"path": "TestScript.setup.action.operation.accept",
"min": 0,
"definition": "The content-type or mime-type to use for RESTful operation in the 'Accept' header.",
"short": "xml | json",
"comments": "If this is specified, then test engine shall set the 'Accept' header to the corresponding value. If 'xml' is specified, then 'Accept' header of 'application/xml+fhir' will be set. If 'json' is specified, then 'application/json+fhir' will be used. If you'd like to explicitly set the 'Accept' to some other value then use the 'requestHeader' element.",
"type": [ {
"code": "code"
} ],
"meaningWhenMissing": "xml",
"binding": {
"strength": "required",
"description": "The content or mime type.",
"valueSetReference": {
"reference": "http://hl7.org/fhir/ValueSet/content-type"
}
},
"max": "1"
}, {
"path": "TestScript.setup.action.operation.contentType",
"min": 0,
"definition": "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.",
"short": "xml | json",
"comments": "If this is specified, then test engine shall set the 'Content-Type' header to the corresponding value. If 'xml' is specified, then 'Content-Type' header of 'application/xml+fhir' will be set. If 'json' is specified, then 'application/json+fhir' will be used. If you'd like to explicitly set the 'Content-Type' to some other value then use the 'requestHeader' element.",
"type": [ {
"code": "code"
} ],
"meaningWhenMissing": "xml",
"binding": {
"strength": "required",
"description": "The content or mime type.",
"valueSetReference": {
"reference": "http://hl7.org/fhir/ValueSet/content-type"
}
},
"max": "1"
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.operation.destination",
"type": [ {
"code": "integer"
} ],
"short": "Which server to perform the operation on",
"definition": "Which server to perform the operation on.",
"defaultValueInteger": 0
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.operation.encodeRequestUrl",
"type": [ {
"code": "boolean"
} ],
"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.",
"defaultValueBoolean": true
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.operation.params",
"type": [ {
"code": "string"
} ],
"short": "Explicitly defined path parameters",
"comments": "If \"url\" element is specified, then \"targetId\", \"params\", and \"resource\" elements will be ignored as \"url\" element will have everything needed for constructing the request url. If \"params\" element is specified, then \"targetId\" element is ignored. For FHIR operations that require a resource (e.g. \"read\" and \"vread\" operations), the \"resource\" element must be specified when \"params\" element is specified. If \"url\" and \"params\" elements are absent, then the request url will be constructed from \"targetId\" fixture if present. For \"read\" operation, the resource and id values will be extracted from \"targetId\" fixture and used to construct the url. For \"vread\" and \"history\" operations, the versionId value will also be used. Test engines would append whatever is specified for \"params\" to the URL after the resource type without tampering with the string (beyond encoding the URL for HTTP). The \"params\" element does not correspond exactly to \"search parameters\". Nor is it the \"path\". It corresponds to the part of the URL that comes after the [type] (when \"resource\" element is specified); e.g. It corresponds to \"/[id]/_history/[vid] {?_format=[mime-type]}\" in the following operation: GET [base]/[type]/[id]/_history/[vid] {?_format=[mime-type]} Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request.",
"definition": "Path plus parameters after [type]. Used to set parts of the request URL explicitly."
}, {
"max": "*",
"min": 0,
"path": "TestScript.setup.action.operation.requestHeader",
"type": [ {
"code": "BackboneElement"
} ],
"short": "Each operation can have one ore more header elements",
"comments": "This gives control to test-script writers to set headers explicitly based on test requirements. It will allow for testing using: - \"If-Modified-Since\" and \"If-None-Match\" headers. See http://hl7-fhir.github.io/http.html#2.1.0.5.1 - \"If-Match\" header. See http://hl7-fhir.github.io/http.html#2.1.0.11 - Conditional Create using \"If-None-Exist\". See http://hl7-fhir.github.io/http.html#2.1.0.13.1 - Invalid \"Content-Type\" header for negative testing. - etc.",
"definition": "Header elements would be used to set HTTP headers."
}, {
"max": "1",
"min": 1,
"path": "TestScript.setup.action.operation.requestHeader.field",
"type": [ {
"code": "string"
} ],
"short": "HTTP header field name",
"comments": "If header element is specified, then field is required.",
"definition": "The HTTP header field e.g. \"Accept\"."
}, {
"max": "1",
"min": 1,
"path": "TestScript.setup.action.operation.requestHeader.value",
"type": [ {
"code": "string"
} ],
"short": "HTTP headerfield value",
"comments": "If header element is specified, then value is required. No conversions will be done by Test Engine e.g. \"xml\" to \"application/xml+fhir\". The values will be set in HTTP headers \"as-is\". Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request.",
"definition": "The value of the header e.g. \"application/xml\"."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.operation.responseId",
"type": [ {
"code": "id"
} ],
"short": "Fixture Id of mapped response",
"comments": "If a responseId is supplied, and the server responds, then the resulting response (both headers and body) is mapped to the fixture ID (which may be entirely new and previously undeclared) designated by \"responseId\". If responseId is not specified, it is the Test Engine's responsibility to store the response and use it as sourceId in subsequent assertions when assertion path and/or headerField is specified and sourceId is not specified.",
"definition": "The fixture id (maybe new) to map to the response."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.operation.sourceId",
"type": [ {
"code": "id"
} ],
"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."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.operation.targetId",
"type": [ {
"code": "id"
} ],
"short": "Id of fixture used for extracting the [id], [type], and [vid] for GET requests",
"comments": "If \"url\" element is specified, then \"targetId\", \"params\", and \"resource\" elements will be ignored as \"url\" element will have everything needed for constructing the request url. If \"params\" element is specified, then \"targetId\" element is ignored. For FHIR operations that require a resource (e.g. \"read\" and \"vread\" operations), the \"resource\" element must be specified when \"params\" element is specified. If \"url\" and \"params\" elements are absent, then the request url will be constructed from \"targetId\" fixture if present. For \"read\" operation, the resource and id values will be extracted from \"targetId\" fixture and used to construct the url. For \"vread\" and \"history\" operations, the versionId value will also be used.",
"definition": "Id of fixture used for extracting the [id], [type], and [vid] for GET requests."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.operation.url",
"type": [ {
"code": "string"
} ],
"short": "Request URL",
"comments": "Used to set the request URL explicitly. If \"url\" element is defined, then \"targetId\", \"resource\", and \"params\" elements will be ignored. Test engines would use whatever is specified in \"url\" without tampering with the string (beyond encoding the URL for HTTP). Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request.",
"definition": "Complete request URL."
}, {
"constraint": [ {
"key": "inv-13",
"human": "Setup action assert shall contain both compareToSourceId and compareToSourcePath or neither.",
"xpath": "(f:compareToSourceId and f:compareToSourcePath) or not(f:compareToSourceId or f:compareToSourcePath)",
"severity": "error"
}, {
"key": "inv-8",
"human": "Only a single assertion SHALL be present within setup action assert element.",
"xpath": "count(f:contentType) + count(f:headerField) + count(f:minimumId) + count(f:navigationLinks) + count(f:path) + count(f:resource) + count(f:responseCode) + count(f:response) + count(f:validateProfileId) <=1",
"severity": "error"
} ],
"path": "TestScript.setup.action.assert",
"min": 0,
"definition": "Evaluates the results of previous operations to determine if the server under test behaves appropriately.",
"short": "The assertion to perform",
"name": "assert",
"comments": "In order to evaluate an assertion, the request, response, and results of the most recently executed operation must always be maintained by the test engine.",
"type": [ {
"code": "BackboneElement"
} ],
"max": "1"
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.label",
"type": [ {
"code": "string"
} ],
"short": "Tracking/logging assertion label",
"comments": "This has no impact on the verification itself.",
"definition": "The label would be used for tracking/logging purposes by test engines."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.description",
"type": [ {
"code": "string"
} ],
"short": "Tracking/reporting assertion description",
"comments": "This has no impact on the verification itself.",
"definition": "The description would be used by test engines for tracking and reporting purposes."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.direction",
"type": [ {
"code": "code"
} ],
"short": "response | request",
"binding": {
"strength": "required",
"description": "The type of direction to use for assertion.",
"valueSetReference": {
"reference": "http://hl7.org/fhir/ValueSet/assert-direction-codes"
}
},
"definition": "The direction to use for the assertion."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.compareToSourceId",
"type": [ {
"code": "string"
} ],
"short": "Id of fixture used to compare the \"sourceId/path\" evaluations to",
"comments": "The id of the fixture used to make comparisons to.",
"definition": "Id of fixture used to compare the \"sourceId/path\" evaluations to."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.compareToSourcePath",
"type": [ {
"code": "string"
} ],
"short": "XPath or JSONPath expression against fixture used to compare the \"sourceId/path\" evaluations to",
"comments": "The XPath or JSONPath expression to be evaluated against the expected fixture to compare to. Ignored if \"assert.value\" is used. The evaluation will be done before the assertion is evaluated.",
"definition": "XPath or JSONPath expression against fixture used to compare the \"sourceId/path\" evaluations to."
}, {
"path": "TestScript.setup.action.assert.contentType",
"min": 0,
"definition": "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.",
"short": "xml | json",
"comments": "If this is specified, then test engine shall confirm that the content-type of the last operation's headers is set to this value. If \"assert.sourceId\" element is specified, then the evaluation will be done against the headers mapped to that sourceId (and not the last operation's headers). If 'xml' is specified, then 'Content-Type' header of 'application/xml+fhir' will be confirmed. If 'json' is specified, then 'application/json+fhir' will be used. If you'd like to have more control over the string, then use 'assert.headerField' instead.",
"type": [ {
"code": "code"
} ],
"meaningWhenMissing": "xml",
"binding": {
"strength": "required",
"description": "The content or mime type.",
"valueSetReference": {
"reference": "http://hl7.org/fhir/ValueSet/content-type"
}
},
"max": "1"
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.headerField",
"type": [ {
"code": "string"
} ],
"short": "HTTP header field name",
"comments": "If \"headerField\" is specified then \"value\" must be specified. If \"sourceId\" is not specified, then \"headerField\" will be evaluated against the last operation's response headers. Test engines are to keep track of the last operation's response body and response headers.",
"definition": "The HTTP header field name e.g. 'Location'."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.minimumId",
"type": [ {
"code": "string"
} ],
"short": "Fixture Id of minimum content resource",
"comments": "Asserts that the response contains all the element/content in another fixture pointed to by minimumId. This can be a statically defined fixture or one that is dynamically set via responseId.",
"definition": "The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.navigationLinks",
"type": [ {
"code": "boolean"
} ],
"short": "Perform validation on navigation links?",
"comments": "Asserts that the Bundle contains first, last, and next links.",
"definition": "Whether or not the test execution performs validation on the bundle navigation links."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.operator",
"type": [ {
"code": "code"
} ],
"short": "equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains",
"binding": {
"strength": "required",
"description": "The type of operator to use for assertion.",
"valueSetReference": {
"reference": "http://hl7.org/fhir/ValueSet/assert-operator-codes"
}
},
"comments": "Operators come handy especially for negative testing. If operator is not specified, then the \"equals\" operator is assumed; e.g. ,201,204\" /> .",
"definition": "The operator type."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.path",
"type": [ {
"code": "string"
} ],
"short": "XPath or JSONPath expression",
"comments": "If both \"path\" and \"fixtureId\" are specified, then the path will be evaluated against the responseBody mapped to the fixtureId. If \"path\" is specified and \"fixtureId\" is not, then the path will be evaluated against the responseBody of the last operation. Test engines are to store the response body and headers of the last operation at all times for subsequent assertions.",
"definition": "The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.resource",
"type": [ {
"code": "code"
} ],
"short": "Resource type",
"binding": {
"strength": "required",
"description": "Either a resource or a data type.",
"valueSetReference": {
"reference": "http://hl7.org/fhir/ValueSet/defined-types"
}
},
"comments": "This will be expected resource type in response body e.g. in read, vread, search, etc. See http://hl7-fhir.github.io/resourcelist.html for complete list of resource types; e.g. .",
"definition": "The type of the resource. See http://hl7-fhir.github.io/resourcelist.html."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.response",
"type": [ {
"code": "code"
} ],
"short": "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable",
"binding": {
"strength": "required",
"description": "The type of response code to use for assertion.",
"valueSetReference": {
"reference": "http://hl7.org/fhir/ValueSet/assert-response-code-types"
}
},
"comments": "This is a shorter way of achieving similar verifications via \"assert.responseCode\". If you need more control, then use \"assert.responseCode\" e.g. .",
"definition": "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.responseCode",
"type": [ {
"code": "string"
} ],
"short": "HTTP response code to test",
"comments": "To be used with \"operator\" attribute value. Asserts that the response code equals this value if \"operator\" is not specified. If the operator is \"in\" or \"notIn\" then the responseCode would be a comma-separated list of values e.g. \"200,201\". Otherwise, it's expected to be a numeric value. If \"fixture\" is not specified, then the \"responseBodyId\" value of the last operation is assumed.",
"definition": "The value of the HTTP response code to be tested."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.sourceId",
"type": [ {
"code": "id"
} ],
"short": "Fixture Id of source expression or headerField",
"comments": "This can be a statically defined fixture (at the top of the testscript) or a dynamically set fixture created by responseId of the action.operation element.",
"definition": "Fixture to evaluate the XPath/JSONPath expression or the headerField against."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.validateProfileId",
"type": [ {
"code": "id"
} ],
"short": "Profile Id of validation profile reference",
"comments": "The ID of a Profile fixture. Asserts that the response is valid according to the Profile specified by validateProfileId.",
"definition": "The ID of the Profile to validate against."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.value",
"type": [ {
"code": "string"
} ],
"short": "The value to compare to",
"comments": "The string-representation of a number, string, or boolean that is expected. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before comparing this value to the actual value.",
"definition": "The value to compare to."
}, {
"max": "1",
"min": 0,
"path": "TestScript.setup.action.assert.warningOnly",
"type": [ {
"code": "boolean"
} ],
"short": "Will this assert produce a warning only on error?",
"comments": "If this element is specified and it is true, then assertion failures can be logged by test engine but should not stop the test script execution from proceeding. There are likely cases where the spec is not clear on what should happen. If the spec says something is optional (maybe a response header for example), but a server doesn’t do it, we could choose to issue a warning.",
"definition": "Whether or not the test execution will produce a warning only on error for this assert.",
"defaultValueBoolean": false
}, {
"max": "*",
"min": 0,
"path": "TestScript.test",
"type": [ {
"code": "BackboneElement"
} ],
"short": "A test in this script",
"definition": "A test in this script."
}, {
"max": "1",
"min": 0,
"path": "TestScript.test.name",
"type": [ {
"code": "string"
} ],
"short": "Tracking/logging name of this test",
"definition": "The name of this test used for tracking/logging purposes by test engines."
}, {
"max": "1",
"min": 0,
"path": "TestScript.test.description",
"type": [ {
"code": "string"
} ],
"short": "Tracking/reporting short description of the test",
"definition": "A short description of the test used by test engines for tracking and reporting purposes."
}, {
"max": "1",
"min": 0,
"path": "TestScript.test.metadata",
"short": "Capabilities that are expected to function correctly on the FHIR server being tested",
"constraint": [ {
"key": "inv-7",
"human": "Test metadata capability SHALL contain required or validated or both.",
"xpath": "f:capability/f:required or f:capability/f:validated or (f:capability/f:required and f:capability/f:validated)",
"severity": "error"
} ],
"definition": "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.",
"nameReference": "metadata"
}, {
"max": "*",
"min": 1,
"path": "TestScript.test.action",
"type": [ {
"code": "BackboneElement"
} ],
"short": "A test operation or assert to perform",
"comments": "An action should contain either an operation or an assertion but not both. It can contain any number of variables.",
"constraint": [ {
"key": "inv-2",
"human": "Test action SHALL contain either an operation or assert but not both.",
"xpath": "(f:operation or f:assert) and not(f:operation and f:assert)",
"severity": "error"
} ],
"definition": "Action would contain either an operation or an assertion."
}, {
"max": "1",
"min": 0,
"path": "TestScript.test.action.operation",
"short": "The setup operation to perform",
"constraint": [ {
"key": "inv-11",
"human": "Test operation SHALL contain either sourceId or targetId or params or url.",
"xpath": "f:sourceId or (f:targetId or f:url or f:params) and (count(f:targetId) + count(f:url) + count(f:params) =1) or (f:type/f:code/@value='conformance' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')",
"severity": "error"
} ],
"definition": "An operation would involve a REST request to a server.",
"nameReference": "operation"
}, {
"max": "1",
"min": 0,
"path": "TestScript.test.action.assert",
"short": "The setup assertion to perform",
"comments": "In order to evaluate an assertion, the request, response, and results of the most recently executed operation must always be maintained by the test engine.",
"constraint": [ {
"key": "inv-14",
"human": "Test action assert shall contain both compareToSourceId and compareToSourcePath or neither.",
"xpath": "(f:compareToSourceId and f:compareToSourcePath) or not(f:compareToSourceId or f:compareToSourcePath)",
"severity": "error"
}, {
"key": "inv-9",
"human": "Only a single assertion SHALL be present within test action assert element.",
"xpath": "count(f:contentType) + count(f:headerField) + count(f:minimumId) + count(f:navigationLinks) + count(f:path) + count(f:resource) + count(f:responseCode) + count(f:response) + count(f:validateProfileId) <=1",
"severity": "error"
} ],
"definition": "Evaluates the results of previous operations to determine if the server under test behaves appropriately.",
"nameReference": "assert"
}, {
"max": "1",
"min": 0,
"path": "TestScript.teardown",
"type": [ {
"code": "BackboneElement"
} ],
"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)."
}, {
"max": "*",
"min": 1,
"path": "TestScript.teardown.action",
"type": [ {
"code": "BackboneElement"
} ],
"short": "One or more teardown operations to perform",
"comments": "An action should contain either an operation or an assertion but not both. It can contain any number of variables.",
"constraint": [ {
"key": "inv-3",
"human": "Teardown action SHALL contain an operation.",
"xpath": "f:operation",
"severity": "error"
} ],
"definition": "The teardown action will only contain an operation."
}, {
"max": "1",
"min": 0,
"path": "TestScript.teardown.action.operation",
"short": "The teardown operation to perform",
"constraint": [ {
"key": "inv-12",
"human": "Teardown operation SHALL contain either sourceId or targetId or params or url.",
"xpath": "f:sourceId or (f:targetId or f:url or (f:params and f:resource)) and (count(f:targetId) + count(f:url) + count(f:params) =1) or (f:type/f:code/@value='conformance' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')",
"severity": "error"
} ],
"definition": "An operation would involve a REST request to a server.",
"nameReference": "operation"
} ]
},
"contact": [ {
"telecom": [ {
"value": "http://hl7.org/fhir",
"system": "other"
} ]
}, {
"telecom": [ {
"value": "http://www.hl7.org/Special/committees/fiwg/index.cfm",
"system": "other"
} ]
} ]
}