hapi-fhir-jpaserver-starter icon indicating copy to clipboard operation
hapi-fhir-jpaserver-starter copied to clipboard

Why are there two settings for creating missing resources

Open janvdpol opened this issue 4 years ago • 3 comments

See file https://github.com/hapifhir/hapi-fhir-jpaserver-starter/blob/master/src/main/java/ca/uhn/fhir/jpa/starter/FhirServerConfigCommon.java on line 95 and 102.

setAutoCreatePlaceholderReferenceTargets is being called twice and (obviously) only acting upon allowPlaceholderReferences variable in hapi.properties.

Is this intended?

janvdpol avatar May 14 '20 07:05 janvdpol

I think this is a bug because there are two different properties from hapi.properties file (auto_create_placeholder_reference_targets and allow_placeholder_references) that initialize the same ca.uhn.fhir.jpa.api.config.DaoConfig property (myAutoCreatePlaceholderReferenceTargets):

DaoConfig retVal = new DaoConfig();
...
retVal.setAutoCreatePlaceholderReferenceTargets(this.autoCreatePlaceholderReferenceTargets);
...
retVal.setAutoCreatePlaceholderReferenceTargets(this.allowPlaceholderReferences);

This makes the auto_create_placeholder_reference_targets property completely useless since its value is overridden by the allow_placeholder_references value.

j-fbriere avatar Jun 05 '20 19:06 j-fbriere

@j-fbriere You are right. I just asked this question in the fhir chat

I'll be glad to send a PR, if you are all ok

keerthivasan-r avatar Jul 27 '20 11:07 keerthivasan-r

I'll be glad to send a PR, if you are all ok

Please do, thank you.

j-fbriere avatar Jul 27 '20 15:07 j-fbriere

Closing as stale

jkiddo avatar Apr 16 '24 18:04 jkiddo