Stream: hapi
Topic: how to get ConformanceStatement from HAPI 3.6 ?
Georg Fette (Jan 09 2019 at 10:30):
Hello,
In the HAPI documentation it is said that using
Conformance conf = client.fetchConformance().ofType(Conformance.class).execute();
would provide the ConformanceStatement. However, the class Conformance does not exist. There seems to be no class implementing IBaseConformance or BaseConformance, which is the the supertype for the class that may be given to the ofType-method. Is the documentation for this topic old or am I doing something wrong ?
I am using hapi-fhir-structures-dstu3 v3.6.
In dstu2 a Conformance class exists.
Greetings
Georg Fette (Jan 09 2019 at 10:36):
ah, it is CapabilityStatement. And this class does indeed implement IBaseConformance.
Georg Fette (Jan 09 2019 at 11:42):
hm, but it stays still strange. Using this code:
FhirContext ctx = FhirContext.forDstu3();
IGenericClient client = ctx.newRestfulGenericClient("http://hapi.fhir.org/baseDstu3");
CapabilityStatement execute = client.capabilities().ofType(CapabilityStatement.class).execute();
String value = execute.getDescriptionElement().getValue();
The value is "null". Shoudn't the hapi test server return something more meaningful ?
Last updated: Apr 12 2022 at 19:14 UTC