Documentation ¶
Index ¶
- func GetDefaultParams() (params url.Values)
- func SetLogger(log logrus.FieldLogger)
- type APIClient
- type BlueButtonClient
- func (bbc *BlueButtonClient) GetClaim(jobData models.JobEnqueueArgs, mbi string, claimsWindow ClaimsWindow) (*fhirModels.Bundle, error)
- func (bbc *BlueButtonClient) GetClaimResponse(jobData models.JobEnqueueArgs, mbi string, claimsWindow ClaimsWindow) (*fhirModels.Bundle, error)
- func (bbc *BlueButtonClient) GetCoverage(jobData models.JobEnqueueArgs, beneficiaryID string) (*fhirModels.Bundle, error)
- func (bbc *BlueButtonClient) GetExplanationOfBenefit(jobData models.JobEnqueueArgs, patientID string, claimsWindow ClaimsWindow) (*fhirModels.Bundle, error)
- func (bbc *BlueButtonClient) GetMetadata() (string, error)
- func (bbc *BlueButtonClient) GetPatient(jobData models.JobEnqueueArgs, patientID string) (*fhirModels.Bundle, error)
- func (bbc *BlueButtonClient) GetPatientByMbi(jobData models.JobEnqueueArgs, mbi string) (string, error)
- type BlueButtonConfig
- type ClaimsWindow
- type MockBlueButtonClient
- func (bbc *MockBlueButtonClient) GetBundleData(endpoint, patientID string) (*fhirModels.Bundle, error)
- func (bbc *MockBlueButtonClient) GetClaim(jobData models.JobEnqueueArgs, mbi string, claimsWindow ClaimsWindow) (*fhirModels.Bundle, error)
- func (bbc *MockBlueButtonClient) GetClaimResponse(jobData models.JobEnqueueArgs, mbi string, claimsWindow ClaimsWindow) (*fhirModels.Bundle, error)
- func (bbc *MockBlueButtonClient) GetCoverage(jobData models.JobEnqueueArgs, beneficiaryID string) (*fhirModels.Bundle, error)
- func (bbc *MockBlueButtonClient) GetData(endpoint, patientID string) (string, error)
- func (bbc *MockBlueButtonClient) GetExplanationOfBenefit(jobData models.JobEnqueueArgs, patientID string, serviceDate ClaimsWindow) (*fhirModels.Bundle, error)
- func (bbc *MockBlueButtonClient) GetPatient(jobData models.JobEnqueueArgs, patientID string) (*fhirModels.Bundle, error)
- func (bbc *MockBlueButtonClient) GetPatientByMbi(jobData models.JobEnqueueArgs, mbi string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDefaultParams ¶
func SetLogger ¶
func SetLogger(log logrus.FieldLogger)
SetLogger sets the logger to be used in the client. Since both the API and worker use the bluebutton client, we need to be able to set the appropriate logger based on who is using the client.
Types ¶
type APIClient ¶
type APIClient interface { GetExplanationOfBenefit(jobData models.JobEnqueueArgs, patientID string, claimsWindow ClaimsWindow) (*fhirModels.Bundle, error) GetPatient(jobData models.JobEnqueueArgs, patientID string) (*fhirModels.Bundle, error) GetCoverage(jobData models.JobEnqueueArgs, beneficiaryID string) (*fhirModels.Bundle, error) GetPatientByMbi(jobData models.JobEnqueueArgs, mbi string) (string, error) GetClaim(jobData models.JobEnqueueArgs, mbi string, claimsWindow ClaimsWindow) (*fhirModels.Bundle, error) GetClaimResponse(jobData models.JobEnqueueArgs, mbi string, claimsWindow ClaimsWindow) (*fhirModels.Bundle, error) }
type BlueButtonClient ¶
type BlueButtonClient struct {
// contains filtered or unexported fields
}
func NewBlueButtonClient ¶
func NewBlueButtonClient(config BlueButtonConfig) (*BlueButtonClient, error)
func (*BlueButtonClient) GetClaim ¶
func (bbc *BlueButtonClient) GetClaim(jobData models.JobEnqueueArgs, mbi string, claimsWindow ClaimsWindow) (*fhirModels.Bundle, error)
func (*BlueButtonClient) GetClaimResponse ¶
func (bbc *BlueButtonClient) GetClaimResponse(jobData models.JobEnqueueArgs, mbi string, claimsWindow ClaimsWindow) (*fhirModels.Bundle, error)
func (*BlueButtonClient) GetCoverage ¶
func (bbc *BlueButtonClient) GetCoverage(jobData models.JobEnqueueArgs, beneficiaryID string) (*fhirModels.Bundle, error)
func (*BlueButtonClient) GetExplanationOfBenefit ¶
func (bbc *BlueButtonClient) GetExplanationOfBenefit(jobData models.JobEnqueueArgs, patientID string, claimsWindow ClaimsWindow) (*fhirModels.Bundle, error)
func (*BlueButtonClient) GetMetadata ¶
func (bbc *BlueButtonClient) GetMetadata() (string, error)
func (*BlueButtonClient) GetPatient ¶
func (bbc *BlueButtonClient) GetPatient(jobData models.JobEnqueueArgs, patientID string) (*fhirModels.Bundle, error)
func (*BlueButtonClient) GetPatientByMbi ¶
func (bbc *BlueButtonClient) GetPatientByMbi(jobData models.JobEnqueueArgs, mbi string) (string, error)
type BlueButtonConfig ¶
BlueButtonConfig holds the configuration settings needed to create a BlueButtonClient TODO (BCDA-3755): Move the other env vars used in NewBlueButtonClient to this struct
func NewConfig ¶
func NewConfig(basePath string) BlueButtonConfig
NewConfig generates a new BlueButtonConfig using various environment variables.
type MockBlueButtonClient ¶
func (*MockBlueButtonClient) GetBundleData ¶
func (bbc *MockBlueButtonClient) GetBundleData(endpoint, patientID string) (*fhirModels.Bundle, error)
func (*MockBlueButtonClient) GetClaim ¶
func (bbc *MockBlueButtonClient) GetClaim(jobData models.JobEnqueueArgs, mbi string, claimsWindow ClaimsWindow) (*fhirModels.Bundle, error)
func (*MockBlueButtonClient) GetClaimResponse ¶
func (bbc *MockBlueButtonClient) GetClaimResponse(jobData models.JobEnqueueArgs, mbi string, claimsWindow ClaimsWindow) (*fhirModels.Bundle, error)
func (*MockBlueButtonClient) GetCoverage ¶
func (bbc *MockBlueButtonClient) GetCoverage(jobData models.JobEnqueueArgs, beneficiaryID string) (*fhirModels.Bundle, error)
func (*MockBlueButtonClient) GetData ¶
func (bbc *MockBlueButtonClient) GetData(endpoint, patientID string) (string, error)
Returns copy of a static json file (From Blue Button Sandbox originally) after replacing the patient ID of 20000000000001 with the requested identifier This is private in the real function and should remain so, but in the test client it makes maintenance easier to expose it.
func (*MockBlueButtonClient) GetExplanationOfBenefit ¶
func (bbc *MockBlueButtonClient) GetExplanationOfBenefit(jobData models.JobEnqueueArgs, patientID string, serviceDate ClaimsWindow) (*fhirModels.Bundle, error)
func (*MockBlueButtonClient) GetPatient ¶
func (bbc *MockBlueButtonClient) GetPatient(jobData models.JobEnqueueArgs, patientID string) (*fhirModels.Bundle, error)
func (*MockBlueButtonClient) GetPatientByMbi ¶
func (bbc *MockBlueButtonClient) GetPatientByMbi(jobData models.JobEnqueueArgs, mbi string) (string, error)