update to new service class

This commit is contained in:
Brenin Rhodes
2025-03-13 10:48:54 -06:00
parent 9a2d3d31d7
commit 40c3745ad2
5 changed files with 11 additions and 11 deletions

View File

@@ -31,7 +31,7 @@ public class StarterCdsHooksConfig {
public ICdsCrDiscoveryServiceRegistry cdsCrDiscoveryServiceRegistry() { public ICdsCrDiscoveryServiceRegistry cdsCrDiscoveryServiceRegistry() {
CdsCrDiscoveryServiceRegistry registry = new CdsCrDiscoveryServiceRegistry(); CdsCrDiscoveryServiceRegistry registry = new CdsCrDiscoveryServiceRegistry();
registry.unregister(FhirVersionEnum.R4); registry.unregister(FhirVersionEnum.R4);
registry.register(FhirVersionEnum.R4, UpdatedCrDiscoveryServiceR4.class); registry.register(FhirVersionEnum.R4, UpdatedCrDiscoveryService.class);
return registry; return registry;
} }
@@ -39,7 +39,7 @@ public class StarterCdsHooksConfig {
public ICdsCrServiceRegistry cdsCrServiceRegistry() { public ICdsCrServiceRegistry cdsCrServiceRegistry() {
CdsCrServiceRegistry registry = new CdsCrServiceRegistry(); CdsCrServiceRegistry registry = new CdsCrServiceRegistry();
registry.unregister(FhirVersionEnum.R4); registry.unregister(FhirVersionEnum.R4);
registry.register(FhirVersionEnum.R4, UpdatedCdsCrServiceR4.class); registry.register(FhirVersionEnum.R4, UpdatedCdsCrService.class);
return registry; return registry;
} }

View File

@@ -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.BooleanType;
import org.hl7.fhir.r4.model.Parameters; import org.hl7.fhir.r4.model.Parameters;
import org.opencds.cqf.fhir.api.Repository; 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.Constants.APPLY_PARAMETER_DATA;
import static org.opencds.cqf.fhir.utility.r4.Parameters.part; import static org.opencds.cqf.fhir.utility.r4.Parameters.part;
public class UpdatedCdsCrServiceR4 extends CdsCrServiceR4 { public class UpdatedCdsCrService extends CdsCrService {
public UpdatedCdsCrServiceR4( public UpdatedCdsCrService(
RequestDetails theRequestDetails, Repository theRepository, ICdsConfigService theCdsConfigService) { RequestDetails theRequestDetails, Repository theRepository, ICdsConfigService theCdsConfigService) {
super(theRequestDetails, theRepository, theCdsConfigService); super(theRequestDetails, theRepository, theCdsConfigService);
} }
@Override @Override
public Parameters encodeParams(CdsServiceRequestJson theJson) { public Parameters encodeParams(CdsServiceRequestJson theJson) {
Parameters parameters = super.encodeParams(theJson); var parameters = (Parameters) super.encodeParams(theJson);
if (parameters.hasParameter(APPLY_PARAMETER_DATA)) { if (parameters.hasParameter(APPLY_PARAMETER_DATA)) {
parameters.addParameter(part("useServerData", new BooleanType(false))); parameters.addParameter(part("useServerData", new BooleanType(false)));
} }

View File

@@ -2,10 +2,10 @@ package ca.uhn.fhir.jpa.starter.cdshooks;
import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.instance.model.api.IIdType;
import org.opencds.cqf.fhir.api.Repository; 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 class UpdatedCrDiscoveryService extends CrDiscoveryService {
public UpdatedCrDiscoveryServiceR4(IIdType thePlanDefinitionId, Repository theRepository) { public UpdatedCrDiscoveryService(IIdType thePlanDefinitionId, Repository theRepository) {
super(thePlanDefinitionId, theRepository); super(thePlanDefinitionId, theRepository);
maxUriLength = 6000; maxUriLength = 6000;
} }

View File

@@ -123,7 +123,7 @@ hapi:
data: data:
search_parameter_mode: USE_SEARCH_PARAMETERS # AUTO, USE_SEARCH_PARAMETERS, FILTER_IN_MEMORY 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 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: cdshooks:
enabled: false enabled: false

View File

@@ -124,7 +124,7 @@ hapi:
data: data:
search_parameter_mode: USE_SEARCH_PARAMETERS # AUTO, USE_SEARCH_PARAMETERS, FILTER_IN_MEMORY 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 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: cdshooks:
enabled: true enabled: true