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

Temporal precision is not respected on DateDt elements #101

Closed
jacksonjesse opened this Issue Feb 4, 2015 · 1 comment

Comments

Projects
None yet
1 participant
@jacksonjesse

jacksonjesse commented Feb 4, 2015

For example, if you use the following call on a Patient element:

patient.setBirthDate(Calendar.getInstance().getTime(), TemporalPrecisionEnum.DAY);

The resultant XML appears as follow:

<birthDate value="2015-02-04T21:14:06"/>

This works for resources that contain DateTimeDt elements, but not DateDt elements.

@jacksonjesse

This comment has been minimized.

jacksonjesse commented Feb 4, 2015

There appears to be a workaround to this issue which is to construct the DateDt and then switch off zulu time as follows:

DateDt date = new DateDt(Calendar.getInstance().getTime());
date.setTimeZoneZulu(false);
patient.setBirthDate(date);

However, this still seems like a bug to me. Even if zulu time is specified, the precision should still be respected.

@jamesagnew jamesagnew closed this in c8bd93b Feb 9, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment