Code Monkey home page Code Monkey logo

Comments (2)

tylerperyea avatar tylerperyea commented on July 21, 2024

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.

epuzanov avatar epuzanov commented on July 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.