@Override public void run(String... args) throws Exception { fhirClient.capabilities() .ofType(CapabilityStatement.class) .execute(); } };
@Override public void run(String... args) throws Exception { fhirClient.capabilities() .ofType(CapabilityStatement.class) .execute(); } };
conformance = (IBaseResource) client.fetchConformance().ofType(implementingClass).execute(); } catch (FhirClientConnectionException e) { if (!myContext.getVersion().getVersion().isOlderThan(FhirVersionEnum.DSTU3) && e.getCause() instanceof DataFormatException) { capabilityStatementResourceName = "CapabilityStatement"; implementingClass = myContext.getResourceDefinition(capabilityStatementResourceName).getImplementingClass(); conformance = (IBaseResource) client.fetchConformance().ofType(implementingClass).execute(); } else { throw e;
/** * Retrieve the conformance statement using the given model type * @param type the model type * @param extraParameters see {@link ExtraParameters} for a full list of parameters that can be passed, may be NULL * @param <T> extends {@link IBaseConformance} * @return the conformance statement */ public <T extends IBaseConformance> T ofType(Class<T> type, Map<ExtraParameters, Object> extraParameters) { IFetchConformanceTyped<T> fetchConformanceTyped = client.capabilities().ofType(type); ExtraParameters.process(extraParameters, fetchConformanceTyped); return fetchConformanceTyped.execute(); }
@Test public void testGetConformance() { CapabilityStatement conf = client.capabilities().ofType(CapabilityStatement.class).execute(); assertEquals(1, conf.getRest().size()); CapabilityStatement.CapabilityStatementRestComponent component = conf.getRest().iterator().next(); CapabilityStatement.CapabilityStatementRestOperationComponent operation = component.getOperation().iterator().next(); assertEquals(Iti83Constants.PIXM_OPERATION_NAME.substring(1), operation.getName()); // printAsXML(conf); }
@Test public void testGetConformance() { Conformance conf = client.capabilities().ofType(Conformance.class).execute(); assertEquals(1, conf.getRest().size()); Conformance.ConformanceRestComponent component = conf.getRest().iterator().next(); Conformance.ConformanceRestOperationComponent operation = component.getOperation().iterator().next(); assertEquals(Iti83Constants.PIXM_OPERATION_NAME, operation.getName()); // printAsXML(conf); }
@Test public void testGetConformance() { Conformance conf = client.capabilities().ofType(Conformance.class).execute(); Conformance.ConformanceRestComponent component = conf.getRest().iterator().next(); assertEquals(Conformance.SystemRestfulInteraction.TRANSACTION, component.getInteraction().get(0).getCode()); }
@Test public void testGetConformance() { CapabilityStatement conf = client.capabilities().ofType(CapabilityStatement.class).execute(); CapabilityStatement.CapabilityStatementRestComponent component = conf.getRest().iterator().next(); assertEquals(CapabilityStatement.SystemRestfulInteraction.TRANSACTION, component.getInteraction().get(0).getCode()); }
try { IGenericClient client = fhirContext.newRestfulGenericClient(fhirServiceUrl); conformance = client.fetchConformance().ofType(Conformance.class).execute(); } catch (FhirClientConnectionException e) { throw new FhirClientConnectionException(fhirContext.getLocalizer()
try { IGenericClient client = fhirContext.newRestfulGenericClient(fhirServiceUrl); capabilityStatement = client.fetchConformance().ofType(CapabilityStatement.class).execute(); } catch (FhirClientConnectionException e) { throw new FhirClientConnectionException(fhirContext.getLocalizer()
try { IGenericClient client = fhirContext.newRestfulGenericClient(fhirServiceUrl); conformance = client.fetchConformance().ofType(Conformance.class).execute(); } catch (FhirClientConnectionException e) { throw new FhirClientConnectionException(fhirContext.getLocalizer()
Conformance conf = client.fetchConformance().ofType(Conformance.class).execute(); System.out.println(conf.getDescriptionElement().getValue());
conformance = (IBaseResource) client.fetchConformance().ofType(implementingClass).execute(); } catch (FhirClientConnectionException e) { if (!myContext.getVersion().getVersion().isOlderThan(FhirVersionEnum.DSTU3) && e.getCause() instanceof DataFormatException) { capabilityStatementResourceName = "CapabilityStatement"; implementingClass = myContext.getResourceDefinition(capabilityStatementResourceName).getImplementingClass(); conformance = (IBaseResource) client.fetchConformance().ofType(implementingClass).execute(); } else { throw e;