Skip to content
This repository has been archived by the owner on Dec 1, 2017. It is now read-only.

Treat codes consistently across resources #15

Closed
jmandel opened this issue Mar 7, 2013 · 3 comments
Closed

Treat codes consistently across resources #15

jmandel opened this issue Mar 7, 2013 · 3 comments

Comments

@jmandel
Copy link
Member

jmandel commented Mar 7, 2013

For example in Labs, rather than repeating:

      var name = el.attr('displayName'),
          code = el.attr('code'),
          code_system = el.attr('codeSystem'),
          code_system_name = el.attr('codeSystemName');

You should parse the code in a consistent way (including translations if present), and abstract out that logic. Then you can given the code a property name to attach it to the lab

(For example in SMART we use semantic labels like "labName", so we'd have an individual result and say result.labName.code, or result.labName.label).

@blacktm
Copy link
Member

blacktm commented Apr 9, 2013

I agree that codes should be parsed consistently, lots of benefits there, but I'm not sure what you mean about by giving the code a property name. The structure currently looks like:

{
  "name": "CBC WO DIFFERENTIAL",
  "code": "43789009",
  "code_system": "2.16.840.1.113883.6.96",
  "code_system_name": "SNOMED CT",

Are you suggesting something more like this?

{
  "label": "CBC WO DIFFERENTIAL",
  "code": {
    "code": "43789009",
    "code_system": "2.16.840.1.113883.6.96",
    "code_system_name": "SNOMED CT",
  },

Or would you drop code_system and code_system_name entirely?

{
  "label": "CBC WO DIFFERENTIAL",
  "code": "43789009",

@jmandel
Copy link
Member Author

jmandel commented Apr 9, 2013

We most certainly need code_system and/or a standardized code_system_name -- otherwise the codes are incomplete. What I was thinking about was more like your code: {} example. Although rather than calling it code, I'd give it a meaningful property like

"labPanelName": {
  "label": "CBC",
  "code": "43789009",
  "code_system": "2.16.840.1.113883.6.96",
  "code_system_name": "SNOMED CT",
  "translations": [{}, {}, ..]
},
"date": "2013-04-04", ...

the idea thought would be in bb.js there's a common function parseCode-ish for picking a code out the XML (and translating to JSON) for any resource, rather than repeating the same steps for every resource.

@blacktm
Copy link
Member

blacktm commented Aug 21, 2013

I've added this to the list of JSON to review. I'm working on a PR to add a lib/ccda/codes.js that all CCDA codes would be sent to and parsed consistently.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants