cqf-ruler icon indicating copy to clipboard operation
cqf-ruler copied to clipboard

Add a configurable timeout to CDS Hooks server data request

Open brynrhodes opened this issue 3 years ago • 2 comments

During a CDS Hooks call, if the service makes a call back to the FHIR Server, that call should have a configurable timeout that if it takes longer than that timeout to execute, short-circuits the service call with an error that says "source system is taking too long to respond and guidance cannot be provided as a result"

brynrhodes avatar Jun 02 '22 17:06 brynrhodes

Duplicates #472, closing that one in favor of this one.

JPercival avatar Jun 08 '22 20:06 JPercival

Here's where the callback client is set up:

https://github.com/DBCG/cqf-ruler/blob/master/plugin/cds-hooks/src/main/java/org/opencds/cqf/ruler/cdshooks/evaluation/EvaluationContext.java#L168

What we need to do is add some properties to the cds-hooks config class here:

https://github.com/DBCG/cqf-ruler/blob/master/plugin/cds-hooks/src/main/java/org/opencds/cqf/ruler/cdshooks/CdsHooksProperties.java

And then pass that configuration down through the evaluation context so that the timeout can be set.

JPercival avatar Jun 08 '22 20:06 JPercival