Skip to content

Commit

Permalink
replace bluebutton source with Medicare.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogJ committed Oct 13, 2023
1 parent 3fc1ed1 commit b25fb83
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
16 changes: 8 additions & 8 deletions clients/factory/factory.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"net/http"
)

type sourceClientBluebutton struct {
type sourceClientMedicare struct {
models.SourceClient
}

Expand All @@ -23,18 +23,18 @@ type sourceClientBluebutton struct {
https://groups.google.com/g/Developer-group-for-cms-blue-button-api/c/mVNFJI4dxbs
https://groups.google.com/g/developer-group-for-cms-blue-button-api/c/77ZDwZWHloM/m/jQHZVNznBAAJ?utm_medium=email&utm_source=footer
*/
func GetSourceClientBluebutton(env pkg.FastenLighthouseEnvType, ctx context.Context, globalLogger logrus.FieldLogger, sourceCreds models.SourceCredential, testHttpClient ...*http.Client) (models.SourceClient, error) {
func GetSourceClientMedicare(env pkg.FastenLighthouseEnvType, ctx context.Context, globalLogger logrus.FieldLogger, sourceCreds models.SourceCredential, testHttpClient ...*http.Client) (models.SourceClient, error) {
baseClient, err := base.GetSourceClientFHIR401(env, ctx, globalLogger, sourceCreds, testHttpClient...)
if err != nil {
return nil, err
}

return sourceClientBluebutton{baseClient}, err
return sourceClientMedicare{baseClient}, err
}

// Operation-PatientEverything is not supported - https://build.fhir.org/operation-patient-everything.html
// Manually processing individual resources
func (c sourceClientBluebutton) SyncAll(db models.DatabaseRepository) (models.UpsertSummary, error) {
func (c sourceClientMedicare) SyncAll(db models.DatabaseRepository) (models.UpsertSummary, error) {
supportedResources := append(c.GetUsCoreResources(), []string{"ExplanationOfBenefit", "Coverage"}...)
return c.SyncAllByResourceName(db, supportedResources)
}
6 changes: 3 additions & 3 deletions definitions/factory/factory.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
https://groups.google.com/g/Developer-group-for-cms-blue-button-api/c/mVNFJI4dxbs
https://groups.google.com/g/developer-group-for-cms-blue-button-api/c/77ZDwZWHloM/m/jQHZVNznBAAJ?utm_medium=email&utm_source=footer
*/
func GetSourceBluebutton(env pkg.FastenLighthouseEnvType, clientIdLookup map[pkg.SourceType]string) (models.LighthouseSourceDefinition, error) {
func GetSourceMedicare(env pkg.FastenLighthouseEnvType, clientIdLookup map[pkg.SourceType]string) (models.LighthouseSourceDefinition, error) {
sourceDef := models.LighthouseSourceDefinition{}
sourceDef.AuthorizationEndpoint = "https://sandbox.bluebutton.cms.gov/v2/o/authorize/"
sourceDef.TokenEndpoint = "https://sandbox.bluebutton.cms.gov/v2/o/token/"
Expand All @@ -31,15 +31,15 @@ func GetSourceBluebutton(env pkg.FastenLighthouseEnvType, clientIdLookup map[pkg

sourceDef.ApiEndpointBaseUrl = "https://sandbox.bluebutton.cms.gov/v2/fhir"
// retrieve client-id, if available
if clientId, clientIdOk := clientIdLookup[pkg.SourceTypeBluebutton]; clientIdOk {
if clientId, clientIdOk := clientIdLookup[pkg.SourceTypeMedicare]; clientIdOk {
sourceDef.ClientId = clientId
}
sourceDef.RedirectUri = pkg.GetCallbackEndpoint(string(pkg.SourceTypeBluebutton))
sourceDef.RedirectUri = pkg.GetCallbackEndpoint(string(pkg.SourceTypeMedicare))
sourceDef.Confidential = true

sourceDef.Display = "Medicare"
sourceDef.PlatformType = pkg.SourceTypeBluebutton
sourceDef.SourceType = pkg.SourceTypeBluebutton
sourceDef.PlatformType = pkg.SourceTypeMedicare
sourceDef.SourceType = pkg.SourceTypeMedicare
sourceDef.Category = []string{"Hospital"}
sourceDef.Aliases = []string{}
sourceDef.PatientAccessUrl = "https://sandbox.bluebutton.cms.gov/"
Expand Down
2 changes: 1 addition & 1 deletion pkg/source_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ const (
SourceTypeAetna SourceType = "aetna"
SourceTypeAllscripts SourceType = "allscripts"
SourceTypeAthena SourceType = "athena"
SourceTypeBluebutton SourceType = "bluebutton"
SourceTypeCareevolution SourceType = "careevolution"
SourceTypeCerner SourceType = "cerner"
SourceTypeCigna SourceType = "cigna"
SourceTypeEclinicalworks SourceType = "eclinicalworks"
SourceTypeEdifecs SourceType = "edifecs"
SourceTypeEpic SourceType = "epic"
SourceTypeMedicare SourceType = "medicare"
SourceTypeMeditech SourceType = "meditech"
SourceTypeNextgen SourceType = "nextgen"
SourceTypeVahealth SourceType = "vahealth"
Expand Down

0 comments on commit b25fb83

Please sign in to comment.