inferno_core 0.4.12 → 0.4.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4b1eba213bf449c0eb90414707f7f10dbdc6d905a3318e10f9897c57dc8f50ea
4
- data.tar.gz: 889d85b5f4d88ed64931456d98badf3e1906a4adad570e636a16a6b4284e4e7b
3
+ metadata.gz: 14ead0a65b0236831bcc411e2ad41259d79f5f46fc142b1ccf59313dfe5ae6ee
4
+ data.tar.gz: 53fe3ce009e652b8e01a538e3bb9c344a85e00b04eafeef3274d79124df415da
5
5
  SHA512:
6
- metadata.gz: 8ea65d2a4eb2541d74312cf0f761acb89f7c57406d930de97660ba0252b7dd03a9a08c0e87352a747ea8265c4e8786d2046b7ca7ed60932e115b262c28d6bce1
7
- data.tar.gz: ac4069552e2187bb5eac1d607b7ece11ef96e2ca81074260252d8b5f51183c0363ba2cba8dcbf1e8c26d9302f6a486bfc180ccd24358ff5e56a6e8aedcb77d42
6
+ metadata.gz: c3a1747a9f6aa9488b23c62ba173e07e6f4a2a9f7a7692dfebe1c0480633fc74d98491ed0b7e47699bf916ccbd44df504047039f4a7f80f0e5cbb41685beaeb2
7
+ data.tar.gz: ec5512e437deb49920c60d8bc63c5691b1ae24a8b59b3ad0ab5da15eff22e8b4c303afa5dd7f3892e46483b82603cc45e534196d90b8d55cd54f4801ef729a1a
@@ -57,8 +57,10 @@ module Inferno
57
57
  end
58
58
 
59
59
  # @private
60
- def invalid_resource_message(profile_url)
61
- "Resource does not conform to the profile: #{profile_url}"
60
+ def invalid_resource_message(resource, profile_url)
61
+ return "Resource does not conform to the profile: #{profile_url}" if profile_url.present?
62
+
63
+ "Resource does not conform to the base #{resource&.resourceType} profile."
62
64
  end
63
65
 
64
66
  # Validate a FHIR resource
@@ -70,7 +72,7 @@ module Inferno
70
72
  # @return [void]
71
73
  def assert_valid_resource(resource: self.resource, profile_url: nil, validator: :default)
72
74
  assert resource_is_valid?(resource:, profile_url:, validator:),
73
- invalid_resource_message(profile_url)
75
+ invalid_resource_message(resource, profile_url)
74
76
  end
75
77
 
76
78
  # Validate each entry of a Bundle