Sha256: 0fe25b617077a792900944a7c50ace4e968d76a659baad0a162bfd5256f5e2ad
Contents?: true
Size: 1.46 KB
Versions: 1
Compression:
Stored size: 1.46 KB
Contents
module IpaTestKit class JSONSupportTest < Inferno::Test id :ipa_010_json_support title 'FHIR server capability states JSON support' description %( FHIR provides multiple [representation formats](https://www.hl7.org/fhir/formats.html) for resources, including JSON and XML. IPA profiles require servers to use the [JSON representation](https://www.hl7.org/fhir/json.html): [```The IPA Server **SHALL** Support json source formats for all IPA interactions.```](http://hl7.org/fhir/uv/ipa/CapabilityStatement-ipa-server.html#behavior) The FHIR conformance interaction require servers to describe which formats are available for clients to use. The server must explicitly state that JSON is supported. This is located in the [format element](https://www.hl7.org/fhir/capabilitystatement-definitions.html#CapabilityStatement.format) of the CapabilityStatement Resource. This test checks that one of the following values are located in the format field. * json * application/json * application/fhir+json ) uses_request :capability_statement run do assert_resource_type(:capability_statement) json_formats = ['json', 'application/json', 'application/fhir+json'] server_formats = resource.format assert server_formats.any? { |format| json_formats.include? format }, 'CapabilityStatement does not state support for JSON' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ipa_test_kit-0.2.0 | lib/ipa_test_kit/custom_groups/capability_statement/json_support_test.rb |