Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aphl 582 move to hapifhirrepository #760

Merged
merged 12 commits into from
Jan 12, 2024
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package org.opencds.cqf.ruler.provider;

import org.opencds.cqf.ruler.api.OperationProvider;
import org.opencds.cqf.ruler.behavior.DaoRegistryUser;
import org.springframework.beans.factory.annotation.Autowired;

import ca.uhn.fhir.cr.repo.HapiFhirRepository;
import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
import ca.uhn.fhir.rest.api.server.RequestDetails;
import ca.uhn.fhir.rest.server.RestfulServer;

public class HapiFhirRepositoryProvider implements OperationProvider, DaoRegistryUser {
@Autowired
private DaoRegistry myDaoRegistry;

@Autowired
RestfulServer myRestfulServer;

public DaoRegistry getDaoRegistry() {
return myDaoRegistry;
}
public HapiFhirRepository getRepository(RequestDetails theRequestDetails) {
return new HapiFhirRepository(myDaoRegistry, theRequestDetails, myRestfulServer);
}
}
Loading