1+ <template >
2+ <div class =" nutrition-card" >
3+ <div class =" nutrition-card-header" >
4+ <span class =" nutrition-author" >{{ authorLine }}</span >
5+ </div >
6+ <div class =" nutrition-section bottom-line" >
7+ <div class =" nutrition-row" >
8+ <div class =" nutrition-label" >Gene (HGNC symbol)</div >
9+ <div class =" nutrition-value" >{{ scoreSet.targetGenes[0]?.name }}</div >
10+ </div >
11+ </div >
12+ <div class =" nutrition-section" >
13+ <div class =" nutrition-row" >
14+ <div class =" nutrition-label" >Assay Type</div >
15+ <div class =" nutrition-value" >
16+ <div v-if =" scoreSet.experiment.keywords?.some((k) => k.keyword.key === 'Phenotypic Assay Method')" >
17+ {{ scoreSet.experiment.keywords.find((k) => k.keyword.key === "Phenotypic Assay Method").keyword.label}}
18+ </div >
19+ <div v-else >Not specified</div >
20+ </div >
21+ </div >
22+ <div class =" nutrition-row" >
23+ <div class =" nutrition-label" >Molecular Mechanism Assessed</div >
24+ <div class =" nutrition-value" >
25+ <div v-if =" scoreSet.experiment.keywords?.some((k) => k.keyword.key === 'Phenotypic Assay Mechanism')" >
26+ {{ scoreSet.experiment.keywords.find((k) => k.keyword.key === "Phenotypic Assay Mechanism").keyword.label }}
27+ </div >
28+ <div v-else >Not specified</div >
29+ </div >
30+ </div >
31+ <div class =" nutrition-row" >
32+ <div class =" nutrition-label" >Model System</div >
33+ <div class =" nutrition-value" >
34+ <div
35+ v-if =" scoreSet.experiment.keywords?.some((k) => k.keyword.key === 'Phenotypic Assay Model System')" >
36+ {{ scoreSet.experiment.keywords.find((k) => k.keyword.key === "Phenotypic Assay Model System").keyword.label }}
37+ </div >
38+ <div v-else >Not specified</div >
39+ </div >
40+ </div >
41+ <!--
42+ <div class="nutrition-row">
43+ <div class="nutrition-label">Detects Splicing Variants?</div>
44+ <div class="nutrition-value" :class="{ yellow: scoreSet.detectsSplicing === 'No' }">
45+ {{ scoreSet.detectsSplicing || "Yes" }}
46+ </div>
47+ </div>
48+ <div class="nutrition-row">
49+ <div class="nutrition-label">Detects NMD Variants?</div>
50+ <div class="nutrition-value" :class="{ yellow: scoreSet.detectsNmd === 'No' }">
51+ {{ scoreSet.detectsNmd || "Yes" }}
52+ </div>
53+ </div>
54+ -->
55+ <div class =" nutrition-row" >
56+ <div class =" nutrition-label" >Number of Variants</div >
57+ <div class =" nutrition-value" >
58+ <div >{{ scoreSet.numVariants }}</div >
59+ </div >
60+ </div >
61+ </div >
62+ <div class =" nutrition-section-title" >Clinical Performance</div >
63+ <div class =" nutrition-section" >
64+ <div v-if =" scoreSet.scoreRanges?.investigatorProvided?.ranges[0]?.oddsPath?.ratio" >
65+ <div class =" nutrition-row" >
66+ <div class =" nutrition-label" >OddsPath – Normal</div >
67+ <div class =" nutrition-value" v-if =" scoreSet.scoreRanges?.investigatorProvided?.ranges?.some((r) => r.classification === 'normal')" >
68+ {{ scoreSet.scoreRanges.investigatorProvided.ranges.find((r) => r.classification === "normal").oddsPath?.ratio }}
69+ <span class =" badge blue" >
70+ {{ scoreSet.scoreRanges.investigatorProvided.ranges.find((r) => r.classification === "normal").oddsPath?.evidence }}
71+ </span >
72+ </div >
73+ </div >
74+ <div class =" nutrition-row" >
75+ <div class =" nutrition-label" >OddsPath – Abnormal</div >
76+ <div class =" nutrition-value" v-if =" scoreSet.scoreRanges?.investigatorProvided?.ranges?.some((r) => r.classification === 'abnormal')" >
77+ {{ scoreSet.scoreRanges.investigatorProvided.ranges.find((r) => r.classification === "abnormal").oddsPath?.ratio }}
78+ <span class =" badge strong red" >
79+ {{ scoreSet.scoreRanges.investigatorProvided.ranges.find((r) => r.classification === "abnormal").oddsPath?.evidence }}
80+ </span >
81+ </div >
82+ </div >
83+ </div >
84+ <div v-else >
85+ OddsPath values are not provided for this score set.
86+ </div >
87+ </div >
88+ </div >
89+ </template >
90+
91+ <script >
92+
93+ import { defineComponent , computed } from ' vue'
94+
95+ export default defineComponent ({
96+ name: ' AssayFactSheet' ,
97+
98+ props: {
99+ scoreSet: {
100+ type: Object ,
101+ required: true
102+ },
103+ },
104+
105+ computed: {
106+ authorLine : function (){
107+ const author = this .scoreSet .primaryPublicationIdentifiers [0 ]? .authors [0 ].name
108+ const gene = this .scoreSet .targetGenes ? .[0 ]? .name || " "
109+ const year = this .scoreSet .primaryPublicationIdentifiers [0 ]? .publicationYear || " "
110+
111+ if (author && author .length > 0 ) {
112+ return ` ${ author} et al. ${ gene} ${ year} `
113+ }
114+ return ` ${ gene} ${ year} `
115+ }
116+ }
117+ })
118+
119+
120+ < / script>
121+
122+ < style scoped>
123+
124+ /* Nutrition label */
125+
126+ .nutrition - author {
127+ font- size: 21px ;
128+ }
129+
130+ .nutrition - card {
131+ width: 580px ; /* fixed size */
132+ border: 1px solid #000 ;
133+ padding: 12px ;
134+ font- family: sans- serif;
135+ font- size: 14px ;
136+ line- height: 1.4 ;
137+ }
138+
139+ .nutrition - card- header {
140+ font- weight: bold;
141+ border- bottom: 3px solid #000 ;
142+ padding- bottom: 4px ;
143+ margin- bottom: 8px ;
144+ }
145+
146+ .nutrition - section {
147+ margin- bottom: 12px ;
148+ }
149+
150+ .nutrition - section- title {
151+ font- weight: bold;
152+ margin: 6px 0 ;
153+ border- top: 1 .0px solid #3e3d3dbb ;
154+ padding- top: 4px ;
155+ font- size: 16px ;
156+ font- weight: bold;
157+ }
158+
159+ .nutrition - row {
160+ display: flex;
161+ justify- content: space- between;
162+ margin: 2px 0 ;
163+ }
164+
165+ .nutrition - label {
166+ font- weight: bold;
167+ flex: 1 ;
168+ }
169+
170+ .nutrition - value {
171+ flex: 1 ;
172+ text- align: left;
173+ }
174+
175+ .nutrition - value .yellow {
176+ background: #fef3c7;
177+ padding: 2px 4px ;
178+ border- radius: 4px ;
179+ }
180+
181+ .badge {
182+ display: inline- block;
183+ padding: 2px 6px ;
184+ border- radius: 4px ;
185+ font- size: 12px ;
186+ font- weight: bold;
187+ margin- left: 4px ;
188+ }
189+
190+ .badge .blue {
191+ background: #1e40af ;
192+ color: white;
193+ }
194+
195+ .badge .red {
196+ background: #991b1b ;
197+ color: white;
198+ }
199+
200+ .bottom - line{
201+ border- bottom: 1px solid #3e3d3dbb ;
202+ }
203+
204+ < / style>
0 commit comments