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

Setting Instant in compo.startTimeValue makes Archie serialization fail #220

Open
7 tasks
ppazos opened this issue May 13, 2021 · 0 comments
Open
7 tasks
Assignees
Labels
bug Something isn't working

Comments

@ppazos
Copy link

ppazos commented May 13, 2021

Configuration information

  • EHRbase version: 0.16.5
  • openEHR_SDK version: develop-SNAPSHOP
  • Archie version:
  • PostgreSQL version:
  • Java Runtime version: 11.0.6
  • Operating System version:

Steps to reproduce

The FHIR bridge has generated code from the SDK. In the composition classes, there is a private TemporalAccessor startTimeValue; field, which accepts, among other values, Instant.

If we do compo.setStartTimeValue(Instant.now()) then use the EHRBase client, the serialization of the compo fails in Archie. (exception below).

With compo.setStartTimeValue(ZonedDateTime.now()) it works OK.

It seems there are some TemporalAccessor implementer classes that are not supported by the Archie serialization.

Actual result

Caused by: com.fasterxml.jackson.databind.JsonMappingException: Unsupported field: Year (through reference chain: com.nedap.archie.rm.composition.Composition["context"]->com.nedap.archie.rm.composition.EventContext["start_time"]->com.nedap.archie.rm.datavalues.quantity.datetime.DvDateTime["value"])
...
Caused by: java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: Year
	at java.base/java.time.Instant.getLong(Instant.java:602) ~[na:na]
	at java.base/java.time.format.DateTimePrintContext.getValue(DateTimePrintContext.java:308) ~[na:na]

Expected result (Acceptance Criteria)

Serialize OK.

Definition of Done

  • Talk to Pieter, he already knows about this and needs to understand why we use TemporalAccessor
  • The defect is checked by an unit or an integration test (Robot)
  • Merge Request approved
  • Unit tests passed
  • Build without errors
  • Release notes prepared
  • No additional runtime warnings
@ppazos ppazos added the bug Something isn't working label May 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants