generated from PackagrIO/goweb-template
-
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix CareEvolution (now configured as a Confidential client)
fixes fastenhealth/docs#10
- Loading branch information
Showing
5 changed files
with
39 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package careevolution | ||
|
||
import ( | ||
"context" | ||
"github.com/fastenhealth/fastenhealth-onprem/backend/pkg/config" | ||
"github.com/fastenhealth/fastenhealth-onprem/backend/pkg/hub/internal/fhir/base" | ||
"github.com/fastenhealth/fastenhealth-onprem/backend/pkg/models" | ||
"github.com/sirupsen/logrus" | ||
"net/http" | ||
) | ||
|
||
type CareEvolutionClient struct { | ||
*base.FHIR401Client | ||
} | ||
|
||
func NewClient(ctx context.Context, appConfig config.Interface, globalLogger logrus.FieldLogger, source models.Source, testHttpClient ...*http.Client) (base.Client, *models.Source, error) { | ||
baseClient, updatedSource, err := base.NewFHIR401Client(ctx, appConfig, globalLogger, source, testHttpClient...) | ||
baseClient.Headers["Accept"] = "application/json+fhir" | ||
return CareEvolutionClient{ | ||
baseClient, | ||
}, updatedSource, err | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters