From d420cb75af7ae21946d679545490e19e21f96c22 Mon Sep 17 00:00:00 2001 From: Pablo Pazos Date: Sun, 16 Oct 2022 13:45:46 -0300 Subject: [PATCH] cleanup --- .../openehr/rm_1_0_2/ehr/EhrAccess.groovy | 3 ++- .../openehr/opt/ValidationFlowTest.groovy | 21 ++++--------------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/src/main/groovy/com/cabolabs/openehr/rm_1_0_2/ehr/EhrAccess.groovy b/src/main/groovy/com/cabolabs/openehr/rm_1_0_2/ehr/EhrAccess.groovy index c5481fe7..ec661939 100644 --- a/src/main/groovy/com/cabolabs/openehr/rm_1_0_2/ehr/EhrAccess.groovy +++ b/src/main/groovy/com/cabolabs/openehr/rm_1_0_2/ehr/EhrAccess.groovy @@ -19,6 +19,7 @@ class EhrAccess extends Locatable { this.dataPath = ((parent.dataPath != '/') ? '/' : '') + parentAttribute this.parent = parent - //this.other_details.fillPathable(this, "other_details") + // From the RM 1.0.2 spec we don't know if AccessControlSetting is Pathable + //this.settings.fillPathable(this, "settings") } } diff --git a/src/test/groovy/com/cabolabs/openehr/opt/ValidationFlowTest.groovy b/src/test/groovy/com/cabolabs/openehr/opt/ValidationFlowTest.groovy index 573d285a..29645046 100644 --- a/src/test/groovy/com/cabolabs/openehr/opt/ValidationFlowTest.groovy +++ b/src/test/groovy/com/cabolabs/openehr/opt/ValidationFlowTest.groovy @@ -886,14 +886,10 @@ class ValidationFlowTest extends GroovyTestCase { def parser = new OpenEhrJsonParser(true) // does RM schema validation not API Person person = parser.parseJson(json_person) - //println person - - println parser.getJsonValidationErrors() + //println parser.getJsonValidationErrors() assert person - - // SETUP OPT REPO OptRepository repo = new OptRepositoryFSImpl(getClass().getResource(PS + "opts").toURI()) OptManager opt_manager = OptManager.getInstance() @@ -926,8 +922,6 @@ class ValidationFlowTest extends GroovyTestCase { assert organization - - // SETUP OPT REPO OptRepository repo = new OptRepositoryFSImpl(getClass().getResource(PS + "opts").toURI()) OptManager opt_manager = OptManager.getInstance() @@ -955,12 +949,11 @@ class ValidationFlowTest extends GroovyTestCase { //println person - println parser.getJsonValidationErrors() + //println parser.getJsonValidationErrors() assert group - // SETUP OPT REPO OptRepository repo = new OptRepositoryFSImpl(getClass().getResource(PS + "opts").toURI()) OptManager opt_manager = OptManager.getInstance() @@ -988,12 +981,10 @@ class ValidationFlowTest extends GroovyTestCase { // FIXME: this should fail because the uid is mandatory and it's not in the JSON - println parser.getJsonValidationErrors() + //println parser.getJsonValidationErrors() assert agent - - // SETUP OPT REPO OptRepository repo = new OptRepositoryFSImpl(getClass().getResource(PS + "opts").toURI()) OptManager opt_manager = OptManager.getInstance() @@ -1004,8 +995,6 @@ class ValidationFlowTest extends GroovyTestCase { RmValidator validator = new RmValidator(opt_manager) RmValidationReport report = validator.dovalidate(agent, 'com.cabolabs.openehr_opt.namespaces.default') - println report.errors - assert !report.errors } @@ -1021,12 +1010,10 @@ class ValidationFlowTest extends GroovyTestCase { //println person - println parser.getJsonValidationErrors() + //println parser.getJsonValidationErrors() assert role - - // SETUP OPT REPO OptRepository repo = new OptRepositoryFSImpl(getClass().getResource(PS + "opts").toURI()) OptManager opt_manager = OptManager.getInstance()