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

Need to implement a bean for a DSTU2 FhirInstanceValidator. #609

Closed
dmuylwyk opened this issue Mar 28, 2017 · 6 comments
Closed

Need to implement a bean for a DSTU2 FhirInstanceValidator. #609

dmuylwyk opened this issue Mar 28, 2017 · 6 comments
Assignees
Labels

Comments

@dmuylwyk
Copy link
Collaborator

@dmuylwyk dmuylwyk commented Mar 28, 2017

Here's what I think I need to do in hapi-fhir in order to implement bean for a DSTU2 FhirInstanceValidator:

In BaseDstu3Config, I have this at Line 67:

	@Bean(name = "myInstanceValidatorDstu3")
	@Lazy
	public IValidatorModule instanceValidatorDstu3() {
		FhirInstanceValidator val = new FhirInstanceValidator();
		val.setBestPracticeWarningLevel(BestPracticeWarningLevel.Warning);
		val.setValidationSupport(validationSupportChainDstu3());
		return val;
	}

In FhirResourceDaoDstu3, I have this at Line 70:

	@Autowired()
	@Qualifier("myInstanceValidatorDstu3")
	private IValidatorModule myInstanceValidator;

And this at Line 131:

		validator.registerValidatorModule(myInstanceValidator);

Therefore...

In BaseDstu2Config, I should refactor this to be as BaseDstu3Config.

In FhirResourceDaoDstu2, I should refactor this at Line 127 to be as FhirResourceDaoDstu3:

		FhirInstanceValidator val = new FhirInstanceValidator();
		val.setBestPracticeWarningLevel(BestPracticeWarningLevel.Warning);
		val.setValidationSupport(new ValidationSupportChain(new DefaultProfileValidationSupport(), myJpaValidationSupport));
		validator.registerValidatorModule(val);
@dmuylwyk dmuylwyk self-assigned this Mar 28, 2017
@jamesagnew
Copy link
Owner

@jamesagnew jamesagnew commented Mar 28, 2017

@dmuylwyk
Copy link
Collaborator Author

@dmuylwyk dmuylwyk commented Mar 28, 2017

Looks like this may be more complicated.

I think I'll need to create and/or modify DSTU2 equivalents of the following:

Is that correct?

@dmuylwyk
Copy link
Collaborator Author

@dmuylwyk dmuylwyk commented Mar 28, 2017

Re: my earlier comment.

I've figured out how to do this without such extensive modification. Submitting a pull request.

@dmuylwyk
Copy link
Collaborator Author

@dmuylwyk dmuylwyk commented Mar 28, 2017

See #611.

dmuylwyk added a commit that referenced this issue Mar 29, 2017
Merging with master, issue #609 will be closed.
@dmuylwyk
Copy link
Collaborator Author

@dmuylwyk dmuylwyk commented Mar 29, 2017

Merged into master in commit 4748c8b. Closing issue.

@dmuylwyk dmuylwyk closed this Mar 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.