update to new service class
This commit is contained in:
@@ -31,7 +31,7 @@ public class StarterCdsHooksConfig {
|
||||
public ICdsCrDiscoveryServiceRegistry cdsCrDiscoveryServiceRegistry() {
|
||||
CdsCrDiscoveryServiceRegistry registry = new CdsCrDiscoveryServiceRegistry();
|
||||
registry.unregister(FhirVersionEnum.R4);
|
||||
registry.register(FhirVersionEnum.R4, UpdatedCrDiscoveryServiceR4.class);
|
||||
registry.register(FhirVersionEnum.R4, UpdatedCrDiscoveryService.class);
|
||||
return registry;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public class StarterCdsHooksConfig {
|
||||
public ICdsCrServiceRegistry cdsCrServiceRegistry() {
|
||||
CdsCrServiceRegistry registry = new CdsCrServiceRegistry();
|
||||
registry.unregister(FhirVersionEnum.R4);
|
||||
registry.register(FhirVersionEnum.R4, UpdatedCdsCrServiceR4.class);
|
||||
registry.register(FhirVersionEnum.R4, UpdatedCdsCrService.class);
|
||||
return registry;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,20 +6,20 @@ import ca.uhn.hapi.fhir.cdshooks.api.ICdsConfigService;
|
||||
import org.hl7.fhir.r4.model.BooleanType;
|
||||
import org.hl7.fhir.r4.model.Parameters;
|
||||
import org.opencds.cqf.fhir.api.Repository;
|
||||
import org.opencds.cqf.fhir.cr.hapi.cdshooks.CdsCrServiceR4;
|
||||
import org.opencds.cqf.fhir.cr.hapi.cdshooks.CdsCrService;
|
||||
|
||||
import static org.opencds.cqf.fhir.utility.Constants.APPLY_PARAMETER_DATA;
|
||||
import static org.opencds.cqf.fhir.utility.r4.Parameters.part;
|
||||
|
||||
public class UpdatedCdsCrServiceR4 extends CdsCrServiceR4 {
|
||||
public UpdatedCdsCrServiceR4(
|
||||
public class UpdatedCdsCrService extends CdsCrService {
|
||||
public UpdatedCdsCrService(
|
||||
RequestDetails theRequestDetails, Repository theRepository, ICdsConfigService theCdsConfigService) {
|
||||
super(theRequestDetails, theRepository, theCdsConfigService);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Parameters encodeParams(CdsServiceRequestJson theJson) {
|
||||
Parameters parameters = super.encodeParams(theJson);
|
||||
var parameters = (Parameters) super.encodeParams(theJson);
|
||||
if (parameters.hasParameter(APPLY_PARAMETER_DATA)) {
|
||||
parameters.addParameter(part("useServerData", new BooleanType(false)));
|
||||
}
|
||||
@@ -2,10 +2,10 @@ package ca.uhn.fhir.jpa.starter.cdshooks;
|
||||
|
||||
import org.hl7.fhir.instance.model.api.IIdType;
|
||||
import org.opencds.cqf.fhir.api.Repository;
|
||||
import org.opencds.cqf.fhir.cr.hapi.cdshooks.discovery.CrDiscoveryServiceR4;
|
||||
import org.opencds.cqf.fhir.cr.hapi.cdshooks.discovery.CrDiscoveryService;
|
||||
|
||||
public class UpdatedCrDiscoveryServiceR4 extends CrDiscoveryServiceR4 {
|
||||
public UpdatedCrDiscoveryServiceR4(IIdType thePlanDefinitionId, Repository theRepository) {
|
||||
public class UpdatedCrDiscoveryService extends CrDiscoveryService {
|
||||
public UpdatedCrDiscoveryService(IIdType thePlanDefinitionId, Repository theRepository) {
|
||||
super(thePlanDefinitionId, theRepository);
|
||||
maxUriLength = 6000;
|
||||
}
|
||||
@@ -123,7 +123,7 @@ hapi:
|
||||
data:
|
||||
search_parameter_mode: USE_SEARCH_PARAMETERS # AUTO, USE_SEARCH_PARAMETERS, FILTER_IN_MEMORY
|
||||
terminology_parameter_mode: FILTER_IN_MEMORY # AUTO, USE_VALUE_SET_URL, USE_INLINE_CODES, FILTER_IN_MEMORY
|
||||
profile_mode: OFF # ENFORCED, DECLARED, OPTIONAL, TRUST, OFF
|
||||
profile_mode: DECLARED # ENFORCED, DECLARED, OPTIONAL, TRUST, OFF
|
||||
|
||||
cdshooks:
|
||||
enabled: false
|
||||
|
||||
@@ -124,7 +124,7 @@ hapi:
|
||||
data:
|
||||
search_parameter_mode: USE_SEARCH_PARAMETERS # AUTO, USE_SEARCH_PARAMETERS, FILTER_IN_MEMORY
|
||||
terminology_parameter_mode: FILTER_IN_MEMORY # AUTO, USE_VALUE_SET_URL, USE_INLINE_CODES, FILTER_IN_MEMORY
|
||||
profile_mode: OFF # ENFORCED, DECLARED, OPTIONAL, TRUST, OFF
|
||||
profile_mode: DECLARED # ENFORCED, DECLARED, OPTIONAL, TRUST, OFF
|
||||
|
||||
cdshooks:
|
||||
enabled: true
|
||||
|
||||
Reference in New Issue
Block a user