diff --git a/Changelog.md b/Changelog.md index 871f51c..9609c0c 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,6 @@ +Release 0.4.0 +* Add Tam subsystem with 'registriisik' service + Release 0.3.3.1 * Moved under a new repo https://github.com/domify/x_road please update. diff --git a/lib/x_road.rb b/lib/x_road.rb index 7d270c7..56555b0 100644 --- a/lib/x_road.rb +++ b/lib/x_road.rb @@ -5,6 +5,7 @@ require 'x_road/services/rr.rb' require 'x_road/services/ehis.rb' require 'x_road/services/kpr.rb' +require 'x_road/services/tam.rb' module XRoad class << self diff --git a/lib/x_road/services/tam.rb b/lib/x_road/services/tam.rb new file mode 100644 index 0000000..b3e87f7 --- /dev/null +++ b/lib/x_road/services/tam.rb @@ -0,0 +1,25 @@ +module XRoad + # Tam is a subsystem managed by Terviseamet's (Health Board) + # IT-branch TEHIK. + class Tam < XRoad::ActiveXRoad6 + class << self + def producer_path + 'GOV/70008799/tam' + end + + # NS should be: 'http://rr.x-road.eu/producer' as V6 standard suggest, but + # according to Ehis letter at 13.12.2017, ehis uses old one, thus we overwrite producer ns + # def producer_ns + # 'http://producers.tam.xtee.riik.ee/producer/tam' + # end + + def registriisik(personal_code) + service_path = producer_path + '/registriisik/v2' + body = { + isikukood: personal_code + } + request service_path: service_path, body: body + end + end + end +end diff --git a/lib/x_road/version.rb b/lib/x_road/version.rb index 8fbdd09..8ed1cdb 100644 --- a/lib/x_road/version.rb +++ b/lib/x_road/version.rb @@ -1,3 +1,3 @@ module XRoad - VERSION = '0.3.3.1' + VERSION = '0.4.0' end