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

@hdconradi hdconradi commented Apr 9, 2018

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) {

This comment has been minimized.

@jamesagnew

jamesagnew Apr 9, 2018
Collaborator

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. :)

This comment has been minimized.

@hdconradi

hdconradi Apr 11, 2018
Author Contributor

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 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 hdconradi:extension_domains_configuration_in_fhr_instance_validator branch from d6416f0 to e87d827 Apr 11, 2018
@hdconradi
Copy link
Contributor Author

@hdconradi hdconradi commented Apr 11, 2018

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 hdconradi:extension_domains_configuration_in_fhr_instance_validator branch from e87d827 to 46f7e9d Jun 5, 2018
@hdconradi
Copy link
Contributor Author

@hdconradi hdconradi commented Jun 5, 2018

Rebase after 3.4

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

@hdconradi hdconradi commented Sep 27, 2018

Rebase after 3.5.0

Heinz-Dieter Conradi added 5 commits Nov 28, 2018
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 hdconradi:extension_domains_configuration_in_fhr_instance_validator branch from c3232f8 to a8957b9 Nov 28, 2018
@hdconradi
Copy link
Contributor Author

@hdconradi hdconradi commented Nov 28, 2018

Rebase after 3.6

@jamesagnew
Copy link
Collaborator

@jamesagnew jamesagnew commented Dec 13, 2018

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
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
jamesagnew added a commit that referenced this pull request Dec 13, 2018
@hdconradi hdconradi deleted the hdconradi:extension_domains_configuration_in_fhr_instance_validator branch Dec 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants