Class HapiFhirRepository

java.lang.Object
ca.uhn.fhir.jpa.repository.HapiFhirRepository
All Implemented Interfaces:
ca.uhn.fhir.repository.IRepository

public class HapiFhirRepository extends Object implements ca.uhn.fhir.repository.IRepository
This class leverages DaoRegistry from Hapi-fhir to implement CRUD FHIR API operations constrained to provide only the operations necessary for the cql-evaluator modules to function.
  • Constructor Summary

    Constructors
    Constructor
    Description
    HapiFhirRepository(DaoRegistry theDaoRegistry, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.server.RestfulServer theRestfulServer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <C extends org.hl7.fhir.instance.model.api.IBaseConformance>
    C
    capabilities(Class<C> theCapabilityStatementType, Map<String,String> theHeaders)
     
    <T extends org.hl7.fhir.instance.model.api.IBaseResource>
    ca.uhn.fhir.rest.api.MethodOutcome
    create(T theResource, Map<String,String> theHeaders)
     
    <T extends org.hl7.fhir.instance.model.api.IBaseResource, I extends org.hl7.fhir.instance.model.api.IIdType>
    ca.uhn.fhir.rest.api.MethodOutcome
    delete(Class<T> theResourceType, I theId, Map<String,String> theHeaders)
     
    ca.uhn.fhir.context.FhirContext
     
    <B extends org.hl7.fhir.instance.model.api.IBaseBundle, P extends org.hl7.fhir.instance.model.api.IBaseParameters, I extends org.hl7.fhir.instance.model.api.IIdType>
    B
    history(I theId, P theParameters, Class<B> theBundleType, Map<String,String> theHeaders)
     
    <B extends org.hl7.fhir.instance.model.api.IBaseBundle, P extends org.hl7.fhir.instance.model.api.IBaseParameters, T extends org.hl7.fhir.instance.model.api.IBaseResource>
    B
    history(Class<T> theResourceType, P theParameters, Class<B> theBundleType, Map<String,String> theHeaders)
     
    <B extends org.hl7.fhir.instance.model.api.IBaseBundle, P extends org.hl7.fhir.instance.model.api.IBaseParameters>
    B
    history(P theParameters, Class<B> theBundleType, Map<String,String> theHeaders)
     
    protected <R> R
    invoke(ca.uhn.fhir.rest.api.server.RequestDetails theDetails)
     
    <R extends org.hl7.fhir.instance.model.api.IBaseResource, P extends org.hl7.fhir.instance.model.api.IBaseParameters, I extends org.hl7.fhir.instance.model.api.IIdType>
    R
    invoke(I theId, String theName, P theParameters, Class<R> theReturnType, Map<String,String> theHeaders)
     
    <P extends org.hl7.fhir.instance.model.api.IBaseParameters, I extends org.hl7.fhir.instance.model.api.IIdType>
    ca.uhn.fhir.rest.api.MethodOutcome
    invoke(I theId, String theName, P theParameters, Map<String,String> theHeaders)
     
    <R extends org.hl7.fhir.instance.model.api.IBaseResource, P extends org.hl7.fhir.instance.model.api.IBaseParameters, T extends org.hl7.fhir.instance.model.api.IBaseResource>
    R
    invoke(Class<T> theResourceType, String theName, P theParameters, Class<R> theReturnType, Map<String,String> theHeaders)
     
    <P extends org.hl7.fhir.instance.model.api.IBaseParameters, T extends org.hl7.fhir.instance.model.api.IBaseResource>
    ca.uhn.fhir.rest.api.MethodOutcome
    invoke(Class<T> theResourceType, String theName, P theParameters, Map<String,String> theHeaders)
     
    <R extends org.hl7.fhir.instance.model.api.IBaseResource, P extends org.hl7.fhir.instance.model.api.IBaseParameters>
    R
    invoke(String theName, P theParameters, Class<R> theReturnType, Map<String,String> theHeaders)
     
    <P extends org.hl7.fhir.instance.model.api.IBaseParameters>
    ca.uhn.fhir.rest.api.MethodOutcome
    invoke(String theName, P theParameters, Map<String,String> theHeaders)
     
    <B extends org.hl7.fhir.instance.model.api.IBaseBundle>
    B
    link(Class<B> theBundleType, String theUrl, Map<String,String> theHeaders)
     
    <I extends org.hl7.fhir.instance.model.api.IIdType, P extends org.hl7.fhir.instance.model.api.IBaseParameters>
    ca.uhn.fhir.rest.api.MethodOutcome
    patch(I theId, P thePatchParameters, Map<String,String> theHeaders)
     
    <T extends org.hl7.fhir.instance.model.api.IBaseResource, I extends org.hl7.fhir.instance.model.api.IIdType>
    T
    read(Class<T> theResourceType, I theId, Map<String,String> theHeaders)
     
    <B extends org.hl7.fhir.instance.model.api.IBaseBundle, T extends org.hl7.fhir.instance.model.api.IBaseResource>
    B
    search(Class<B> theBundleType, Class<T> theResourceType, com.google.common.collect.Multimap<String,List<ca.uhn.fhir.model.api.IQueryParameterType>> theSearchParameters, Map<String,String> theHeaders)
     
    <B extends org.hl7.fhir.instance.model.api.IBaseBundle>
    B
    transaction(B theBundle, Map<String,String> theHeaders)
     
    <T extends org.hl7.fhir.instance.model.api.IBaseResource>
    ca.uhn.fhir.rest.api.MethodOutcome
    update(T theResource, Map<String,String> theHeaders)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface ca.uhn.fhir.repository.IRepository

    capabilities, create, delete, history, history, history, invoke, invoke, invoke, invoke, invoke, invoke, link, patch, read, search, search, search, transaction, update
  • Constructor Details

    • HapiFhirRepository

      public HapiFhirRepository(DaoRegistry theDaoRegistry, ca.uhn.fhir.rest.api.server.RequestDetails theRequestDetails, ca.uhn.fhir.rest.server.RestfulServer theRestfulServer)
  • Method Details

    • read

      public <T extends org.hl7.fhir.instance.model.api.IBaseResource, I extends org.hl7.fhir.instance.model.api.IIdType> T read(Class<T> theResourceType, I theId, Map<String,String> theHeaders)
      Specified by:
      read in interface ca.uhn.fhir.repository.IRepository
    • create

      public <T extends org.hl7.fhir.instance.model.api.IBaseResource> ca.uhn.fhir.rest.api.MethodOutcome create(T theResource, Map<String,String> theHeaders)
      Specified by:
      create in interface ca.uhn.fhir.repository.IRepository
    • patch

      public <I extends org.hl7.fhir.instance.model.api.IIdType, P extends org.hl7.fhir.instance.model.api.IBaseParameters> ca.uhn.fhir.rest.api.MethodOutcome patch(I theId, P thePatchParameters, Map<String,String> theHeaders)
      Specified by:
      patch in interface ca.uhn.fhir.repository.IRepository
    • update

      public <T extends org.hl7.fhir.instance.model.api.IBaseResource> ca.uhn.fhir.rest.api.MethodOutcome update(T theResource, Map<String,String> theHeaders)
      Specified by:
      update in interface ca.uhn.fhir.repository.IRepository
    • delete

      public <T extends org.hl7.fhir.instance.model.api.IBaseResource, I extends org.hl7.fhir.instance.model.api.IIdType> ca.uhn.fhir.rest.api.MethodOutcome delete(Class<T> theResourceType, I theId, Map<String,String> theHeaders)
      Specified by:
      delete in interface ca.uhn.fhir.repository.IRepository
    • search

      public <B extends org.hl7.fhir.instance.model.api.IBaseBundle, T extends org.hl7.fhir.instance.model.api.IBaseResource> B search(Class<B> theBundleType, Class<T> theResourceType, com.google.common.collect.Multimap<String,List<ca.uhn.fhir.model.api.IQueryParameterType>> theSearchParameters, Map<String,String> theHeaders)
      Specified by:
      search in interface ca.uhn.fhir.repository.IRepository
    • link

      public <B extends org.hl7.fhir.instance.model.api.IBaseBundle> B link(Class<B> theBundleType, String theUrl, Map<String,String> theHeaders)
      Specified by:
      link in interface ca.uhn.fhir.repository.IRepository
    • capabilities

      public <C extends org.hl7.fhir.instance.model.api.IBaseConformance> C capabilities(Class<C> theCapabilityStatementType, Map<String,String> theHeaders)
      Specified by:
      capabilities in interface ca.uhn.fhir.repository.IRepository
    • transaction

      public <B extends org.hl7.fhir.instance.model.api.IBaseBundle> B transaction(B theBundle, Map<String,String> theHeaders)
      Specified by:
      transaction in interface ca.uhn.fhir.repository.IRepository
    • invoke

      public <R extends org.hl7.fhir.instance.model.api.IBaseResource, P extends org.hl7.fhir.instance.model.api.IBaseParameters> R invoke(String theName, P theParameters, Class<R> theReturnType, Map<String,String> theHeaders)
      Specified by:
      invoke in interface ca.uhn.fhir.repository.IRepository
    • invoke

      public <P extends org.hl7.fhir.instance.model.api.IBaseParameters> ca.uhn.fhir.rest.api.MethodOutcome invoke(String theName, P theParameters, Map<String,String> theHeaders)
      Specified by:
      invoke in interface ca.uhn.fhir.repository.IRepository
    • invoke

      public <R extends org.hl7.fhir.instance.model.api.IBaseResource, P extends org.hl7.fhir.instance.model.api.IBaseParameters, T extends org.hl7.fhir.instance.model.api.IBaseResource> R invoke(Class<T> theResourceType, String theName, P theParameters, Class<R> theReturnType, Map<String,String> theHeaders)
      Specified by:
      invoke in interface ca.uhn.fhir.repository.IRepository
    • invoke

      public <P extends org.hl7.fhir.instance.model.api.IBaseParameters, T extends org.hl7.fhir.instance.model.api.IBaseResource> ca.uhn.fhir.rest.api.MethodOutcome invoke(Class<T> theResourceType, String theName, P theParameters, Map<String,String> theHeaders)
      Specified by:
      invoke in interface ca.uhn.fhir.repository.IRepository
    • invoke

      public <R extends org.hl7.fhir.instance.model.api.IBaseResource, P extends org.hl7.fhir.instance.model.api.IBaseParameters, I extends org.hl7.fhir.instance.model.api.IIdType> R invoke(I theId, String theName, P theParameters, Class<R> theReturnType, Map<String,String> theHeaders)
      Specified by:
      invoke in interface ca.uhn.fhir.repository.IRepository
    • invoke

      public <P extends org.hl7.fhir.instance.model.api.IBaseParameters, I extends org.hl7.fhir.instance.model.api.IIdType> ca.uhn.fhir.rest.api.MethodOutcome invoke(I theId, String theName, P theParameters, Map<String,String> theHeaders)
      Specified by:
      invoke in interface ca.uhn.fhir.repository.IRepository
    • history

      public <B extends org.hl7.fhir.instance.model.api.IBaseBundle, P extends org.hl7.fhir.instance.model.api.IBaseParameters> B history(P theParameters, Class<B> theBundleType, Map<String,String> theHeaders)
      Specified by:
      history in interface ca.uhn.fhir.repository.IRepository
    • history

      public <B extends org.hl7.fhir.instance.model.api.IBaseBundle, P extends org.hl7.fhir.instance.model.api.IBaseParameters, T extends org.hl7.fhir.instance.model.api.IBaseResource> B history(Class<T> theResourceType, P theParameters, Class<B> theBundleType, Map<String,String> theHeaders)
      Specified by:
      history in interface ca.uhn.fhir.repository.IRepository
    • history

      public <B extends org.hl7.fhir.instance.model.api.IBaseBundle, P extends org.hl7.fhir.instance.model.api.IBaseParameters, I extends org.hl7.fhir.instance.model.api.IIdType> B history(I theId, P theParameters, Class<B> theBundleType, Map<String,String> theHeaders)
      Specified by:
      history in interface ca.uhn.fhir.repository.IRepository
    • fhirContext

      public ca.uhn.fhir.context.FhirContext fhirContext()
      Specified by:
      fhirContext in interface ca.uhn.fhir.repository.IRepository
    • invoke

      protected <R> R invoke(ca.uhn.fhir.rest.api.server.RequestDetails theDetails)