use of org.hl7.fhir.r5.model.Parameters.ParametersParameterComponent in project camel-quarkus by apache.
the class FhirDstu3Resource method operationOnType.
@Path("/operation/onType")
@GET
@Produces(MediaType.TEXT_PLAIN)
public String operationOnType() {
Map<String, Object> headers = new HashMap<>();
headers.put("CamelFhir.resourceType", Patient.class);
headers.put("CamelFhir.name", "everything");
headers.put("CamelFhir.parameters", null);
headers.put("CamelFhir.outputParameterType", Parameters.class);
headers.put("CamelFhir.useHttpGet", Boolean.FALSE);
headers.put("CamelFhir.returnType", null);
headers.put("CamelFhir.extraParameters", null);
Parameters result = producerTemplate.requestBodyAndHeaders("direct:operationOnType-dstu3", null, headers, Parameters.class);
Parameters.ParametersParameterComponent parametersParameterComponent = result.getParameter().get(0);
Bundle bundle = (Bundle) parametersParameterComponent.getResource();
Bundle.BundleEntryComponent bundleEntryComponent = bundle.getEntry().get(0);
return bundleEntryComponent.getResource().getIdElement().toUnqualifiedVersionless().getValue();
}
use of org.hl7.fhir.r5.model.Parameters.ParametersParameterComponent in project camel-quarkus by apache.
the class FhirDstu3Resource method operationOnInstance.
// ///////////////////
// Operation
// ///////////////////
@Path("/operation/onInstance")
@GET
@Produces(MediaType.TEXT_PLAIN)
public String operationOnInstance(@QueryParam("id") String id) {
IdType iIdType = new IdType(id);
Map<String, Object> headers = new HashMap<>();
headers.put("CamelFhir.id", iIdType);
headers.put("CamelFhir.name", "everything");
headers.put("CamelFhir.parameters", null);
headers.put("CamelFhir.outputParameterType", Parameters.class);
headers.put("CamelFhir.useHttpGet", Boolean.FALSE);
headers.put("CamelFhir.returnType", null);
headers.put("CamelFhir.extraParameters", null);
Parameters result = producerTemplate.requestBodyAndHeaders("direct:operationOnInstance-dstu3", null, headers, Parameters.class);
Parameters.ParametersParameterComponent parametersParameterComponent = result.getParameter().get(0);
Bundle bundle = (Bundle) parametersParameterComponent.getResource();
Bundle.BundleEntryComponent bundleEntryComponent = bundle.getEntry().get(0);
return bundleEntryComponent.getResource().getIdElement().toUnqualifiedVersionless().getValue();
}
use of org.hl7.fhir.r5.model.Parameters.ParametersParameterComponent in project camel-quarkus by apache.
the class FhirDstu2_1Resource method operationOnInstanceVersion.
@Path("/operation/onInstanceVersion")
@GET
@Produces(MediaType.TEXT_PLAIN)
public String operationOnInstanceVersion(@QueryParam("id") String id) {
IdType iIdType = new IdType(id);
Map<String, Object> headers = new HashMap<>();
headers.put("CamelFhir.id", iIdType);
headers.put("CamelFhir.name", "everything");
headers.put("CamelFhir.parameters", null);
headers.put("CamelFhir.outputParameterType", Parameters.class);
headers.put("CamelFhir.useHttpGet", Boolean.FALSE);
headers.put("CamelFhir.returnType", null);
headers.put("CamelFhir.extraParameters", null);
Parameters result = producerTemplate.requestBodyAndHeaders("direct:operationOnInstanceVersion-dstu2-1", null, headers, Parameters.class);
Parameters.ParametersParameterComponent parametersParameterComponent = result.getParameter().get(0);
Bundle bundle = (Bundle) parametersParameterComponent.getResource();
Bundle.BundleEntryComponent bundleEntryComponent = bundle.getEntry().get(0);
return bundleEntryComponent.getResource().getIdElement().toUnqualifiedVersionless().getValue();
}
use of org.hl7.fhir.r5.model.Parameters.ParametersParameterComponent in project camel-quarkus by apache.
the class FhirR5Resource method operationOnInstance.
// ///////////////////
// Operation
// ///////////////////
@Path("/operation/onInstance")
@GET
@Produces(MediaType.TEXT_PLAIN)
public String operationOnInstance(@QueryParam("id") String id) {
IdType iIdType = new IdType(id);
Map<String, Object> headers = new HashMap<>();
headers.put("CamelFhir.id", iIdType);
headers.put("CamelFhir.name", "everything");
headers.put("CamelFhir.parameters", null);
headers.put("CamelFhir.outputParameterType", Parameters.class);
headers.put("CamelFhir.useHttpGet", Boolean.FALSE);
headers.put("CamelFhir.returnType", null);
headers.put("CamelFhir.extraParameters", null);
Parameters result = producerTemplate.requestBodyAndHeaders("direct:operationOnInstance-r5", null, headers, Parameters.class);
Parameters.ParametersParameterComponent parametersParameterComponent = result.getParameter().get(0);
Bundle bundle = (Bundle) parametersParameterComponent.getResource();
Bundle.BundleEntryComponent bundleEntryComponent = bundle.getEntry().get(0);
return bundleEntryComponent.getResource().getIdElement().toUnqualifiedVersionless().getValue();
}
use of org.hl7.fhir.r5.model.Parameters.ParametersParameterComponent in project camel-quarkus by apache.
the class FhirR4Resource method operationOnInstanceVersion.
@Path("/operation/onInstanceVersion")
@GET
@Produces(MediaType.TEXT_PLAIN)
public String operationOnInstanceVersion(@QueryParam("id") String id) {
IdType iIdType = new IdType(id);
Map<String, Object> headers = new HashMap<>();
headers.put("CamelFhir.id", iIdType);
headers.put("CamelFhir.name", "everything");
headers.put("CamelFhir.parameters", null);
headers.put("CamelFhir.outputParameterType", Parameters.class);
headers.put("CamelFhir.useHttpGet", Boolean.FALSE);
headers.put("CamelFhir.returnType", null);
headers.put("CamelFhir.extraParameters", null);
Parameters result = producerTemplate.requestBodyAndHeaders("direct:operationOnInstanceVersion-r4", null, headers, Parameters.class);
ParametersParameterComponent parametersParameterComponent = result.getParameter().get(0);
Bundle bundle = (Bundle) parametersParameterComponent.getResource();
BundleEntryComponent bundleEntryComponent = bundle.getEntry().get(0);
return bundleEntryComponent.getResource().getIdElement().toUnqualifiedVersionless().getValue();
}
Aggregations