Package org.cqframework.fhir.api
Interface FhirDal
public interface FhirDal
This interface is a minimal Fhir CRUD API. It's based on the
FHIR HTTP API, but constrained to provide only the
operations necessary for the cql-evaluator modules to function.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidcreate(org.hl7.fhir.instance.model.api.IBaseResource resource) Creates theIBaseResource.voiddelete(org.hl7.fhir.instance.model.api.IIdType id) Deletes anIBaseResourcebyid.org.hl7.fhir.instance.model.api.IBaseResourceread(org.hl7.fhir.instance.model.api.IIdType id) Fetches anIBaseResourcebyid.org.hl7.fhir.instance.model.api.IBaseBundlesearch(String resourceType, Map<String, List<List<ca.uhn.fhir.model.api.IQueryParameterType>>> searchParameters) Returns anIterable<IBaseResource>of all the resources of typeresourceType.voidupdate(org.hl7.fhir.instance.model.api.IBaseResource resource) Updates theIBaseResource.
-
Method Details
-
read
org.hl7.fhir.instance.model.api.IBaseResource read(org.hl7.fhir.instance.model.api.IIdType id) Fetches anIBaseResourcebyid. TheIIdTypemust have the resourceType defined. Returns null if no resource is found.- Parameters:
id- the id of the resource- Returns:
- the resource
-
create
void create(org.hl7.fhir.instance.model.api.IBaseResource resource) Creates theIBaseResource. Default behavior is to overwrite the resource if it already exists.- Parameters:
resource- the resource
-
update
void update(org.hl7.fhir.instance.model.api.IBaseResource resource) Updates theIBaseResource. Default behavior is to create the resource if it does not exist.- Parameters:
resource- the resource
-
delete
void delete(org.hl7.fhir.instance.model.api.IIdType id) Deletes anIBaseResourcebyid. TheIIdTypemust have the resourceType defined. Default behavior is no-op if the resource does not exist.- Parameters:
id- the id of the resource
-
search
org.hl7.fhir.instance.model.api.IBaseBundle search(String resourceType, Map<String, List<List<ca.uhn.fhir.model.api.IQueryParameterType>>> searchParameters) Returns anIterable<IBaseResource>of all the resources of typeresourceType. Default behavior is to return null if no resources are found.- Parameters:
resourceType- the type of resources to return.- Returns:
- the resources
-