diff --git a/gradle.properties b/gradle.properties index f2487452..c5cf0818 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -version = 1.9.5 +version = 1.9.6 group = com.cabolabs \ No newline at end of file diff --git a/src/main/groovy/com/cabolabs/openehr/formats/OpenEhrJsonParserQuick.groovy b/src/main/groovy/com/cabolabs/openehr/formats/OpenEhrJsonParserQuick.groovy index 8e24f934..6ecea8e9 100644 --- a/src/main/groovy/com/cabolabs/openehr/formats/OpenEhrJsonParserQuick.groovy +++ b/src/main/groovy/com/cabolabs/openehr/formats/OpenEhrJsonParserQuick.groovy @@ -722,8 +722,6 @@ class OpenEhrJsonParserQuick { def slurper = new JsonSlurper() def map = slurper.parseText(json) - // FIXME: EHR is not LOCATABLE and doesn't have info about the rm_version! - // For the API EHR we could access the EHR_STATUS.archetype_details.rm_version, but for RM EHRs, ehr_status is an OBJECT_REF that should be resolved. if (this.schemaValidate) { // independently from schemaFlavor, this will always be "api" since it is asking to parse an API EhrDto diff --git a/src/main/groovy/com/cabolabs/openehr/formats/OpenEhrJsonSerializer.groovy b/src/main/groovy/com/cabolabs/openehr/formats/OpenEhrJsonSerializer.groovy index eb048fff..d7c36e07 100644 --- a/src/main/groovy/com/cabolabs/openehr/formats/OpenEhrJsonSerializer.groovy +++ b/src/main/groovy/com/cabolabs/openehr/formats/OpenEhrJsonSerializer.groovy @@ -1392,10 +1392,10 @@ class OpenEhrJsonSerializer { { def out = [:] - out.issuer = o.issuer - out.assigner = o.assigner out.id = o.id - out.type = o.type + if (o.issuer) out.issuer = o.issuer + if (o.assigner) out.assigner = o.assigner + if (o.type) out.type = o.type return out } diff --git a/src/test/groovy/com/cabolabs/openehr/opt/ValidationFlowTest.groovy b/src/test/groovy/com/cabolabs/openehr/opt/ValidationFlowTest.groovy index 38931383..ed6c2f1a 100644 --- a/src/test/groovy/com/cabolabs/openehr/opt/ValidationFlowTest.groovy +++ b/src/test/groovy/com/cabolabs/openehr/opt/ValidationFlowTest.groovy @@ -1072,6 +1072,7 @@ class ValidationFlowTest extends GroovyTestCase { def parser = new OpenEhrJsonParserQuick(true) parser.setSchemaFlavorAPI() PersonDto person = parser.parsePersonDto(json_person) + //PersonDto person = parser.parseActorDto(json_person) // This also works println parser.getJsonValidationErrors()