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

Extension domains configuration for the fhr instance validator #917

Conversation

hdconradi
Copy link
Contributor

Creating larger questionnaires with extension domains will currently produce lot's of information messages with regard Unkown extensions which might drown the more critical warnings and errors.
The InstanceValidator already has a data structure which is used for registering extension domains, but this data structure is not exposed to client code.

The first of patch for this branch add the necessary functionality for the FhirInstanceValidator in DSTU3 and R4 and the second patch add two tests.

The third and fourth patch are not really about this functionality and can in priniciple remove from this branch and/or moved in their own branches.
The third patch fixes and obvious bug when intialising the FhirInstanceValidator and the forth one tackles a variety of different less important issues.

@@ -70,18 +71,24 @@ public FhirInstanceValidator(IValidationSupport theValidationSupport) {
myValidationSupport = theValidationSupport;
}

private String determineResourceName(Document theDocument) {
Element root = null;
public FhirInstanceValidator setExtensionDomains(List<String> extensionDomains) {
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 very cool. Would you mind to add some javadoc to the setExtensionDomains indicating what the values would be and what the impact of setting them is? I'm assuming that the actual term "extension domain" comes from InstanceValidator so it's probably worth preserving that term, but it's not very intuitive what it would be. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I somehow missed your comment.
And, yes I will of course do it. I will just take a few hours since at the moment I am a bit swamped.
But it should only be hours ...

@coveralls
Copy link

coveralls commented Apr 9, 2018

Coverage Status

Coverage decreased (-0.003%) to 72.706% when pulling 46f7e9d on hdconradi:extension_domains_configuration_in_fhr_instance_validator into 044fc13 on jamesagnew:master.

@hdconradi hdconradi force-pushed the extension_domains_configuration_in_fhr_instance_validator branch from d6416f0 to e87d827 Compare April 11, 2018 22:07
@hdconradi
Copy link
Contributor Author

I have added a bit javadoc and renamed those methods from setExtensionDomains -> setCustomExtensionDomains.
Furthermore I have discovered a (probable) bug for the predefined fhir StructureDefinitions and corrected it in the very first patch.
The tests have been adapted accordingly.

@hdconradi hdconradi force-pushed the extension_domains_configuration_in_fhr_instance_validator branch from e87d827 to 46f7e9d Compare June 5, 2018 15:09
@hdconradi
Copy link
Contributor Author

Rebase after 3.4

@hdconradi hdconradi force-pushed the extension_domains_configuration_in_fhr_instance_validator branch from 46f7e9d to c3232f8 Compare September 27, 2018 15:00
@hdconradi
Copy link
Contributor Author

Rebase after 3.5.0

Heinz-Dieter Conradi added 5 commits November 28, 2018 13:55
http://hl7.org/fhir/tools/StructureDefinition/ -> http://hl7.org/fhir/StructureDefinition/
That makes the entry for the structuredefinition-expression superfluous.

The url behind IG_DEPENDSON_PACKAGE_EXTENSION does not point is not (yet?) valid too.
The for loop was completely superfluous beforehand.
Either fix it as e.g. in this patch or remove it.
- javadoc see
- use diamond operator for generics
- remove throws clause when exception is not thrown
- add TODO's for some cases a NPE might occur.
  My knowledge of the context is not sufficient to suggest the proper
  way to solve this.
@hdconradi hdconradi force-pushed the extension_domains_configuration_in_fhr_instance_validator branch from c3232f8 to a8957b9 Compare November 28, 2018 13:43
@hdconradi
Copy link
Contributor Author

Rebase after 3.6

@jamesagnew
Copy link
Collaborator

Hi @hdconradi - Sorry this took so long to merge, and many thanks for keeping it up to date. I'm merging it now so you don't need to do this any longer. :)

@jamesagnew jamesagnew merged commit 89ede0e into hapifhir:master Dec 13, 2018
jamesagnew added a commit that referenced this pull request Dec 13, 2018
@hdconradi hdconradi deleted the extension_domains_configuration_in_fhr_instance_validator branch December 14, 2018 15:04
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.

3 participants