This is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions
FHIR Infrastructure Work Group | Maturity Level: N/A | Standards Status: Informative | Compartments: No defined compartments |
ShEx statement for testplan
PREFIX fhir: <http://hl7.org/fhir/> PREFIX fhirvs: <http://hl7.org/fhir/ValueSet/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> IMPORT <uri.shex> IMPORT <url.shex> IMPORT <code.shex> IMPORT <Base.shex> IMPORT <string.shex> IMPORT <Coding.shex> IMPORT <boolean.shex> IMPORT <integer.shex> IMPORT <decimal.shex> IMPORT <dateTime.shex> IMPORT <markdown.shex> IMPORT <Quantity.shex> IMPORT <Resource.shex> IMPORT <canonical.shex> IMPORT <Identifier.shex> IMPORT <Expression.shex> IMPORT <UsageContext.shex> IMPORT <ContactDetail.shex> IMPORT <DomainResource.shex> IMPORT <CodeableConcept.shex> start=@<TestPlan> AND {fhir:nodeRole [fhir:treeRoot]} # Tests to be executed by a Test Runner that knows the tests <TestPlan> EXTENDS @<DomainResource> CLOSED { a [fhir:TestPlan]?;fhir:nodeRole [fhir:treeRoot]?; fhir:url @<uri>?; # Canonical identifier for this test # plan, represented as a URI # (globally unique) fhir:identifier @<OneOrMore_Identifier>?; # Business identifier for the test # plan fhir:version @<string>?; # Business version of the test plan fhir:versionAlgorithm @<string> OR @<Coding> ?; # How to compare versions fhir:name @<string>?; # Name for this test plan (computer # friendly) fhir:title @<string>?; # Name for this test plan (human # friendly) fhir:status @<code> AND {fhir:v @fhirvs:publication-status}; # draft | active | retired | unknown fhir:experimental @<boolean>?; # For testing only - never for real # usage fhir:date @<dateTime>?; # Date last changed fhir:publisher @<string>?; # Name of the publisher/steward # (organization or individual) fhir:contact @<OneOrMore_ContactDetail>?; # Contact details for the publisher fhir:description @<markdown>?; # Natural language description of # the test plan fhir:useContext @<OneOrMore_UsageContext>?; # The context that the content is # intended to support fhir:jurisdiction @<OneOrMore_CodeableConcept>?; # Intended jurisdiction where the # test plan applies (if applicable) fhir:purpose @<markdown>?; # Why this test plan is defined fhir:copyright @<markdown>?; # Use and/or publishing restrictions fhir:copyrightLabel @<string>?; # Copyright holder and year(s) fhir:scope @<OneOrMore_Base>?; # The scope - what these test cases # are testing fhir:dependency @<OneOrMore_Base>?; # Test cases that must be passed # before these test cases are # meaningful to execute fhir:runner @<url>; # URL Documentation for a runner # that executes these tests fhir:mode @<OneOrMore_Base>?; # A mode that can be passed to # runner - affects test content fhir:parameter @<OneOrMore_Base>?; # Parameter defined for all tests fhir:suite @<OneOrMore_Base>?; # A suite of tests that share a # common set up } # Parameter defined for all tests <TestPlan.parameter> EXTENDS @<Base> CLOSED { fhir:name @<string>; # Name per Runner Definition fhir:value @<string> OR @<boolean> OR @<integer> OR @<decimal> OR @<dateTime> OR @<uri> OR @<Coding> OR @<Quantity> OR @<Expression> ; # Value of this parameter fhir:mode @<code>?; # A mode that must be true for this # parameter to be used } # A mode that can be passed to runner - affects test content <TestPlan.mode> EXTENDS @<Base> CLOSED { fhir:code @<string>; # The code that identifies the mode fhir:description @<string>?; # Description of what this mode # exists / why it was defined } # A suite of tests that share a common set up <TestPlan.suite> EXTENDS @<Base> CLOSED { fhir:name @<string>; # The name of this suite - unique in # the TestCases resource fhir:description @<string>?; # Description of what this suite # does / why it was defined fhir:mode @<code>?; # Mode required to run this suite fhir:input @<OneOrMore_Base>?; # Resources used in the tests in # this suite fhir:parameter @<OneOrMore_TestPlan.parameter>?; # Parameter defined by the suite fhir:test @<OneOrMore_Base>?; # A test in the test suite fhir:suite @<OneOrMore_TestPlan.suite>?; # A nested suite of tests fhir:plan @<OneOrMore_Reference_TestPlan>?; # A nested set of test plans } # Assertions that can be executed against the output of the tests <TestPlan.suite.test.assertion> EXTENDS @<Base> CLOSED { fhir:focus @<string>?; # Which output the assertion is # tested on (by name, if there is # more than one) fhir:severity @<code>?; # fatal | error | warning | # information | success; fatal+error # = fail fhir:expression @<Expression>?; # Technical Expression of the # assertion fhir:human @<string>?; # Human readable description of the # assertion fhir:mode @<code>?; # A mode that must be true for this # assertion to apply } # A test in the test suite <TestPlan.suite.test> EXTENDS @<Base> CLOSED { fhir:name @<string>; # The name of this test - unique in # the suite fhir:description @<string>?; # Description of what this test does # / why it was defined fhir:operation @<code>?; # Operation that is executed during # this test (per definition of # runner) fhir:mode @<code>?; # Mode required to run this test fhir:parameter @<OneOrMore_TestPlan.parameter>?; # Parameter defined by the test fhir:input @<OneOrMore_TestPlan.suite.input>?; # Resources used when executing this # test (per runner definition) fhir:expected @<OneOrMore_TestPlan.suite.input>?; # Resources expected as output from # this test (per runner definition, # often Matchetypes) fhir:assertion @<OneOrMore_Base>?; # Assertions that can be executed # against the output of the tests } # The scope - what these test cases are testing <TestPlan.scope> EXTENDS @<Base> CLOSED { fhir:reference @<canonical>?; # A reference to what is being tested fhir:description @<string>?; # Description of what the scope is # exists / what is being tested } # Resources used in the tests in this suite <TestPlan.suite.input> EXTENDS @<Base> CLOSED { fhir:name @<string>?; # A name for this resource (per # runner definition) fhir:file @<string>?; # A file containing a resource used # in the tests fhir:resource @<Resource>?; # An inline resource used in the # tests fhir:mode @<code>?; # A mode that must be true for this # resource to be used } # A nested suite of tests <TestPlan.suite.suitenull> CLOSED { } # Test cases that must be passed before these test cases are meaningful to execute <TestPlan.dependency> EXTENDS @<Base> CLOSED { fhir:reference @<canonical>; # The Test Cases fhir:description @<string>?; # Description of what the dependency # exists / why it was defined } #---------------------- Cardinality Types (OneOrMore) ------------------- <OneOrMore_Identifier> CLOSED { rdf:first @<Identifier> ; rdf:rest [rdf:nil] OR @<OneOrMore_Identifier> } <OneOrMore_ContactDetail> CLOSED { rdf:first @<ContactDetail> ; rdf:rest [rdf:nil] OR @<OneOrMore_ContactDetail> } <OneOrMore_UsageContext> CLOSED { rdf:first @<UsageContext> ; rdf:rest [rdf:nil] OR @<OneOrMore_UsageContext> } <OneOrMore_CodeableConcept> CLOSED { rdf:first @<CodeableConcept> ; rdf:rest [rdf:nil] OR @<OneOrMore_CodeableConcept> } <OneOrMore_Base> CLOSED { rdf:first @<Base> ; rdf:rest [rdf:nil] OR @<OneOrMore_Base> } <OneOrMore_TestPlan.parameter> CLOSED { rdf:first @<TestPlan.parameter> ; rdf:rest [rdf:nil] OR @<OneOrMore_TestPlan.parameter> } <OneOrMore_TestPlan.suite> CLOSED { rdf:first @<TestPlan.suite> ; rdf:rest [rdf:nil] OR @<OneOrMore_TestPlan.suite> } <OneOrMore_Reference_TestPlan> CLOSED { rdf:first @<Reference> AND {fhir:link @<TestPlan> } ; rdf:rest [rdf:nil] OR @<OneOrMore_Reference_TestPlan> } <OneOrMore_TestPlan.suite.input> CLOSED { rdf:first @<TestPlan.suite.input> ; rdf:rest [rdf:nil] OR @<OneOrMore_TestPlan.suite.input> } #---------------------- Value Sets ------------------------ # The lifecycle status of an artifact. fhirvs:publication-status ["draft" "active" "retired" "unknown"]
Usage note: every effort has been made to ensure that the ShEx files are correct and useful, but they are not a normative part of the specification.
FHIR ®© HL7.org 2011+. FHIR R6 hl7.fhir.core#6.0.0-ballot3 generated on Tue, Sep 2, 2025 16:09+0000.
Links: Search |
Version History |
Contents |
Glossary |
QA |
Compare to R5 |
|
Propose a change