PREFIX fhir: PREFIX fhirvs: PREFIX xsd: BASE start=@ AND {fhir:nodeRole [fhir:treeRoot]} # Describes a set of tests CLOSED { a [fhir:TestScript]; fhir:nodeRole [fhir:treeRoot]?; fhir:Resource.id id?; # Logical id of this artifact fhir:Resource.meta @?; # Metadata about the resource fhir:Resource.implicitRules @?; # A set of rules under which this # content was created fhir:Resource.language @?; # Language of the resource content fhir:DomainResource.text @?; # Text summary of the resource, for # human interpretation fhir:DomainResource.contained @*; # Contained, inline Resources fhir:DomainResource.extension @*; # Additional content defined by # implementations fhir:DomainResource.modifierExtension @*; # Extensions that cannot be ignored fhir:TestScript.url @; # Canonical identifier for this test # script, represented as a URI # (globally unique) fhir:TestScript.identifier @?; # Additional identifier for the test # script fhir:TestScript.version @?; # Business version of the test script fhir:TestScript.name @; # Name for this test script # (computer friendly) fhir:TestScript.title @?; # Name for this test script (human # friendly) fhir:TestScript.status @ AND {fhir:value @fhirvs:publication-status}; # draft | active | retired | unknown fhir:TestScript.experimental @?; # For testing purposes, not real # usage fhir:TestScript.date @?; # Date last changed fhir:TestScript.publisher @?; # Name of the publisher # (organization or individual) fhir:TestScript.contact @*; # Contact details for the publisher fhir:TestScript.description @?; # Natural language description of # the test script fhir:TestScript.useContext @*; # The context that the content is # intended to support fhir:TestScript.jurisdiction @*; # Intended jurisdiction for test # script (if applicable) fhir:TestScript.purpose @?; # Why this test script is defined fhir:TestScript.copyright @?; # Use and/or publishing restrictions fhir:TestScript.origin @*; # An abstract server representing a # client or sender in a message # exchange fhir:TestScript.destination @*; # An abstract server representing a # destination or receiver in a # message exchange fhir:TestScript.metadata @?; # Required capability that is # assumed to function correctly on # the FHIR server being tested fhir:TestScript.fixture @*; # Fixture in the test script - by # reference (uri) fhir:TestScript.profile @*; # Reference of the validation profile fhir:TestScript.variable @*; # Placeholder for evaluated elements fhir:TestScript.setup @?; # A series of required setup # operations before tests are # executed fhir:TestScript.test @*; # A test in this script fhir:TestScript.teardown @?; # A series of required clean up steps fhir:index xsd:integer? # Relative position in a list } # Placeholder for evaluated elements CLOSED { fhir:Element.id string?; # Unique id for inter-element # referencing fhir:Element.extension @*; # Additional content defined by # implementations fhir:BackboneElement.modifierExtension @*; # Extensions that cannot be ignored # even if unrecognized fhir:TestScript.variable.name @; # Descriptive name for this variable fhir:TestScript.variable.defaultValue @?; # Default, hard-coded, or # user-defined value for this # variable fhir:TestScript.variable.description @?; # Natural language description of # the variable fhir:TestScript.variable.expression @?; # The FHIRPath expression against # the fixture body fhir:TestScript.variable.headerField @?; # HTTP header field name for source fhir:TestScript.variable.hint @?; # Hint help text for default value # to enter fhir:TestScript.variable.path @?; # XPath or JSONPath against the # fixture body fhir:TestScript.variable.sourceId @?; # Fixture Id of source expression or # headerField within this variable fhir:index xsd:integer? # Relative position in a list } # An abstract server representing a destination or receiver in a message exchange CLOSED { fhir:Element.id string?; # Unique id for inter-element # referencing fhir:Element.extension @*; # Additional content defined by # implementations fhir:BackboneElement.modifierExtension @*; # Extensions that cannot be ignored # even if unrecognized fhir:TestScript.destination.index @; # The index of the abstract # destination server starting at 1 fhir:TestScript.destination.profile @; # FHIR-Server | FHIR-SDC-FormManager # | FHIR-SDC-FormReceiver | # FHIR-SDC-FormProcessor fhir:index xsd:integer? # Relative position in a list } # Fixture in the test script - by reference (uri) CLOSED { fhir:Element.id string?; # Unique id for inter-element # referencing fhir:Element.extension @*; # Additional content defined by # implementations fhir:BackboneElement.modifierExtension @*; # Extensions that cannot be ignored # even if unrecognized fhir:TestScript.fixture.autocreate @; # Whether or not to implicitly # create the fixture during setup fhir:TestScript.fixture.autodelete @; # Whether or not to implicitly # delete the fixture during teardown fhir:TestScript.fixture.resource @?; # Reference of the resource fhir:index xsd:integer? # Relative position in a list } # Required capability that is assumed to function correctly on the FHIR server being tested CLOSED { fhir:Element.id string?; # Unique id for inter-element # referencing fhir:Element.extension @*; # Additional content defined by # implementations fhir:BackboneElement.modifierExtension @*; # Extensions that cannot be ignored # even if unrecognized fhir:TestScript.metadata.link @*; # Links to the FHIR specification fhir:TestScript.metadata.capability @+; # Capabilities that are assumed to # function correctly on the FHIR # server being tested fhir:index xsd:integer? # Relative position in a list } # An abstract server representing a client or sender in a message exchange CLOSED { fhir:Element.id string?; # Unique id for inter-element # referencing fhir:Element.extension @*; # Additional content defined by # implementations fhir:BackboneElement.modifierExtension @*; # Extensions that cannot be ignored # even if unrecognized fhir:TestScript.origin.index @; # The index of the abstract origin # server starting at 1 fhir:TestScript.origin.profile @; # FHIR-Client | FHIR-SDC-FormFiller fhir:index xsd:integer? # Relative position in a list } # A series of required clean up steps CLOSED { fhir:Element.id string?; # Unique id for inter-element # referencing fhir:Element.extension @*; # Additional content defined by # implementations fhir:BackboneElement.modifierExtension @*; # Extensions that cannot be ignored # even if unrecognized fhir:TestScript.teardown.action @+; # One or more teardown operations to # perform fhir:index xsd:integer? # Relative position in a list } # A test in this script CLOSED { fhir:Element.id string?; # Unique id for inter-element # referencing fhir:Element.extension @*; # Additional content defined by # implementations fhir:BackboneElement.modifierExtension @*; # Extensions that cannot be ignored # even if unrecognized fhir:TestScript.test.name @?; # Tracking/logging name of this test fhir:TestScript.test.description @?; # Tracking/reporting short # description of the test fhir:TestScript.test.action @+; # A test operation or assert to # perform fhir:index xsd:integer? # Relative position in a list } # A series of required setup operations before tests are executed CLOSED { fhir:Element.id string?; # Unique id for inter-element # referencing fhir:Element.extension @*; # Additional content defined by # implementations fhir:BackboneElement.modifierExtension @*; # Extensions that cannot be ignored # even if unrecognized fhir:TestScript.setup.action @+; # A setup operation or assert to # perform fhir:index xsd:integer? # Relative position in a list } # A setup operation or assert to perform CLOSED { fhir:Element.id string?; # Unique id for inter-element # referencing fhir:Element.extension @*; # Additional content defined by # implementations fhir:BackboneElement.modifierExtension @*; # Extensions that cannot be ignored # even if unrecognized fhir:TestScript.setup.action.operation @?; # The setup operation to perform fhir:TestScript.setup.action.assert @?; # The assertion to perform fhir:index xsd:integer? # Relative position in a list } # Capabilities that are assumed to function correctly on the FHIR server being tested CLOSED { fhir:Element.id string?; # Unique id for inter-element # referencing fhir:Element.extension @*; # Additional content defined by # implementations fhir:BackboneElement.modifierExtension @*; # Extensions that cannot be ignored # even if unrecognized fhir:TestScript.metadata.capability.required @; # Are the capabilities required? fhir:TestScript.metadata.capability.validated @; # Are the capabilities validated? fhir:TestScript.metadata.capability.description @?; # The expected capabilities of the # server fhir:TestScript.metadata.capability.origin @*; # Which origin server these # requirements apply to fhir:TestScript.metadata.capability.destination @?; # Which server these requirements # apply to fhir:TestScript.metadata.capability.link @*; # Links to the FHIR specification fhir:TestScript.metadata.capability.capabilities @; # Required Capability Statement fhir:index xsd:integer? # Relative position in a list } # Links to the FHIR specification CLOSED { fhir:Element.id string?; # Unique id for inter-element # referencing fhir:Element.extension @*; # Additional content defined by # implementations fhir:BackboneElement.modifierExtension @*; # Extensions that cannot be ignored # even if unrecognized fhir:TestScript.metadata.link.url @; # URL to the specification fhir:TestScript.metadata.link.description @?; # Short description fhir:index xsd:integer? # Relative position in a list } # A test operation or assert to perform CLOSED { fhir:Element.id string?; # Unique id for inter-element # referencing fhir:Element.extension @*; # Additional content defined by # implementations fhir:BackboneElement.modifierExtension @*; # Extensions that cannot be ignored # even if unrecognized fhir:TestScript.test.action.operation @?; # The setup operation to perform fhir:TestScript.test.action.assert @?; # The setup assertion to perform fhir:index xsd:integer? # Relative position in a list } # One or more teardown operations to perform CLOSED { fhir:Element.id string?; # Unique id for inter-element # referencing fhir:Element.extension @*; # Additional content defined by # implementations fhir:BackboneElement.modifierExtension @*; # Extensions that cannot be ignored # even if unrecognized fhir:TestScript.teardown.action.operation @; # The teardown operation to perform fhir:index xsd:integer? # Relative position in a list } # The teardown operation to perform CLOSED { fhir:index xsd:integer? # Relative position in a list } # The assertion to perform CLOSED { fhir:Element.id string?; # Unique id for inter-element # referencing fhir:Element.extension @*; # Additional content defined by # implementations fhir:BackboneElement.modifierExtension @*; # Extensions that cannot be ignored # even if unrecognized fhir:TestScript.setup.action.assert.label @?; # Tracking/logging assertion label fhir:TestScript.setup.action.assert.description @?; # Tracking/reporting assertion # description fhir:TestScript.setup.action.assert.direction @ AND {fhir:value @fhirvs:assert-direction-codes}?; # response | request fhir:TestScript.setup.action.assert.compareToSourceId @?; # Id of the source fixture to be # evaluated fhir:TestScript.setup.action.assert.compareToSourceExpression @?; # The FHIRPath expression to # evaluate against the source # fixture fhir:TestScript.setup.action.assert.compareToSourcePath @?; # XPath or JSONPath expression to # evaluate against the source # fixture fhir:TestScript.setup.action.assert.contentType @ AND {fhir:value @fhirvs:mimetypes}?; # Mime type to compare against the # 'Content-Type' header fhir:TestScript.setup.action.assert.expression @?; # The FHIRPath expression to be # evaluated fhir:TestScript.setup.action.assert.headerField @?; # HTTP header field name fhir:TestScript.setup.action.assert.minimumId @?; # Fixture Id of minimum content # resource fhir:TestScript.setup.action.assert.navigationLinks @?; # Perform validation on navigation # links? fhir:TestScript.setup.action.assert.operator @ AND {fhir:value @fhirvs:assert-operator-codes}?; # equals | notEquals | in | notIn | # greaterThan | lessThan | empty | # notEmpty | contains | notContains # | eval fhir:TestScript.setup.action.assert.path @?; # XPath or JSONPath expression fhir:TestScript.setup.action.assert.requestMethod @ AND {fhir:value @fhirvs:http-operations}?; # delete | get | options | patch | # post | put | head fhir:TestScript.setup.action.assert.requestURL @?; # Request URL comparison value fhir:TestScript.setup.action.assert.resource @ AND {fhir:value @fhirvs:defined-types}?; # Resource type fhir:TestScript.setup.action.assert.response @ AND {fhir:value @fhirvs:assert-response-code-types}?; # okay | created | noContent | # notModified | bad | forbidden | # notFound | methodNotAllowed | # conflict | gone | # preconditionFailed | unprocessable fhir:TestScript.setup.action.assert.responseCode @?; # HTTP response code to test fhir:TestScript.setup.action.assert.sourceId @?; # Fixture Id of source expression or # headerField fhir:TestScript.setup.action.assert.validateProfileId @?; # Profile Id of validation profile # reference fhir:TestScript.setup.action.assert.value @?; # The value to compare to fhir:TestScript.setup.action.assert.warningOnly @; # Will this assert produce a warning # only on error? fhir:index xsd:integer? # Relative position in a list } # The setup operation to perform CLOSED { fhir:Element.id string?; # Unique id for inter-element # referencing fhir:Element.extension @*; # Additional content defined by # implementations fhir:BackboneElement.modifierExtension @*; # Extensions that cannot be ignored # even if unrecognized fhir:TestScript.setup.action.operation.type @?; # The operation code type that will # be executed fhir:TestScript.setup.action.operation.resource @ AND {fhir:value @fhirvs:defined-types}?; # Resource type fhir:TestScript.setup.action.operation.label @?; # Tracking/logging operation label fhir:TestScript.setup.action.operation.description @?; # Tracking/reporting operation # description fhir:TestScript.setup.action.operation.accept @ AND {fhir:value @fhirvs:mimetypes}?; # Mime type to accept in the payload # of the response, with charset etc. fhir:TestScript.setup.action.operation.contentType @ AND {fhir:value @fhirvs:mimetypes}?; # Mime type of the request payload # contents, with charset etc. fhir:TestScript.setup.action.operation.destination @?; # Server responding to the request fhir:TestScript.setup.action.operation.encodeRequestUrl @; # Whether or not to send the request # url in encoded format fhir:TestScript.setup.action.operation.method @ AND {fhir:value @fhirvs:http-operations}?; # delete | get | options | patch | # post | put | head fhir:TestScript.setup.action.operation.origin @?; # Server initiating the request fhir:TestScript.setup.action.operation.params @?; # Explicitly defined path parameters fhir:TestScript.setup.action.operation.requestHeader @*; # Each operation can have one or # more header elements fhir:TestScript.setup.action.operation.requestId @?; # Fixture Id of mapped request fhir:TestScript.setup.action.operation.responseId @?; # Fixture Id of mapped response fhir:TestScript.setup.action.operation.sourceId @?; # Fixture Id of body for PUT and # POST requests fhir:TestScript.setup.action.operation.targetId @?; # Id of fixture used for extracting # the [id], [type], and [vid] for # GET requests fhir:TestScript.setup.action.operation.url @?; # Request URL fhir:index xsd:integer? # Relative position in a list } # The setup operation to perform CLOSED { fhir:index xsd:integer? # Relative position in a list } # The setup assertion to perform CLOSED { fhir:index xsd:integer? # Relative position in a list } # Each operation can have one or more header elements CLOSED { fhir:Element.id string?; # Unique id for inter-element # referencing fhir:Element.extension @*; # Additional content defined by # implementations fhir:BackboneElement.modifierExtension @*; # Extensions that cannot be ignored # even if unrecognized fhir:TestScript.setup.action.operation.requestHeader.field @; # HTTP header field name fhir:TestScript.setup.action.operation.requestHeader.value @; # HTTP headerfield value fhir:index xsd:integer? # Relative position in a list } #---------------------- Data Types ------------------- # Primitive Type dateTime CLOSED { fhir:Element.id string?; # xml:id (or equivalent in JSON) fhir:Element.extension @*; # Additional content defined by # implementations fhir:value dateTime?; # Primitive value for dateTime fhir:index xsd:integer? # Relative position in a list } # Metadata about a resource CLOSED { fhir:Element.id id?; # Unique id for inter-element # referencing fhir:Element.extension @*; # Additional content defined by # implementations fhir:Meta.versionId @?; # Version specific identifier fhir:Meta.lastUpdated @?; # When the resource version last # changed fhir:Meta.source @?; # Identifies where the resource # comes from fhir:Meta.profile @*; # Profiles this resource claims to # conform to fhir:Meta.security @*; # Security Labels applied to this # resource fhir:Meta.tag @*; # Tags applied to this resource fhir:index xsd:integer? # Relative position in a list } # Primitive Type code CLOSED { fhir:Element.id string?; # xml:id (or equivalent in JSON) fhir:Element.extension @*; # Additional content defined by # implementations fhir:value code?; # Primitive value for code fhir:index xsd:integer? # Relative position in a list } # Primitive Type string CLOSED { fhir:Element.id string?; # xml:id (or equivalent in JSON) fhir:Element.extension @*; # Additional content defined by # implementations fhir:value string MAXLENGTH 1048576?; # Primitive value for string fhir:index xsd:integer? # Relative position in a list } # A reference from one resource to another CLOSED { fhir:link IRI?; fhir:Element.id id?; # Unique id for inter-element # referencing fhir:Element.extension @*; # Additional content defined by # implementations fhir:Reference.reference @?; # Literal reference, Relative, # internal or absolute URL fhir:Reference.type @?; # Type the reference refers to (e.g. # "Patient") fhir:Reference.identifier @?; # Logical reference, when literal # reference is not known fhir:Reference.display @?; # Text alternative for the resource fhir:index xsd:integer? # Relative position in a list } # Base Resource {a .+; fhir:Resource.id id?; # Logical id of this artifact fhir:Resource.meta @?; # Metadata about the resource fhir:Resource.implicitRules @?; # A set of rules under which this # content was created fhir:Resource.language @?; # Language of the resource content fhir:index xsd:integer? } # Primitive Type integer CLOSED { fhir:Element.id string?; # xml:id (or equivalent in JSON) fhir:Element.extension @*; # Additional content defined by # implementations fhir:value integer MININCLUSIVE -2147483648 MAXINCLUSIVE 2147483647?; # Primitive value for integer fhir:index xsd:integer? # Relative position in a list } # Primitive Type canonical CLOSED { fhir:Element.id string?; # xml:id (or equivalent in JSON) fhir:Element.extension @*; # Additional content defined by # implementations fhir:value canonical?; # Primitive value for canonical fhir:index xsd:integer? # Relative position in a list } # Primitive Type uri CLOSED { fhir:Element.id string?; # xml:id (or equivalent in JSON) fhir:Element.extension @*; # Additional content defined by # implementations fhir:value uri?; # Primitive value for uri fhir:index xsd:integer? # Relative position in a list } # Optional Extensions Element CLOSED { fhir:Element.id id?; fhir:Element.extension @*; fhir:Extension.url uri; ( fhir:Extension.valueBase64Binary @ | fhir:Extension.valueBoolean @ | fhir:Extension.valueCanonical @ | fhir:Extension.valueCode @ | fhir:Extension.valueDate @ | fhir:Extension.valueDateTime @ | fhir:Extension.valueDecimal @ | fhir:Extension.valueId @ | fhir:Extension.valueInstant @ | fhir:Extension.valueInteger @ | fhir:Extension.valueMarkdown @ | fhir:Extension.valueOid @ | fhir:Extension.valuePositiveInt @ | fhir:Extension.valueString @ | fhir:Extension.valueTime @