Skip to content

Validating a Capability Statement Resource at Connectathon

Sunil Bhaskarla edited this page Jan 14, 2020 · 3 revisions

Validating a Capability Statement Resource at Connectathon

Validating elements

Use the tables to see if the Capability Statement resource in question has the following elements.

Capability Statement Reference

CapabilityStatement.status
Cardinality 1..1
Type code
Expected value active
CapabilityStatement.experimental
Cardinality 0..1
Type boolean
Expected value If present, value should be 'false'.
CapabilityStatement.kind
Cardinality 1..1
Type code
Expected value instance or capability. We do not expect a requirements capability statement at Connectathon.Details
CapabilityStatement.software
Cardinality 0..1 Software
If present, one of these element(s) are required:
CapabilityStatement.software.name
Optional:
CapabilityStatement.software.version
CapabilityStatement.implementation
Cardinality 0..1 Implementation
CapabilityStatement.implementation.description
Cardinality 1..1
CapabilityStatement.implementation.url
Cardinality 0..1

* Implementation or Software is required for Connectathon

Implementation Element is Present Software Element is Present
T T or F (CapabilityStatement.kind=instance)
CapabilityStatement.rest:
Expected CapabilityStatement.rest.mode = server
or
Expected CapabilityStatement.rest.mode = client
"Multiple repetitions allow definition of both client and/or server behaviors or possibly behaviors under different configuration settings (for software or requirements statements)."
F T (Kind=Capability) "Because it is not dependent on any particular implementation, the profile cannot provide specific details such as endpoint addresses. It may also need to document various configurations in which the application can be set up or describe the degree of customizability associated with the solution."
Expected CapabilityStatement.rest.mode = CLIENT
F F Requirements capability statement not expected at Connectathon.
CapabilityStatement.fhirVersion
Cardinality 1..1
Type code
Expected value 4.0.0 FHIR Release 4 (Normative + STU).
or
4.0.1 FHIR Release 4 Technical Correction.
CapabilityStatement.format
Cardinality 1..*
Terminology Binding MimeType
Type code
Expected value(s) application/fhir+xml, application/fhir+json
CapabilityStatement.rest
Cardinality 0..*
Expected element count At least one.
CapabilityStatement.rest.mode
Cardinality 1..1
Expected value client or server

Actor specific REST elements:

Examples from IHE FTP Site

Document Consumer

Document Recipient

Document Responder

Document Source

Getting a SERVER Capability Statement - GET Metadata

GET [base]/metadata{?mode=[mode]} {&_format=[mime-type]}

Mode parameter

Mode parameter
full (or mode not present) A Capability Statement that specifies which resource types and interactions are supported
normative As above, but only the normative portions of the Capability Statement
terminology A TerminologyCapabilities resource that provides further information about terminologies which are supported by the server

Format parameter

In order to support various implementation limitations, servers SHOULD support the optional _format parameter to specify alternative response formats by their MIME-types. Reference: https://www.hl7.org/fhir/http.html#parameters

Use the FHIR Toolkit GET Tool

In FHIR Toolkit, click on the GET Tool link and enter an URL for the metadata resource.

Use curl to get the metadata

curl -O -H "Accept:application/json+fhir" --url [base]/metadata

CURL Example

curl -O -H "Accept:application/json+fhir" --url http://localhost:8081/asbestos/proxy/default__limited/metadata

FHIR Validator

FHIR Validator

Download the org.hl7.fhir.validator.jar validator

Download FHIR Validator File size: 57,424,643 bytes

Running the org.hl7.fhir.validator.jar validator

Example based on a Capability Statement resource URL

java -jar org.hl7.fhir.validator.jar http://localhost:8081/asbestos/proxy/default__limited/metadata -version 4.0.0 -profile http://hl7.org/fhir/StructureDefinition/CapabilityStatement

Example based on a Capability Statement XML resource file

java -jar org.hl7.fhir.validator.jar xdsChannelCapabilityStatement.xml -version 4.0.0 -profile http://hl7.org/fhir/StructureDefinition/CapabilityStatement

Sample output

Detected Java version: 1.8.0_221 from C:\Users\_\jre on amd64 (64bit). 3596MB available
Arguments: xdsChannelCapabilityStatement.xml -version 4.0.0 -profile http://hl7.org/fhir/StructureDefinition/CapabilityStatement
Directories: Current = C:\Users\_, Package Cache = C:\Users\_\.fhir\packages
  .. FHIR Version 4.0, definitions from hl7.fhir.r4.core#4.0.1
  .. connect to tx server @ http://tx.fhir.org
    (v4.0.1)
  .. validate [C:\Users\_\xdsChannelCapabilityStatement.xml] against [http://hl7.org/fhir/StructureDefinition/CapabilityStatement]
Success...validating C:\Users\_\xdsChannelCapabilityStatement.xml:  error:0 warn:0 info:0
Clone this wiki locally