use of org.hl7.fhir.instance.model.api.IBaseMetaType in project camel-quarkus by apache.
the class FhirDstu2Hl7OrgResource method metaAdd.
// ///////////////////
// Meta
// ///////////////////
@Path("/meta")
@POST
@Produces(MediaType.TEXT_PLAIN)
public int metaAdd(@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:metaAdd-dstu2-hl7org", null, headers, IBaseMetaType.class);
return result.getTag().size();
}
use of org.hl7.fhir.instance.model.api.IBaseMetaType in project camel-quarkus by apache.
the class FhirDstu2Hl7OrgResource 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-dstu2-hl7org", null, headers, IBaseMetaType.class);
return result.getTag().size();
}
use of org.hl7.fhir.instance.model.api.IBaseMetaType in project camel-quarkus by apache.
the class FhirDstu2Hl7OrgResource 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-dstu2-hl7org", null, headers, IBaseMetaType.class);
return result.getTag().size();
}
use of org.hl7.fhir.instance.model.api.IBaseMetaType in project camel-quarkus by apache.
the class FhirDstu2Resource 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", MetaDt.class);
headers.put("CamelFhir.resourceType", "Patient");
if (preferResponseType) {
headers.put(ExtraParameters.PREFER_RESPONSE_TYPE.getHeaderName(), Patient.class);
}
IBaseMetaType result = producerTemplate.requestBodyAndHeaders("direct:metaGetFromType-dstu2", null, headers, IBaseMetaType.class);
return result.getTag().size();
}
use of org.hl7.fhir.instance.model.api.IBaseMetaType in project camel-quarkus by apache.
the class FhirDstu2Resource method metaDelete.
@Path("/meta")
@DELETE
@Produces(MediaType.TEXT_PLAIN)
public int metaDelete(@QueryParam("id") String id) {
IdDt iIdType = new IdDt(id);
MetaDt inMeta = new MetaDt();
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-dstu2", null, headers, IBaseMetaType.class);
return result.getTag().size();
}
Aggregations