Skip to content

Commit

Permalink
Simplify access of cmoPatientId field
Browse files Browse the repository at this point in the history
  • Loading branch information
qu8n authored and ao508 committed Aug 7, 2024
1 parent 73c9ca6 commit 4326dd8
Show file tree
Hide file tree
Showing 7 changed files with 2,030 additions and 16 deletions.
149 changes: 145 additions & 4 deletions frontend/src/generated/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1668,6 +1668,26 @@ export type CohortHasCohortSampleSamplesNodeAggregationWhereInput = {
datasource_SHORTEST_GTE?: InputMaybe<Scalars["Int"]>;
datasource_SHORTEST_LT?: InputMaybe<Scalars["Int"]>;
datasource_SHORTEST_LTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_AVERAGE_EQUAL?: InputMaybe<Scalars["Float"]>;
dmpPatientId_AVERAGE_GT?: InputMaybe<Scalars["Float"]>;
dmpPatientId_AVERAGE_GTE?: InputMaybe<Scalars["Float"]>;
dmpPatientId_AVERAGE_LT?: InputMaybe<Scalars["Float"]>;
dmpPatientId_AVERAGE_LTE?: InputMaybe<Scalars["Float"]>;
dmpPatientId_EQUAL?: InputMaybe<Scalars["String"]>;
dmpPatientId_GT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_GTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_EQUAL?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_GT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_GTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_LT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_LTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_EQUAL?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_GT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_GTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_LT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_LTE?: InputMaybe<Scalars["Int"]>;
embargoDate_AVERAGE_EQUAL?: InputMaybe<Scalars["Float"]>;
embargoDate_AVERAGE_GT?: InputMaybe<Scalars["Float"]>;
embargoDate_AVERAGE_GTE?: InputMaybe<Scalars["Float"]>;
Expand Down Expand Up @@ -2372,6 +2392,7 @@ export type CohortSampleHasCohortSampleSamplesNodeAggregateSelection = {
costCenter: StringAggregateSelectionNullable;
custodianInformation: StringAggregateSelectionNullable;
datasource: StringAggregateSelectionNonNullable;
dmpPatientId: StringAggregateSelectionNullable;
embargoDate: StringAggregateSelectionNullable;
genePanel: StringAggregateSelectionNullable;
igoRequestId: StringAggregateSelectionNullable;
Expand Down Expand Up @@ -4262,6 +4283,26 @@ export type PatientHasSampleSamplesNodeAggregationWhereInput = {
datasource_SHORTEST_GTE?: InputMaybe<Scalars["Int"]>;
datasource_SHORTEST_LT?: InputMaybe<Scalars["Int"]>;
datasource_SHORTEST_LTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_AVERAGE_EQUAL?: InputMaybe<Scalars["Float"]>;
dmpPatientId_AVERAGE_GT?: InputMaybe<Scalars["Float"]>;
dmpPatientId_AVERAGE_GTE?: InputMaybe<Scalars["Float"]>;
dmpPatientId_AVERAGE_LT?: InputMaybe<Scalars["Float"]>;
dmpPatientId_AVERAGE_LTE?: InputMaybe<Scalars["Float"]>;
dmpPatientId_EQUAL?: InputMaybe<Scalars["String"]>;
dmpPatientId_GT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_GTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_EQUAL?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_GT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_GTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_LT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_LTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_EQUAL?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_GT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_GTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_LT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_LTE?: InputMaybe<Scalars["Int"]>;
embargoDate_AVERAGE_EQUAL?: InputMaybe<Scalars["Float"]>;
embargoDate_AVERAGE_GT?: InputMaybe<Scalars["Float"]>;
embargoDate_AVERAGE_GTE?: InputMaybe<Scalars["Float"]>;
Expand Down Expand Up @@ -5102,6 +5143,7 @@ export type PatientSampleHasSampleSamplesNodeAggregateSelection = {
costCenter: StringAggregateSelectionNullable;
custodianInformation: StringAggregateSelectionNullable;
datasource: StringAggregateSelectionNonNullable;
dmpPatientId: StringAggregateSelectionNullable;
embargoDate: StringAggregateSelectionNullable;
genePanel: StringAggregateSelectionNullable;
igoRequestId: StringAggregateSelectionNullable;
Expand Down Expand Up @@ -7329,6 +7371,26 @@ export type RequestHasSampleSamplesNodeAggregationWhereInput = {
datasource_SHORTEST_GTE?: InputMaybe<Scalars["Int"]>;
datasource_SHORTEST_LT?: InputMaybe<Scalars["Int"]>;
datasource_SHORTEST_LTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_AVERAGE_EQUAL?: InputMaybe<Scalars["Float"]>;
dmpPatientId_AVERAGE_GT?: InputMaybe<Scalars["Float"]>;
dmpPatientId_AVERAGE_GTE?: InputMaybe<Scalars["Float"]>;
dmpPatientId_AVERAGE_LT?: InputMaybe<Scalars["Float"]>;
dmpPatientId_AVERAGE_LTE?: InputMaybe<Scalars["Float"]>;
dmpPatientId_EQUAL?: InputMaybe<Scalars["String"]>;
dmpPatientId_GT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_GTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_EQUAL?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_GT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_GTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_LT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_LTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_EQUAL?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_GT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_GTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_LT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_LTE?: InputMaybe<Scalars["Int"]>;
embargoDate_AVERAGE_EQUAL?: InputMaybe<Scalars["Float"]>;
embargoDate_AVERAGE_GT?: InputMaybe<Scalars["Float"]>;
embargoDate_AVERAGE_GTE?: InputMaybe<Scalars["Float"]>;
Expand Down Expand Up @@ -9050,6 +9112,7 @@ export type RequestSampleHasSampleSamplesNodeAggregateSelection = {
costCenter: StringAggregateSelectionNullable;
custodianInformation: StringAggregateSelectionNullable;
datasource: StringAggregateSelectionNonNullable;
dmpPatientId: StringAggregateSelectionNullable;
embargoDate: StringAggregateSelectionNullable;
genePanel: StringAggregateSelectionNullable;
igoRequestId: StringAggregateSelectionNullable;
Expand Down Expand Up @@ -9439,6 +9502,7 @@ export type Sample = {
costCenter?: Maybe<Scalars["String"]>;
custodianInformation?: Maybe<Scalars["String"]>;
datasource: Scalars["String"];
dmpPatientId?: Maybe<Scalars["String"]>;
embargoDate?: Maybe<Scalars["String"]>;
genePanel?: Maybe<Scalars["String"]>;
hasMetadataSampleMetadata: Array<SampleMetadata>;
Expand Down Expand Up @@ -9625,6 +9689,7 @@ export type SampleAggregateSelection = {
count: Scalars["Int"];
custodianInformation: StringAggregateSelectionNullable;
datasource: StringAggregateSelectionNonNullable;
dmpPatientId: StringAggregateSelectionNullable;
embargoDate: StringAggregateSelectionNullable;
genePanel: StringAggregateSelectionNullable;
igoRequestId: StringAggregateSelectionNullable;
Expand Down Expand Up @@ -10122,6 +10187,26 @@ export type SampleAliasIsAliasSamplesNodeAggregationWhereInput = {
datasource_SHORTEST_GTE?: InputMaybe<Scalars["Int"]>;
datasource_SHORTEST_LT?: InputMaybe<Scalars["Int"]>;
datasource_SHORTEST_LTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_AVERAGE_EQUAL?: InputMaybe<Scalars["Float"]>;
dmpPatientId_AVERAGE_GT?: InputMaybe<Scalars["Float"]>;
dmpPatientId_AVERAGE_GTE?: InputMaybe<Scalars["Float"]>;
dmpPatientId_AVERAGE_LT?: InputMaybe<Scalars["Float"]>;
dmpPatientId_AVERAGE_LTE?: InputMaybe<Scalars["Float"]>;
dmpPatientId_EQUAL?: InputMaybe<Scalars["String"]>;
dmpPatientId_GT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_GTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_EQUAL?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_GT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_GTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_LT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_LTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_EQUAL?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_GT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_GTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_LT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_LTE?: InputMaybe<Scalars["Int"]>;
embargoDate_AVERAGE_EQUAL?: InputMaybe<Scalars["Float"]>;
embargoDate_AVERAGE_GT?: InputMaybe<Scalars["Float"]>;
embargoDate_AVERAGE_GTE?: InputMaybe<Scalars["Float"]>;
Expand Down Expand Up @@ -10819,6 +10904,7 @@ export type SampleAliasSampleIsAliasSamplesNodeAggregateSelection = {
costCenter: StringAggregateSelectionNullable;
custodianInformation: StringAggregateSelectionNullable;
datasource: StringAggregateSelectionNonNullable;
dmpPatientId: StringAggregateSelectionNullable;
embargoDate: StringAggregateSelectionNullable;
genePanel: StringAggregateSelectionNullable;
igoRequestId: StringAggregateSelectionNullable;
Expand Down Expand Up @@ -11259,6 +11345,7 @@ export type SampleCreateInput = {
costCenter?: InputMaybe<Scalars["String"]>;
custodianInformation?: InputMaybe<Scalars["String"]>;
datasource: Scalars["String"];
dmpPatientId?: InputMaybe<Scalars["String"]>;
embargoDate?: InputMaybe<Scalars["String"]>;
genePanel?: InputMaybe<Scalars["String"]>;
hasMetadataSampleMetadata?: InputMaybe<SampleHasMetadataSampleMetadataFieldInput>;
Expand Down Expand Up @@ -12451,6 +12538,7 @@ export type SampleMetadataSampleSamplesHasMetadataNodeAggregateSelection = {
costCenter: StringAggregateSelectionNullable;
custodianInformation: StringAggregateSelectionNullable;
datasource: StringAggregateSelectionNonNullable;
dmpPatientId: StringAggregateSelectionNullable;
embargoDate: StringAggregateSelectionNullable;
genePanel: StringAggregateSelectionNullable;
igoRequestId: StringAggregateSelectionNullable;
Expand Down Expand Up @@ -12887,6 +12975,26 @@ export type SampleMetadataSamplesHasMetadataNodeAggregationWhereInput = {
datasource_SHORTEST_GTE?: InputMaybe<Scalars["Int"]>;
datasource_SHORTEST_LT?: InputMaybe<Scalars["Int"]>;
datasource_SHORTEST_LTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_AVERAGE_EQUAL?: InputMaybe<Scalars["Float"]>;
dmpPatientId_AVERAGE_GT?: InputMaybe<Scalars["Float"]>;
dmpPatientId_AVERAGE_GTE?: InputMaybe<Scalars["Float"]>;
dmpPatientId_AVERAGE_LT?: InputMaybe<Scalars["Float"]>;
dmpPatientId_AVERAGE_LTE?: InputMaybe<Scalars["Float"]>;
dmpPatientId_EQUAL?: InputMaybe<Scalars["String"]>;
dmpPatientId_GT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_GTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_EQUAL?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_GT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_GTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_LT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_LTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_EQUAL?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_GT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_GTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_LT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_LTE?: InputMaybe<Scalars["Int"]>;
embargoDate_AVERAGE_EQUAL?: InputMaybe<Scalars["Float"]>;
embargoDate_AVERAGE_GT?: InputMaybe<Scalars["Float"]>;
embargoDate_AVERAGE_GTE?: InputMaybe<Scalars["Float"]>;
Expand Down Expand Up @@ -14912,6 +15020,7 @@ export type SampleSort = {
costCenter?: InputMaybe<SortDirection>;
custodianInformation?: InputMaybe<SortDirection>;
datasource?: InputMaybe<SortDirection>;
dmpPatientId?: InputMaybe<SortDirection>;
embargoDate?: InputMaybe<SortDirection>;
genePanel?: InputMaybe<SortDirection>;
igoComplete?: InputMaybe<SortDirection>;
Expand Down Expand Up @@ -14986,6 +15095,7 @@ export type SampleUpdateInput = {
costCenter?: InputMaybe<Scalars["String"]>;
custodianInformation?: InputMaybe<Scalars["String"]>;
datasource?: InputMaybe<Scalars["String"]>;
dmpPatientId?: InputMaybe<Scalars["String"]>;
embargoDate?: InputMaybe<Scalars["String"]>;
genePanel?: InputMaybe<Scalars["String"]>;
hasMetadataSampleMetadata?: InputMaybe<
Expand Down Expand Up @@ -15228,6 +15338,16 @@ export type SampleWhere = {
datasource_NOT_IN?: InputMaybe<Array<Scalars["String"]>>;
datasource_NOT_STARTS_WITH?: InputMaybe<Scalars["String"]>;
datasource_STARTS_WITH?: InputMaybe<Scalars["String"]>;
dmpPatientId?: InputMaybe<Scalars["String"]>;
dmpPatientId_CONTAINS?: InputMaybe<Scalars["String"]>;
dmpPatientId_ENDS_WITH?: InputMaybe<Scalars["String"]>;
dmpPatientId_IN?: InputMaybe<Array<InputMaybe<Scalars["String"]>>>;
dmpPatientId_NOT?: InputMaybe<Scalars["String"]>;
dmpPatientId_NOT_CONTAINS?: InputMaybe<Scalars["String"]>;
dmpPatientId_NOT_ENDS_WITH?: InputMaybe<Scalars["String"]>;
dmpPatientId_NOT_IN?: InputMaybe<Array<InputMaybe<Scalars["String"]>>>;
dmpPatientId_NOT_STARTS_WITH?: InputMaybe<Scalars["String"]>;
dmpPatientId_STARTS_WITH?: InputMaybe<Scalars["String"]>;
embargoDate?: InputMaybe<Scalars["String"]>;
embargoDate_CONTAINS?: InputMaybe<Scalars["String"]>;
embargoDate_ENDS_WITH?: InputMaybe<Scalars["String"]>;
Expand Down Expand Up @@ -17301,6 +17421,7 @@ export type TempoSampleSamplesHasTempoNodeAggregateSelection = {
costCenter: StringAggregateSelectionNullable;
custodianInformation: StringAggregateSelectionNullable;
datasource: StringAggregateSelectionNonNullable;
dmpPatientId: StringAggregateSelectionNullable;
embargoDate: StringAggregateSelectionNullable;
genePanel: StringAggregateSelectionNullable;
igoRequestId: StringAggregateSelectionNullable;
Expand Down Expand Up @@ -17731,6 +17852,26 @@ export type TempoSamplesHasTempoNodeAggregationWhereInput = {
datasource_SHORTEST_GTE?: InputMaybe<Scalars["Int"]>;
datasource_SHORTEST_LT?: InputMaybe<Scalars["Int"]>;
datasource_SHORTEST_LTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_AVERAGE_EQUAL?: InputMaybe<Scalars["Float"]>;
dmpPatientId_AVERAGE_GT?: InputMaybe<Scalars["Float"]>;
dmpPatientId_AVERAGE_GTE?: InputMaybe<Scalars["Float"]>;
dmpPatientId_AVERAGE_LT?: InputMaybe<Scalars["Float"]>;
dmpPatientId_AVERAGE_LTE?: InputMaybe<Scalars["Float"]>;
dmpPatientId_EQUAL?: InputMaybe<Scalars["String"]>;
dmpPatientId_GT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_GTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_EQUAL?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_GT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_GTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_LT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LONGEST_LTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_LTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_EQUAL?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_GT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_GTE?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_LT?: InputMaybe<Scalars["Int"]>;
dmpPatientId_SHORTEST_LTE?: InputMaybe<Scalars["Int"]>;
embargoDate_AVERAGE_EQUAL?: InputMaybe<Scalars["Float"]>;
embargoDate_AVERAGE_GT?: InputMaybe<Scalars["Float"]>;
embargoDate_AVERAGE_GTE?: InputMaybe<Scalars["Float"]>;
Expand Down Expand Up @@ -18704,6 +18845,7 @@ export type PatientsListQuery = {
primaryId: string;
cmoSampleName?: string | null;
additionalProperties: string;
cmoPatientId?: string | null;
}>;
}>;
hasSampleSamplesConnection: {
Expand Down Expand Up @@ -18780,6 +18922,7 @@ export type SamplesListQuery = {
qcCompleteReason?: string | null;
qcCompleteStatus?: string | null;
recipe?: string | null;
dmpPatientId?: string | null;
datasource: string;
revisable: boolean;
sampleCategory: string;
Expand Down Expand Up @@ -18843,8 +18986,6 @@ export type SamplesListQuery = {
patientsHasSample: Array<{
__typename?: "Patient";
smilePatientId: string;
cmoPatientId?: string | null;
dmpPatientId?: string | null;
patientAliasesIsAlias: Array<{
__typename?: "PatientAlias";
namespace: string;
Expand Down Expand Up @@ -19302,6 +19443,7 @@ export const PatientsListDocument = gql`
primaryId
cmoSampleName
additionalProperties
cmoPatientId
}
}
hasSampleSamplesConnection {
Expand Down Expand Up @@ -19428,6 +19570,7 @@ export const SamplesListDocument = gql`
qcCompleteReason
qcCompleteStatus
recipe
dmpPatientId
hasMetadataSampleMetadata(options: $sampleMetadataOptions) {
...SampleMetadataParts
hasStatusStatuses {
Expand All @@ -19440,8 +19583,6 @@ export const SamplesListDocument = gql`
}
patientsHasSample {
smilePatientId
cmoPatientId
dmpPatientId
patientAliasesIsAlias {
namespace
value
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/shared/helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ export function getSamplePopupParamId(
paramId: string
) {
if (parentWhereVariables.OR?.[0].patientsHasSampleConnection_SOME) {
const { cmoPatientId, dmpPatientId } = samples[0].patientsHasSample?.[0];
const { cmoPatientId, dmpPatientId } = samples[0];
if (cmoPatientId) return cmoPatientId;
return dmpPatientId;
}
Expand Down
Loading

0 comments on commit 4326dd8

Please sign in to comment.