use of org.hl7.fhir.r4b.model.Meta in project camel-quarkus by apache.
the class FhirDstu2Resource method metaGetFromResource.
@Path("/meta/getFromResource")
@GET
@Produces(MediaType.TEXT_PLAIN)
public int metaGetFromResource(@QueryParam("id") String id) {
IdDt iIdType = new IdDt(id);
final Map<String, Object> headers = new HashMap<>();
headers.put("CamelFhir.metaType", MetaDt.class);
headers.put("CamelFhir.id", iIdType);
IBaseMetaType result = producerTemplate.requestBodyAndHeaders("direct:metaGetFromResource-dstu2", null, headers, IBaseMetaType.class);
return result.getTag().size();
}
use of org.hl7.fhir.r4b.model.Meta in project camel-quarkus by apache.
the class FhirR4Resource method metaGetFromResource.
@Path("/meta/getFromResource")
@GET
@Produces(MediaType.TEXT_PLAIN)
public int metaGetFromResource(@QueryParam("id") String id) {
IdType iIdType = new IdType(id);
final Map<String, Object> headers = new HashMap<>();
headers.put("CamelFhir.metaType", Meta.class);
headers.put("CamelFhir.id", iIdType);
IBaseMetaType result = producerTemplate.requestBodyAndHeaders("direct:metaGetFromResource-r4", null, headers, IBaseMetaType.class);
return result.getTag().size();
}
use of org.hl7.fhir.r4b.model.Meta in project camel-quarkus by apache.
the class FhirR4Resource method metaGetFromType.
@Path("/meta/getFromType")
@GET
@Produces(MediaType.TEXT_PLAIN)
public int metaGetFromType(@QueryParam("preferResponseType") boolean preferResponseType) {
Map<String, Object> headers = new HashMap<>();
headers.put("CamelFhir.metaType", Meta.class);
headers.put("CamelFhir.resourceType", "Patient");
if (preferResponseType) {
headers.put(ExtraParameters.PREFER_RESPONSE_TYPE.getHeaderName(), Patient.class);
}
IBaseMetaType result = producerTemplate.requestBodyAndHeaders("direct:metaGetFromType-r4", null, headers, IBaseMetaType.class);
return result.getTag().size();
}
use of org.hl7.fhir.r4b.model.Meta in project camel-quarkus by apache.
the class FhirDstu3Resource method metaDelete.
@Path("/meta")
@DELETE
@Produces(MediaType.TEXT_PLAIN)
public int metaDelete(@QueryParam("id") String id) {
IdType iIdType = new IdType(id);
Meta inMeta = new Meta();
inMeta.addTag().setSystem("urn:system1").setCode("urn:code1");
Map<String, Object> headers = new HashMap<>();
headers.put("CamelFhir.meta", inMeta);
headers.put("CamelFhir.id", iIdType);
IBaseMetaType result = producerTemplate.requestBodyAndHeaders("direct:metaDelete-dstu3", null, headers, IBaseMetaType.class);
return result.getTag().size();
}
use of org.hl7.fhir.r4b.model.Meta in project camel-quarkus by apache.
the class FhirDstu3Resource method metaGetFromType.
@Path("/meta/getFromType")
@GET
@Produces(MediaType.TEXT_PLAIN)
public int metaGetFromType(@QueryParam("preferResponseType") boolean preferResponseType) {
Map<String, Object> headers = new HashMap<>();
headers.put("CamelFhir.metaType", Meta.class);
headers.put("CamelFhir.resourceType", "Patient");
if (preferResponseType) {
headers.put(ExtraParameters.PREFER_RESPONSE_TYPE.getHeaderName(), Patient.class);
}
IBaseMetaType result = producerTemplate.requestBodyAndHeaders("direct:metaGetFromType-dstu3", null, headers, IBaseMetaType.class);
return result.getTag().size();
}
Aggregations