Add search support to ITerminologyClient

This commit is contained in:
Grahame Grieve 2024-01-16 11:41:54 +11:00
parent 56fc442db4
commit ec67f6c97a
7 changed files with 36 additions and 1 deletions

View File

@ -227,4 +227,10 @@ public class TerminologyClientR2 implements ITerminologyClient {
public int getUseCount() {
return client.getUseCount();
}
@Override
public Bundle search(String type, String criteria) {
org.hl7.fhir.dstu2.model.Bundle result = client.search(type, criteria);
return result == null ? null : (Bundle) VersionConvertorFactory_10_50.convertResource(result);
}
}

View File

@ -230,4 +230,11 @@ public class TerminologyClientR3 implements ITerminologyClient {
return client.getUseCount();
}
@Override
public Bundle search(String type, String criteria) {
org.hl7.fhir.dstu3.model.Bundle result = client.search(type, criteria);
return result == null ? null : (Bundle) VersionConvertorFactory_30_50.convertResource(result);
}
}

View File

@ -242,5 +242,11 @@ public class TerminologyClientR4 implements ITerminologyClient {
return client.getUseCount();
}
@Override
public Bundle search(String type, String criteria) {
org.hl7.fhir.r4.model.Bundle result = client.search(type, criteria);
return result == null ? null : (Bundle) VersionConvertorFactory_40_50.convertResource(result);
}
}

View File

@ -924,5 +924,10 @@ public class FHIRToolingClient extends FHIRBaseToolingClient {
private void recordUse() {
useCount++;
}
public Bundle search(String type, String criteria) {
recordUse();
return fetchFeed(Utilities.pathURL(base, type+criteria));
}
}

View File

@ -654,5 +654,10 @@ public class FHIRToolingClient extends FHIRBaseToolingClient {
useCount++;
}
public Bundle search(String type, String criteria) {
recordUse();
return fetchFeed(Utilities.pathURL(base, type+criteria));
}
}

View File

@ -69,4 +69,5 @@ public interface ITerminologyClient {
ITerminologyClient setContentLanguage(String lang);
String getUserAgent();
int getUseCount();
Bundle search(String type, String criteria);
}

View File

@ -246,4 +246,9 @@ public class TerminologyClientR5 implements ITerminologyClient {
return new TerminologyClientR5Factory();
}
@Override
public Bundle search(String type, String criteria) {
return client.search(type, criteria);
}
}