Skip to content

Commit

Permalink
fixed json serializer of dv_identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
ppazos committed May 25, 2023
1 parent b843661 commit 1a72609
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = 1.9.5
version = 1.9.6
group = com.cabolabs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 1a72609

Please sign in to comment.