try to extact patient id from idtoken if present (used in AllScripts).

This commit is contained in:
Jason Kulatunga 2023-07-27 18:32:59 -07:00
parent 60bedabe01
commit fefb2e8277
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -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\/)/,'')