ndr_lookup 0.3.0 → 0.3.1
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/ndr_lookup/fhir/base.rb +3 -2
- data/lib/ndr_lookup/fhir/odt/organisation.rb +3 -0
- data/lib/ndr_lookup/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c67e55ec9b88c908bc7f68e98ac30da65c563d693da24c43dfea644c1cb2eeaa
|
|
4
|
+
data.tar.gz: e65b75ddde2fa3201cb0352d6db6215b3ff1faa871b6b7ec923625a8345e77b0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 972783e32d189ee2e00ba641f5c9f4d4589844616f22fe3c71f8e7eb5db06daaab1a5004987b052050ef18e70603b04eaac52d1de412aded1c8c539124b3d1ed
|
|
7
|
+
data.tar.gz: c970724bc8e20c8771677a7e4bb1a0cef52614c793f87b7daefc7c3e019f30fed483075dc7aa52f4443e94009ca9c49b861ba276c8f38cef088b119af77fcdc4
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## 0.3.1 / 2026-03-05
|
|
4
|
+
### Fixed
|
|
5
|
+
* Strip whitespace from IDs in FHIR Base.find to prevent bad URI errors
|
|
6
|
+
* Handle ApiError/InvalidURIError gracefully in Organisation.find
|
|
7
|
+
|
|
3
8
|
## 0.3.0 / 2026-02-26
|
|
4
9
|
### Added
|
|
5
10
|
* Added specific error classes (InvalidURIError, UnauthorizedError) for granular error handling
|
data/lib/ndr_lookup/fhir/base.rb
CHANGED
|
@@ -27,8 +27,9 @@ module NdrLookup
|
|
|
27
27
|
# Finds a specific FHIR resource by type and ID
|
|
28
28
|
# @return [Hash] Parsed FHIR resource
|
|
29
29
|
def find(resource_type, id)
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
sanitized_id = id.to_s.strip
|
|
31
|
+
with_error_handling("#{resource_type} with ID '#{sanitized_id}' not found") do
|
|
32
|
+
response = connection.get("#{endpoint}/#{resource_type}/#{sanitized_id}", headers)
|
|
32
33
|
JSON.parse(response.body)
|
|
33
34
|
end
|
|
34
35
|
end
|
|
@@ -21,6 +21,9 @@ module NdrLookup
|
|
|
21
21
|
rescue Client::ResourceNotFound => e
|
|
22
22
|
logger.info("Organization not found: #{e.message}")
|
|
23
23
|
nil
|
|
24
|
+
rescue Client::ApiError, Client::InvalidURIError => e
|
|
25
|
+
logger.warn("Organization lookup failed for '#{id}': #{e.message}")
|
|
26
|
+
nil
|
|
24
27
|
end
|
|
25
28
|
|
|
26
29
|
# ActiveRecord subs .all in to /all which then becomes like finding the id 'all'
|
data/lib/ndr_lookup/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ndr_lookup
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- NCRS Development Team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-03-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activeresource
|