Uploaded image for project: 'i2b2 Core Software'
  1. i2b2 Core Software
  2. CORE-370

Support for greater diversity in valueflag_cd / flagstouse in c_metadataxml

Details

    • New Feature
    • Status: New
    • Major
    • Resolution: Unresolved
    • None
    • TBD
    • None
    • None
    • Query Tool, Temporal Query Tool
    • Constraints - Value
    • i2b2 Web Client
    • All databases
    • All Web Browsers

    Description

      Currently, the webclient seems to only support either:
      * flagstouse: A
      * flagstouse: HL

      with no mixing between sets.

      LOINC and HL7 support a much larger set:

      User-defined Table 0078 - Abnormal flags
      Value Description
      L Below low normal
      H Above high normal
      LL Below lower panic limits
      HH Above upper panic limits
      < Below absolute low-off instrument scale
      > Above absolute high-off instrument scale
      N Normal (applies to non-numeric results)
      A Abnormal (applies to non-numeric results)
      AA Very abnormal (applies to non-numeric units, analogous to panic limits for numeric
      units)
      U Significant change up
      D Significant change down
      B Better--use when direction not relevant
      W Worse--use when direction not relevant
      S Susceptible. Indicates for microbiology susceptibilities only.
      R Resistant. Indicates for microbiology susceptibilities only.
      I Intermediate. Indicates for microbiology susceptibilities only.
      MS Moderately susceptible. Indicates for microbiology susceptibilities only.
      VS Very susceptible. Indicates for microbiology susceptibilities only

      https://loinc.org/meetings/20050606/public-laboratory-workshop-committee-meeting-06-06-2005/handout_a.pdf

      It would be nice to be able to make these as queryable flags as well.

      Attachments

        Activity

          Mike - I ran into a similar predicament for our local instance in the need to support "Critical High" and "Critical Low" values in our data. The current code doesn't easily support expansion of the valueflags greatly, so I modified it to parse more values using "indexOf" and changing the format of the valueflag codes in the XML_METADATA. Posting the code here in-case it is useful to others and or development team:

          Filename: \js-i2b2\cells\CRC\CRC_view_modLabRange.js
          Starting line: 360
          dm.flag = false;
          try {
          var t = i2b2.h.getXNodeVal(refXML, 'Flagstouse');
          if (t) {
          dm.flagType = 'N';
          dm.flags = [{name:'Normal', value:'@'}];
          if(t.indexOf("[A]") >=0 ) {
          dm.flagType += 'A';
          dm.flags.push({name:'Abnormal', value:'A'});
          }
          if(t.indexOf("[H]") >=0 ) {
          dm.flagType += 'H';
          dm.flags.push({name:'High', value:'H'});
          }
          if(t.indexOf("[L]") >=0 ) {
          dm.flagType += 'L';
          dm.flags.push({name:'Low', value:'L'});
          }
          if(t.indexOf("[CL]") >=0 ) {
          dm.flagType += 'CL';
          dm.flags.push({name:'Critical Low', value:'CL'});
          }
          if(t.indexOf("[CH]") >=0 ) {
          dm.flagType += 'CH';
          dm.flags.push({name:'Critical High', value:'CH'});
          }
          } else {
          dm.flagType = false;


          rbrad Robert Bradford added a comment - Mike - I ran into a similar predicament for our local instance in the need to support "Critical High" and "Critical Low" values in our data. The current code doesn't easily support expansion of the valueflags greatly, so I modified it to parse more values using "indexOf" and changing the format of the valueflag codes in the XML_METADATA. Posting the code here in-case it is useful to others and or development team: Filename: \js-i2b2\cells\CRC\CRC_view_modLabRange.js Starting line: 360 dm.flag = false; try { var t = i2b2.h.getXNodeVal(refXML, 'Flagstouse'); if (t) { dm.flagType = 'N'; dm.flags = [{name:'Normal', value:'@'}]; if(t.indexOf("[A]") >=0 ) { dm.flagType += 'A'; dm.flags.push({name:'Abnormal', value:'A'}); } if(t.indexOf("[H]") >=0 ) { dm.flagType += 'H'; dm.flags.push({name:'High', value:'H'}); } if(t.indexOf("[L]") >=0 ) { dm.flagType += 'L'; dm.flags.push({name:'Low', value:'L'}); } if(t.indexOf("[CL]") >=0 ) { dm.flagType += 'CL'; dm.flags.push({name:'Critical Low', value:'CL'}); } if(t.indexOf("[CH]") >=0 ) { dm.flagType += 'CH'; dm.flags.push({name:'Critical High', value:'CH'}); } } else { dm.flagType = false;
          That's very useful Robert. I may end up incorporating that into our local instance.

          Although it still has issues with 'CH' containing 'H', so that kind of limits this patch for covering the larger set above.
          mhorvath Michael Horvath added a comment - That's very useful Robert. I may end up incorporating that into our local instance. Although it still has issues with 'CH' containing 'H', so that kind of limits this patch for covering the larger set above.
          Agreed. One of the additional modifications that needs to be done is encase each of the value flags in the XML within brackets to distinguish them from each other instead of being a long concatenated string of letters. For example, the default client expects for High, Low:

          <Flagstouse>HL</Flagstouse>

          The patch expects:
          <Flagstouse>[H][L]</Flagstouse>

          That way when you add Critical High it becomes:
          <Flagstouse>[H][L][CH]</Flagstouse>

          The patch looks for the "indexOf" the values within brackets as they serve as containers for each valueflag. The bracketed valueflags do not have to carry through to the database, the value set for dm.flags[{NAME,VALUE}] is what is selected on in the database for VALUEFLAG_CD.


          rbrad Robert Bradford added a comment - Agreed. One of the additional modifications that needs to be done is encase each of the value flags in the XML within brackets to distinguish them from each other instead of being a long concatenated string of letters. For example, the default client expects for High, Low: <Flagstouse>HL</Flagstouse> The patch expects: <Flagstouse>[H][L]</Flagstouse> That way when you add Critical High it becomes: <Flagstouse>[H][L][CH]</Flagstouse> The patch looks for the "indexOf" the values within brackets as they serve as containers for each valueflag. The bracketed valueflags do not have to carry through to the database, the value set for dm.flags[{NAME,VALUE}] is what is selected on in the database for VALUEFLAG_CD.
          This needs to be reviewed by the i2b2 Development team. During the review process the team will determine what other components are involved (i.e. Ontology cell)



          jmd86 Janice Donahoe added a comment - This needs to be reviewed by the i2b2 Development team. During the review process the team will determine what other components are involved (i.e. Ontology cell)

          People

            nich Nich
            mhorvath Michael Horvath
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: