From 404c0770361b1664b97f633fc18fe8bdf33afeff Mon Sep 17 00:00:00 2001 From: Andres Ehrenpreis Date: Tue, 21 Sep 2021 23:42:44 +0300 Subject: [PATCH 01/11] WIP: Add basic tam service file --- lib/x_road/services/tam.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 lib/x_road/services/tam.rb diff --git a/lib/x_road/services/tam.rb b/lib/x_road/services/tam.rb new file mode 100644 index 0000000..4568734 --- /dev/null +++ b/lib/x_road/services/tam.rb @@ -0,0 +1,22 @@ +module XRoad + # Terviseamet (Health Board) + class Tam < XRoad::ActiveXRoad6 + class << self + def producer_path + 'GOV/70008799​/tam' + end + + def producer_ns + 'http://producers.tam.xtee.riik.ee/producer/tam' + end + + def registriisik(personal_code) + service_path = producer_path + '/registriisik/v1' + body = { + isikukood: personal_code + } + request service_path: service_path, body: body, user_id: user_id + end + end + end +end From 34d8f4db9709445388f099af1304cad26c4c9d01 Mon Sep 17 00:00:00 2001 From: Andres Ehrenpreis Date: Wed, 13 Oct 2021 01:26:32 +0300 Subject: [PATCH 02/11] Require TAM service in x_road.rb lib --- lib/x_road.rb | 1 + 1 file changed, 1 insertion(+) 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 From 81c368be34f4f9147032bc3fb81bd45a0004ca93 Mon Sep 17 00:00:00 2001 From: Andres Ehrenpreis Date: Wed, 13 Oct 2021 01:26:52 +0300 Subject: [PATCH 03/11] Add TAM allowedMethods and listMethods methods --- lib/x_road/services/tam.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/x_road/services/tam.rb b/lib/x_road/services/tam.rb index 4568734..4ca497f 100644 --- a/lib/x_road/services/tam.rb +++ b/lib/x_road/services/tam.rb @@ -4,10 +4,15 @@ class Tam < XRoad::ActiveXRoad6 class << self def producer_path 'GOV/70008799​/tam' + # 'GOV/70009770/digilugu' end - def producer_ns - 'http://producers.tam.xtee.riik.ee/producer/tam' + def allowed_methods + request service_path: producer_path + '/allowedMethods' + end + + def list_methods + request service_path: producer_path + '/listMethods' end def registriisik(personal_code) @@ -19,4 +24,4 @@ def registriisik(personal_code) end end end -end +end \ No newline at end of file From 36070337a034506492e86ef886b9d95fbd819eb4 Mon Sep 17 00:00:00 2001 From: Andres Ehrenpreis Date: Sun, 24 Oct 2021 12:50:00 +0300 Subject: [PATCH 04/11] Test problematic Tam service producer_path --- lib/x_road/services/tam.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/x_road/services/tam.rb b/lib/x_road/services/tam.rb index 4ca497f..b26e0a0 100644 --- a/lib/x_road/services/tam.rb +++ b/lib/x_road/services/tam.rb @@ -3,7 +3,7 @@ module XRoad class Tam < XRoad::ActiveXRoad6 class << self def producer_path - 'GOV/70008799​/tam' + '70008799​/tam' # 'GOV/70009770/digilugu' end From 58dfc5a184d1ef294efc63350b23f15322d204fa Mon Sep 17 00:00:00 2001 From: Andres Ehrenpreis Date: Sun, 24 Oct 2021 12:51:28 +0300 Subject: [PATCH 05/11] Test problematic Tam service producer_path 2 --- lib/x_road/services/tam.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/x_road/services/tam.rb b/lib/x_road/services/tam.rb index b26e0a0..0648ad8 100644 --- a/lib/x_road/services/tam.rb +++ b/lib/x_road/services/tam.rb @@ -3,7 +3,7 @@ module XRoad class Tam < XRoad::ActiveXRoad6 class << self def producer_path - '70008799​/tam' + 'ee-dev/70008799​/tam' # 'GOV/70009770/digilugu' end From 757340eac58a5c59b085832ddcb517876a4443dd Mon Sep 17 00:00:00 2001 From: Andres Ehrenpreis Date: Sun, 24 Oct 2021 12:56:01 +0300 Subject: [PATCH 06/11] Revert previous tests --- lib/x_road/services/tam.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/x_road/services/tam.rb b/lib/x_road/services/tam.rb index 0648ad8..4ca497f 100644 --- a/lib/x_road/services/tam.rb +++ b/lib/x_road/services/tam.rb @@ -3,7 +3,7 @@ module XRoad class Tam < XRoad::ActiveXRoad6 class << self def producer_path - 'ee-dev/70008799​/tam' + 'GOV/70008799​/tam' # 'GOV/70009770/digilugu' end From a3df9d958e4efe34bad7fb2ff8695f753f936a4c Mon Sep 17 00:00:00 2001 From: Andres Ehrenpreis Date: Tue, 26 Oct 2021 19:24:57 +0300 Subject: [PATCH 07/11] Fix tam subservice code --- lib/x_road/services/tam.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/x_road/services/tam.rb b/lib/x_road/services/tam.rb index 4ca497f..94f8bc1 100644 --- a/lib/x_road/services/tam.rb +++ b/lib/x_road/services/tam.rb @@ -3,8 +3,7 @@ module XRoad class Tam < XRoad::ActiveXRoad6 class << self def producer_path - 'GOV/70008799​/tam' - # 'GOV/70009770/digilugu' + 'GOV/70008799/tam' end def allowed_methods From f56ad12f59fa59416d9af4a8f9cd969114aa0f8d Mon Sep 17 00:00:00 2001 From: Andres Ehrenpreis Date: Sun, 31 Oct 2021 13:01:39 +0200 Subject: [PATCH 08/11] Remove user_id from tam.registriisik --- lib/x_road/services/tam.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/x_road/services/tam.rb b/lib/x_road/services/tam.rb index 94f8bc1..bd7e46f 100644 --- a/lib/x_road/services/tam.rb +++ b/lib/x_road/services/tam.rb @@ -19,7 +19,7 @@ def registriisik(personal_code) body = { isikukood: personal_code } - request service_path: service_path, body: body, user_id: user_id + request service_path: service_path, body: body end end end From 6525b9c21a848223f45b065864bc414663d483b8 Mon Sep 17 00:00:00 2001 From: Andres Ehrenpreis Date: Sun, 31 Oct 2021 15:09:41 +0200 Subject: [PATCH 09/11] Bump version to 0.4.0, add Changelog --- Changelog.md | 3 +++ lib/x_road/services/tam.rb | 3 ++- lib/x_road/version.rb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) 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/services/tam.rb b/lib/x_road/services/tam.rb index bd7e46f..b986b77 100644 --- a/lib/x_road/services/tam.rb +++ b/lib/x_road/services/tam.rb @@ -1,5 +1,6 @@ module XRoad - # Terviseamet (Health Board) + # Tam is a subsystem managed by Terviseamet's (Health Board) + # IT-branch TEHIK. class Tam < XRoad::ActiveXRoad6 class << self def producer_path diff --git a/lib/x_road/version.rb b/lib/x_road/version.rb index 32706ed..8ed1cdb 100644 --- a/lib/x_road/version.rb +++ b/lib/x_road/version.rb @@ -1,3 +1,3 @@ module XRoad - VERSION = '0.3.0' + VERSION = '0.4.0' end From 7e6f79f8089d15af3b6587c125f0fefbc689e288 Mon Sep 17 00:00:00 2001 From: Andres Ehrenpreis Date: Fri, 12 Nov 2021 11:52:19 +0200 Subject: [PATCH 10/11] Remove allowed_methods and list_methods from tam subservice --- lib/x_road/services/tam.rb | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/x_road/services/tam.rb b/lib/x_road/services/tam.rb index b986b77..613291f 100644 --- a/lib/x_road/services/tam.rb +++ b/lib/x_road/services/tam.rb @@ -7,14 +7,6 @@ def producer_path 'GOV/70008799/tam' end - def allowed_methods - request service_path: producer_path + '/allowedMethods' - end - - def list_methods - request service_path: producer_path + '/listMethods' - end - def registriisik(personal_code) service_path = producer_path + '/registriisik/v1' body = { @@ -24,4 +16,4 @@ def registriisik(personal_code) end end end -end \ No newline at end of file +end From c3bfd6b9408248d9afe87613e196b21dfcb1d985 Mon Sep 17 00:00:00 2001 From: Andres Ehrenpreis Date: Wed, 17 Nov 2021 15:18:24 +0200 Subject: [PATCH 11/11] WIP: Change tam.registriisik service version 1->2 --- lib/x_road/services/tam.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/x_road/services/tam.rb b/lib/x_road/services/tam.rb index 613291f..b3e87f7 100644 --- a/lib/x_road/services/tam.rb +++ b/lib/x_road/services/tam.rb @@ -7,8 +7,14 @@ 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/v1' + service_path = producer_path + '/registriisik/v2' body = { isikukood: personal_code }