From fefb2e8277e4d49f916e510e11d8fe357e78f17b Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Thu, 27 Jul 2023 18:32:59 -0700 Subject: [PATCH] try to extact patient id from idtoken if present (used in AllScripts). --- .../medical-sources-connected.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/components/medical-sources-connected/medical-sources-connected.component.ts b/frontend/src/app/components/medical-sources-connected/medical-sources-connected.component.ts index 7c5e15d9..8822a9d1 100644 --- a/frontend/src/app/components/medical-sources-connected/medical-sources-connected.component.ts +++ b/frontend/src/app/components/medical-sources-connected/medical-sources-connected.component.ts @@ -122,7 +122,7 @@ export class MedicalSourcesConnectedComponent implements OnInit { //console.log(introspectionResp) let decodedIdToken = this.jwtDecode(payload.id_token) //nextGen uses fhirUser instead of profile. - payload.patient = decodedIdToken["profile"] || decodedIdToken["fhirUser"] + payload.patient = decodedIdToken["patient"] || decodedIdToken["profile"] || decodedIdToken["fhirUser"] if(payload.patient){ payload.patient = payload.patient.replace(/^(Patient\/)/,'')