diff --git a/client/src/app/components/comments/comment-body/comment-body.component.html b/client/src/app/components/comments/comment-body/comment-body.component.html index 78b13446d..37fe2b5b8 100644 --- a/client/src/app/components/comments/comment-body/comment-body.component.html +++ b/client/src/app/components/comments/comment-body/comment-body.component.html @@ -75,6 +75,15 @@ deprecated: c.deprecated }"> + + + + + countQueryRef?: QueryRef< + ExistingEvidenceCountQuery, + ExistingEvidenceCountQueryVariables + > existingEvidenceCount$?: Observable constructor( - private revisableFieldsGQL: EvidenceItemRevisableFields2GQL, + private revisableFieldsGQL: EvidenceItemRevisableFieldsGQL, private submitEvidenceGQL: SubmitEvidenceItemGQL, private existingEvidenceGQL: ExistingEvidenceCountGQL, private cdr: ChangeDetectorRef, @@ -82,11 +88,11 @@ export class CvcEvidenceSubmitForm implements OnDestroy, AfterViewInit, OnInit { this.existingEvidenceId = +params.existingEvidenceId let direction = this.getFieldConfig('direction-select') - if(direction) { + if (direction) { direction.props!.formMode = 'clone' } let significance = this.getFieldConfig('significance-select') - if(significance) { + if (significance) { significance.props!.formMode = 'clone' } } else { @@ -96,23 +102,25 @@ export class CvcEvidenceSubmitForm implements OnDestroy, AfterViewInit, OnInit { } getFieldConfig(fieldKey: string) { - return this.fields?.[0] - .fieldGroup?.find(f => f.key === 'fields') - ?.fieldGroup?.find(f => f.type === fieldKey) + return this.fields?.[0].fieldGroup + ?.find((f) => f.key === 'fields') + ?.fieldGroup?.find((f) => f.type === fieldKey) } - ngOnInit(): void { - this.countQueryRef = this.existingEvidenceGQL.watch({molecularProfileId: 0, sourceId: 0}) + this.countQueryRef = this.existingEvidenceGQL.watch({ + molecularProfileId: 0, + sourceId: 0, + }) this.existingEvidenceCount$ = this.countQueryRef?.valueChanges.pipe( - map(c => c.data?.evidenceItems?.totalCount), - filter(isNonNulled), - untilDestroyed(this) + map((c) => c.data?.evidenceItems?.totalCount), + filter(isNonNulled), + untilDestroyed(this) ) } ngAfterViewInit(): void { - if(this.existingEvidenceId) { + if (this.existingEvidenceId) { this.revisableFieldsGQL .fetch({ evidenceId: this.existingEvidenceId }) .pipe(untilDestroyed(this)) @@ -157,16 +165,19 @@ export class CvcEvidenceSubmitForm implements OnDestroy, AfterViewInit, OnInit { onModelChange(newModel: EvidenceSubmitModel) { if (newModel.fields.sourceId && newModel.fields.molecularProfileId) { - if (newModel.fields.sourceId != this.selectedSourceId || newModel.fields.molecularProfileId != this.selectedMpId) { + if ( + newModel.fields.sourceId != this.selectedSourceId || + newModel.fields.molecularProfileId != this.selectedMpId + ) { this.selectedSourceId = newModel.fields.sourceId this.selectedMpId = newModel.fields.molecularProfileId this.countQueryRef?.refetch({ molecularProfileId: newModel.fields.molecularProfileId, - sourceId: newModel.fields.sourceId + sourceId: newModel.fields.sourceId, }) } } else { - this.countQueryRef?.refetch({molecularProfileId: 0, sourceId: 0}) + this.countQueryRef?.refetch({ molecularProfileId: 0, sourceId: 0 }) } } diff --git a/client/src/app/forms/config/evidence-submit/evidence-submit.query.gql b/client/src/app/forms/config/evidence-submit/evidence-submit.query.gql new file mode 100644 index 000000000..b4b1dde21 --- /dev/null +++ b/client/src/app/forms/config/evidence-submit/evidence-submit.query.gql @@ -0,0 +1,73 @@ +query EvidenceFieldsFromSourceSuggestion( + $sourceId: Int + $molecularProfileId: Int + $diseaseId: Int +) { + sourceSuggestionValues( + molecularProfileId: $molecularProfileId + diseaseId: $diseaseId + sourceId: $sourceId + ) { + molecularProfile { + id + name + link + } + disease { + id + name + link + } + source { + id + sourceType + citationId + citation + link + } + } +} + +query EvidenceSubmittableFields($evidenceId: Int!) { + evidenceItem(id: $evidenceId) { + ...SubmittableEvidenceFields + } +} + +fragment SubmittableEvidenceFields on EvidenceItem { + id + description + variantOrigin + evidenceType + significance + evidenceLevel + evidenceDirection + evidenceRating + therapyInteractionType + source { + id + citation + sourceType + } + phenotypes { + id + name + } + therapies { + id + name + } + disease { + id + name + } +} + +mutation SubmitEvidenceItem($input: SubmitEvidenceItemInput!) { + submitEvidence(input: $input) { + clientMutationId + evidenceItem { + id + } + } +} diff --git a/client/src/app/forms/config/molecular-profile-revise/molecular-profile-revise.form.config.ts b/client/src/app/forms/config/molecular-profile-revise/molecular-profile-revise.form.config.ts index 84a50c1e3..1abf9cd09 100644 --- a/client/src/app/forms/config/molecular-profile-revise/molecular-profile-revise.form.config.ts +++ b/client/src/app/forms/config/molecular-profile-revise/molecular-profile-revise.form.config.ts @@ -27,6 +27,19 @@ const formFieldConfig: FormlyFieldConfig[] = [ title: 'Revise Evidence Item', }, fieldGroup: [ + { + key: 'commonName', + type: 'input', + wrappers: ['form-field'], + props: { + placeholder: 'Enter a common name for this molecular profile.', + label: 'Molecular Profile Common Name', + description: 'Provide a human readable shorthand name that is commonly used for this molecular profile.', + extraType: 'prompt', + required: false, + rows: 1 + } + }, { key: 'description', type: 'textarea', diff --git a/client/src/app/forms/config/molecular-profile-revise/molecular-profile-revise.query.gql b/client/src/app/forms/config/molecular-profile-revise/molecular-profile-revise.query.gql index fc8e55f30..132459fbe 100644 --- a/client/src/app/forms/config/molecular-profile-revise/molecular-profile-revise.query.gql +++ b/client/src/app/forms/config/molecular-profile-revise/molecular-profile-revise.query.gql @@ -6,6 +6,7 @@ query MolecularProfileRevisableFields($molecularProfileId: Int!) { fragment RevisableMolecularProfileFields on MolecularProfile { id + commonName description sources { id diff --git a/client/src/app/forms/config/variantgroup-revise/variantgroup-revise.form.ts b/client/src/app/forms/config/variantgroup-revise/variantgroup-revise.form.ts index 9add7ad59..c42a7b813 100644 --- a/client/src/app/forms/config/variantgroup-revise/variantgroup-revise.form.ts +++ b/client/src/app/forms/config/variantgroup-revise/variantgroup-revise.form.ts @@ -19,12 +19,11 @@ import { variantGroupToModelFields, } from '@app/forms/utilities/variant-group-to-model-fields' import { - SuggestEvidenceItemRevision2GQL, - SuggestVariantGroupRevision2GQL, + SuggestEvidenceItemRevisionGQL, SuggestVariantGroupRevisionGQL, SuggestVariantGroupRevisionMutation, SuggestVariantGroupRevisionMutationVariables, - VariantGroupRevisableFields2GQL, + VariantGroupRevisableFieldsGQL, } from '@app/generated/civic.apollo' import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy' import { FormlyFieldConfig, FormlyFormOptions } from '@ngx-formly/core' @@ -57,8 +56,8 @@ export class CvcVariantgroupReviseForm url?: string constructor( - private revisableFieldsGQL: VariantGroupRevisableFields2GQL, - private submitRevisionsGQL: SuggestVariantGroupRevision2GQL, + private revisableFieldsGQL: VariantGroupRevisableFieldsGQL, + private submitRevisionsGQL: SuggestVariantGroupRevisionGQL, private networkErrorService: NetworkErrorsService, private cdr: ChangeDetectorRef ) { diff --git a/client/src/app/forms/config/variantgroup-revise/variantgroup-revise.query.gql b/client/src/app/forms/config/variantgroup-revise/variantgroup-revise.query.gql index dbdd979a1..71e2cb175 100644 --- a/client/src/app/forms/config/variantgroup-revise/variantgroup-revise.query.gql +++ b/client/src/app/forms/config/variantgroup-revise/variantgroup-revise.query.gql @@ -1,10 +1,10 @@ -query VariantGroupRevisableFields2($variantGroupId: Int!) { +query VariantGroupRevisableFields($variantGroupId: Int!) { variantGroup(id: $variantGroupId) { - ...VariantGroupRevisableFields2 + ...VariantGroupRevisableFields } } -fragment VariantGroupRevisableFields2 on VariantGroup { +fragment VariantGroupRevisableFields on VariantGroup { id name description @@ -31,7 +31,7 @@ fragment VariantGroupRevisableFields2 on VariantGroup { } } -mutation SuggestVariantGroupRevision2( +mutation SuggestVariantGroupRevision( $input: SuggestVariantGroupRevisionInput! ) { suggestVariantGroupRevision(input: $input) { diff --git a/client/src/app/forms/config/variantgroup-submit/variantgroup-submit.query.gql b/client/src/app/forms/config/variantgroup-submit/variantgroup-submit.query.gql index dbdd979a1..df6c8c4e1 100644 --- a/client/src/app/forms/config/variantgroup-submit/variantgroup-submit.query.gql +++ b/client/src/app/forms/config/variantgroup-submit/variantgroup-submit.query.gql @@ -1,48 +1,38 @@ -query VariantGroupRevisableFields2($variantGroupId: Int!) { +query VariantGroupSubmittableFields($variantGroupId: Int!) { variantGroup(id: $variantGroupId) { - ...VariantGroupRevisableFields2 + ...SubmittableVariantGroupFields } } -fragment VariantGroupRevisableFields2 on VariantGroup { +fragment SubmittableVariantGroupFields on VariantGroup { id name description - variants { - totalCount - edges { - cursor - node { - id - name - link - } - } + variants(first: 50) { nodes { id name link + singleVariantMolecularProfile { + id + name + link + } } } sources { id - name link + citation + sourceType } } -mutation SuggestVariantGroupRevision2( - $input: SuggestVariantGroupRevisionInput! -) { - suggestVariantGroupRevision(input: $input) { +mutation SubmitVariantGroup($input: SubmitVariantGroupInput!) { + submitVariantGroup(input: $input) { clientMutationId variantGroup { id } - results { - newlyCreated - id - fieldName - } } } diff --git a/client/src/app/forms/models/molecular-profile-fields.model.ts b/client/src/app/forms/models/molecular-profile-fields.model.ts index e7e963daf..4ae49b845 100644 --- a/client/src/app/forms/models/molecular-profile-fields.model.ts +++ b/client/src/app/forms/models/molecular-profile-fields.model.ts @@ -1,5 +1,6 @@ export type MolecularProfileFields = { description?: string + commonName?: string sourceIds?: number[] aliases?: string[] -} \ No newline at end of file +} diff --git a/client/src/app/forms/models/molecular-profile-revise.model.ts b/client/src/app/forms/models/molecular-profile-revise.model.ts index ea5c99921..fd981b8b6 100644 --- a/client/src/app/forms/models/molecular-profile-revise.model.ts +++ b/client/src/app/forms/models/molecular-profile-revise.model.ts @@ -7,6 +7,7 @@ export interface MolecularProfileReviseModel extends FormReviseBaseModel { export const molecularProfileReviseFieldsDefaults: MolecularProfileFields = { description: undefined, + commonName: undefined, sourceIds: undefined, aliases: undefined } @@ -17,4 +18,4 @@ export const molecularProfileReviseFormInitialModel: MolecularProfileReviseModel fields: molecularProfileReviseFieldsDefaults, comment: undefined, organizationId: undefined -} \ No newline at end of file +} diff --git a/client/src/app/forms/types/variant-select/variant-quick-add/variant-quick-add.query.gql b/client/src/app/forms/types/variant-select/variant-quick-add/variant-quick-add.query.gql index 32203a3c9..da28dec97 100644 --- a/client/src/app/forms/types/variant-select/variant-quick-add/variant-quick-add.query.gql +++ b/client/src/app/forms/types/variant-select/variant-quick-add/variant-quick-add.query.gql @@ -1,6 +1,6 @@ mutation QuickAddVariant($name: String!, $geneId: Int!) { addVariant(input: { name: $name, geneId: $geneId }) { - ...AddVariantFields + ...QuickAddVariantFields } } diff --git a/client/src/app/forms/utilities/variant-group-to-model-fields.ts b/client/src/app/forms/utilities/variant-group-to-model-fields.ts index 0e9fea3ca..d4566f93c 100644 --- a/client/src/app/forms/utilities/variant-group-to-model-fields.ts +++ b/client/src/app/forms/utilities/variant-group-to-model-fields.ts @@ -7,12 +7,12 @@ import { Maybe, SubmitVariantGroupInput, SuggestVariantGroupRevisionInput, - VariantGroupRevisableFields2Fragment, + VariantGroupRevisableFieldsFragment, } from '@app/generated/civic.apollo' import { VariantGroupSubmitModel } from '../models/variant-group-submit.model' export function variantGroupToModelFields( - variantGroup: VariantGroupRevisableFields2Fragment + variantGroup: VariantGroupRevisableFieldsFragment ): VariantGroupFields { return { description: variantGroup.description, @@ -28,6 +28,7 @@ export function variantGroupFormModelToReviseInput( ): Maybe { let input = variantGroupFormModelToInput(model) if (input) { + delete input.organizationId return { id: gid, fields: { @@ -54,6 +55,7 @@ export function variantGroupFormModelToInput( sourceIds: fields.sourceIds || [], name: fields.name!, variantIds: fields.variantIds || [], + organizationId: model.organizationId, } } } diff --git a/client/src/app/generated/civic.apollo-helpers.ts b/client/src/app/generated/civic.apollo-helpers.ts index 972131399..4b042940d 100644 --- a/client/src/app/generated/civic.apollo-helpers.ts +++ b/client/src/app/generated/civic.apollo-helpers.ts @@ -876,10 +876,11 @@ export type ModeratedObjectFieldFieldPolicy = { id?: FieldPolicy | FieldReadFunction, link?: FieldPolicy | FieldReadFunction }; -export type MolecularProfileKeySpecifier = ('assertions' | 'comments' | 'deprecated' | 'deprecatedVariants' | 'deprecationEvent' | 'description' | 'events' | 'evidenceCountsByStatus' | 'evidenceItems' | 'flagged' | 'flags' | 'id' | 'isComplex' | 'lastAcceptedRevisionEvent' | 'lastCommentEvent' | 'lastSubmittedRevisionEvent' | 'link' | 'molecularProfileAliases' | 'molecularProfileScore' | 'name' | 'parsedName' | 'rawName' | 'revisions' | 'sources' | 'variants' | MolecularProfileKeySpecifier)[]; +export type MolecularProfileKeySpecifier = ('assertions' | 'comments' | 'commonName' | 'deprecated' | 'deprecatedVariants' | 'deprecationEvent' | 'description' | 'events' | 'evidenceCountsByStatus' | 'evidenceItems' | 'flagged' | 'flags' | 'fullName' | 'id' | 'isComplex' | 'lastAcceptedRevisionEvent' | 'lastCommentEvent' | 'lastSubmittedRevisionEvent' | 'link' | 'molecularProfileAliases' | 'molecularProfileScore' | 'name' | 'parsedName' | 'rawName' | 'revisions' | 'sources' | 'variants' | MolecularProfileKeySpecifier)[]; export type MolecularProfileFieldPolicy = { assertions?: FieldPolicy | FieldReadFunction, comments?: FieldPolicy | FieldReadFunction, + commonName?: FieldPolicy | FieldReadFunction, deprecated?: FieldPolicy | FieldReadFunction, deprecatedVariants?: FieldPolicy | FieldReadFunction, deprecationEvent?: FieldPolicy | FieldReadFunction, @@ -889,6 +890,7 @@ export type MolecularProfileFieldPolicy = { evidenceItems?: FieldPolicy | FieldReadFunction, flagged?: FieldPolicy | FieldReadFunction, flags?: FieldPolicy | FieldReadFunction, + fullName?: FieldPolicy | FieldReadFunction, id?: FieldPolicy | FieldReadFunction, isComplex?: FieldPolicy | FieldReadFunction, lastAcceptedRevisionEvent?: FieldPolicy | FieldReadFunction, diff --git a/client/src/app/generated/civic.apollo.ts b/client/src/app/generated/civic.apollo.ts index 6a40b0df6..e5067484c 100644 --- a/client/src/app/generated/civic.apollo.ts +++ b/client/src/app/generated/civic.apollo.ts @@ -2189,6 +2189,8 @@ export type MolecularProfile = Commentable & EventOriginObject & EventSubject & assertions: AssertionConnection; /** List and filter comments. */ comments: CommentConnection; + /** A human readable shorthand name that is commonly used for this profile. */ + commonName?: Maybe; deprecated: Scalars['Boolean']; deprecatedVariants: Array; deprecationEvent?: Maybe; @@ -2201,6 +2203,8 @@ export type MolecularProfile = Commentable & EventOriginObject & EventSubject & flagged: Scalars['Boolean']; /** List and filter flags. */ flags: FlagConnection; + /** The human readable full name of this profile, including gene, variant names, and boolean operators. */ + fullName: Scalars['String']; id: Scalars['Int']; isComplex: Scalars['Boolean']; lastAcceptedRevisionEvent?: Maybe; @@ -2209,7 +2213,7 @@ export type MolecularProfile = Commentable & EventOriginObject & EventSubject & link: Scalars['String']; molecularProfileAliases: Array; molecularProfileScore: Scalars['Float']; - /** The human readable name of this profile, including gene and variant names. */ + /** Returns either the common name of this profile, if it is set, or the full_name otherwise. */ name: Scalars['String']; /** The profile name with its constituent parts as objects, suitable for building tags. */ parsedName: Array; @@ -2348,6 +2352,8 @@ export type MolecularProfileEdge = { export type MolecularProfileFields = { /** List of aliases or alternate names for the MolecularProfile. */ aliases: Array; + /** The MolecularProfile's common name. */ + commonName: NullableStringInput; /** The MolecularProfile's description/summary text. */ description: NullableStringInput; /** Source IDs cited by the MolecularProfile's summary. */ @@ -4684,6 +4690,7 @@ export enum TaggableEntity { MolecularProfile = 'MOLECULAR_PROFILE', Revision = 'REVISION', Role = 'ROLE', + Source = 'SOURCE', Variant = 'VARIANT', VariantGroup = 'VARIANT_GROUP' } @@ -6152,29 +6159,6 @@ export type ViewerNotificationCountQueryVariables = Exact<{ [key: string]: never export type ViewerNotificationCountQuery = { __typename: 'Query', notifications: { __typename: 'NotificationConnection', unreadCount: number } }; -export type AssertionRevisableFieldsQueryVariables = Exact<{ - assertionId: Scalars['Int']; -}>; - - -export type AssertionRevisableFieldsQuery = { __typename: 'Query', assertion?: { __typename: 'Assertion', id: number, summary: string, description: string, variantOrigin: VariantOrigin, significance: AssertionSignificance, therapyInteractionType?: TherapyInteraction | undefined, assertionDirection: AssertionDirection, assertionType: AssertionType, ampLevel?: AmpLevel | undefined, nccnGuidelineVersion?: string | undefined, regulatoryApproval?: boolean | undefined, fdaCompanionTest?: boolean | undefined, molecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string }, disease?: { __typename: 'Disease', id: number, doid?: string | undefined, name: string, displayName: string, link: string } | undefined, therapies: Array<{ __typename: 'Therapy', id: number, ncitId?: string | undefined, name: string, link: string }>, phenotypes: Array<{ __typename: 'Phenotype', id: number, hpoId: string, name: string }>, acmgCodes: Array<{ __typename: 'AcmgCode', id: number, name: string, code: string, description: string, tooltip: string }>, clingenCodes: Array<{ __typename: 'ClingenCode', id: number, code: string, description: string, name: string, tooltip: string, exclusive: boolean }>, nccnGuideline?: { __typename: 'NccnGuideline', id: number, name: string } | undefined, evidenceItems: Array<{ __typename: 'EvidenceItem', id: number, name: string, link: string, status: EvidenceStatus }> } | undefined }; - -export type RevisableAssertionFieldsFragment = { __typename: 'Assertion', id: number, summary: string, description: string, variantOrigin: VariantOrigin, significance: AssertionSignificance, therapyInteractionType?: TherapyInteraction | undefined, assertionDirection: AssertionDirection, assertionType: AssertionType, ampLevel?: AmpLevel | undefined, nccnGuidelineVersion?: string | undefined, regulatoryApproval?: boolean | undefined, fdaCompanionTest?: boolean | undefined, molecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string }, disease?: { __typename: 'Disease', id: number, doid?: string | undefined, name: string, displayName: string, link: string } | undefined, therapies: Array<{ __typename: 'Therapy', id: number, ncitId?: string | undefined, name: string, link: string }>, phenotypes: Array<{ __typename: 'Phenotype', id: number, hpoId: string, name: string }>, acmgCodes: Array<{ __typename: 'AcmgCode', id: number, name: string, code: string, description: string, tooltip: string }>, clingenCodes: Array<{ __typename: 'ClingenCode', id: number, code: string, description: string, name: string, tooltip: string, exclusive: boolean }>, nccnGuideline?: { __typename: 'NccnGuideline', id: number, name: string } | undefined, evidenceItems: Array<{ __typename: 'EvidenceItem', id: number, name: string, link: string, status: EvidenceStatus }> }; - -export type SuggestAssertionRevisionMutationVariables = Exact<{ - input: SuggestAssertionRevisionInput; -}>; - - -export type SuggestAssertionRevisionMutation = { __typename: 'Mutation', suggestAssertionRevision?: { __typename: 'SuggestAssertionRevisionPayload', clientMutationId?: string | undefined, assertion: { __typename: 'Assertion', id: number }, results: Array<{ __typename: 'RevisionResult', newlyCreated: boolean }> } | undefined }; - -export type SubmitAssertionMutationVariables = Exact<{ - input: SubmitAssertionInput; -}>; - - -export type SubmitAssertionMutation = { __typename: 'Mutation', submitAssertion?: { __typename: 'SubmitAssertionPayload', clientMutationId?: string | undefined, assertion: { __typename: 'Assertion', id: number } } | undefined }; - export type AddCommentMutationVariables = Exact<{ input: AddCommentInput; }>; @@ -6211,194 +6195,106 @@ export type EntityTypeaheadQueryVariables = Exact<{ export type EntityTypeaheadQuery = { __typename: 'Query', entityTypeahead: Array<{ __typename: 'CommentTagSegment', entityId: number, tagType: TaggableEntity, displayName: string }> }; -export type PreviewMolecularProfileNameQueryVariables = Exact<{ - mpStructure?: InputMaybe; -}>; - - -export type PreviewMolecularProfileNameQuery = { __typename: 'Query', previewMolecularProfileName: { __typename: 'MolecularProfileNamePreview', existingMolecularProfile?: { __typename: 'MolecularProfile', id: number, name: string, link: string } | undefined, segments: Array<{ __typename: 'Gene', id: number, name: string, link: string } | { __typename: 'MolecularProfileTextSegment', text: string } | { __typename: 'Variant', id: number, name: string, link: string }>, deprecatedVariants: Array<{ __typename: 'Variant', id: number, name: string, link: string }> } }; - -export type CreateMolecularProfileMutationVariables = Exact<{ - mpStructure: MolecularProfileComponentInput; -}>; - - -export type CreateMolecularProfileMutation = { __typename: 'Mutation', createMolecularProfile?: { __typename: 'CreateMolecularProfilePayload', molecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string } } | undefined }; - -type PreviewMpName_Gene_Fragment = { __typename: 'Gene', id: number, name: string, link: string }; - -type PreviewMpName_MolecularProfileTextSegment_Fragment = { __typename: 'MolecularProfileTextSegment', text: string }; - -type PreviewMpName_Variant_Fragment = { __typename: 'Variant', id: number, name: string, link: string }; - -export type PreviewMpNameFragment = PreviewMpName_Gene_Fragment | PreviewMpName_MolecularProfileTextSegment_Fragment | PreviewMpName_Variant_Fragment; - -export type AcmgCodeTypeaheadQueryVariables = Exact<{ - code: Scalars['String']; -}>; - - -export type AcmgCodeTypeaheadQuery = { __typename: 'Query', acmgCodesTypeahead: Array<{ __typename: 'AcmgCode', id: number, code: string, description: string, name: string, tooltip: string }> }; - -export type ClingenCodeTypeaheadQueryVariables = Exact<{ - code: Scalars['String']; -}>; - - -export type ClingenCodeTypeaheadQuery = { __typename: 'Query', clingenCodesTypeahead: Array<{ __typename: 'ClingenCode', id: number, code: string, description: string, name: string, tooltip: string, exclusive: boolean }> }; - -export type DiseaseTypeaheadQueryVariables = Exact<{ - name: Scalars['String']; -}>; - - -export type DiseaseTypeaheadQuery = { __typename: 'Query', diseaseTypeahead: Array<{ __typename: 'Disease', id: number, name: string, displayName: string, doid?: string | undefined, diseaseAliases: Array }> }; - -export type AddDiseaseMutationVariables = Exact<{ - name: Scalars['String']; - doid?: InputMaybe; -}>; - - -export type AddDiseaseMutation = { __typename: 'Mutation', addDisease?: { __typename: 'AddDiseasePayload', new: boolean, disease: { __typename: 'Disease', id: number, name: string, displayName: string } } | undefined }; - -export type AddDiseaseFieldsFragment = { __typename: 'AddDiseasePayload', new: boolean, disease: { __typename: 'Disease', id: number, name: string, displayName: string } }; - -export type EvidenceTypeaheadQueryVariables = Exact<{ - id: Scalars['Int']; -}>; - - -export type EvidenceTypeaheadQuery = { __typename: 'Query', evidenceItem?: { __typename: 'EvidenceItem', id: number, status: EvidenceStatus, name: string } | undefined }; - -export type GeneTypeaheadQueryVariables = Exact<{ - entrezSymbol: Scalars['String']; -}>; - - -export type GeneTypeaheadQuery = { __typename: 'Query', geneTypeahead: Array<{ __typename: 'Gene', id: number, name: string, geneAliases: Array, entrezId: number }> }; - -export type GeneTypeaheadFieldsFragment = { __typename: 'Gene', id: number, name: string, geneAliases: Array, entrezId: number }; - -export type NccnGuidelineTypeaheadQueryVariables = Exact<{ - name: Scalars['String']; +export type LinkableGeneQueryVariables = Exact<{ + geneId: Scalars['Int']; }>; -export type NccnGuidelineTypeaheadQuery = { __typename: 'Query', nccnGuidelinesTypeahead: Array<{ __typename: 'NccnGuideline', id: number, name: string }> }; +export type LinkableGeneQuery = { __typename: 'Query', gene?: { __typename: 'Gene', id: number, name: string, link: string } | undefined }; -export type PhenotypeTypeaheadQueryVariables = Exact<{ - name: Scalars['String']; +export type LinkableVariantQueryVariables = Exact<{ + variantId: Scalars['Int']; }>; -export type PhenotypeTypeaheadQuery = { __typename: 'Query', phenotypeTypeahead: Array<{ __typename: 'Phenotype', hpoId: string, id: number, name: string }> }; +export type LinkableVariantQuery = { __typename: 'Query', variant?: { __typename: 'Variant', id: number, name: string, link: string } | undefined }; -export type CitationExistenceCheckQueryVariables = Exact<{ - sourceType: SourceSource; - citationId: Scalars['String']; +export type LinkableTherapyQueryVariables = Exact<{ + therapyId: Scalars['Int']; }>; -export type CitationExistenceCheckQuery = { __typename: 'Query', remoteCitation?: string | undefined }; +export type LinkableTherapyQuery = { __typename: 'Query', therapy?: { __typename: 'Therapy', id: number, name: string, link: string } | undefined }; -export type CreateSourceStubMutationVariables = Exact<{ - input: AddRemoteCitationInput; +export type FlagEntityMutationVariables = Exact<{ + input: FlagEntityInput; }>; -export type CreateSourceStubMutation = { __typename: 'Mutation', addRemoteCitation?: { __typename: 'AddRemoteCitationPayload', newSource: { __typename: 'SourceStub', id: number, citationId: number, sourceType: SourceSource } } | undefined }; +export type FlagEntityMutation = { __typename: 'Mutation', flagEntity?: { __typename: 'FlagEntityPayload', flag?: { __typename: 'Flag', id: number } | undefined } | undefined }; -export type CitationTypeaheadQueryVariables = Exact<{ - partialCitationId: Scalars['String']; - sourceType: SourceSource; +export type ResolveFlagMutationVariables = Exact<{ + input: ResolveFlagInput; }>; -export type CitationTypeaheadQuery = { __typename: 'Query', sourceTypeahead: Array<{ __typename: 'Source', id: number, name: string, citation?: string | undefined, citationId: string, sourceType: SourceSource }> }; - -export type SourceTypeaheadResultFragment = { __typename: 'Source', id: number, name: string, citation?: string | undefined, citationId: string, sourceType: SourceSource }; +export type ResolveFlagMutation = { __typename: 'Mutation', resolveFlag?: { __typename: 'ResolveFlagPayload', flag?: { __typename: 'Flag', id: number } | undefined } | undefined }; -export type CheckRemoteCitationQueryVariables = Exact<{ - sourceType: SourceSource; - citationId: Scalars['String']; +export type UpdateSourceSuggestionMutationVariables = Exact<{ + input: UpdateSourceSuggestionStatusInput; }>; -export type CheckRemoteCitationQuery = { __typename: 'Query', remoteCitation?: string | undefined }; +export type UpdateSourceSuggestionMutation = { __typename: 'Mutation', updateSourceSuggestionStatus?: { __typename: 'UpdateSourceSuggestionStatusPayload', sourceSuggestion: { __typename: 'SourceSuggestion', id: number, status: SourceSuggestionStatus } } | undefined }; -export type AddRemoteCitationMutationVariables = Exact<{ - input: AddRemoteCitationInput; +export type UpdateCoiMutationVariables = Exact<{ + input: UpdateCoiInput; }>; -export type AddRemoteCitationMutation = { __typename: 'Mutation', addRemoteCitation?: { __typename: 'AddRemoteCitationPayload', newSource: { __typename: 'SourceStub', id: number, citationId: number, sourceType: SourceSource } } | undefined }; - -export type SourceStubFieldsFragment = { __typename: 'SourceStub', id: number, citationId: number, sourceType: SourceSource }; +export type UpdateCoiMutation = { __typename: 'Mutation', updateCoi?: { __typename: 'UpdateCoiPayload', coiStatement: { __typename: 'Coi', coiPresent: boolean, coiStatus: CoiStatus, createdAt?: any | undefined, id: number } } | undefined }; -export type SourceTypeaheadQueryVariables = Exact<{ - partialCitationId: Scalars['String']; - sourceType: SourceSource; +export type UpdateUserProfileMutationVariables = Exact<{ + input: EditUserInput; }>; -export type SourceTypeaheadQuery = { __typename: 'Query', sourceTypeahead: Array<{ __typename: 'Source', id: number, name: string, citation?: string | undefined, citationId: string, sourceType: SourceSource }> }; - -export type SourceTypeaheadFieldsFragment = { __typename: 'Source', id: number, name: string, citation?: string | undefined, citationId: string, sourceType: SourceSource }; +export type UpdateUserProfileMutation = { __typename: 'Mutation', editUser?: { __typename: 'EditUserPayload', user: { __typename: 'User', id: number } } | undefined }; -export type TherapyTypeaheadQueryVariables = Exact<{ - name: Scalars['String']; -}>; +export type CountriesQueryVariables = Exact<{ [key: string]: never; }>; -export type TherapyTypeaheadQuery = { __typename: 'Query', therapyTypeahead: Array<{ __typename: 'Therapy', id: number, name: string, ncitId?: string | undefined, therapyAliases: Array }> }; +export type CountriesQuery = { __typename: 'Query', countries: Array<{ __typename: 'Country', id: number, name: string }> }; -export type AddTherapyMutationVariables = Exact<{ - name: Scalars['String']; - ncitId?: InputMaybe; +export type DeprecateVariantMutationVariables = Exact<{ + variantId: Scalars['Int']; + deprecationReason: DeprecationReason; + comment: Scalars['String']; + organizationId?: InputMaybe; }>; -export type AddTherapyMutation = { __typename: 'Mutation', addTherapy?: { __typename: 'AddTherapyPayload', new: boolean, therapy: { __typename: 'Therapy', id: number, ncitId?: string | undefined, name: string } } | undefined }; - -export type AddTherapyFieldsFragment = { __typename: 'AddTherapyPayload', new: boolean, therapy: { __typename: 'Therapy', id: number, ncitId?: string | undefined, name: string } }; +export type DeprecateVariantMutation = { __typename: 'Mutation', deprecateVariant?: { __typename: 'DeprecateVariantPayload', newlyDeprecatedMolecularProfiles?: Array<{ __typename: 'MolecularProfile', id: number }> | undefined, variant?: { __typename: 'Variant', id: number, name: string } | undefined } | undefined }; -export type VariantTypeaheadQueryVariables = Exact<{ - name: Scalars['String']; - geneId?: InputMaybe; +export type MolecularProfilesForVariantQueryVariables = Exact<{ + variantId: Scalars['Int']; }>; -export type VariantTypeaheadQuery = { __typename: 'Query', variants: { __typename: 'VariantConnection', nodes: Array<{ __typename: 'Variant', id: number, name: string, variantAliases: Array, singleVariantMolecularProfileId: number, singleVariantMolecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string } }> } }; - -export type VariantTypeaheadFieldsFragment = { __typename: 'Variant', id: number, name: string, variantAliases: Array, singleVariantMolecularProfileId: number, singleVariantMolecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string } }; +export type MolecularProfilesForVariantQuery = { __typename: 'Query', molecularProfiles: { __typename: 'MolecularProfileConnection', nodes: Array<{ __typename: 'MolecularProfile', id: number, name: string, link: string, evidenceCountsByStatus: { __typename: 'EvidenceItemsByStatus', submittedCount: number, acceptedCount: number } }> } }; -export type AddVariantMutationVariables = Exact<{ - name: Scalars['String']; - geneId: Scalars['Int']; +export type AssertionRevisableFieldsQueryVariables = Exact<{ + assertionId: Scalars['Int']; }>; -export type AddVariantMutation = { __typename: 'Mutation', addVariant?: { __typename: 'AddVariantPayload', clientMutationId?: string | undefined, new: boolean, variant: { __typename: 'Variant', id: number, name: string, singleVariantMolecularProfileId: number, singleVariantMolecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string } } } | undefined }; +export type AssertionRevisableFieldsQuery = { __typename: 'Query', assertion?: { __typename: 'Assertion', id: number, summary: string, description: string, variantOrigin: VariantOrigin, significance: AssertionSignificance, therapyInteractionType?: TherapyInteraction | undefined, assertionDirection: AssertionDirection, assertionType: AssertionType, ampLevel?: AmpLevel | undefined, nccnGuidelineVersion?: string | undefined, regulatoryApproval?: boolean | undefined, fdaCompanionTest?: boolean | undefined, molecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string }, disease?: { __typename: 'Disease', id: number, doid?: string | undefined, name: string, displayName: string, link: string } | undefined, therapies: Array<{ __typename: 'Therapy', id: number, ncitId?: string | undefined, name: string, link: string }>, phenotypes: Array<{ __typename: 'Phenotype', id: number, hpoId: string, name: string }>, acmgCodes: Array<{ __typename: 'AcmgCode', id: number, name: string, code: string, description: string, tooltip: string }>, clingenCodes: Array<{ __typename: 'ClingenCode', id: number, code: string, description: string, name: string, tooltip: string, exclusive: boolean }>, nccnGuideline?: { __typename: 'NccnGuideline', id: number, name: string } | undefined, evidenceItems: Array<{ __typename: 'EvidenceItem', id: number, name: string, link: string, status: EvidenceStatus }> } | undefined }; -export type AddVariantFieldsFragment = { __typename: 'AddVariantPayload', clientMutationId?: string | undefined, new: boolean, variant: { __typename: 'Variant', id: number, name: string, singleVariantMolecularProfileId: number, singleVariantMolecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string } } }; +export type RevisableAssertionFieldsFragment = { __typename: 'Assertion', id: number, summary: string, description: string, variantOrigin: VariantOrigin, significance: AssertionSignificance, therapyInteractionType?: TherapyInteraction | undefined, assertionDirection: AssertionDirection, assertionType: AssertionType, ampLevel?: AmpLevel | undefined, nccnGuidelineVersion?: string | undefined, regulatoryApproval?: boolean | undefined, fdaCompanionTest?: boolean | undefined, molecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string }, disease?: { __typename: 'Disease', id: number, doid?: string | undefined, name: string, displayName: string, link: string } | undefined, therapies: Array<{ __typename: 'Therapy', id: number, ncitId?: string | undefined, name: string, link: string }>, phenotypes: Array<{ __typename: 'Phenotype', id: number, hpoId: string, name: string }>, acmgCodes: Array<{ __typename: 'AcmgCode', id: number, name: string, code: string, description: string, tooltip: string }>, clingenCodes: Array<{ __typename: 'ClingenCode', id: number, code: string, description: string, name: string, tooltip: string, exclusive: boolean }>, nccnGuideline?: { __typename: 'NccnGuideline', id: number, name: string } | undefined, evidenceItems: Array<{ __typename: 'EvidenceItem', id: number, name: string, link: string, status: EvidenceStatus }> }; -export type VariantSelectQueryVariables = Exact<{ - name: Scalars['String']; - geneId?: InputMaybe; +export type SuggestAssertionRevisionMutationVariables = Exact<{ + input: SuggestAssertionRevisionInput; }>; -export type VariantSelectQuery = { __typename: 'Query', variants: { __typename: 'VariantConnection', nodes: Array<{ __typename: 'Variant', id: number, name: string, variantAliases: Array, singleVariantMolecularProfileId: number, singleVariantMolecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string } }> } }; - -export type VariantSelectFieldsFragment = { __typename: 'Variant', id: number, name: string, variantAliases: Array, singleVariantMolecularProfileId: number, singleVariantMolecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string } }; +export type SuggestAssertionRevisionMutation = { __typename: 'Mutation', suggestAssertionRevision?: { __typename: 'SuggestAssertionRevisionPayload', clientMutationId?: string | undefined, assertion: { __typename: 'Assertion', id: number }, results: Array<{ __typename: 'RevisionResult', newlyCreated: boolean }> } | undefined }; -export type VariantTypeTypeaheadQueryVariables = Exact<{ - name: Scalars['String']; +export type SubmitAssertionMutationVariables = Exact<{ + input: SubmitAssertionInput; }>; -export type VariantTypeTypeaheadQuery = { __typename: 'Query', variantTypeTypeahead: Array<{ __typename: 'VariantType', name: string, soid: string, id: number }> }; +export type SubmitAssertionMutation = { __typename: 'Mutation', submitAssertion?: { __typename: 'SubmitAssertionPayload', clientMutationId?: string | undefined, assertion: { __typename: 'Assertion', id: number } } | undefined }; export type EvidenceItemRevisableFieldsQueryVariables = Exact<{ evidenceId: Scalars['Int']; @@ -6441,19 +6337,13 @@ export type SubmitEvidenceItemMutationVariables = Exact<{ export type SubmitEvidenceItemMutation = { __typename: 'Mutation', submitEvidence?: { __typename: 'SubmitEvidenceItemPayload', clientMutationId?: string | undefined, evidenceItem: { __typename: 'EvidenceItem', id: number } } | undefined }; -export type FlagEntityMutationVariables = Exact<{ - input: FlagEntityInput; -}>; - - -export type FlagEntityMutation = { __typename: 'Mutation', flagEntity?: { __typename: 'FlagEntityPayload', flag?: { __typename: 'Flag', id: number } | undefined } | undefined }; - -export type ResolveFlagMutationVariables = Exact<{ - input: ResolveFlagInput; +export type ExistingEvidenceCountQueryVariables = Exact<{ + molecularProfileId: Scalars['Int']; + sourceId: Scalars['Int']; }>; -export type ResolveFlagMutation = { __typename: 'Mutation', resolveFlag?: { __typename: 'ResolveFlagPayload', flag?: { __typename: 'Flag', id: number } | undefined } | undefined }; +export type ExistingEvidenceCountQuery = { __typename: 'Query', evidenceItems: { __typename: 'EvidenceItemConnection', totalCount: number } }; export type GeneRevisableFieldsQueryVariables = Exact<{ geneId: Scalars['Int']; @@ -6476,9 +6366,9 @@ export type MolecularProfileRevisableFieldsQueryVariables = Exact<{ }>; -export type MolecularProfileRevisableFieldsQuery = { __typename: 'Query', molecularProfile?: { __typename: 'MolecularProfile', id: number, description?: string | undefined, molecularProfileAliases: Array, isComplex: boolean, sources: Array<{ __typename: 'Source', id: number, sourceType: SourceSource, citation?: string | undefined, citationId: string }> } | undefined }; +export type MolecularProfileRevisableFieldsQuery = { __typename: 'Query', molecularProfile?: { __typename: 'MolecularProfile', id: number, commonName?: string | undefined, description?: string | undefined, molecularProfileAliases: Array, isComplex: boolean, sources: Array<{ __typename: 'Source', id: number, sourceType: SourceSource, citation?: string | undefined, citationId: string }> } | undefined }; -export type RevisableMolecularProfileFieldsFragment = { __typename: 'MolecularProfile', id: number, description?: string | undefined, molecularProfileAliases: Array, isComplex: boolean, sources: Array<{ __typename: 'Source', id: number, sourceType: SourceSource, citation?: string | undefined, citationId: string }> }; +export type RevisableMolecularProfileFieldsFragment = { __typename: 'MolecularProfile', id: number, commonName?: string | undefined, description?: string | undefined, molecularProfileAliases: Array, isComplex: boolean, sources: Array<{ __typename: 'Source', id: number, sourceType: SourceSource, citation?: string | undefined, citationId: string }> }; export type SuggestMolecularProfileRevisionMutationVariables = Exact<{ input: SuggestMolecularProfileRevisionInput; @@ -6487,55 +6377,39 @@ export type SuggestMolecularProfileRevisionMutationVariables = Exact<{ export type SuggestMolecularProfileRevisionMutation = { __typename: 'Mutation', suggestMolecularProfileRevision?: { __typename: 'SuggestMolecularProfileRevisionPayload', clientMutationId?: string | undefined, molecularProfile: { __typename: 'MolecularProfile', id: number }, results: Array<{ __typename: 'RevisionResult', newlyCreated: boolean, id: number, fieldName: string }> } | undefined }; -export type SuggestSourceMutationVariables = Exact<{ +export type SubmitSourceMutationVariables = Exact<{ input: SuggestSourceInput; }>; -export type SuggestSourceMutation = { __typename: 'Mutation', suggestSource?: { __typename: 'SuggestSourcePayload', clientMutationId?: string | undefined, sourceSuggestion: { __typename: 'SourceSuggestion', id: number } } | undefined }; +export type SubmitSourceMutation = { __typename: 'Mutation', suggestSource?: { __typename: 'SuggestSourcePayload', clientMutationId?: string | undefined, sourceSuggestion: { __typename: 'SourceSuggestion', id: number } } | undefined }; -export type UpdateSourceSuggestionMutationVariables = Exact<{ - input: UpdateSourceSuggestionStatusInput; +export type VariantRevisableFieldsQueryVariables = Exact<{ + variantId: Scalars['Int']; }>; -export type UpdateSourceSuggestionMutation = { __typename: 'Mutation', updateSourceSuggestionStatus?: { __typename: 'UpdateSourceSuggestionStatusPayload', sourceSuggestion: { __typename: 'SourceSuggestion', id: number, status: SourceSuggestionStatus } } | undefined }; - -export type UpdateCoiMutationVariables = Exact<{ - input: UpdateCoiInput; -}>; +export type VariantRevisableFieldsQuery = { __typename: 'Query', variant?: { __typename: 'Variant', id: number, name: string, variantAliases: Array, alleleRegistryId?: string | undefined, clinvarIds: Array, ensemblVersion?: number | undefined, hgvsDescriptions: Array, referenceBuild?: ReferenceBuild | undefined, referenceBases?: string | undefined, variantBases?: string | undefined, gene: { __typename: 'Gene', id: number, name: string }, variantTypes: Array<{ __typename: 'VariantType', id: number, name: string, soid: string }>, primaryCoordinates?: { __typename: 'Coordinate', chromosome?: string | undefined, representativeTranscript?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined, secondaryCoordinates?: { __typename: 'Coordinate', chromosome?: string | undefined, representativeTranscript?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined } | undefined }; +export type RevisableVariantFieldsFragment = { __typename: 'Variant', id: number, name: string, variantAliases: Array, alleleRegistryId?: string | undefined, clinvarIds: Array, ensemblVersion?: number | undefined, hgvsDescriptions: Array, referenceBuild?: ReferenceBuild | undefined, referenceBases?: string | undefined, variantBases?: string | undefined, gene: { __typename: 'Gene', id: number, name: string }, variantTypes: Array<{ __typename: 'VariantType', id: number, name: string, soid: string }>, primaryCoordinates?: { __typename: 'Coordinate', chromosome?: string | undefined, representativeTranscript?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined, secondaryCoordinates?: { __typename: 'Coordinate', chromosome?: string | undefined, representativeTranscript?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined }; -export type UpdateCoiMutation = { __typename: 'Mutation', updateCoi?: { __typename: 'UpdateCoiPayload', coiStatement: { __typename: 'Coi', coiPresent: boolean, coiStatus: CoiStatus, createdAt?: any | undefined, id: number } } | undefined }; +export type CoordinateFieldsFragment = { __typename: 'Coordinate', chromosome?: string | undefined, representativeTranscript?: string | undefined, start?: number | undefined, stop?: number | undefined }; -export type UpdateUserProfileMutationVariables = Exact<{ - input: EditUserInput; +export type SuggestVariantRevisionMutationVariables = Exact<{ + input: SuggestVariantRevisionInput; }>; -export type UpdateUserProfileMutation = { __typename: 'Mutation', editUser?: { __typename: 'EditUserPayload', user: { __typename: 'User', id: number } } | undefined }; - -export type CountriesQueryVariables = Exact<{ [key: string]: never; }>; - - -export type CountriesQuery = { __typename: 'Query', countries: Array<{ __typename: 'Country', id: number, name: string }> }; +export type SuggestVariantRevisionMutation = { __typename: 'Mutation', suggestVariantRevision?: { __typename: 'SuggestVariantRevisionPayload', clientMutationId?: string | undefined, variant: { __typename: 'Variant', id: number }, results: Array<{ __typename: 'RevisionResult', id: number, fieldName: string, newlyCreated: boolean }> } | undefined }; -export type DeprecateVariantMutationVariables = Exact<{ - variantId: Scalars['Int']; - deprecationReason: DeprecationReason; - comment: Scalars['String']; - organizationId?: InputMaybe; +export type VariantGroupRevisableFieldsQueryVariables = Exact<{ + variantGroupId: Scalars['Int']; }>; -export type DeprecateVariantMutation = { __typename: 'Mutation', deprecateVariant?: { __typename: 'DeprecateVariantPayload', newlyDeprecatedMolecularProfiles?: Array<{ __typename: 'MolecularProfile', id: number }> | undefined, variant?: { __typename: 'Variant', id: number, name: string } | undefined } | undefined }; - -export type MolecularProfilesForVariantQueryVariables = Exact<{ - variantId: Scalars['Int']; -}>; - +export type VariantGroupRevisableFieldsQuery = { __typename: 'Query', variantGroup?: { __typename: 'VariantGroup', id: number, name: string, description: string, variants: { __typename: 'VariantConnection', totalCount: number, edges: Array<{ __typename: 'VariantEdge', cursor: string, node?: { __typename: 'Variant', id: number, name: string, link: string } | undefined }>, nodes: Array<{ __typename: 'Variant', id: number, name: string, link: string }> }, sources: Array<{ __typename: 'Source', id: number, name: string, link: string }> } | undefined }; -export type MolecularProfilesForVariantQuery = { __typename: 'Query', molecularProfiles: { __typename: 'MolecularProfileConnection', nodes: Array<{ __typename: 'MolecularProfile', id: number, name: string, link: string, evidenceCountsByStatus: { __typename: 'EvidenceItemsByStatus', submittedCount: number, acceptedCount: number } }> } }; +export type VariantGroupRevisableFieldsFragment = { __typename: 'VariantGroup', id: number, name: string, description: string, variants: { __typename: 'VariantConnection', totalCount: number, edges: Array<{ __typename: 'VariantEdge', cursor: string, node?: { __typename: 'Variant', id: number, name: string, link: string } | undefined }>, nodes: Array<{ __typename: 'Variant', id: number, name: string, link: string }> }, sources: Array<{ __typename: 'Source', id: number, name: string, link: string }> }; export type SuggestVariantGroupRevisionMutationVariables = Exact<{ input: SuggestVariantGroupRevisionInput; @@ -6560,161 +6434,75 @@ export type SubmitVariantGroupMutationVariables = Exact<{ export type SubmitVariantGroupMutation = { __typename: 'Mutation', submitVariantGroup?: { __typename: 'SubmitVariantGroupPayload', clientMutationId?: string | undefined, variantGroup: { __typename: 'VariantGroup', id: number } } | undefined }; -export type LinkableGeneQueryVariables = Exact<{ +export type EntityTagsTestQueryVariables = Exact<{ + molecularProfileId: Scalars['Int']; geneId: Scalars['Int']; + variantId: Scalars['Int']; + therapyId: Scalars['Int']; + diseaseId: Scalars['Int']; + eid: Scalars['Int']; }>; -export type LinkableGeneQuery = { __typename: 'Query', gene?: { __typename: 'Gene', id: number, name: string, link: string } | undefined }; +export type EntityTagsTestQuery = { __typename: 'Query', evidenceItem?: { __typename: 'EvidenceItem', id: number, name: string, link: string } | undefined, molecularProfile?: { __typename: 'MolecularProfile', id: number, name: string, link: string } | undefined, gene?: { __typename: 'Gene', id: number, name: string, link: string } | undefined, variant?: { __typename: 'Variant', id: number, name: string, link: string } | undefined, therapy?: { __typename: 'Therapy', id: number, name: string, link: string } | undefined, disease?: { __typename: 'Disease', id: number, name: string, link: string } | undefined }; -export type LinkableVariantQueryVariables = Exact<{ - variantId: Scalars['Int']; +export type AcmgCodeSelectTypeaheadQueryVariables = Exact<{ + code: Scalars['String']; }>; -export type LinkableVariantQuery = { __typename: 'Query', variant?: { __typename: 'Variant', id: number, name: string, link: string } | undefined }; +export type AcmgCodeSelectTypeaheadQuery = { __typename: 'Query', acmgCodesTypeahead: Array<{ __typename: 'AcmgCode', id: number, code: string, name: string, description: string, tooltip: string }> }; -export type LinkableTherapyQueryVariables = Exact<{ - therapyId: Scalars['Int']; +export type AcmgCodeSelectTagQueryVariables = Exact<{ + id: Scalars['Int']; }>; -export type LinkableTherapyQuery = { __typename: 'Query', therapy?: { __typename: 'Therapy', id: number, name: string, link: string } | undefined }; +export type AcmgCodeSelectTagQuery = { __typename: 'Query', acmgCode?: { __typename: 'AcmgCode', id: number, code: string, name: string, description: string, tooltip: string } | undefined }; -export type EvidenceItemRevisableFields2QueryVariables = Exact<{ - evidenceId: Scalars['Int']; -}>; +export type AcmgCodeSelectTypeaheadFieldsFragment = { __typename: 'AcmgCode', id: number, code: string, name: string, description: string, tooltip: string }; +export type ClingenCodeSelectTypeaheadQueryVariables = Exact<{ + code: Scalars['String']; +}>; -export type EvidenceItemRevisableFields2Query = { __typename: 'Query', evidenceItem?: { __typename: 'EvidenceItem', id: number, variantOrigin: VariantOrigin, description: string, significance: EvidenceSignificance, therapyInteractionType?: TherapyInteraction | undefined, evidenceDirection: EvidenceDirection, evidenceLevel: EvidenceLevel, evidenceType: EvidenceType, evidenceRating?: number | undefined, molecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string, molecularProfileAliases: Array }, disease?: { __typename: 'Disease', id: number, name: string, link: string, displayName: string, doid?: string | undefined, diseaseAliases: Array } | undefined, therapies: Array<{ __typename: 'Therapy', id: number, name: string, link: string, ncitId?: string | undefined, therapyAliases: Array }>, phenotypes: Array<{ __typename: 'Phenotype', id: number, name: string, link: string, hpoId: string }>, source: { __typename: 'Source', id: number, name: string, link: string, citation?: string | undefined, citationId: string, sourceType: SourceSource } } | undefined }; -export type RevisableEvidenceFields2Fragment = { __typename: 'EvidenceItem', id: number, variantOrigin: VariantOrigin, description: string, significance: EvidenceSignificance, therapyInteractionType?: TherapyInteraction | undefined, evidenceDirection: EvidenceDirection, evidenceLevel: EvidenceLevel, evidenceType: EvidenceType, evidenceRating?: number | undefined, molecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string, molecularProfileAliases: Array }, disease?: { __typename: 'Disease', id: number, name: string, link: string, displayName: string, doid?: string | undefined, diseaseAliases: Array } | undefined, therapies: Array<{ __typename: 'Therapy', id: number, name: string, link: string, ncitId?: string | undefined, therapyAliases: Array }>, phenotypes: Array<{ __typename: 'Phenotype', id: number, name: string, link: string, hpoId: string }>, source: { __typename: 'Source', id: number, name: string, link: string, citation?: string | undefined, citationId: string, sourceType: SourceSource } }; +export type ClingenCodeSelectTypeaheadQuery = { __typename: 'Query', clingenCodesTypeahead: Array<{ __typename: 'ClingenCode', id: number, code: string, name: string, description: string, tooltip: string, exclusive: boolean }> }; -export type SuggestEvidenceItemRevision2MutationVariables = Exact<{ - input: SuggestEvidenceItemRevisionInput; +export type ClingenCodeSelectTagQueryVariables = Exact<{ + id: Scalars['Int']; }>; -export type SuggestEvidenceItemRevision2Mutation = { __typename: 'Mutation', suggestEvidenceItemRevision?: { __typename: 'SuggestEvidenceItemRevisionPayload', clientMutationId?: string | undefined, evidenceItem: { __typename: 'EvidenceItem', id: number }, results: Array<{ __typename: 'RevisionResult', newlyCreated: boolean }> } | undefined }; +export type ClingenCodeSelectTagQuery = { __typename: 'Query', clingenCode?: { __typename: 'ClingenCode', id: number, code: string, name: string, description: string, tooltip: string, exclusive: boolean } | undefined }; -export type ExistingEvidenceCountQueryVariables = Exact<{ - molecularProfileId: Scalars['Int']; - sourceId: Scalars['Int']; +export type ClingenCodeSelectTypeaheadFieldsFragment = { __typename: 'ClingenCode', id: number, code: string, name: string, description: string, tooltip: string, exclusive: boolean }; + +export type QuickAddDiseaseMutationVariables = Exact<{ + name: Scalars['String']; + doid?: InputMaybe; }>; -export type ExistingEvidenceCountQuery = { __typename: 'Query', evidenceItems: { __typename: 'EvidenceItemConnection', totalCount: number } }; +export type QuickAddDiseaseMutation = { __typename: 'Mutation', addDisease?: { __typename: 'AddDiseasePayload', new: boolean, disease: { __typename: 'Disease', id: number, name: string, link: string, displayName: string, doid?: string | undefined, diseaseAliases: Array } } | undefined }; -export type SubmitSourceMutationVariables = Exact<{ - input: SuggestSourceInput; +export type QuickAddDiseaseFieldsFragment = { __typename: 'AddDiseasePayload', new: boolean, disease: { __typename: 'Disease', id: number, name: string, link: string, displayName: string, doid?: string | undefined, diseaseAliases: Array } }; + +export type DiseaseSelectTypeaheadQueryVariables = Exact<{ + name: Scalars['String']; }>; -export type SubmitSourceMutation = { __typename: 'Mutation', suggestSource?: { __typename: 'SuggestSourcePayload', clientMutationId?: string | undefined, sourceSuggestion: { __typename: 'SourceSuggestion', id: number } } | undefined }; +export type DiseaseSelectTypeaheadQuery = { __typename: 'Query', diseaseTypeahead: Array<{ __typename: 'Disease', id: number, name: string, link: string, displayName: string, doid?: string | undefined, diseaseAliases: Array }> }; -export type VariantRevisableFieldsQueryVariables = Exact<{ - variantId: Scalars['Int']; +export type DiseaseSelectTagQueryVariables = Exact<{ + id: Scalars['Int']; }>; -export type VariantRevisableFieldsQuery = { __typename: 'Query', variant?: { __typename: 'Variant', id: number, name: string, variantAliases: Array, alleleRegistryId?: string | undefined, clinvarIds: Array, ensemblVersion?: number | undefined, hgvsDescriptions: Array, referenceBuild?: ReferenceBuild | undefined, referenceBases?: string | undefined, variantBases?: string | undefined, gene: { __typename: 'Gene', id: number, name: string }, variantTypes: Array<{ __typename: 'VariantType', id: number, name: string, soid: string }>, primaryCoordinates?: { __typename: 'Coordinate', chromosome?: string | undefined, representativeTranscript?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined, secondaryCoordinates?: { __typename: 'Coordinate', chromosome?: string | undefined, representativeTranscript?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined } | undefined }; +export type DiseaseSelectTagQuery = { __typename: 'Query', disease?: { __typename: 'Disease', id: number, name: string, link: string, displayName: string, doid?: string | undefined, diseaseAliases: Array } | undefined }; -export type RevisableVariantFieldsFragment = { __typename: 'Variant', id: number, name: string, variantAliases: Array, alleleRegistryId?: string | undefined, clinvarIds: Array, ensemblVersion?: number | undefined, hgvsDescriptions: Array, referenceBuild?: ReferenceBuild | undefined, referenceBases?: string | undefined, variantBases?: string | undefined, gene: { __typename: 'Gene', id: number, name: string }, variantTypes: Array<{ __typename: 'VariantType', id: number, name: string, soid: string }>, primaryCoordinates?: { __typename: 'Coordinate', chromosome?: string | undefined, representativeTranscript?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined, secondaryCoordinates?: { __typename: 'Coordinate', chromosome?: string | undefined, representativeTranscript?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined }; - -export type CoordinateFieldsFragment = { __typename: 'Coordinate', chromosome?: string | undefined, representativeTranscript?: string | undefined, start?: number | undefined, stop?: number | undefined }; - -export type SuggestVariantRevisionMutationVariables = Exact<{ - input: SuggestVariantRevisionInput; -}>; - - -export type SuggestVariantRevisionMutation = { __typename: 'Mutation', suggestVariantRevision?: { __typename: 'SuggestVariantRevisionPayload', clientMutationId?: string | undefined, variant: { __typename: 'Variant', id: number }, results: Array<{ __typename: 'RevisionResult', id: number, fieldName: string, newlyCreated: boolean }> } | undefined }; - -export type VariantGroupRevisableFields2QueryVariables = Exact<{ - variantGroupId: Scalars['Int']; -}>; - - -export type VariantGroupRevisableFields2Query = { __typename: 'Query', variantGroup?: { __typename: 'VariantGroup', id: number, name: string, description: string, variants: { __typename: 'VariantConnection', totalCount: number, edges: Array<{ __typename: 'VariantEdge', cursor: string, node?: { __typename: 'Variant', id: number, name: string, link: string } | undefined }>, nodes: Array<{ __typename: 'Variant', id: number, name: string, link: string }> }, sources: Array<{ __typename: 'Source', id: number, name: string, link: string }> } | undefined }; - -export type VariantGroupRevisableFields2Fragment = { __typename: 'VariantGroup', id: number, name: string, description: string, variants: { __typename: 'VariantConnection', totalCount: number, edges: Array<{ __typename: 'VariantEdge', cursor: string, node?: { __typename: 'Variant', id: number, name: string, link: string } | undefined }>, nodes: Array<{ __typename: 'Variant', id: number, name: string, link: string }> }, sources: Array<{ __typename: 'Source', id: number, name: string, link: string }> }; - -export type SuggestVariantGroupRevision2MutationVariables = Exact<{ - input: SuggestVariantGroupRevisionInput; -}>; - - -export type SuggestVariantGroupRevision2Mutation = { __typename: 'Mutation', suggestVariantGroupRevision?: { __typename: 'SuggestVariantGroupRevisionPayload', clientMutationId?: string | undefined, variantGroup: { __typename: 'VariantGroup', id: number }, results: Array<{ __typename: 'RevisionResult', newlyCreated: boolean, id: number, fieldName: string }> } | undefined }; - -export type EntityTagsTestQueryVariables = Exact<{ - molecularProfileId: Scalars['Int']; - geneId: Scalars['Int']; - variantId: Scalars['Int']; - therapyId: Scalars['Int']; - diseaseId: Scalars['Int']; - eid: Scalars['Int']; -}>; - - -export type EntityTagsTestQuery = { __typename: 'Query', evidenceItem?: { __typename: 'EvidenceItem', id: number, name: string, link: string } | undefined, molecularProfile?: { __typename: 'MolecularProfile', id: number, name: string, link: string } | undefined, gene?: { __typename: 'Gene', id: number, name: string, link: string } | undefined, variant?: { __typename: 'Variant', id: number, name: string, link: string } | undefined, therapy?: { __typename: 'Therapy', id: number, name: string, link: string } | undefined, disease?: { __typename: 'Disease', id: number, name: string, link: string } | undefined }; - -export type AcmgCodeSelectTypeaheadQueryVariables = Exact<{ - code: Scalars['String']; -}>; - - -export type AcmgCodeSelectTypeaheadQuery = { __typename: 'Query', acmgCodesTypeahead: Array<{ __typename: 'AcmgCode', id: number, code: string, name: string, description: string, tooltip: string }> }; - -export type AcmgCodeSelectTagQueryVariables = Exact<{ - id: Scalars['Int']; -}>; - - -export type AcmgCodeSelectTagQuery = { __typename: 'Query', acmgCode?: { __typename: 'AcmgCode', id: number, code: string, name: string, description: string, tooltip: string } | undefined }; - -export type AcmgCodeSelectTypeaheadFieldsFragment = { __typename: 'AcmgCode', id: number, code: string, name: string, description: string, tooltip: string }; - -export type ClingenCodeSelectTypeaheadQueryVariables = Exact<{ - code: Scalars['String']; -}>; - - -export type ClingenCodeSelectTypeaheadQuery = { __typename: 'Query', clingenCodesTypeahead: Array<{ __typename: 'ClingenCode', id: number, code: string, name: string, description: string, tooltip: string, exclusive: boolean }> }; - -export type ClingenCodeSelectTagQueryVariables = Exact<{ - id: Scalars['Int']; -}>; - - -export type ClingenCodeSelectTagQuery = { __typename: 'Query', clingenCode?: { __typename: 'ClingenCode', id: number, code: string, name: string, description: string, tooltip: string, exclusive: boolean } | undefined }; - -export type ClingenCodeSelectTypeaheadFieldsFragment = { __typename: 'ClingenCode', id: number, code: string, name: string, description: string, tooltip: string, exclusive: boolean }; - -export type QuickAddDiseaseMutationVariables = Exact<{ - name: Scalars['String']; - doid?: InputMaybe; -}>; - - -export type QuickAddDiseaseMutation = { __typename: 'Mutation', addDisease?: { __typename: 'AddDiseasePayload', new: boolean, disease: { __typename: 'Disease', id: number, name: string, link: string, displayName: string, doid?: string | undefined, diseaseAliases: Array } } | undefined }; - -export type QuickAddDiseaseFieldsFragment = { __typename: 'AddDiseasePayload', new: boolean, disease: { __typename: 'Disease', id: number, name: string, link: string, displayName: string, doid?: string | undefined, diseaseAliases: Array } }; - -export type DiseaseSelectTypeaheadQueryVariables = Exact<{ - name: Scalars['String']; -}>; - - -export type DiseaseSelectTypeaheadQuery = { __typename: 'Query', diseaseTypeahead: Array<{ __typename: 'Disease', id: number, name: string, link: string, displayName: string, doid?: string | undefined, diseaseAliases: Array }> }; - -export type DiseaseSelectTagQueryVariables = Exact<{ - id: Scalars['Int']; -}>; - - -export type DiseaseSelectTagQuery = { __typename: 'Query', disease?: { __typename: 'Disease', id: number, name: string, link: string, displayName: string, doid?: string | undefined, diseaseAliases: Array } | undefined }; - -export type DiseaseSelectTypeaheadFieldsFragment = { __typename: 'Disease', id: number, name: string, link: string, displayName: string, doid?: string | undefined, diseaseAliases: Array }; +export type DiseaseSelectTypeaheadFieldsFragment = { __typename: 'Disease', id: number, name: string, link: string, displayName: string, doid?: string | undefined, diseaseAliases: Array }; export type EvidenceManagerQueryVariables = Exact<{ first?: InputMaybe; @@ -6945,7 +6733,7 @@ export type QuickAddVariantMutationVariables = Exact<{ }>; -export type QuickAddVariantMutation = { __typename: 'Mutation', addVariant?: { __typename: 'AddVariantPayload', clientMutationId?: string | undefined, new: boolean, variant: { __typename: 'Variant', id: number, name: string, singleVariantMolecularProfileId: number, singleVariantMolecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string } } } | undefined }; +export type QuickAddVariantMutation = { __typename: 'Mutation', addVariant?: { __typename: 'AddVariantPayload', clientMutationId?: string | undefined, new: boolean, variant: { __typename: 'Variant', id: number, name: string, link: string, variantAliases: Array, singleVariantMolecularProfileId: number, singleVariantMolecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string, molecularProfileAliases: Array } } } | undefined }; export type QuickAddVariantFieldsFragment = { __typename: 'AddVariantPayload', clientMutationId?: string | undefined, new: boolean, variant: { __typename: 'Variant', id: number, name: string, link: string, variantAliases: Array, singleVariantMolecularProfileId: number, singleVariantMolecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string, molecularProfileAliases: Array } } }; @@ -7082,9 +6870,9 @@ export type MolecularProfileSummaryQueryVariables = Exact<{ }>; -export type MolecularProfileSummaryQuery = { __typename: 'Query', molecularProfile?: { __typename: 'MolecularProfile', id: number, name: string, description?: string | undefined, molecularProfileAliases: Array, molecularProfileScore: number, sources: Array<{ __typename: 'Source', id: number, citation?: string | undefined, link: string, sourceType: SourceSource }>, variants: Array<{ __typename: 'Variant', id: number, name: string, link: string, variantAliases: Array, clinvarIds: Array, alleleRegistryId?: string | undefined, openCravatUrl?: string | undefined, referenceBuild?: ReferenceBuild | undefined, ensemblVersion?: number | undefined, referenceBases?: string | undefined, variantBases?: string | undefined, hgvsDescriptions: Array, gene: { __typename: 'Gene', id: number, name: string, link: string }, molecularProfiles: { __typename: 'MolecularProfileConnection', totalCount: number, nodes: Array<{ __typename: 'MolecularProfile', id: number, link: string, name: string, deprecated: boolean }> }, variantTypes: Array<{ __typename: 'VariantType', id: number, link: string, soid: string, name: string }>, primaryCoordinates?: { __typename: 'Coordinate', representativeTranscript?: string | undefined, chromosome?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined, secondaryCoordinates?: { __typename: 'Coordinate', representativeTranscript?: string | undefined, chromosome?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined }>, parsedName: Array<{ __typename: 'Gene', id: number, name: string, link: string } | { __typename: 'MolecularProfileTextSegment', text: string } | { __typename: 'Variant', id: number, name: string, link: string, deprecated: boolean }> } | undefined }; +export type MolecularProfileSummaryQuery = { __typename: 'Query', molecularProfile?: { __typename: 'MolecularProfile', id: number, commonName?: string | undefined, name: string, description?: string | undefined, molecularProfileAliases: Array, molecularProfileScore: number, sources: Array<{ __typename: 'Source', id: number, citation?: string | undefined, sourceType: SourceSource, link: string }>, variants: Array<{ __typename: 'Variant', id: number, name: string, link: string, variantAliases: Array, clinvarIds: Array, alleleRegistryId?: string | undefined, openCravatUrl?: string | undefined, referenceBuild?: ReferenceBuild | undefined, ensemblVersion?: number | undefined, referenceBases?: string | undefined, variantBases?: string | undefined, hgvsDescriptions: Array, gene: { __typename: 'Gene', id: number, name: string, link: string }, molecularProfiles: { __typename: 'MolecularProfileConnection', totalCount: number, nodes: Array<{ __typename: 'MolecularProfile', id: number, link: string, name: string, deprecated: boolean }> }, variantTypes: Array<{ __typename: 'VariantType', id: number, link: string, soid: string, name: string }>, primaryCoordinates?: { __typename: 'Coordinate', representativeTranscript?: string | undefined, chromosome?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined, secondaryCoordinates?: { __typename: 'Coordinate', representativeTranscript?: string | undefined, chromosome?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined }>, parsedName: Array<{ __typename: 'Gene', id: number, name: string, link: string } | { __typename: 'MolecularProfileTextSegment', text: string } | { __typename: 'Variant', id: number, name: string, link: string, deprecated: boolean }> } | undefined }; -export type MolecularProfileSummaryFieldsFragment = { __typename: 'MolecularProfile', id: number, name: string, description?: string | undefined, molecularProfileAliases: Array, molecularProfileScore: number, sources: Array<{ __typename: 'Source', id: number, citation?: string | undefined, link: string, sourceType: SourceSource }>, variants: Array<{ __typename: 'Variant', id: number, name: string, link: string, variantAliases: Array, clinvarIds: Array, alleleRegistryId?: string | undefined, openCravatUrl?: string | undefined, referenceBuild?: ReferenceBuild | undefined, ensemblVersion?: number | undefined, referenceBases?: string | undefined, variantBases?: string | undefined, hgvsDescriptions: Array, gene: { __typename: 'Gene', id: number, name: string, link: string }, molecularProfiles: { __typename: 'MolecularProfileConnection', totalCount: number, nodes: Array<{ __typename: 'MolecularProfile', id: number, link: string, name: string, deprecated: boolean }> }, variantTypes: Array<{ __typename: 'VariantType', id: number, link: string, soid: string, name: string }>, primaryCoordinates?: { __typename: 'Coordinate', representativeTranscript?: string | undefined, chromosome?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined, secondaryCoordinates?: { __typename: 'Coordinate', representativeTranscript?: string | undefined, chromosome?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined }>, parsedName: Array<{ __typename: 'Gene', id: number, name: string, link: string } | { __typename: 'MolecularProfileTextSegment', text: string } | { __typename: 'Variant', id: number, name: string, link: string, deprecated: boolean }> }; +export type MolecularProfileSummaryFieldsFragment = { __typename: 'MolecularProfile', id: number, commonName?: string | undefined, name: string, description?: string | undefined, molecularProfileAliases: Array, molecularProfileScore: number, sources: Array<{ __typename: 'Source', id: number, citation?: string | undefined, sourceType: SourceSource, link: string }>, variants: Array<{ __typename: 'Variant', id: number, name: string, link: string, variantAliases: Array, clinvarIds: Array, alleleRegistryId?: string | undefined, openCravatUrl?: string | undefined, referenceBuild?: ReferenceBuild | undefined, ensemblVersion?: number | undefined, referenceBases?: string | undefined, variantBases?: string | undefined, hgvsDescriptions: Array, gene: { __typename: 'Gene', id: number, name: string, link: string }, molecularProfiles: { __typename: 'MolecularProfileConnection', totalCount: number, nodes: Array<{ __typename: 'MolecularProfile', id: number, link: string, name: string, deprecated: boolean }> }, variantTypes: Array<{ __typename: 'VariantType', id: number, link: string, soid: string, name: string }>, primaryCoordinates?: { __typename: 'Coordinate', representativeTranscript?: string | undefined, chromosome?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined, secondaryCoordinates?: { __typename: 'Coordinate', representativeTranscript?: string | undefined, chromosome?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined }>, parsedName: Array<{ __typename: 'Gene', id: number, name: string, link: string } | { __typename: 'MolecularProfileTextSegment', text: string } | { __typename: 'Variant', id: number, name: string, link: string, deprecated: boolean }> }; type MolecularProfileParsedName_Gene_Fragment = { __typename: 'Gene', id: number, name: string, link: string }; @@ -8369,6 +8157,30 @@ export const BrowseVariantsFieldsFragmentDoc = gql` } } `; +export const PreviewCommentFragmentDoc = gql` + fragment previewComment on CommentBodySegment { + __typename + ... on CommentTagSegment { + entityId + displayName + tagType + link + status + deprecated + __typename + } + ... on CommentTextSegment { + text + __typename + } + ... on User { + id + displayName + role + __typename + } +} + `; export const RevisableAssertionFieldsFragmentDoc = gql` fragment RevisableAssertionFields on Assertion { id @@ -8433,143 +8245,6 @@ export const RevisableAssertionFieldsFragmentDoc = gql` } } `; -export const PreviewCommentFragmentDoc = gql` - fragment previewComment on CommentBodySegment { - __typename - ... on CommentTagSegment { - entityId - displayName - tagType - link - status - deprecated - __typename - } - ... on CommentTextSegment { - text - __typename - } - ... on User { - id - displayName - role - __typename - } -} - `; -export const PreviewMpNameFragmentDoc = gql` - fragment previewMpName on MolecularProfileSegment { - __typename - ... on MolecularProfileTextSegment { - text - } - ... on Gene { - id - name - link - } - ... on Variant { - id - name - link - } -} - `; -export const AddDiseaseFieldsFragmentDoc = gql` - fragment AddDiseaseFields on AddDiseasePayload { - new - disease { - id - name - displayName - } -} - `; -export const GeneTypeaheadFieldsFragmentDoc = gql` - fragment GeneTypeaheadFields on Gene { - id - name - geneAliases - entrezId -} - `; -export const SourceTypeaheadResultFragmentDoc = gql` - fragment SourceTypeaheadResult on Source { - id - name - citation - citationId - sourceType -} - `; -export const SourceStubFieldsFragmentDoc = gql` - fragment SourceStubFields on SourceStub { - id - citationId - sourceType -} - `; -export const SourceTypeaheadFieldsFragmentDoc = gql` - fragment SourceTypeaheadFields on Source { - id - name - citation - citationId - sourceType -} - `; -export const AddTherapyFieldsFragmentDoc = gql` - fragment AddTherapyFields on AddTherapyPayload { - new - therapy { - id - ncitId - name - } -} - `; -export const VariantTypeaheadFieldsFragmentDoc = gql` - fragment VariantTypeaheadFields on Variant { - id - name - variantAliases - singleVariantMolecularProfileId - singleVariantMolecularProfile { - id - name - link - } -} - `; -export const AddVariantFieldsFragmentDoc = gql` - fragment AddVariantFields on AddVariantPayload { - clientMutationId - new - variant { - id - name - singleVariantMolecularProfileId - singleVariantMolecularProfile { - id - name - link - } - } -} - `; -export const VariantSelectFieldsFragmentDoc = gql` - fragment VariantSelectFields on Variant { - id - name - variantAliases - singleVariantMolecularProfileId - singleVariantMolecularProfile { - id - name - link - } -} - `; export const MolecularProfileSelectTypeaheadFieldsFragmentDoc = gql` fragment MolecularProfileSelectTypeaheadFields on MolecularProfile { id @@ -8692,6 +8367,7 @@ export const RevisableGeneFieldsFragmentDoc = gql` export const RevisableMolecularProfileFieldsFragmentDoc = gql` fragment RevisableMolecularProfileFields on MolecularProfile { id + commonName description sources { id @@ -8703,76 +8379,19 @@ export const RevisableMolecularProfileFieldsFragmentDoc = gql` isComplex } `; -export const SubmittableVariantGroupFieldsFragmentDoc = gql` - fragment SubmittableVariantGroupFields on VariantGroup { +export const CoordinateFieldsFragmentDoc = gql` + fragment CoordinateFields on Coordinate { + chromosome + representativeTranscript + start + stop +} + `; +export const RevisableVariantFieldsFragmentDoc = gql` + fragment RevisableVariantFields on Variant { id name - description - variants(first: 50) { - nodes { - id - name - link - singleVariantMolecularProfile { - id - name - link - } - } - } - sources { - id - link - citation - sourceType - } -} - `; -export const RevisableEvidenceFields2FragmentDoc = gql` - fragment RevisableEvidenceFields2 on EvidenceItem { - id - molecularProfile { - ...MolecularProfileSelectTypeaheadFields - } - variantOrigin - description - significance - disease { - ...DiseaseSelectTypeaheadFields - } - therapies { - ...TherapySelectTypeaheadFields - } - therapyInteractionType - evidenceDirection - evidenceLevel - evidenceType - phenotypes { - ...PhenotypeSelectTypeaheadFields - } - evidenceRating - source { - ...SourceSelectTypeaheadFields - } -} - ${MolecularProfileSelectTypeaheadFieldsFragmentDoc} -${DiseaseSelectTypeaheadFieldsFragmentDoc} -${TherapySelectTypeaheadFieldsFragmentDoc} -${PhenotypeSelectTypeaheadFieldsFragmentDoc} -${SourceSelectTypeaheadFieldsFragmentDoc}`; -export const CoordinateFieldsFragmentDoc = gql` - fragment CoordinateFields on Coordinate { - chromosome - representativeTranscript - start - stop -} - `; -export const RevisableVariantFieldsFragmentDoc = gql` - fragment RevisableVariantFields on Variant { - id - name - gene { + gene { id name } @@ -8797,8 +8416,8 @@ export const RevisableVariantFieldsFragmentDoc = gql` variantBases } ${CoordinateFieldsFragmentDoc}`; -export const VariantGroupRevisableFields2FragmentDoc = gql` - fragment VariantGroupRevisableFields2 on VariantGroup { +export const VariantGroupRevisableFieldsFragmentDoc = gql` + fragment VariantGroupRevisableFields on VariantGroup { id name description @@ -8825,6 +8444,31 @@ export const VariantGroupRevisableFields2FragmentDoc = gql` } } `; +export const SubmittableVariantGroupFieldsFragmentDoc = gql` + fragment SubmittableVariantGroupFields on VariantGroup { + id + name + description + variants(first: 50) { + nodes { + id + name + link + singleVariantMolecularProfile { + id + name + link + } + } + } + sources { + id + link + citation + sourceType + } +} + `; export const AcmgCodeSelectTypeaheadFieldsFragmentDoc = gql` fragment AcmgCodeSelectTypeaheadFields on AcmgCode { id @@ -9444,6 +9088,7 @@ export const VariantMolecularProfileCardFieldsFragmentDoc = gql` export const MolecularProfileSummaryFieldsFragmentDoc = gql` fragment MolecularProfileSummaryFields on MolecularProfile { id + commonName name description molecularProfileAliases @@ -9451,6 +9096,7 @@ export const MolecularProfileSummaryFieldsFragmentDoc = gql` sources { id citation + sourceType link sourceType } @@ -11887,69 +11533,6 @@ export const ViewerNotificationCountDocument = gql` export class ViewerNotificationCountGQL extends Apollo.Query { document = ViewerNotificationCountDocument; - constructor(apollo: Apollo.Apollo) { - super(apollo); - } - } -export const AssertionRevisableFieldsDocument = gql` - query AssertionRevisableFields($assertionId: Int!) { - assertion(id: $assertionId) { - ...RevisableAssertionFields - } -} - ${RevisableAssertionFieldsFragmentDoc}`; - - @Injectable({ - providedIn: 'root' - }) - export class AssertionRevisableFieldsGQL extends Apollo.Query { - document = AssertionRevisableFieldsDocument; - - constructor(apollo: Apollo.Apollo) { - super(apollo); - } - } -export const SuggestAssertionRevisionDocument = gql` - mutation SuggestAssertionRevision($input: SuggestAssertionRevisionInput!) { - suggestAssertionRevision(input: $input) { - clientMutationId - assertion { - id - } - results { - newlyCreated - } - } -} - `; - - @Injectable({ - providedIn: 'root' - }) - export class SuggestAssertionRevisionGQL extends Apollo.Mutation { - document = SuggestAssertionRevisionDocument; - - constructor(apollo: Apollo.Apollo) { - super(apollo); - } - } -export const SubmitAssertionDocument = gql` - mutation SubmitAssertion($input: SubmitAssertionInput!) { - submitAssertion(input: $input) { - clientMutationId - assertion { - id - } - } -} - `; - - @Injectable({ - providedIn: 'root' - }) - export class SubmitAssertionGQL extends Apollo.Mutation { - document = SubmitAssertionDocument; - constructor(apollo: Apollo.Apollo) { super(apollo); } @@ -12031,44 +11614,32 @@ export const EntityTypeaheadDocument = gql` super(apollo); } } -export const PreviewMolecularProfileNameDocument = gql` - query previewMolecularProfileName($mpStructure: MolecularProfileComponentInput) { - previewMolecularProfileName(structure: $mpStructure) { - existingMolecularProfile { - id - name - link - } - segments { - ...previewMpName - } - deprecatedVariants { - id - name - link - } +export const LinkableGeneDocument = gql` + query LinkableGene($geneId: Int!) { + gene(id: $geneId) { + id + name + link } } - ${PreviewMpNameFragmentDoc}`; + `; @Injectable({ providedIn: 'root' }) - export class PreviewMolecularProfileNameGQL extends Apollo.Query { - document = PreviewMolecularProfileNameDocument; + export class LinkableGeneGQL extends Apollo.Query { + document = LinkableGeneDocument; constructor(apollo: Apollo.Apollo) { super(apollo); } } -export const CreateMolecularProfileDocument = gql` - mutation createMolecularProfile($mpStructure: MolecularProfileComponentInput!) { - createMolecularProfile(input: {structure: $mpStructure}) { - molecularProfile { - id - name - link - } +export const LinkableVariantDocument = gql` + query LinkableVariant($variantId: Int!) { + variant(id: $variantId) { + id + name + link } } `; @@ -12076,21 +11647,19 @@ export const CreateMolecularProfileDocument = gql` @Injectable({ providedIn: 'root' }) - export class CreateMolecularProfileGQL extends Apollo.Mutation { - document = CreateMolecularProfileDocument; + export class LinkableVariantGQL extends Apollo.Query { + document = LinkableVariantDocument; constructor(apollo: Apollo.Apollo) { super(apollo); } } -export const AcmgCodeTypeaheadDocument = gql` - query AcmgCodeTypeahead($code: String!) { - acmgCodesTypeahead(queryTerm: $code) { +export const LinkableTherapyDocument = gql` + query LinkableTherapy($therapyId: Int!) { + therapy(id: $therapyId) { id - code - description name - tooltip + link } } `; @@ -12098,22 +11667,19 @@ export const AcmgCodeTypeaheadDocument = gql` @Injectable({ providedIn: 'root' }) - export class AcmgCodeTypeaheadGQL extends Apollo.Query { - document = AcmgCodeTypeaheadDocument; + export class LinkableTherapyGQL extends Apollo.Query { + document = LinkableTherapyDocument; constructor(apollo: Apollo.Apollo) { super(apollo); } } -export const ClingenCodeTypeaheadDocument = gql` - query ClingenCodeTypeahead($code: String!) { - clingenCodesTypeahead(queryTerm: $code) { - id - code - description - name - tooltip - exclusive +export const FlagEntityDocument = gql` + mutation FlagEntity($input: FlagEntityInput!) { + flagEntity(input: $input) { + flag { + id + } } } `; @@ -12121,21 +11687,19 @@ export const ClingenCodeTypeaheadDocument = gql` @Injectable({ providedIn: 'root' }) - export class ClingenCodeTypeaheadGQL extends Apollo.Query { - document = ClingenCodeTypeaheadDocument; + export class FlagEntityGQL extends Apollo.Mutation { + document = FlagEntityDocument; constructor(apollo: Apollo.Apollo) { super(apollo); } } -export const DiseaseTypeaheadDocument = gql` - query DiseaseTypeahead($name: String!) { - diseaseTypeahead(queryTerm: $name) { - id - name - displayName - doid - diseaseAliases +export const ResolveFlagDocument = gql` + mutation ResolveFlag($input: ResolveFlagInput!) { + resolveFlag(input: $input) { + flag { + id + } } } `; @@ -12143,37 +11707,43 @@ export const DiseaseTypeaheadDocument = gql` @Injectable({ providedIn: 'root' }) - export class DiseaseTypeaheadGQL extends Apollo.Query { - document = DiseaseTypeaheadDocument; + export class ResolveFlagGQL extends Apollo.Mutation { + document = ResolveFlagDocument; constructor(apollo: Apollo.Apollo) { super(apollo); } } -export const AddDiseaseDocument = gql` - mutation AddDisease($name: String!, $doid: String) { - addDisease(input: {name: $name, doid: $doid}) { - ...AddDiseaseFields +export const UpdateSourceSuggestionDocument = gql` + mutation UpdateSourceSuggestion($input: UpdateSourceSuggestionStatusInput!) { + updateSourceSuggestionStatus(input: $input) { + sourceSuggestion { + id + status + } } } - ${AddDiseaseFieldsFragmentDoc}`; + `; @Injectable({ providedIn: 'root' }) - export class AddDiseaseGQL extends Apollo.Mutation { - document = AddDiseaseDocument; + export class UpdateSourceSuggestionGQL extends Apollo.Mutation { + document = UpdateSourceSuggestionDocument; constructor(apollo: Apollo.Apollo) { super(apollo); } } -export const EvidenceTypeaheadDocument = gql` - query EvidenceTypeahead($id: Int!) { - evidenceItem(id: $id) { - id - status - name +export const UpdateCoiDocument = gql` + mutation UpdateCoi($input: UpdateCoiInput!) { + updateCoi(input: $input) { + coiStatement { + coiPresent + coiStatus + createdAt + id + } } } `; @@ -12181,34 +11751,36 @@ export const EvidenceTypeaheadDocument = gql` @Injectable({ providedIn: 'root' }) - export class EvidenceTypeaheadGQL extends Apollo.Query { - document = EvidenceTypeaheadDocument; + export class UpdateCoiGQL extends Apollo.Mutation { + document = UpdateCoiDocument; constructor(apollo: Apollo.Apollo) { super(apollo); } } -export const GeneTypeaheadDocument = gql` - query GeneTypeahead($entrezSymbol: String!) { - geneTypeahead(queryTerm: $entrezSymbol) { - ...GeneTypeaheadFields +export const UpdateUserProfileDocument = gql` + mutation UpdateUserProfile($input: EditUserInput!) { + editUser(input: $input) { + user { + id + } } } - ${GeneTypeaheadFieldsFragmentDoc}`; + `; @Injectable({ providedIn: 'root' }) - export class GeneTypeaheadGQL extends Apollo.Query { - document = GeneTypeaheadDocument; + export class UpdateUserProfileGQL extends Apollo.Mutation { + document = UpdateUserProfileDocument; constructor(apollo: Apollo.Apollo) { super(apollo); } } -export const NccnGuidelineTypeaheadDocument = gql` - query NccnGuidelineTypeahead($name: String!) { - nccnGuidelinesTypeahead(queryTerm: $name) { +export const CountriesDocument = gql` + query Countries { + countries { id name } @@ -12218,255 +11790,123 @@ export const NccnGuidelineTypeaheadDocument = gql` @Injectable({ providedIn: 'root' }) - export class NccnGuidelineTypeaheadGQL extends Apollo.Query { - document = NccnGuidelineTypeaheadDocument; + export class CountriesGQL extends Apollo.Query { + document = CountriesDocument; constructor(apollo: Apollo.Apollo) { super(apollo); } } -export const PhenotypeTypeaheadDocument = gql` - query PhenotypeTypeahead($name: String!) { - phenotypeTypeahead(queryTerm: $name) { - hpoId - id - name - } -} - `; - - @Injectable({ - providedIn: 'root' - }) - export class PhenotypeTypeaheadGQL extends Apollo.Query { - document = PhenotypeTypeaheadDocument; - - constructor(apollo: Apollo.Apollo) { - super(apollo); - } - } -export const CitationExistenceCheckDocument = gql` - query CitationExistenceCheck($sourceType: SourceSource!, $citationId: String!) { - remoteCitation(sourceType: $sourceType, citationId: $citationId) -} - `; - - @Injectable({ - providedIn: 'root' - }) - export class CitationExistenceCheckGQL extends Apollo.Query { - document = CitationExistenceCheckDocument; - - constructor(apollo: Apollo.Apollo) { - super(apollo); - } - } -export const CreateSourceStubDocument = gql` - mutation CreateSourceStub($input: AddRemoteCitationInput!) { - addRemoteCitation(input: $input) { - newSource { +export const DeprecateVariantDocument = gql` + mutation DeprecateVariant($variantId: Int!, $deprecationReason: DeprecationReason!, $comment: String!, $organizationId: Int) { + deprecateVariant( + input: {variantId: $variantId, deprecationReason: $deprecationReason, comment: $comment, organizationId: $organizationId} + ) { + newlyDeprecatedMolecularProfiles { id - citationId - sourceType - } - } -} - `; - - @Injectable({ - providedIn: 'root' - }) - export class CreateSourceStubGQL extends Apollo.Mutation { - document = CreateSourceStubDocument; - - constructor(apollo: Apollo.Apollo) { - super(apollo); } - } -export const CitationTypeaheadDocument = gql` - query CitationTypeahead($partialCitationId: String!, $sourceType: SourceSource!) { - sourceTypeahead(citationId: $partialCitationId, sourceType: $sourceType) { - ...SourceTypeaheadResult - } -} - ${SourceTypeaheadResultFragmentDoc}`; - - @Injectable({ - providedIn: 'root' - }) - export class CitationTypeaheadGQL extends Apollo.Query { - document = CitationTypeaheadDocument; - - constructor(apollo: Apollo.Apollo) { - super(apollo); + variant { + id + name } } -export const CheckRemoteCitationDocument = gql` - query CheckRemoteCitation($sourceType: SourceSource!, $citationId: String!) { - remoteCitation(sourceType: $sourceType, citationId: $citationId) } `; @Injectable({ providedIn: 'root' }) - export class CheckRemoteCitationGQL extends Apollo.Query { - document = CheckRemoteCitationDocument; - - constructor(apollo: Apollo.Apollo) { - super(apollo); - } - } -export const AddRemoteCitationDocument = gql` - mutation AddRemoteCitation($input: AddRemoteCitationInput!) { - addRemoteCitation(input: $input) { - newSource { - ...SourceStubFields - } - } -} - ${SourceStubFieldsFragmentDoc}`; - - @Injectable({ - providedIn: 'root' - }) - export class AddRemoteCitationGQL extends Apollo.Mutation { - document = AddRemoteCitationDocument; + export class DeprecateVariantGQL extends Apollo.Mutation { + document = DeprecateVariantDocument; constructor(apollo: Apollo.Apollo) { super(apollo); } } -export const SourceTypeaheadDocument = gql` - query SourceTypeahead($partialCitationId: String!, $sourceType: SourceSource!) { - sourceTypeahead(citationId: $partialCitationId, sourceType: $sourceType) { - ...SourceTypeaheadResult - } -} - ${SourceTypeaheadResultFragmentDoc}`; - - @Injectable({ - providedIn: 'root' - }) - export class SourceTypeaheadGQL extends Apollo.Query { - document = SourceTypeaheadDocument; - - constructor(apollo: Apollo.Apollo) { - super(apollo); +export const MolecularProfilesForVariantDocument = gql` + query MolecularProfilesForVariant($variantId: Int!) { + molecularProfiles(variantId: $variantId, first: 50) { + nodes { + id + name + link + evidenceCountsByStatus { + submittedCount + acceptedCount + } } } -export const TherapyTypeaheadDocument = gql` - query TherapyTypeahead($name: String!) { - therapyTypeahead(queryTerm: $name) { - id - name - ncitId - therapyAliases - } } `; @Injectable({ providedIn: 'root' }) - export class TherapyTypeaheadGQL extends Apollo.Query { - document = TherapyTypeaheadDocument; + export class MolecularProfilesForVariantGQL extends Apollo.Query { + document = MolecularProfilesForVariantDocument; constructor(apollo: Apollo.Apollo) { super(apollo); } } -export const AddTherapyDocument = gql` - mutation AddTherapy($name: String!, $ncitId: String) { - addTherapy(input: {name: $name, ncitId: $ncitId}) { - ...AddTherapyFields +export const AssertionRevisableFieldsDocument = gql` + query AssertionRevisableFields($assertionId: Int!) { + assertion(id: $assertionId) { + ...RevisableAssertionFields } } - ${AddTherapyFieldsFragmentDoc}`; + ${RevisableAssertionFieldsFragmentDoc}`; @Injectable({ providedIn: 'root' }) - export class AddTherapyGQL extends Apollo.Mutation { - document = AddTherapyDocument; + export class AssertionRevisableFieldsGQL extends Apollo.Query { + document = AssertionRevisableFieldsDocument; constructor(apollo: Apollo.Apollo) { super(apollo); } } -export const VariantTypeaheadDocument = gql` - query VariantTypeahead($name: String!, $geneId: Int) { - variants(name: $name, geneId: $geneId, first: 20) { - nodes { - ...VariantTypeaheadFields +export const SuggestAssertionRevisionDocument = gql` + mutation SuggestAssertionRevision($input: SuggestAssertionRevisionInput!) { + suggestAssertionRevision(input: $input) { + clientMutationId + assertion { + id } - } -} - ${VariantTypeaheadFieldsFragmentDoc}`; - - @Injectable({ - providedIn: 'root' - }) - export class VariantTypeaheadGQL extends Apollo.Query { - document = VariantTypeaheadDocument; - - constructor(apollo: Apollo.Apollo) { - super(apollo); + results { + newlyCreated } } -export const AddVariantDocument = gql` - mutation AddVariant($name: String!, $geneId: Int!) { - addVariant(input: {name: $name, geneId: $geneId}) { - ...AddVariantFields - } } - ${AddVariantFieldsFragmentDoc}`; + `; @Injectable({ providedIn: 'root' }) - export class AddVariantGQL extends Apollo.Mutation { - document = AddVariantDocument; + export class SuggestAssertionRevisionGQL extends Apollo.Mutation { + document = SuggestAssertionRevisionDocument; constructor(apollo: Apollo.Apollo) { super(apollo); } } -export const VariantSelectDocument = gql` - query VariantSelect($name: String!, $geneId: Int) { - variants(name: $name, first: 20, geneId: $geneId) { - nodes { - ...VariantTypeaheadFields - } - } -} - ${VariantTypeaheadFieldsFragmentDoc}`; - - @Injectable({ - providedIn: 'root' - }) - export class VariantSelectGQL extends Apollo.Query { - document = VariantSelectDocument; - - constructor(apollo: Apollo.Apollo) { - super(apollo); +export const SubmitAssertionDocument = gql` + mutation SubmitAssertion($input: SubmitAssertionInput!) { + submitAssertion(input: $input) { + clientMutationId + assertion { + id } } -export const VariantTypeTypeaheadDocument = gql` - query VariantTypeTypeahead($name: String!) { - variantTypeTypeahead(queryTerm: $name) { - name - soid - id - } } `; @Injectable({ providedIn: 'root' }) - export class VariantTypeTypeaheadGQL extends Apollo.Query { - document = VariantTypeTypeaheadDocument; + export class SubmitAssertionGQL extends Apollo.Mutation { + document = SubmitAssertionDocument; constructor(apollo: Apollo.Apollo) { super(apollo); @@ -12591,32 +12031,10 @@ export const SubmitEvidenceItemDocument = gql` super(apollo); } } -export const FlagEntityDocument = gql` - mutation FlagEntity($input: FlagEntityInput!) { - flagEntity(input: $input) { - flag { - id - } - } -} - `; - - @Injectable({ - providedIn: 'root' - }) - export class FlagEntityGQL extends Apollo.Mutation { - document = FlagEntityDocument; - - constructor(apollo: Apollo.Apollo) { - super(apollo); - } - } -export const ResolveFlagDocument = gql` - mutation ResolveFlag($input: ResolveFlagInput!) { - resolveFlag(input: $input) { - flag { - id - } +export const ExistingEvidenceCountDocument = gql` + query ExistingEvidenceCount($molecularProfileId: Int!, $sourceId: Int!) { + evidenceItems(molecularProfileId: $molecularProfileId, sourceId: $sourceId) { + totalCount } } `; @@ -12624,8 +12042,8 @@ export const ResolveFlagDocument = gql` @Injectable({ providedIn: 'root' }) - export class ResolveFlagGQL extends Apollo.Mutation { - document = ResolveFlagDocument; + export class ExistingEvidenceCountGQL extends Apollo.Query { + document = ExistingEvidenceCountDocument; constructor(apollo: Apollo.Apollo) { super(apollo); @@ -12716,8 +12134,8 @@ export const SuggestMolecularProfileRevisionDocument = gql` super(apollo); } } -export const SuggestSourceDocument = gql` - mutation SuggestSource($input: SuggestSourceInput!) { +export const SubmitSourceDocument = gql` + mutation SubmitSource($input: SuggestSourceInput!) { suggestSource(input: $input) { clientMutationId sourceSuggestion { @@ -12730,42 +12148,42 @@ export const SuggestSourceDocument = gql` @Injectable({ providedIn: 'root' }) - export class SuggestSourceGQL extends Apollo.Mutation { - document = SuggestSourceDocument; + export class SubmitSourceGQL extends Apollo.Mutation { + document = SubmitSourceDocument; constructor(apollo: Apollo.Apollo) { super(apollo); } } -export const UpdateSourceSuggestionDocument = gql` - mutation UpdateSourceSuggestion($input: UpdateSourceSuggestionStatusInput!) { - updateSourceSuggestionStatus(input: $input) { - sourceSuggestion { - id - status - } +export const VariantRevisableFieldsDocument = gql` + query VariantRevisableFields($variantId: Int!) { + variant(id: $variantId) { + ...RevisableVariantFields } } - `; + ${RevisableVariantFieldsFragmentDoc}`; @Injectable({ providedIn: 'root' }) - export class UpdateSourceSuggestionGQL extends Apollo.Mutation { - document = UpdateSourceSuggestionDocument; + export class VariantRevisableFieldsGQL extends Apollo.Query { + document = VariantRevisableFieldsDocument; constructor(apollo: Apollo.Apollo) { super(apollo); } } -export const UpdateCoiDocument = gql` - mutation UpdateCoi($input: UpdateCoiInput!) { - updateCoi(input: $input) { - coiStatement { - coiPresent - coiStatus - createdAt +export const SuggestVariantRevisionDocument = gql` + mutation SuggestVariantRevision($input: SuggestVariantRevisionInput!) { + suggestVariantRevision(input: $input) { + clientMutationId + variant { + id + } + results { id + fieldName + newlyCreated } } } @@ -12774,99 +12192,26 @@ export const UpdateCoiDocument = gql` @Injectable({ providedIn: 'root' }) - export class UpdateCoiGQL extends Apollo.Mutation { - document = UpdateCoiDocument; + export class SuggestVariantRevisionGQL extends Apollo.Mutation { + document = SuggestVariantRevisionDocument; constructor(apollo: Apollo.Apollo) { super(apollo); } } -export const UpdateUserProfileDocument = gql` - mutation UpdateUserProfile($input: EditUserInput!) { - editUser(input: $input) { - user { - id - } +export const VariantGroupRevisableFieldsDocument = gql` + query VariantGroupRevisableFields($variantGroupId: Int!) { + variantGroup(id: $variantGroupId) { + ...VariantGroupRevisableFields } } - `; + ${VariantGroupRevisableFieldsFragmentDoc}`; @Injectable({ providedIn: 'root' }) - export class UpdateUserProfileGQL extends Apollo.Mutation { - document = UpdateUserProfileDocument; - - constructor(apollo: Apollo.Apollo) { - super(apollo); - } - } -export const CountriesDocument = gql` - query Countries { - countries { - id - name - } -} - `; - - @Injectable({ - providedIn: 'root' - }) - export class CountriesGQL extends Apollo.Query { - document = CountriesDocument; - - constructor(apollo: Apollo.Apollo) { - super(apollo); - } - } -export const DeprecateVariantDocument = gql` - mutation DeprecateVariant($variantId: Int!, $deprecationReason: DeprecationReason!, $comment: String!, $organizationId: Int) { - deprecateVariant( - input: {variantId: $variantId, deprecationReason: $deprecationReason, comment: $comment, organizationId: $organizationId} - ) { - newlyDeprecatedMolecularProfiles { - id - } - variant { - id - name - } - } -} - `; - - @Injectable({ - providedIn: 'root' - }) - export class DeprecateVariantGQL extends Apollo.Mutation { - document = DeprecateVariantDocument; - - constructor(apollo: Apollo.Apollo) { - super(apollo); - } - } -export const MolecularProfilesForVariantDocument = gql` - query MolecularProfilesForVariant($variantId: Int!) { - molecularProfiles(variantId: $variantId, first: 50) { - nodes { - id - name - link - evidenceCountsByStatus { - submittedCount - acceptedCount - } - } - } -} - `; - - @Injectable({ - providedIn: 'root' - }) - export class MolecularProfilesForVariantGQL extends Apollo.Query { - document = MolecularProfilesForVariantDocument; + export class VariantGroupRevisableFieldsGQL extends Apollo.Query { + document = VariantGroupRevisableFieldsDocument; constructor(apollo: Apollo.Apollo) { super(apollo); @@ -12933,235 +12278,6 @@ export const SubmitVariantGroupDocument = gql` export class SubmitVariantGroupGQL extends Apollo.Mutation { document = SubmitVariantGroupDocument; - constructor(apollo: Apollo.Apollo) { - super(apollo); - } - } -export const LinkableGeneDocument = gql` - query LinkableGene($geneId: Int!) { - gene(id: $geneId) { - id - name - link - } -} - `; - - @Injectable({ - providedIn: 'root' - }) - export class LinkableGeneGQL extends Apollo.Query { - document = LinkableGeneDocument; - - constructor(apollo: Apollo.Apollo) { - super(apollo); - } - } -export const LinkableVariantDocument = gql` - query LinkableVariant($variantId: Int!) { - variant(id: $variantId) { - id - name - link - } -} - `; - - @Injectable({ - providedIn: 'root' - }) - export class LinkableVariantGQL extends Apollo.Query { - document = LinkableVariantDocument; - - constructor(apollo: Apollo.Apollo) { - super(apollo); - } - } -export const LinkableTherapyDocument = gql` - query LinkableTherapy($therapyId: Int!) { - therapy(id: $therapyId) { - id - name - link - } -} - `; - - @Injectable({ - providedIn: 'root' - }) - export class LinkableTherapyGQL extends Apollo.Query { - document = LinkableTherapyDocument; - - constructor(apollo: Apollo.Apollo) { - super(apollo); - } - } -export const EvidenceItemRevisableFields2Document = gql` - query EvidenceItemRevisableFields2($evidenceId: Int!) { - evidenceItem(id: $evidenceId) { - ...RevisableEvidenceFields2 - } -} - ${RevisableEvidenceFields2FragmentDoc}`; - - @Injectable({ - providedIn: 'root' - }) - export class EvidenceItemRevisableFields2GQL extends Apollo.Query { - document = EvidenceItemRevisableFields2Document; - - constructor(apollo: Apollo.Apollo) { - super(apollo); - } - } -export const SuggestEvidenceItemRevision2Document = gql` - mutation SuggestEvidenceItemRevision2($input: SuggestEvidenceItemRevisionInput!) { - suggestEvidenceItemRevision(input: $input) { - clientMutationId - evidenceItem { - id - } - results { - newlyCreated - } - } -} - `; - - @Injectable({ - providedIn: 'root' - }) - export class SuggestEvidenceItemRevision2GQL extends Apollo.Mutation { - document = SuggestEvidenceItemRevision2Document; - - constructor(apollo: Apollo.Apollo) { - super(apollo); - } - } -export const ExistingEvidenceCountDocument = gql` - query ExistingEvidenceCount($molecularProfileId: Int!, $sourceId: Int!) { - evidenceItems(molecularProfileId: $molecularProfileId, sourceId: $sourceId) { - totalCount - } -} - `; - - @Injectable({ - providedIn: 'root' - }) - export class ExistingEvidenceCountGQL extends Apollo.Query { - document = ExistingEvidenceCountDocument; - - constructor(apollo: Apollo.Apollo) { - super(apollo); - } - } -export const SubmitSourceDocument = gql` - mutation SubmitSource($input: SuggestSourceInput!) { - suggestSource(input: $input) { - clientMutationId - sourceSuggestion { - id - } - } -} - `; - - @Injectable({ - providedIn: 'root' - }) - export class SubmitSourceGQL extends Apollo.Mutation { - document = SubmitSourceDocument; - - constructor(apollo: Apollo.Apollo) { - super(apollo); - } - } -export const VariantRevisableFieldsDocument = gql` - query VariantRevisableFields($variantId: Int!) { - variant(id: $variantId) { - ...RevisableVariantFields - } -} - ${RevisableVariantFieldsFragmentDoc}`; - - @Injectable({ - providedIn: 'root' - }) - export class VariantRevisableFieldsGQL extends Apollo.Query { - document = VariantRevisableFieldsDocument; - - constructor(apollo: Apollo.Apollo) { - super(apollo); - } - } -export const SuggestVariantRevisionDocument = gql` - mutation SuggestVariantRevision($input: SuggestVariantRevisionInput!) { - suggestVariantRevision(input: $input) { - clientMutationId - variant { - id - } - results { - id - fieldName - newlyCreated - } - } -} - `; - - @Injectable({ - providedIn: 'root' - }) - export class SuggestVariantRevisionGQL extends Apollo.Mutation { - document = SuggestVariantRevisionDocument; - - constructor(apollo: Apollo.Apollo) { - super(apollo); - } - } -export const VariantGroupRevisableFields2Document = gql` - query VariantGroupRevisableFields2($variantGroupId: Int!) { - variantGroup(id: $variantGroupId) { - ...VariantGroupRevisableFields2 - } -} - ${VariantGroupRevisableFields2FragmentDoc}`; - - @Injectable({ - providedIn: 'root' - }) - export class VariantGroupRevisableFields2GQL extends Apollo.Query { - document = VariantGroupRevisableFields2Document; - - constructor(apollo: Apollo.Apollo) { - super(apollo); - } - } -export const SuggestVariantGroupRevision2Document = gql` - mutation SuggestVariantGroupRevision2($input: SuggestVariantGroupRevisionInput!) { - suggestVariantGroupRevision(input: $input) { - clientMutationId - variantGroup { - id - } - results { - newlyCreated - id - fieldName - } - } -} - `; - - @Injectable({ - providedIn: 'root' - }) - export class SuggestVariantGroupRevision2GQL extends Apollo.Mutation { - document = SuggestVariantGroupRevision2Document; - constructor(apollo: Apollo.Apollo) { super(apollo); } @@ -13833,10 +12949,10 @@ export const VariantManagerDocument = gql` export const QuickAddVariantDocument = gql` mutation QuickAddVariant($name: String!, $geneId: Int!) { addVariant(input: {name: $name, geneId: $geneId}) { - ...AddVariantFields + ...QuickAddVariantFields } } - ${AddVariantFieldsFragmentDoc}`; + ${QuickAddVariantFieldsFragmentDoc}`; @Injectable({ providedIn: 'root' diff --git a/client/src/app/generated/server.model.graphql b/client/src/app/generated/server.model.graphql index 1d8b04d4f..eadc182d9 100644 --- a/client/src/app/generated/server.model.graphql +++ b/client/src/app/generated/server.model.graphql @@ -3645,6 +3645,11 @@ type MolecularProfile implements Commentable & EventOriginObject & EventSubject """ sortBy: DateSort ): CommentConnection! + + """ + A human readable shorthand name that is commonly used for this profile. + """ + commonName: String deprecated: Boolean! deprecatedVariants: [Variant!]! deprecationEvent: Event @@ -3754,6 +3759,11 @@ type MolecularProfile implements Commentable & EventOriginObject & EventSubject """ state: FlagState ): FlagConnection! + + """ + The human readable full name of this profile, including gene, variant names, and boolean operators. + """ + fullName: String! id: Int! isComplex: Boolean! lastAcceptedRevisionEvent: Event @@ -3764,7 +3774,7 @@ type MolecularProfile implements Commentable & EventOriginObject & EventSubject molecularProfileScore: Float! """ - The human readable name of this profile, including gene and variant names. + Returns either the common name of this profile, if it is set, or the full_name otherwise. """ name: String! @@ -3941,6 +3951,11 @@ input MolecularProfileFields { """ aliases: [String!]! + """ + The MolecularProfile's common name. + """ + commonName: NullableStringInput! + """ The MolecularProfile's description/summary text. """ @@ -7683,6 +7698,7 @@ enum TaggableEntity { MOLECULAR_PROFILE REVISION ROLE + SOURCE VARIANT VARIANT_GROUP } diff --git a/client/src/app/generated/server.schema.json b/client/src/app/generated/server.schema.json index 905b19db8..94b96ab93 100644 --- a/client/src/app/generated/server.schema.json +++ b/client/src/app/generated/server.schema.json @@ -16762,6 +16762,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "commonName", + "description": "A human readable shorthand name that is commonly used for this profile.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "deprecated", "description": null, @@ -17149,6 +17161,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "fullName", + "description": "The human readable full name of this profile, including gene, variant names, and boolean operators.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "id", "description": null, @@ -17275,7 +17303,7 @@ }, { "name": "name", - "description": "The human readable name of this profile, including gene and variant names.", + "description": "Returns either the common name of this profile, if it is set, or the full_name otherwise.", "args": [], "type": { "kind": "NON_NULL", @@ -17881,6 +17909,22 @@ "description": "Fields on a MolecularProfile that curators may propose revisions to.", "fields": null, "inputFields": [ + { + "name": "commonName", + "description": "The MolecularProfile's common name.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NullableStringInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "description", "description": "The MolecularProfile's description/summary text.", @@ -33441,6 +33485,12 @@ "description": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "SOURCE", + "description": null, + "isDeprecated": false, + "deprecationReason": null } ], "possibleTypes": null diff --git a/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-summary/molecular-profiles-summary.page.html b/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-summary/molecular-profiles-summary.page.html index 9c7180c5e..583b9f7df 100644 --- a/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-summary/molecular-profiles-summary.page.html +++ b/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-summary/molecular-profiles-summary.page.html @@ -15,6 +15,17 @@ [nzSpan]="1"> + + + {{ mp.commonName }} + + + None provided + + diff --git a/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-summary/molecular-profiles-summary.query.gql b/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-summary/molecular-profiles-summary.query.gql index b196590b7..0fb06ad22 100644 --- a/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-summary/molecular-profiles-summary.query.gql +++ b/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-summary/molecular-profiles-summary.query.gql @@ -6,6 +6,7 @@ query MolecularProfileSummary($mpId: Int!) { fragment MolecularProfileSummaryFields on MolecularProfile { id + commonName name description molecularProfileAliases @@ -13,6 +14,7 @@ fragment MolecularProfileSummaryFields on MolecularProfile { sources { id citation + sourceType link sourceType } diff --git a/server/app/admin/assertions_admin.rb b/server/app/admin/assertions_admin.rb index ecb619639..f33a2f78b 100644 --- a/server/app/admin/assertions_admin.rb +++ b/server/app/admin/assertions_admin.rb @@ -24,7 +24,7 @@ table do column :id column :molecular_profile do |assertion| - assertion.molecular_profile.display_name + assertion.molecular_profile.name end column :summary column :assertion_type do |assertion| @@ -41,7 +41,7 @@ tab :assertion do row do col(sm: 1) { static_field :id } - col(sm: 1) { status_field assertion.molecular_profile.display_name } + col(sm: 1) { status_field assertion.molecular_profile.name } col(sm: 2) do variant_origins = Assertion.variant_origins.keys.map { |variant_origin| [variant_origin, variant_origin] } select :variant_origin, variant_origins diff --git a/server/app/admin/evidence_items_admin.rb b/server/app/admin/evidence_items_admin.rb index 3c456003b..42495dbfa 100644 --- a/server/app/admin/evidence_items_admin.rb +++ b/server/app/admin/evidence_items_admin.rb @@ -20,7 +20,7 @@ table do column :id column :molecular_profile do |evidence_item| - evidence_item.molecular_profile.display_name + evidence_item.molecular_profile.name end column :description column :evidence_type do |evidence_item| @@ -37,7 +37,7 @@ tab :evidence_item do row do col(sm: 1) { static_field :id } - col(sm: 1) { static_field evidence_item.molecular_profile.display_name } + col(sm: 1) { static_field evidence_item.molecular_profile.name } col(sm: 2) do variant_origins = EvidenceItem.variant_origins.keys.map { |variant_origin| [variant_origin, variant_origin] } select :variant_origin, variant_origins diff --git a/server/app/graphql/loaders/molecular_profile_segments_loader.rb b/server/app/graphql/loaders/molecular_profile_segments_loader.rb index 344bc3f30..9777c873f 100644 --- a/server/app/graphql/loaders/molecular_profile_segments_loader.rb +++ b/server/app/graphql/loaders/molecular_profile_segments_loader.rb @@ -13,7 +13,7 @@ def perform(ids) resolved_variants = {} MolecularProfile.where(id: ids).each do |mp| - mps[mp.id] = mp.name.split(' ').map do |segment| + mps[mp.id] = mp.raw_name.split(' ').map do |segment| if gene_match = segment.match(GENE_REGEX) gene_id = gene_match[:id].to_i resolved_genes[gene_id] = nil diff --git a/server/app/graphql/mutations/suggest_molecular_profile_revision.rb b/server/app/graphql/mutations/suggest_molecular_profile_revision.rb index 598d9992a..66f786471 100644 --- a/server/app/graphql/mutations/suggest_molecular_profile_revision.rb +++ b/server/app/graphql/mutations/suggest_molecular_profile_revision.rb @@ -53,7 +53,7 @@ def authorized?(organization_id: nil, **kwargs) end def resolve(fields:, id:, organization_id: nil, comment:) - updated_mp = InputAdaptors::MolecularProfileInputAdaptor.new(mp_input_object: fields, existing_name: mp.name).perform + updated_mp = InputAdaptors::MolecularProfileInputAdaptor.new(mp_input_object: fields, existing_name: mp.raw_name).perform cmd = Actions::SuggestMolecularProfileRevision.new( existing_obj: mp, updated_obj: updated_mp, diff --git a/server/app/graphql/resolvers/browse_molecular_profiles.rb b/server/app/graphql/resolvers/browse_molecular_profiles.rb index f15852368..76f90bb94 100644 --- a/server/app/graphql/resolvers/browse_molecular_profiles.rb +++ b/server/app/graphql/resolvers/browse_molecular_profiles.rb @@ -18,7 +18,7 @@ class Resolvers::BrowseMolecularProfiles < GraphQL::Schema::Resolver results = Searchkick.search( value, models: [MolecularProfile], - fields: ['name'], + fields: ['full_name', 'common_name'], match: :word_start, misspellings: {below: 1} ) diff --git a/server/app/graphql/resolvers/quicksearch.rb b/server/app/graphql/resolvers/quicksearch.rb index f8a0973e4..67aa3fabe 100644 --- a/server/app/graphql/resolvers/quicksearch.rb +++ b/server/app/graphql/resolvers/quicksearch.rb @@ -33,7 +33,7 @@ def resolve(query:, types: nil, highlight_matches: false) models: query_targets, highlight: tag, limit: 10, - fields: ['id^10', 'name', 'aliases', 'gene'] + fields: ['id^10', 'name', 'full_name', 'common_name', 'aliases', 'gene'] ).with_highlights(multiple: true) results.map do |res, highlights| diff --git a/server/app/graphql/resolvers/top_level_assertions.rb b/server/app/graphql/resolvers/top_level_assertions.rb index dd23ef7ac..aae8ad969 100644 --- a/server/app/graphql/resolvers/top_level_assertions.rb +++ b/server/app/graphql/resolvers/top_level_assertions.rb @@ -41,7 +41,7 @@ class Resolvers::TopLevelAssertions < GraphQL::Schema::Resolver results = Searchkick.search( value, models: [MolecularProfile], - fields: ['name'], + fields: ['full_name', 'common_name'], match: :word_start ) ids = results.hits.map { |x| x["_id"] } diff --git a/server/app/graphql/resolvers/top_level_evidence_items.rb b/server/app/graphql/resolvers/top_level_evidence_items.rb index 10d1e7d22..e0826cfaa 100644 --- a/server/app/graphql/resolvers/top_level_evidence_items.rb +++ b/server/app/graphql/resolvers/top_level_evidence_items.rb @@ -85,7 +85,7 @@ class Resolvers::TopLevelEvidenceItems < GraphQL::Schema::Resolver results = Searchkick.search( value, models: [MolecularProfile], - fields: ['name'], + fields: ['full_name', 'common_name'], match: :word_start, misspellings: {below: 1} ) diff --git a/server/app/graphql/types/browse_tables/browse_molecular_profile_type.rb b/server/app/graphql/types/browse_tables/browse_molecular_profile_type.rb index ddca8c7c7..479db985d 100644 --- a/server/app/graphql/types/browse_tables/browse_molecular_profile_type.rb +++ b/server/app/graphql/types/browse_tables/browse_molecular_profile_type.rb @@ -35,8 +35,12 @@ def molecular_profile_score end def name - Loaders::MolecularProfileSegmentsLoader.for(MolecularProfile).load(object.id).then do |segments| - segments.map { |s| s.respond_to?(:name) ? s.name : s }.join(' ') + if object.common_name + object.common_name + else + Loaders::MolecularProfileSegmentsLoader.for(MolecularProfile).load(object.id).then do |segments| + segments.map { |s| s.respond_to?(:name) ? s.name : s }.join(' ') + end end end diff --git a/server/app/graphql/types/commentable/taggable_entity.rb b/server/app/graphql/types/commentable/taggable_entity.rb index 8c40efed9..ced2ab42d 100644 --- a/server/app/graphql/types/commentable/taggable_entity.rb +++ b/server/app/graphql/types/commentable/taggable_entity.rb @@ -8,5 +8,6 @@ class TaggableEntity < Types::BaseEnum value 'REVISION' value 'ROLE' value 'MOLECULAR_PROFILE' + value 'SOURCE' end end diff --git a/server/app/graphql/types/entities/molecular_profile_type.rb b/server/app/graphql/types/entities/molecular_profile_type.rb index b3bf05d05..8a7acd447 100644 --- a/server/app/graphql/types/entities/molecular_profile_type.rb +++ b/server/app/graphql/types/entities/molecular_profile_type.rb @@ -10,7 +10,11 @@ class MolecularProfileType < Types::BaseObject field :raw_name, String, null: false, description: 'The profile name as stored, with ids rather than names.' field :name, String, null: false, - description: 'The human readable name of this profile, including gene and variant names.' + description: 'Returns either the common name of this profile, if it is set, or the full_name otherwise.' + field :full_name, String, null: false, + description: 'The human readable full name of this profile, including gene, variant names, and boolean operators.' + field :common_name, String, null: true, + description: 'A human readable shorthand name that is commonly used for this profile.' field :parsed_name, [Types::MolecularProfile::MolecularProfileSegmentType], null: false, description: 'The profile name with its constituent parts as objects, suitable for building tags.' field :variants, [Types::Entities::VariantType], null: false, @@ -29,15 +33,21 @@ class MolecularProfileType < Types::BaseObject field :evidence_counts_by_status, Types::MolecularProfile::EvidenceItemsByStatusType, null: false field :is_complex, Boolean, null: false - def raw_name - object.name - end - def molecular_profile_score object.evidence_score end def name + if object.common_name + object.common_name + else + Loaders::MolecularProfileSegmentsLoader.for(MolecularProfile).load(object.id).then do |segments| + segments.map { |s| s.respond_to?(:name) ? s.name : s }.join(' ') + end + end + end + + def full_name Loaders::MolecularProfileSegmentsLoader.for(MolecularProfile).load(object.id).then do |segments| segments.map { |s| s.respond_to?(:name) ? s.name : s }.join(' ') end diff --git a/server/app/graphql/types/queries/typeahead_queries.rb b/server/app/graphql/types/queries/typeahead_queries.rb index d81adb3ac..7cd68f01c 100644 --- a/server/app/graphql/types/queries/typeahead_queries.rb +++ b/server/app/graphql/types/queries/typeahead_queries.rb @@ -41,7 +41,7 @@ def self.included(klass) description "Retrieve entity type typeahead fields for a entity mention search term." argument :query_term, GraphQL::Types::String, required: true end - + klass.field :acmg_codes_typeahead, [Types::Entities::AcmgCodeType], null: false do description "Retrieve ACMG Code options as a typeahead" argument :query_term, GraphQL::Types::String, required: true diff --git a/server/app/graphql/types/revisions/molecular_profile_fields.rb b/server/app/graphql/types/revisions/molecular_profile_fields.rb index 8237ee25d..9b667bd26 100644 --- a/server/app/graphql/types/revisions/molecular_profile_fields.rb +++ b/server/app/graphql/types/revisions/molecular_profile_fields.rb @@ -1,6 +1,8 @@ module Types::Revisions class MolecularProfileFields < Types::BaseInputObject description 'Fields on a MolecularProfile that curators may propose revisions to.' + argument :common_name, Types::NullableValueInputType.for(GraphQL::Types::String), required: true, + description: "The MolecularProfile's common name." argument :description, Types::NullableValueInputType.for(GraphQL::Types::String), required: true, description: "The MolecularProfile's description/summary text." argument :source_ids, [Int], required: true, diff --git a/server/app/models/actions/create_complex_molecular_profile.rb b/server/app/models/actions/create_complex_molecular_profile.rb index d2d0c4b26..6df0e345a 100644 --- a/server/app/models/actions/create_complex_molecular_profile.rb +++ b/server/app/models/actions/create_complex_molecular_profile.rb @@ -12,15 +12,15 @@ def initialize(variants:, structure:) private def execute - if existing_mp = MolecularProfile.find_by(name: mp_name) + if existing_mp = MolecularProfile.find_by(raw_name: mp_name) if existing_mp.variant_ids.sort == variants.map(&:id).sort @molecular_profile = existing_mp else raise StandardError.new("Found existing molecular profile with same name #{mp_name} but different variant list") end else - mp = MolecularProfile.where(name: mp_name).first_or_initialize - + mp = MolecularProfile.where(raw_name: mp_name).first_or_initialize + mp.variants = variants mp.evidence_score = 0 mp.save! diff --git a/server/app/models/actions/create_variant.rb b/server/app/models/actions/create_variant.rb index e01e522f2..1d57c0aaf 100644 --- a/server/app/models/actions/create_variant.rb +++ b/server/app/models/actions/create_variant.rb @@ -12,7 +12,7 @@ def initialize(variant_name:, gene_id:) def execute variant.save!(validate: false) #get the ID for use in MP name generation mp_name = Actions::GenerateMolecularProfileName.generate_single_variant_mp_name(variant: variant) - mp = MolecularProfile.where(name: mp_name).first_or_initialize + mp = MolecularProfile.where(raw_name: mp_name).first_or_initialize if mp.evidence_score.blank? mp.evidence_score = 0 diff --git a/server/app/models/actions/extract_references.rb b/server/app/models/actions/extract_references.rb index 7eb692eb9..261ca2586 100644 --- a/server/app/models/actions/extract_references.rb +++ b/server/app/models/actions/extract_references.rb @@ -53,7 +53,7 @@ def self.status_value_for_referenced_entity(item) nil end end - + def self.deprecation_value_for_referenced_entity(item) if item.is_a?(Variant) || item.is_a?(MolecularProfile) item.deprecated @@ -72,7 +72,7 @@ def self.typeahead_matches(query_term) display_name: referenced_item.respond_to?(:display_name) ? referenced_item.display_name : referenced_item.name, tag_type: tag_type, status: status_value_for_referenced_entity(referenced_item), - deprecated: self.class.deprecation_value_for_referenced_entity(referenced_item), + deprecated: deprecation_value_for_referenced_entity(referenced_item), } end else @@ -99,15 +99,17 @@ def self.extract_type(type) [Assertion, 'ASSERTION'] when 'MP' [MolecularProfile, 'MOLECULAR_PROFILE'] + when 'S' + [Source, 'SOURCE'] end end def self.split_regex - @split_regex ||= Regexp.new(/\s*(#(?:a|v|g|vg|e|r|mp)(?:id)?\d+)\b/i) + @split_regex ||= Regexp.new(/\s*(#(?:a|v|g|vg|e|r|mp|s)(?:id)?\d+)\b/i) end def self.scan_regex - @scan_regex ||= Regexp.new(/#(?a|v|g|vg|e|r|mp)(?:id)?(?\d+)\b/i) + @scan_regex ||= Regexp.new(/#(?a|v|g|vg|e|r|mp|s)(?:id)?(?\d+)\b/i) end end end diff --git a/server/app/models/actions/suggest_molecular_profile_revision.rb b/server/app/models/actions/suggest_molecular_profile_revision.rb index 091a0349c..d35cd62d3 100644 --- a/server/app/models/actions/suggest_molecular_profile_revision.rb +++ b/server/app/models/actions/suggest_molecular_profile_revision.rb @@ -3,12 +3,14 @@ def editable_fields if existing_obj.is_complex? [ :description, + :common_name, :source_ids, :molecular_profile_alias_ids, ] else [ :description, + :common_name, :source_ids, ] end diff --git a/server/app/models/input_adaptors/molecular_profile_input_adaptor.rb b/server/app/models/input_adaptors/molecular_profile_input_adaptor.rb index 09df760c9..f77b3fe9f 100644 --- a/server/app/models/input_adaptors/molecular_profile_input_adaptor.rb +++ b/server/app/models/input_adaptors/molecular_profile_input_adaptor.rb @@ -1,17 +1,18 @@ class InputAdaptors::MolecularProfileInputAdaptor - attr_reader :input, :name + attr_reader :input, :raw_name def initialize(mp_input_object:, existing_name: ) @input = mp_input_object - @name = existing_name + @raw_name = existing_name end def perform MolecularProfile.new( + common_name: input.common_name, description: input.description, source_ids: input.source_ids, molecular_profile_alias_ids: get_alias_ids(), - name: name + raw_name: raw_name ) end diff --git a/server/app/models/molecular_profile.rb b/server/app/models/molecular_profile.rb index 18ed2c304..bc7f96279 100644 --- a/server/app/models/molecular_profile.rb +++ b/server/app/models/molecular_profile.rb @@ -20,16 +20,16 @@ class MolecularProfile < ActiveRecord::Base as: :subject, class_name: 'Event' - validates :name, presence: true + validates :raw_name, presence: true validate :unique_name_in_context - searchkick highlight: [:name, :aliases], callbacks: :async, word_start: [:name] + searchkick highlight: [:full_name, :common_name, :aliases], callbacks: :async, word_start: [:name] scope :search_import, -> { includes(:molecular_profile_aliases, variants: [:gene])} def search_data { - name: self.display_name, + name: self.name, aliases: self.molecular_profile_aliases.map(&:name) } end @@ -49,7 +49,15 @@ def mpid "MPID#{self.id}" end - def display_name + def name + if self.common_name + return self.common_name + else + return self.full_name + end + end + + def full_name segments.map { |s| s.respond_to?(:name) ? s.name : s }.join(' ') end @@ -59,7 +67,7 @@ def link def segments #TODO - we could batch these queries if it becomes an issue - @segments ||= name.split(' ').map do |segment| + @segments ||= raw_name.split(' ').map do |segment| if gene_match = segment.match(GENE_REGEX) Gene.find(gene_match[:id]) elsif variant_match = segment.match(VARIANT_REGEX) diff --git a/server/app/tsv_formatters/assertion_tsv_formatter.rb b/server/app/tsv_formatters/assertion_tsv_formatter.rb index baa0cda30..58812cced 100644 --- a/server/app/tsv_formatters/assertion_tsv_formatter.rb +++ b/server/app/tsv_formatters/assertion_tsv_formatter.rb @@ -36,7 +36,7 @@ def self.headers def self.row_from_object(a) [ - a.molecular_profile.display_name, + a.molecular_profile.name, a.molecular_profile.id, a.disease.name, a.disease.doid, diff --git a/server/app/tsv_formatters/evidence_item_tsv_formatter.rb b/server/app/tsv_formatters/evidence_item_tsv_formatter.rb index 956d6204e..e6912ea25 100644 --- a/server/app/tsv_formatters/evidence_item_tsv_formatter.rb +++ b/server/app/tsv_formatters/evidence_item_tsv_formatter.rb @@ -37,7 +37,7 @@ def self.headers def self.row_from_object(ei) [ - ei.molecular_profile.display_name, + ei.molecular_profile.name, ei.molecular_profile.id, ei.disease.nil? ? "" : ei.disease.name, ei.disease.nil? ? "" : ei.disease.doid, diff --git a/server/app/tsv_formatters/molecular_profile_tsv_formatter.rb b/server/app/tsv_formatters/molecular_profile_tsv_formatter.rb index dc7c2cb46..53842a86f 100644 --- a/server/app/tsv_formatters/molecular_profile_tsv_formatter.rb +++ b/server/app/tsv_formatters/molecular_profile_tsv_formatter.rb @@ -26,7 +26,7 @@ def self.headers def self.row_from_object(mp) [ - mp.display_name, + mp.name, mp.id, mp.description&.squish, mp.variants.map(&:id).join(', '), diff --git a/server/db/migrate/20230123161813_add_molecular_profile_common_name.rb b/server/db/migrate/20230123161813_add_molecular_profile_common_name.rb new file mode 100644 index 000000000..9b0e69b29 --- /dev/null +++ b/server/db/migrate/20230123161813_add_molecular_profile_common_name.rb @@ -0,0 +1,6 @@ +class AddMolecularProfileCommonName < ActiveRecord::Migration[6.1] + def change + add_column :molecular_profiles, :common_name, :string + rename_column :molecular_profiles, :name, :raw_name + end +end diff --git a/server/db/migrate/20230123170814_update_molecular_profile_browse_table_rows_to_version_11.rb b/server/db/migrate/20230123170814_update_molecular_profile_browse_table_rows_to_version_11.rb new file mode 100644 index 000000000..a8575b6a2 --- /dev/null +++ b/server/db/migrate/20230123170814_update_molecular_profile_browse_table_rows_to_version_11.rb @@ -0,0 +1,8 @@ +class UpdateMolecularProfileBrowseTableRowsToVersion11 < ActiveRecord::Migration[6.1] + def change + update_view :molecular_profile_browse_table_rows, + version: 11, + revert_to_version: 10, + materialized: true + end +end diff --git a/server/db/schema.rb b/server/db/schema.rb index 855624a05..0803e3501 100644 --- a/server/db/schema.rb +++ b/server/db/schema.rb @@ -517,15 +517,16 @@ end create_table "molecular_profiles", force: :cascade do |t| - t.string "name" + t.string "raw_name" t.datetime "created_at", precision: 6, null: false t.datetime "updated_at", precision: 6, null: false t.text "description" t.boolean "flagged", default: false, null: false t.float "evidence_score", null: false t.boolean "deprecated", default: false, null: false + t.string "common_name" t.index ["description"], name: "index_molecular_profiles_on_description" - t.index ["name"], name: "index_molecular_profiles_on_name", unique: true + t.index ["raw_name"], name: "index_molecular_profiles_on_raw_name", unique: true end create_table "molecular_profiles_sources", id: false, force: :cascade do |t| @@ -673,7 +674,7 @@ t.integer "source_type", null: false t.integer "asco_abstract_id" t.text "asco_presenter" - t.boolean "fully_curated", default: false, null: false + t.text "status", default: "fully curated", null: false t.index ["asco_abstract_id"], name: "index_sources_on_asco_abstract_id" t.index ["asco_presenter"], name: "index_sources_on_asco_presenter" t.index ["citation_id"], name: "index_sources_on_citation_id" @@ -972,47 +973,6 @@ JOIN evidence_items ei ON (((mp.id = ei.molecular_profile_id) AND (ei.deleted = false)))) GROUP BY mp.id; SQL - create_view "molecular_profile_browse_table_rows", materialized: true, sql_definition: <<-SQL - SELECT outer_mps.id, - outer_mps.name, - count(DISTINCT evidence_items.id) AS evidence_item_count, - array_agg(DISTINCT molecular_profile_aliases.name ORDER BY molecular_profile_aliases.name) AS alias_names, - json_agg(DISTINCT jsonb_build_object('name', genes.name, 'id', genes.id)) FILTER (WHERE (genes.name IS NOT NULL)) AS genes, - json_agg(DISTINCT jsonb_build_object('name', variants.name, 'id', variants.id)) FILTER (WHERE (variants.name IS NOT NULL)) AS variants, - json_agg(DISTINCT jsonb_build_object('name', diseases.name, 'id', diseases.id, 'total', disease_count.total)) FILTER (WHERE (diseases.name IS NOT NULL)) AS diseases, - json_agg(DISTINCT jsonb_build_object('name', therapies.name, 'id', therapies.id, 'total', therapy_count.total)) FILTER (WHERE (therapies.name IS NOT NULL)) AS therapies, - count(DISTINCT assertions.id) AS assertion_count, - count(DISTINCT variants.id) AS variant_count, - outer_mps.evidence_score - FROM ((((((((((((molecular_profiles outer_mps - LEFT JOIN evidence_items ON ((evidence_items.molecular_profile_id = outer_mps.id))) - JOIN molecular_profiles_variants ON ((outer_mps.id = molecular_profiles_variants.molecular_profile_id))) - JOIN variants ON ((molecular_profiles_variants.variant_id = variants.id))) - JOIN genes ON ((genes.id = variants.gene_id))) - LEFT JOIN diseases ON ((diseases.id = evidence_items.disease_id))) - LEFT JOIN evidence_items_therapies ON ((evidence_items_therapies.evidence_item_id = evidence_items.id))) - LEFT JOIN therapies ON ((therapies.id = evidence_items_therapies.therapy_id))) - LEFT JOIN assertions ON ((assertions.molecular_profile_id = outer_mps.id))) - LEFT JOIN molecular_profile_aliases_molecular_profiles ON ((molecular_profile_aliases_molecular_profiles.molecular_profile_id = outer_mps.id))) - LEFT JOIN molecular_profile_aliases ON ((molecular_profile_aliases.id = molecular_profile_aliases_molecular_profiles.molecular_profile_alias_id))) - LEFT JOIN LATERAL ( SELECT therapies_1.id AS therapy_id, - count(DISTINCT evidence_items_1.id) AS total - FROM ((evidence_items evidence_items_1 - JOIN evidence_items_therapies evidence_items_therapies_1 ON ((evidence_items_therapies_1.evidence_item_id = evidence_items_1.id))) - JOIN therapies therapies_1 ON ((therapies_1.id = evidence_items_therapies_1.therapy_id))) - WHERE (evidence_items_1.molecular_profile_id = outer_mps.id) - GROUP BY therapies_1.id) therapy_count ON ((therapies.id = therapy_count.therapy_id))) - LEFT JOIN LATERAL ( SELECT diseases_1.id AS disease_id, - count(DISTINCT evidence_items_1.id) AS total - FROM (evidence_items evidence_items_1 - JOIN diseases diseases_1 ON ((diseases_1.id = evidence_items_1.disease_id))) - WHERE (evidence_items_1.molecular_profile_id = outer_mps.id) - GROUP BY diseases_1.id) disease_count ON ((diseases.id = disease_count.disease_id))) - WHERE (outer_mps.deprecated = false) - GROUP BY outer_mps.id, outer_mps.name, outer_mps.evidence_score; - SQL - add_index "molecular_profile_browse_table_rows", ["id"], name: "index_molecular_profile_browse_table_rows_on_id", unique: true - create_view "variant_group_browse_table_rows", materialized: true, sql_definition: <<-SQL SELECT variant_groups.id, variant_groups.name, @@ -1172,4 +1132,46 @@ SQL add_index "source_browse_table_rows", ["id"], name: "index_source_browse_table_rows_on_id", unique: true + create_view "molecular_profile_browse_table_rows", materialized: true, sql_definition: <<-SQL + SELECT outer_mps.id, + outer_mps.raw_name, + outer_mps.common_name, + count(DISTINCT evidence_items.id) AS evidence_item_count, + array_agg(DISTINCT molecular_profile_aliases.name ORDER BY molecular_profile_aliases.name) AS alias_names, + json_agg(DISTINCT jsonb_build_object('name', genes.name, 'id', genes.id)) FILTER (WHERE (genes.name IS NOT NULL)) AS genes, + json_agg(DISTINCT jsonb_build_object('name', variants.name, 'id', variants.id)) FILTER (WHERE (variants.name IS NOT NULL)) AS variants, + json_agg(DISTINCT jsonb_build_object('name', diseases.name, 'id', diseases.id, 'total', disease_count.total)) FILTER (WHERE (diseases.name IS NOT NULL)) AS diseases, + json_agg(DISTINCT jsonb_build_object('name', therapies.name, 'id', therapies.id, 'total', therapy_count.total)) FILTER (WHERE (therapies.name IS NOT NULL)) AS therapies, + count(DISTINCT assertions.id) AS assertion_count, + count(DISTINCT variants.id) AS variant_count, + outer_mps.evidence_score + FROM ((((((((((((molecular_profiles outer_mps + LEFT JOIN evidence_items ON ((evidence_items.molecular_profile_id = outer_mps.id))) + JOIN molecular_profiles_variants ON ((outer_mps.id = molecular_profiles_variants.molecular_profile_id))) + JOIN variants ON ((molecular_profiles_variants.variant_id = variants.id))) + JOIN genes ON ((genes.id = variants.gene_id))) + LEFT JOIN diseases ON ((diseases.id = evidence_items.disease_id))) + LEFT JOIN evidence_items_therapies ON ((evidence_items_therapies.evidence_item_id = evidence_items.id))) + LEFT JOIN therapies ON ((therapies.id = evidence_items_therapies.therapy_id))) + LEFT JOIN assertions ON ((assertions.molecular_profile_id = outer_mps.id))) + LEFT JOIN molecular_profile_aliases_molecular_profiles ON ((molecular_profile_aliases_molecular_profiles.molecular_profile_id = outer_mps.id))) + LEFT JOIN molecular_profile_aliases ON ((molecular_profile_aliases.id = molecular_profile_aliases_molecular_profiles.molecular_profile_alias_id))) + LEFT JOIN LATERAL ( SELECT therapies_1.id AS therapy_id, + count(DISTINCT evidence_items_1.id) AS total + FROM ((evidence_items evidence_items_1 + JOIN evidence_items_therapies evidence_items_therapies_1 ON ((evidence_items_therapies_1.evidence_item_id = evidence_items_1.id))) + JOIN therapies therapies_1 ON ((therapies_1.id = evidence_items_therapies_1.therapy_id))) + WHERE (evidence_items_1.molecular_profile_id = outer_mps.id) + GROUP BY therapies_1.id) therapy_count ON ((therapies.id = therapy_count.therapy_id))) + LEFT JOIN LATERAL ( SELECT diseases_1.id AS disease_id, + count(DISTINCT evidence_items_1.id) AS total + FROM (evidence_items evidence_items_1 + JOIN diseases diseases_1 ON ((diseases_1.id = evidence_items_1.disease_id))) + WHERE (evidence_items_1.molecular_profile_id = outer_mps.id) + GROUP BY diseases_1.id) disease_count ON ((diseases.id = disease_count.disease_id))) + WHERE (outer_mps.deprecated = false) + GROUP BY outer_mps.id, outer_mps.raw_name, outer_mps.common_name, outer_mps.evidence_score; + SQL + add_index "molecular_profile_browse_table_rows", ["id"], name: "index_molecular_profile_browse_table_rows_on_id", unique: true + end diff --git a/server/db/views/molecular_profile_browse_table_rows_v11.sql b/server/db/views/molecular_profile_browse_table_rows_v11.sql new file mode 100644 index 000000000..bc6988263 --- /dev/null +++ b/server/db/views/molecular_profile_browse_table_rows_v11.sql @@ -0,0 +1,41 @@ +SELECT outer_mps.id, + outer_mps.raw_name, + outer_mps.common_name, + COUNT(DISTINCT(evidence_items.id)) as evidence_item_count, + array_agg(distinct(molecular_profile_aliases.name) order by molecular_profile_aliases.name) as alias_names, + json_agg(distinct jsonb_build_object('name', genes.name, 'id', genes.id)) FILTER (WHERE genes.name IS NOT NULL) as genes, + json_agg(distinct jsonb_build_object('name', variants.name, 'id', variants.id)) FILTER (WHERE variants.name IS NOT NULL) as variants, + json_agg(distinct jsonb_build_object('name', diseases.name, 'id', diseases.id, 'total', disease_count.total)) FILTER (WHERE diseases.name IS NOT NULL) as diseases, + json_agg(distinct jsonb_build_object('name', therapies.name, 'id', therapies.id, 'total', therapy_count.total)) FILTER (WHERE therapies.name IS NOT NULL) as therapies, + COUNT(DISTINCT(assertions.id)) as assertion_count, + COUNT(DISTINCT(variants.id)) as variant_count, + outer_mps.evidence_score +FROM molecular_profiles outer_mps +LEFT OUTER JOIN evidence_items ON evidence_items.molecular_profile_id = outer_mps.id +INNER JOIN molecular_profiles_variants ON outer_mps.id = molecular_profiles_variants.molecular_profile_id +INNER JOIN variants ON molecular_profiles_variants.variant_id = variants.id +INNER JOIN genes ON genes.id = variants.gene_id +LEFT OUTER JOIN diseases ON diseases.id = evidence_items.disease_id +LEFT OUTER JOIN evidence_items_therapies ON evidence_items_therapies.evidence_item_id = evidence_items.id +LEFT OUTER JOIN therapies ON therapies.id = evidence_items_therapies.therapy_id +LEFT OUTER JOIN assertions ON assertions.molecular_profile_id = outer_mps.id +LEFT OUTER JOIN molecular_profile_aliases_molecular_profiles ON molecular_profile_aliases_molecular_profiles.molecular_profile_id = outer_mps.id +LEFT OUTER JOIN molecular_profile_aliases ON molecular_profile_aliases.id = molecular_profile_aliases_molecular_profiles.molecular_profile_alias_id +-- this count is used for sorting therapies by the number of eids they appear with +LEFT JOIN LATERAL (SELECT therapies.id as therapy_id, COUNT(DISTINCT(evidence_items.id)) as total + FROM evidence_items + INNER JOIN evidence_items_therapies ON evidence_items_therapies.evidence_item_id = evidence_items.id + INNER JOIN therapies ON therapies.id = evidence_items_therapies.therapy_id + WHERE evidence_items.molecular_profile_id = outer_mps.id + GROUP BY therapies.id +) therapy_count on therapies.id = therapy_count.therapy_id + +LEFT JOIN LATERAL (SELECT diseases.id as disease_id, COUNT(DISTINCT(evidence_items.id)) as total + FROM evidence_items + INNER JOIN diseases ON diseases.id = evidence_items.disease_id + WHERE evidence_items.molecular_profile_id = outer_mps.id + GROUP BY diseases.id +) disease_count on diseases.id = disease_count.disease_id +WHERE outer_mps.deprecated = False +GROUP BY outer_mps.id, outer_mps.raw_name, outer_mps.common_name, outer_mps.evidence_score + diff --git a/server/test/fixtures/molecular_profiles.yml b/server/test/fixtures/molecular_profiles.yml index 1664766d0..970445b1a 100644 --- a/server/test/fixtures/molecular_profiles.yml +++ b/server/test/fixtures/molecular_profiles.yml @@ -1,12 +1,12 @@ mp1: - name: MP1 + raw_name: MP1 evidence_score: 1.5 mp2: - name: MP2 + raw_name: MP2 evidence_score: 21.5 mp3: - name: MP3 + raw_name: MP3 evidence_score: 50 mp4: - name: MP4 + raw_name: MP4 evidence_score: 101.2 diff --git a/server/test/graphql/mutations/create_molecular_profile_test.rb b/server/test/graphql/mutations/create_molecular_profile_test.rb index 699e9f089..ceef43e49 100644 --- a/server/test/graphql/mutations/create_molecular_profile_test.rb +++ b/server/test/graphql/mutations/create_molecular_profile_test.rb @@ -21,7 +21,7 @@ def setup mp_id = response["data"]["createMolecularProfile"]["molecularProfile"]['id'] mp = MolecularProfile.find(mp_id) - assert_equal(mp.display_name, "BRAF V600E") + assert_equal(mp.name, "BRAF V600E") assert_equal(mp.variants, [@variant]) end @@ -65,7 +65,7 @@ def setup mp_id = response["data"]["createMolecularProfile"]["molecularProfile"]["id"] mp = MolecularProfile.find(mp_id) - assert_equal(mp.display_name, "NOT BRAF V600K AND BRAF V600E AND ( VHL W88* OR VHL V87E (c.260T>A) )") + assert_equal(mp.name, "NOT BRAF V600K AND BRAF V600E AND ( VHL W88* OR VHL V87E (c.260T>A) )") assert_equal(mp.variants, [@variant, v2, v3, v4]) end @@ -105,7 +105,7 @@ def setup mp_id = response["data"]["createMolecularProfile"]["molecularProfile"]['id'] mp = MolecularProfile.find(mp_id) - assert_equal(mp.display_name, "NOT BRAF V600K AND BRAF V600E AND ( VHL W88* OR VHL V87E (c.260T>A) )") + assert_equal(mp.name, "NOT BRAF V600K AND BRAF V600E AND ( VHL W88* OR VHL V87E (c.260T>A) )") assert_equal(mp.variants, [@variant, v2, v3, v4]) end end