Skip to content

Commit

Permalink
resolve type complains
Browse files Browse the repository at this point in the history
  • Loading branch information
dippindots committed Jan 9, 2025
1 parent 4dc14e5 commit 39887ad
Showing 1 changed file with 30 additions and 26 deletions.
56 changes: 30 additions & 26 deletions src/pages/studyView/StudyViewPageStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10456,7 +10456,9 @@ export class StudyViewPageStore
}
// a row represents a list of patients that either have or have not recieved
// a specific treatment
public readonly sampleTreatments = remoteData<SampleTreatmentReport>({
public readonly sampleTreatments = remoteData<
SampleTreatmentReport | undefined
>({
await: () => [this.shouldDisplaySampleTreatments],
invoke: async () => {
if (this.shouldDisplaySampleTreatments.result) {
Expand Down Expand Up @@ -10501,7 +10503,9 @@ export class StudyViewPageStore

// a row represents a list of samples that ether have or have not recieved
// a specific treatment
public readonly patientTreatments = remoteData<PatientTreatmentReport>({
public readonly patientTreatments = remoteData<
PatientTreatmentReport | undefined
>({
await: () => [this.shouldDisplayPatientTreatments],
invoke: async () => {
if (this.shouldDisplayPatientTreatments.result) {
Expand Down Expand Up @@ -10567,31 +10571,31 @@ export class StudyViewPageStore

// a row represents a list of samples that ether have or have not recieved
// a specific treatment
public readonly patientTreatmentGroups = remoteData<PatientTreatmentReport>(
{
await: () => [this.shouldDisplayPatientTreatmentGroups],
invoke: () => {
if (this.shouldDisplayPatientTreatmentGroups.result) {
if (isClickhouseMode()) {
// @ts-ignore (will be available when go live with Clickhouse for all portals)
return this.internalClient.fetchPatientTreatmentCountsUsingPOST(
{
studyViewFilter: this.filters,
tier: 'AgentClass',
}
);
} else {
return getPatientTreatmentReport(
this.filters,
'AgentClass',
this.internalClient
);
}
public readonly patientTreatmentGroups = remoteData<
PatientTreatmentReport | undefined
>({
await: () => [this.shouldDisplayPatientTreatmentGroups],
invoke: () => {
if (this.shouldDisplayPatientTreatmentGroups.result) {
if (isClickhouseMode()) {
// @ts-ignore (will be available when go live with Clickhouse for all portals)
return this.internalClient.fetchPatientTreatmentCountsUsingPOST(
{
studyViewFilter: this.filters,
tier: 'AgentClass',
}
);
} else {
return getPatientTreatmentReport(
this.filters,
'AgentClass',
this.internalClient
);
}
return Promise.resolve(undefined);
},
}
);
}
return Promise.resolve(undefined);
},
});

public readonly sampleTreatmentTarget = remoteData({
await: () => [this.shouldDisplaySampleTreatmentTarget],
Expand Down

0 comments on commit 39887ad

Please sign in to comment.