-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '6a59ec325f82c207fbb69020b342b02a2ae7839d' into release
- Loading branch information
Showing
31 changed files
with
1,325 additions
and
48 deletions.
There are no files selected for viewing
94 changes: 94 additions & 0 deletions
94
client/src/app/components/diseases/my-disease-info/my-disease-info.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<ng-container *ngIf="diseaseInfo"> | ||
<nz-card nzTitle="MyDiseaseInfo"> | ||
<nz-card-tab> | ||
<nz-tabset nzSize="small" [nzAnimated]="true"> | ||
<nz-tab (nzClick)="tabIndex.next(0)" nzTitle="Disease Ontology"> </nz-tab> | ||
<nz-tab (nzClick)="tabIndex.next(1)" nzTitle="Mondo"> </nz-tab> | ||
</nz-tabset> | ||
</nz-card-tab> | ||
<ng-container [ngSwitch]="tabIndex | async"> | ||
<!-- DO tab --> | ||
<ng-container *ngSwitchCase="0"> | ||
<div class="tab-padding"> | ||
<nz-row [nzGutter]="8"> | ||
<nz-col [nzSpan]="12"> | ||
<nz-descriptions nzSize="small" [nzBordered]="true" [nzColumn]="1"> | ||
<nz-descriptions-item nzTitle="Definition"> | ||
<ng-container *ngIf="diseaseInfo.doDef; else noValue"> | ||
{{diseaseInfo.doDef}} | ||
</ng-container> | ||
</nz-descriptions-item> | ||
<nz-descriptions-item nzTitle="Citations"> | ||
<ng-container *ngIf="diseaseInfo.doDefCitations.length > 0; else noValue"> | ||
<cvc-tag-list> | ||
<cvc-link-tag *ngFor="let url of diseaseInfo.doDefCitations; let i = index" [href]="url">Source {{ i + 1 }}</cvc-link-tag> | ||
</cvc-tag-list> | ||
</ng-container> | ||
</nz-descriptions-item> | ||
</nz-descriptions> | ||
</nz-col> | ||
<nz-col [nzSpan]="12"> | ||
<nz-descriptions nzSize="small" [nzBordered]="true" [nzColumn]="2"> | ||
<nz-descriptions-item nzTitle="Exact Synonyms" *ngIf="diseaseInfo.diseaseOntologyExactSynonyms.length > 0" | ||
[nzSpan]="2"> | ||
<cvc-tag-list> | ||
<nz-tag *ngFor="let a of diseaseInfo.diseaseOntologyExactSynonyms"> | ||
{{ a }} | ||
</nz-tag> | ||
</cvc-tag-list> | ||
</nz-descriptions-item> | ||
<nz-descriptions-item nzTitle="Related Synonyms" *ngIf="diseaseInfo.diseaseOntologyRelatedSynonyms.length > 0" | ||
[nzSpan]="2"> | ||
<cvc-tag-list> | ||
<nz-tag *ngFor="let a of diseaseInfo.diseaseOntologyRelatedSynonyms"> | ||
{{ a }} | ||
</nz-tag> | ||
</cvc-tag-list> | ||
</nz-descriptions-item> | ||
<nz-descriptions-item nzTitle="External Identifiers" [nzSpan]="2"> | ||
<cvc-tag-list> | ||
<cvc-link-tag *ngIf="diseaseInfo.mesh" [href]="'https://meshb.nlm.nih.gov/record/ui?ui=' + diseaseInfo.mesh" | ||
tooltip="View in MeSH"> | ||
MeSH:{{diseaseInfo.mesh}} | ||
</cvc-link-tag> | ||
<cvc-link-tag *ngFor="let ncit of diseaseInfo.ncit" | ||
[href]="'https://ncithesaurus.nci.nih.gov/ncitbrowser/ConceptReport.jsp?dictionary=NCI_Thesaurus&ns=ncit&code=' + ncit" | ||
tooltip="View in NCI Thesaurus"> | ||
NCIt:{{ncit}} | ||
</cvc-link-tag> | ||
<cvc-link-tag *ngIf="diseaseInfo.omim" [href]="'https://www.omim.org/entry/' + diseaseInfo.omim" | ||
tooltip="View on OMIM"> | ||
OMIM:{{diseaseInfo.omim}} | ||
</cvc-link-tag> | ||
</cvc-tag-list> | ||
</nz-descriptions-item> | ||
<nz-descriptions-item *ngIf="diseaseInfo.icd10" nzTitle="ICD - 10"> | ||
{{diseaseInfo.icd10}} | ||
</nz-descriptions-item> | ||
<nz-descriptions-item *ngIf="diseaseInfo.icdo" nzTitle="ICD - O"> | ||
{{diseaseInfo.icdo}} | ||
</nz-descriptions-item> | ||
</nz-descriptions> | ||
</nz-col> | ||
</nz-row> | ||
</div> | ||
</ng-container> | ||
<ng-container *ngSwitchCase="1"> | ||
<div class="tab-padding"> | ||
<nz-row [nzGutter]="8"> | ||
<nz-col [nzSpan]="12"> | ||
<nz-descriptions nzSize="small" [nzBordered]="true" [nzColumn]="2"> | ||
<nz-descriptions-item nzTitle="Definition"> | ||
<ng-container *ngIf="diseaseInfo.mondoDef; else noValue"> | ||
{{diseaseInfo.mondoDef}} | ||
</ng-container> | ||
</nz-descriptions-item> | ||
</nz-descriptions> | ||
</nz-col> | ||
</nz-row> | ||
</div> | ||
</ng-container> | ||
</ng-container> | ||
</nz-card> | ||
</ng-container> | ||
<ng-template #noValue><span nz-typography nzType="secondary">Not Found</span></ng-template> |
15 changes: 15 additions & 0 deletions
15
client/src/app/components/diseases/my-disease-info/my-disease-info.component.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
:host { | ||
display: block; | ||
} | ||
|
||
nz-card { | ||
width: 100%; | ||
} | ||
|
||
.key-col { | ||
text-align: right; | ||
font-weight: bold; | ||
} | ||
.button-col { | ||
text-align: right; | ||
} |
25 changes: 25 additions & 0 deletions
25
client/src/app/components/diseases/my-disease-info/my-disease-info.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Component, Input, OnDestroy } from "@angular/core"; | ||
import { Maybe } from "@app/generated/civic.apollo"; | ||
import { MyDiseaseInfoFieldsFragment } from "@app/generated/civic.apollo"; | ||
import { BehaviorSubject } from "rxjs"; | ||
|
||
@Component({ | ||
selector: 'cvc-my-disease-info', | ||
templateUrl: './my-disease-info.component.html', | ||
styleUrls: ['./my-disease-info.component.less'] | ||
}) | ||
export class CvcMyDiseaseInfoComponent implements OnDestroy { | ||
@Input() diseaseInfo: Maybe<MyDiseaseInfoFieldsFragment>; | ||
|
||
tabIndex = new BehaviorSubject<number>(0); | ||
|
||
constructor() { } | ||
|
||
tabChange(index: number): void { | ||
this.tabIndex.next(index); | ||
} | ||
|
||
ngOnDestroy(): void { | ||
this.tabIndex.unsubscribe(); | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
client/src/app/components/diseases/my-disease-info/my-disease-info.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { CvcMyDiseaseInfoComponent } from './my-disease-info.component'; | ||
import { NzTabsModule } from 'ng-zorro-antd/tabs'; | ||
import { NzCardModule } from 'ng-zorro-antd/card'; | ||
import { NzGridModule } from 'ng-zorro-antd/grid'; | ||
import { NzTableModule } from 'ng-zorro-antd/table'; | ||
import { CvcPipesModule } from '@app/core/pipes/pipes.module'; | ||
import { CvcLinkTagModule } from '@app/components/shared/link-tag/link-tag.module'; | ||
import { NzDescriptionsModule } from 'ng-zorro-antd/descriptions'; | ||
import { CvcTagListModule } from '@app/components/shared/tag-list/tag-list.module'; | ||
import { NzTagModule } from 'ng-zorro-antd/tag'; | ||
import { NzTypographyModule } from 'ng-zorro-antd/typography'; | ||
|
||
@NgModule({ | ||
declarations: [CvcMyDiseaseInfoComponent], | ||
imports: [ | ||
CommonModule, | ||
NzTabsModule, | ||
NzTableModule, | ||
NzCardModule, | ||
NzDescriptionsModule, | ||
NzGridModule, | ||
NzTagModule, | ||
NzTypographyModule, | ||
CvcPipesModule, | ||
CvcLinkTagModule, | ||
CvcTagListModule | ||
], | ||
exports: [CvcMyDiseaseInfoComponent], | ||
}) | ||
export class CvcMyDiseaseInfoModule { } |
82 changes: 82 additions & 0 deletions
82
client/src/app/components/therapies/my-chem-info/my-chem-info.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<ng-container *ngIf="chemInfo"> | ||
<nz-card nzTitle="MyChemInfo"> | ||
<div class="tab-padding"> | ||
<nz-row [nzGutter]="8"> | ||
<nz-col [nzSpan]="12"> | ||
<nz-descriptions nzSize="small" [nzBordered]="true" [nzColumn]="2"> | ||
<nz-descriptions-item nzTitle="ChEBI Definition" [nzSpan]="2"> | ||
<ng-container *ngIf="chemInfo.chebiDefinition; else noValue"> | ||
{{chemInfo.chebiDefinition}} | ||
</ng-container> | ||
</nz-descriptions-item> | ||
<nz-descriptions-item nzTitle="Inidications" [nzSpan]="2"> | ||
<ng-container *ngIf="chemInfo.indications.length > 0; else noValue"> | ||
<cvc-tag-list> | ||
<nz-tag *ngFor="let i of chemInfo.indications">{{i}}</nz-tag> | ||
</cvc-tag-list> | ||
</ng-container> | ||
</nz-descriptions-item> | ||
<nz-descriptions-item *ngIf="chemInfo.inchikey" nzTitle="InChIKey" [nzSpan]="2"> | ||
{{chemInfo.inchikey}} | ||
</nz-descriptions-item> | ||
</nz-descriptions> | ||
</nz-col> | ||
<nz-col [nzSpan]="12"> | ||
<nz-descriptions nzSize="small" [nzBordered]="true" [nzColumn]="2"> | ||
<nz-descriptions-item *ngIf="chemInfo.firstApproval" nzTitle="First Approval"> | ||
{{chemInfo.firstApproval}} | ||
</nz-descriptions-item> | ||
<nz-descriptions-item *ngIf="chemInfo.chemblMoleculeType" nzTitle="Molecule Type"> | ||
{{chemInfo.chemblMoleculeType}} | ||
</nz-descriptions-item> | ||
<ng-container *ngFor="let epc of chemInfo.fdaEpcCodes"> | ||
<nz-descriptions-item nzTitle="FDA EPC Code"> | ||
{{epc.code}} | ||
</nz-descriptions-item> | ||
<nz-descriptions-item nzTitle="FDA EPC Description"> | ||
{{epc.description}} | ||
</nz-descriptions-item> | ||
</ng-container> | ||
<ng-container *ngFor="let moa of chemInfo.fdaMoaCodes"> | ||
<nz-descriptions-item nzTitle="FDA MOA Code"> | ||
{{moa.code}} | ||
</nz-descriptions-item> | ||
<nz-descriptions-item nzTitle="FDA MOA Description"> | ||
{{moa.description}} | ||
</nz-descriptions-item> | ||
</ng-container> | ||
<nz-descriptions-item nzTitle="External Identifiers" [nzSpan]="2"> | ||
<cvc-tag-list> | ||
<cvc-link-tag *ngIf="chemInfo.chebiId" [href]="'https://www.ebi.ac.uk/chebi/searchId.do?chebiId=' + chemInfo.chebiId" | ||
tooltip="View in ChEBI"> | ||
{{chemInfo.chebiId}} | ||
</cvc-link-tag> | ||
<cvc-link-tag *ngIf="chemInfo.chemblId" [href]="'https://www.ebi.ac.uk/chembl/compound_report_card/' + chemInfo.chemblId" | ||
tooltip="View in ChEMBL"> | ||
{{chemInfo.chemblId}} | ||
</cvc-link-tag> | ||
<cvc-link-tag *ngIf="chemInfo.pubchemCid" [href]="'https://pubchem.ncbi.nlm.nih.gov/compound/' + chemInfo.pubchemCid" | ||
tooltip="View in PubChem"> | ||
PubChem {{chemInfo.pubchemCid}} | ||
</cvc-link-tag> | ||
<cvc-link-tag *ngIf="chemInfo.pharmgkbId" [href]="'https://www.pharmgkb.org/chemical/' + chemInfo.pharmgkbId" | ||
tooltip="View in PHARMGKB"> | ||
PHARMGKB {{chemInfo.pharmgkbId}} | ||
</cvc-link-tag> | ||
<cvc-link-tag *ngIf="chemInfo.rxnorm" [href]="'https://mor.nlm.nih.gov/RxNav/search?searchBy=RXCUI&searchTerm=' + chemInfo.rxnorm" | ||
tooltip="View in RxNav"> | ||
RxNav {{chemInfo.rxnorm}} | ||
</cvc-link-tag> | ||
<cvc-link-tag *ngIf="chemInfo.drugbankId" [href]="'https://go.drugbank.com/drugs/' + chemInfo.drugbankId" | ||
tooltip="View in DrugBank"> | ||
DrugBank {{chemInfo.drugbankId}} | ||
</cvc-link-tag> | ||
</cvc-tag-list> | ||
</nz-descriptions-item> | ||
</nz-descriptions> | ||
</nz-col> | ||
</nz-row> | ||
</div> | ||
</nz-card> | ||
</ng-container> | ||
<ng-template #noValue><span nz-typography nzType="secondary">Not Found</span></ng-template> |
15 changes: 15 additions & 0 deletions
15
client/src/app/components/therapies/my-chem-info/my-chem-info.component.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
:host { | ||
display: block; | ||
} | ||
|
||
nz-card { | ||
width: 100%; | ||
} | ||
|
||
.key-col { | ||
text-align: right; | ||
font-weight: bold; | ||
} | ||
.button-col { | ||
text-align: right; | ||
} |
24 changes: 24 additions & 0 deletions
24
client/src/app/components/therapies/my-chem-info/my-chem-info.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Component, Input, OnDestroy } from "@angular/core"; | ||
import { Maybe, MyChemInfoFieldsFragment } from "@app/generated/civic.apollo"; | ||
import { BehaviorSubject } from "rxjs"; | ||
|
||
@Component({ | ||
selector: 'cvc-my-chem-info', | ||
templateUrl: './my-chem-info.component.html', | ||
styleUrls: ['./my-chem-info.component.less'] | ||
}) | ||
export class CvcMyChemInfoComponent implements OnDestroy { | ||
@Input() chemInfo: Maybe<MyChemInfoFieldsFragment>; | ||
|
||
tabIndex = new BehaviorSubject<number>(0); | ||
|
||
constructor() { } | ||
|
||
tabChange(index: number): void { | ||
this.tabIndex.next(index); | ||
} | ||
|
||
ngOnDestroy(): void { | ||
this.tabIndex.unsubscribe(); | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
client/src/app/components/therapies/my-chem-info/my-chem-info.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { CvcMyChemInfoComponent } from './my-chem-info.component'; | ||
import { NzTabsModule } from 'ng-zorro-antd/tabs'; | ||
import { NzCardModule } from 'ng-zorro-antd/card'; | ||
import { NzGridModule } from 'ng-zorro-antd/grid'; | ||
import { NzTableModule } from 'ng-zorro-antd/table'; | ||
import { CvcPipesModule } from '@app/core/pipes/pipes.module'; | ||
import { CvcLinkTagModule } from '@app/components/shared/link-tag/link-tag.module'; | ||
import { NzDescriptionsModule } from 'ng-zorro-antd/descriptions'; | ||
import { CvcTagListModule } from '@app/components/shared/tag-list/tag-list.module'; | ||
import { NzTagModule } from 'ng-zorro-antd/tag'; | ||
import { NzTypographyModule } from 'ng-zorro-antd/typography'; | ||
|
||
@NgModule({ | ||
declarations: [CvcMyChemInfoComponent], | ||
imports: [ | ||
CommonModule, | ||
NzTabsModule, | ||
NzTableModule, | ||
NzCardModule, | ||
NzDescriptionsModule, | ||
NzGridModule, | ||
NzTagModule, | ||
NzTypographyModule, | ||
CvcPipesModule, | ||
CvcLinkTagModule, | ||
CvcTagListModule | ||
], | ||
exports: [CvcMyChemInfoComponent], | ||
}) | ||
export class CvcMyChemInfoModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.