Skip to content

Commit e506933

Browse files
committed
Add resource request case for eCW client id
1 parent 5238dd9 commit e506933

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

src/lib/sofClient.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,17 @@ async function getResources() {
7676
return undefined;
7777
}
7878
// Establish resource display methods
79-
let resources = (await Promise.allSettled(SOF_PATIENT_RESOURCES.map((resourceType) => {
80-
return requestResources(client, resourceType);
81-
}))).filter(x => x.status == "fulfilled").map(x => x.value);
79+
let resources;
80+
if (client.state.clientId === "XfubBaEQzzHCOvgeB9Q7qZbg4QcK3Jro_65w5VWFRP8") {
81+
resources = (await Promise.allSettled(['Patient', 'Immunization'].map((resourceType) => {
82+
return requestResources(client, resourceType);
83+
}))).filter(x => x.status == "fulfilled").map(x => x.value);
84+
} else {
85+
resources = (await Promise.allSettled(SOF_PATIENT_RESOURCES.map((resourceType) => {
86+
return requestResources(client, resourceType);
87+
}))).filter(x => x.status == "fulfilled").map(x => x.value);
88+
}
89+
8290

8391
return resources;
8492
}

0 commit comments

Comments
 (0)