Comments (2)
This is a good point. The invention of the classifications vs identifiers was a rather late addition, and the logic used has just been to look for a "|" character in the comments/code text. The POJO probably abstracted this to that method call, while the beta UI just reinvents that same logic on the client-side. For consistency, we should expose the "isClassification" method of the POJO as a "_"-based property in the JSON (perhaps "_isClassification") and allow the client-side code to use that property.
Long term, really, the CV should categorize the code systems as either identifiers or classifications, and that could be used for the UI.
@epuzanov if you'd like to propose the addition of that new JSON property, I think it should be fairly straight-forward to make the beta UI optionally use that field rather than its current logic.
from gsrs-play.
I think, I found the problem:
https://github.com/ncats/GSRSFrontend/blob/Public_2.6/src/app/core/substance-details/substance-codes/substance-codes.component.ts
Line: 83
Must be something like:
} else if ((!code.comments || code.comments.indexOf('|') < 0) && this.type === 'identifiers') {
or another variant replace lines 81-85 with following code:
if (code.comments && code.comments.indexOf('|') > -1) {
if (this.type === 'classification') {
this.codes.push(code);
}
} else {
if (this.type === 'identifiers') {
this.codes.push(code);
}
}
from gsrs-play.
Related Issues (9)
- Hierarchy View Is Incomplete HOT 1
- substanceClass in relatedSubstance always has the value "reference" HOT 1
- Beta UI: Name Jurisdiction
- Beta UI: List View CodeSystem order
- Cassic UI: Impurities list is broken
- Certain structural modifications cause errors on protein registration HOT 1
- Error when processing some non-most abundant isotopes
- Fix code scanning alert - Code injection
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gsrs-play.