Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminology server: no support for tx-resource #311

Open
qligier opened this issue Nov 14, 2024 · 0 comments
Open

Terminology server: no support for tx-resource #311

qligier opened this issue Nov 14, 2024 · 0 comments
Assignees
Milestone

Comments

@qligier
Copy link
Member

qligier commented Nov 14, 2024

We currently don't handle the 'tx-resource' parameters in our terminology server. It can be used to send needed resource to expand a value set (like a code system or another value set).

Not sure if it would be useful, though.

if (request.hasParameter("tx-resource")) {
	// The client may have sent us other resources to use in the expansion (e.g. another ValueSet)
	for (final var component : request.getParameters("tx-resource")) {
		if (component.getResource() instanceof final ValueSet valueSetResource) {
			final IValidationSupport.ValueSetExpansionOutcome result = this.inMemoryTerminologySupport.expandValueSet(
				validationSupportContext,
				this.expansionOptions,
				valueSetResource);
			if (result == null || result.getValueSet() == null) {
				return createErrorResponseParameters(
					"Failed to expand the provided 'tx-resource' ValueSet '%s'".formatted(valueSetResource.getUrl()),
					coding,
					codeableConcept
				);
			}
			// Store the expanded value set in the cache
			this.cacheExpandedValueSet(cacheId, valueSetResource.getUrl(), (ValueSet) result.getValueSet());
		}
	}
}
@qligier qligier self-assigned this Nov 14, 2024
@oliveregger oliveregger added this to the backlog milestone Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants