@@ -17,7 +17,7 @@ let client;
17
17
function authorize ( inputFhirUrl , clientId ) {
18
18
config . iss = inputFhirUrl ;
19
19
config . clientId = clientId ?? "no clientId configured" ;
20
- // TODO: Remove in favor of producing correct token response on server side
20
+ // TODO SOF : Remove in favor of producing correct token response on server side
21
21
let fakeTokenResponse = {
22
22
authorizeUri : "https://keycloak.inform.dev.cirg.uw.edu/realms/ltt/protocol/openid-connect/auth" ,
23
23
tokenUri : "https://keycloak.inform.dev.cirg.uw.edu/realms/ltt/protocol/openid-connect/token"
@@ -50,8 +50,9 @@ function getReferences(obj, references) {
50
50
}
51
51
52
52
async function requestResources ( client , resourceType ) {
53
+ // TODO SOF: Replace with appropriate query once server is configured
53
54
// let endpoint = (resourceType == 'Patient' ? 'Patient/' : `${resourceType}?patient=`) + client.getPatientId();
54
- let endpoint = "https://fhir.inform.dev.cirg.uw.edu/fhir/ Patient" ;
55
+ let endpoint = "Patient" ;
55
56
return client . request ( endpoint , { flat : true } ) . then ( ( result ) => {
56
57
let resourcesToPass = [ ] ;
57
58
if ( Array . isArray ( result ) ) {
@@ -77,10 +78,11 @@ async function activePatient() {
77
78
async function getResources ( ) {
78
79
client = await FHIR . oauth2 . ready ( ) ;
79
80
let pid = client . getPatientId ( ) ;
80
- if ( ! pid ) {
81
- console . error ( "No patient ID found" ) ;
82
- return undefined ;
83
- }
81
+ // TODO SOF: Bring back in once SMART Auth is set up
82
+ // if (!pid) {
83
+ // console.error("No patient ID found");
84
+ // return undefined;
85
+ // }
84
86
// Establish resource display methods
85
87
let resources = ( await Promise . allSettled ( SOF_PATIENT_RESOURCES . map ( ( resourceType ) => {
86
88
return requestResources ( client , resourceType ) ;
0 commit comments