Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes ehrscape compo uid #520

Merged
merged 11 commits into from
Sep 9, 2021
Merged

Fixes ehrscape compo uid #520

merged 11 commits into from
Sep 9, 2021

Conversation

jakesmolka
Copy link
Contributor

@jakesmolka jakesmolka commented May 31, 2021

Changes

  • EhrScape UID fix

Related issue

fixes #481

Additional information and checks

  • Pull request linked in changelog

@jakesmolka jakesmolka marked this pull request as draft June 2, 2021 09:16
@jakesmolka
Copy link
Contributor Author

One result from the failing tests is that it can't accept structures like this in folders anymore:

"items": [
        {
      		"id": {
      			"_type": "HIER_OBJECT_ID",
      			"value": "d936409e-901f-4994-8d33-ed104d460456"
      		},
      		"namespace": "my.system.id",
      		"type": "VERSIONED_COMPOSITION"
      	}
      ]

The thrown error:

"Problem deserializing property 'id' (expected type: [simple type, class java.lang.Object]; actual type: java.util.LinkedHashMap), problem: argument type mismatch\n at [Source: (StringReader); line: 1, column: 32669] (through reference chain: com.nedap.archie.rm.directory.Folder["folders"]->java.util.ArrayList[0]->com.nedap.archie.rm.directory.Folder["items"]->java.util.ArrayList[0]->com.nedap.archie.rm.support.identification.ObjectRef["id"])"

This particular case is invoked just by creating a folder. Code-wise this means the controller wants to map the input to an Archie Folder. There might be some EHRbase custom de-serialization code being applied here, but apart from that this is plain Archie and Spring Boot.

@jakesmolka jakesmolka mentioned this pull request Jul 28, 2021
1 task
Copy link
Contributor

@ppazos ppazos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good @jakesmolka and fixes what I commented for #552 (comment)

@ppazos
Copy link
Contributor

ppazos commented Jul 31, 2021

@jakesmolka from your comment and the error, it seems it comes from the Archie JSON parser, since the structure seems correct. Maybe, since OBJECT_REF has subclasses, the _type is needed there to be able to parse the correct type.

@jakesmolka
Copy link
Contributor Author

@ppazos right! @subigre already fixed that in openEHR/archie#338 and therefore the bump in the last commit 🙂
The other problems seem to be results of the UID change though.

@jakesmolka jakesmolka marked this pull request as ready for review September 9, 2021 08:46
@jakesmolka jakesmolka self-assigned this Sep 9, 2021
@sonarcloud
Copy link

sonarcloud bot commented Sep 9, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@jakesmolka jakesmolka merged commit d3e7895 into develop Sep 9, 2021
@jakesmolka jakesmolka deleted the feature/ehrscape_uid_fix branch September 9, 2021 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect uid responses from Commit FLAT JSON
2 participants