Coder Social home page Coder Social logo

Comments (5)

jmandel avatar jmandel commented on August 27, 2024

A special case:

<administrativeGenderCode code="M" codeSystem="2.16.840.1.113883.5.1"/>

This should resolve to {"gender": "male"} or something similar -- not null

from bluebutton.js.

blacktm avatar blacktm commented on August 27, 2024

This completely makes sense. Quick question, can we assume consistent code system use in CCDA? If so, we can just maintain simple mappings for lookup, i.e.:

data.race = Codes.race(patient.tag('raceCode').attr('code'));

Then Codes.race would assume the "CDC Race and Ethnicity" code system and return "white". Does that make sense, or do we have to do something more elaborate?

from bluebutton.js.

jmandel avatar jmandel commented on August 27, 2024

You can assume a fixed coding system in C-CDA (since the implementation guide says SHALL) for:

  • Race
  • Ethnicity
  • Administrative Gender
  • Martial Status
  • Language

For "guardian" relationship, it's only a SHOULD, but I'd just run with the assumption that you can use:
https://phinvads.cdc.gov/vads/ViewValueSet.action?id=68FDBFB5-A277-DE11-9B52-0015173D1785

from bluebutton.js.

jmandel avatar jmandel commented on August 27, 2024

jmandel@19f70a6
Patched in this approach locally:

    var gender = el.tag('administrativeGenderCode').attr('code');
    var genders = {
      'M': 'Male',
      'F': 'Female',
      'U': 'Undifferentiated'
    };
    data.gender =  genders[gender];

from bluebutton.js.

blacktm avatar blacktm commented on August 27, 2024

For small-ish coding systems, I've started to add a look-up using core.js, for example in demographics.js:

gender = Codes.gender(el.tag('administrativeGenderCode').attr('code')),

I'm looking at other coding systems used in the CCDA (and beyond) that could be dumped into code.js.

from bluebutton.js.

Related Issues (20)

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.