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

Core library bump 6.3.7 #5772

Open
wants to merge 145 commits into
base: master
Choose a base branch
from
Open

Core library bump 6.3.7 #5772

wants to merge 145 commits into from

Conversation

dotasek
Copy link
Contributor

@dotasek dotasek commented Mar 11, 2024

This is a version bump of the org.hl7.fhir.core library from 6.1.2.2 to 6.3.7.

The trivial changes are matching changing method signatures and class changes.

The more difficult changes revolve around the resource validation. HAPI provides its own implementations of IWorkerContext, which are used by core's InstanceValidator to validate resources.

InstanceValidator has changed significantly with regard to logic, particularly regarding code validation:

org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java

See comments for discussion of some of these changes.

dotasek and others added 30 commits December 13, 2023 17:57
private static XhtmlNode extractNarrativeFromDomainResource(@Nonnull IBaseResource theResource, FhirContext ctx) {
if (ctx.getResourceDefinition(theResource).getChildByName("text") != null) {
private static XhtmlNode extractNarrativeFromElement(@Nonnull IBase theElement, FhirContext ctx) {
if (ctx.getElementDefinition(theElement.getClass()).getChildByName("text") != null) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

What happens if ctx.getElementDefinition(theElement.getClass()) returns null?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a @jamesagnew commit. If you have a quick minute, James, could you check it out. If not, I'll investigate.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think at a minimum you want to check for null and either throw some sort of meaningful Exception or add an error to the output.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a "should not happen" kind of thing. It's not impossible if someone decides to create their own custom class implementing IBase and don't register it properly, but if someone does that there are all kinds of things that will fail. Might be nice to include a Validate.notNull() check here, but even that is probably never going to hit.

Copy link
Collaborator

@lukedegruchy lukedegruchy left a comment

Choose a reason for hiding this comment

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

Approved pending resolution of comments and also strongly suggest getting James to look at the most senstive production code changes.

@dotasek
Copy link
Contributor Author

dotasek commented May 13, 2024

Approved pending resolution of comments and also strongly suggest getting James to look at the most senstive production code changes.

I wholeheartedly agree. Thank you for the initial review, it's shaking out changes that should be commented on for the record.

Attending to code comments now. I've tagged James wherever he comes into the conversation.

It was working when it left the shop.
@@ -0,0 +1,7 @@
---
Copy link
Collaborator

Choose a reason for hiding this comment

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

This file should be moved to the 7.4.0 directory now. :)

provide some guidance on how to derive similar debugging code from the org.hl7.fhir.core test cases.
*/
@Disabled
public class VersionSpecificWorkerContextWrapperCoreTest {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is super cool!

Copy link
Collaborator

@jamesagnew jamesagnew left a comment

Choose a reason for hiding this comment

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

Awesome work!

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.

None yet

3 participants