Add support for code system supplements when communicating with tx server

This commit is contained in:
Grahame Grieve 2024-04-15 22:42:05 +10:00
parent 1f7f57bade
commit 4155a9be6a
1 changed files with 5 additions and 1 deletions

View File

@ -1783,7 +1783,11 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
CodeSystem cs = fetchResource(CodeSystem.class, inc.getSystem(), src);
if (cs != null && !hasCanonicalResource(pin, "tx-resource", cs.getVUrl()) && (cs.getContent() == CodeSystemContentMode.COMPLETE || cs.getContent() == CodeSystemContentMode.FRAGMENT)) {
cache = checkAddToParams(tc, pin, cs) || cache;
// todo: supplements
for (CodeSystem supp : fetchResourcesByType(CodeSystem.class)) {
if (supp.getContent() == CodeSystemContentMode.SUPPLEMENT && supp.getSupplements().equals(cs.getUrl())) {
cache = checkAddToParams(tc, pin, supp) || cache;
}
}
}
return cache;
}