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

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

Comments

Projects
None yet
2 participants
@dmuylwyk
Collaborator

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

This comment has been minimized.

Show comment
Hide comment
@jamesagnew

jamesagnew Mar 28, 2017

Owner
Owner

jamesagnew commented Mar 28, 2017

@dmuylwyk

This comment has been minimized.

Show comment
Hide comment
@dmuylwyk

dmuylwyk Mar 28, 2017

Collaborator

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?

Collaborator

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

This comment has been minimized.

Show comment
Hide comment
@dmuylwyk

dmuylwyk Mar 28, 2017

Collaborator

Re: my earlier comment.

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

Collaborator

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

This comment has been minimized.

Show comment
Hide comment
@dmuylwyk

dmuylwyk Mar 28, 2017

Collaborator

See #611.

Collaborator

dmuylwyk commented Mar 28, 2017

See #611.

dmuylwyk added a commit that referenced this issue Mar 29, 2017

New DSTU2 FhirInstanceValidator bean exposed. (#611)
Merging with master, issue #609 will be closed.
@dmuylwyk

This comment has been minimized.

Show comment
Hide comment
@dmuylwyk

dmuylwyk Mar 29, 2017

Collaborator

Merged into master in commit 4748c8b. Closing issue.

Collaborator

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