Skip to content
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
1 change: 1 addition & 0 deletions lib/x_road.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 25 additions & 0 deletions lib/x_road/services/tam.rb
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion lib/x_road/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module XRoad
VERSION = '0.3.3.1'
VERSION = '0.4.0'
end