From 72e349cbf0ecbfb93ef2da8d9741edf62d7d354f Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Mon, 13 Nov 2023 12:33:15 -0800 Subject: [PATCH] updating unitedhealthcare sandbox. --- clients/internal/platform/unitedhealthcare.go | 10 ++++------ definitions/internal/platform/unitedhealthcare.go | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/clients/internal/platform/unitedhealthcare.go b/clients/internal/platform/unitedhealthcare.go index c78f08a79..3573f6248 100644 --- a/clients/internal/platform/unitedhealthcare.go +++ b/clients/internal/platform/unitedhealthcare.go @@ -30,11 +30,9 @@ func GetSourceClientUnitedhealthcare(env pkg.FastenLighthouseEnvType, ctx contex return sourceClientUnitedhealthcare{baseClient}, err } -// Operation-PatientEverything uses non-standard endpoint - https://build.fhir.org/operation-patient-everything.html +// Operation-PatientEverything is not supported - https://build.fhir.org/operation-patient-everything.html +// Manually processing individual resources func (c sourceClientUnitedhealthcare) SyncAll(db models.DatabaseRepository) (models.UpsertSummary, error) { - bundle, err := c.GetResourceBundle("Patient") - if err != nil { - return models.UpsertSummary{UpdatedResources: []string{}}, err - } - return c.SyncAllByPatientEverythingBundle(db, bundle) + supportedResources := append(c.GetUsCoreResources(), []string{"MedicationDispense"}...) + return c.SyncAllByResourceName(db, supportedResources) } diff --git a/definitions/internal/platform/unitedhealthcare.go b/definitions/internal/platform/unitedhealthcare.go index fa1a83a97..c69f66490 100644 --- a/definitions/internal/platform/unitedhealthcare.go +++ b/definitions/internal/platform/unitedhealthcare.go @@ -21,10 +21,10 @@ func GetSourceUnitedhealthcare(env pkg.FastenLighthouseEnvType, clientIdLookup m sourceDef.UserInfoEndpoint = "https://sandbox.authz.flex.optum.com/userinfo" sourceDef.Issuer = "https://sandbox.fhir.flex.optum.com/R4" - sourceDef.Scopes = []string{"fhirUser", "openid", "patient/Condition.read", "patient/Coverage.read", "patient/Encounter.read", "patient/ExplanationOfBenefit.read", "patient/Immunization.read", "patient/MedicationDispense.read", "patient/MedicationRequest.read", "patient/Observation.read", "patient/Patient.read", "patient/Procedure.read", "public/Endpoint.read", "public/HealthcareService.read", "public/InsurancePlan.read", "public/Location.read", "public/Network.read", "public/Organization.read", "public/OrganizationAffiliation.read", "public/Practitioner.read", "public/PractitionerRole.read"} + sourceDef.Scopes = []string{"fhirUser", "openid", "patient/Condition.read", "patient/Coverage.read", "patient/Encounter.read", "patient/ExplanationOfBenefit.read", "patient/Immunization.read", "patient/MedicationDispense.read", "patient/MedicationRequest.read", "patient/Observation.read", "patient/Patient.read", "patient/Procedure.read", "profile"} sourceDef.GrantTypesSupported = []string{"authorization_code"} sourceDef.ResponseType = []string{"code"} - sourceDef.ResponseModesSupported = []string{"query"} + sourceDef.ResponseModesSupported = []string{"fragment", "query"} sourceDef.Audience = "https://sandbox.fhir.flex.optum.com/R4" sourceDef.CodeChallengeMethodsSupported = []string{"S256"}