Coder Social home page Coder Social logo

utg's Introduction

UTG

Unified Terminology Governance

utg's People

Contributors

abdullah-git1 avatar alexzautke avatar bheale avatar brianpos avatar brianreinhold avatar davidpyke avatar dtriglianos avatar elrodm avatar enfrank avatar gaurav avatar grahamegrieve avatar hda-carmen avatar jessbota avatar jharper-infoway avatar johnmoehrke avatar jsnell8 avatar kshahin-computablepublishing avatar lawgers avatar lmckenzi avatar mduteau1995 avatar michelle-m-miller avatar mld1995 avatar mojitoj avatar oliveregger avatar reubendaniels avatar rhausam avatar russellhamm avatar seanmcilvenna avatar tedmadvocab avatar yanheras avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

utg's Issues

SimpleWorkerContext.fromClassPath results in "Stream closed" IOException

I try to create a SimpleWorkerContext given a zip file on the classpath:

SimpleWorkerContext.fromClassPath(CORE_R4_FHIR_RESOURCES_FILENAME);

This results in a IOException: Stream closed.

The reason is, my zip file (the Core R4 Profile) contains Json files, and the JsonParser closes the stream after parsing each zip entry, although more entries are available on the zip stream.

Explanation:

This method is looping through the entries in the zip file (which is perfectly fine):
SimpleWorkerContext:

private void loadFromStream(InputStream stream, IContextResourceLoader loader) throws IOException, FHIRException {
  ZipInputStream zip = new ZipInputStream(stream);
  ZipEntry ze;
  while ((ze = zip.getNextEntry()) != null) {
      loadDefinitionItem(ze.getName(), zip, loader);
    zip.closeEntry();
  }
zip.close();
}

The loadDefinitions() calls the JsonParser, which in turn calls this:
TextFile:

  public static String streamToString(InputStream input) throws IOException  {
    InputStreamReader sr = new InputStreamReader(input, "UTF-8");    
    StringBuilder b = new StringBuilder();
    //while (sr.ready()) { Commented out by Claude Nanjo (1/14/2014) - sr.ready() always returns false - please remove if change does not impact other areas of codebase
    int i = -1;
    while((i = sr.read()) > -1) {
      char c = (char) i;
      b.append(c);
    }
    sr.close();
    
    return  b.toString().replace("\uFEFF", ""); 
  }

This closes the InputStream, which causes the entire zip stream to be closed, causing everything to fail.

Also, reading a file byte for byte seems horribly inefficient!

Improve documentation: how does terminology.hl7.org relate to tx.fhir.org and the hl7-terminology Node package?

I've been trying to figure out how terminology.hl7.org (which appears to be generated by the code in this repository) relates to https://tx.fhir.org and the hl7-terminology Node package. I have run the ./runonce.sh script from this repo in Java 11 and successfully generated the documentation I see at https://terminology.hl7.org/, including the NPM packages on the download page at https://terminology.hl7.org/downloads.html. However, based on the output from that shell script, this code appears to access both tx.fhir.org ("Connect to Terminology Server at http://tx.fhir.org", "-tx: Connect to http://tx.fhir.org/r4") and possibly hl7-terminology ("Installing hl7.terminology#3.0.0 to the package cache", which I haven’t figured out where that is yet).

I would really appreciate some documentation on:

  1. How does this repository use tx.fhir.org? Does it only use terminologies from there, or does it compare the CodeSystems stored locally (e.g. https://github.com/HL7/UTG/blob/master/input/sourceOfTruth/external/v3/codeSystems/cs-v3-snomed-CT.xml) with those stored on tx.fhir.org?
  2. Is this the repository that generates the hl7-terminology Node package? If so, does it use tx.fhir.org, the CodeSystems mentioned above, or some other source for the CodeSystem/NamingSystem information?
  3. If this is not the repository that generates the hl7-terminology Node package, could you please point me to the documentation on how that package is generated?

The reason I'm poking around with this is because I'd like to propose that FHIR CodeSystems and NamingSystems store the prefixes we need to convert a FHIR Coding (e.g. system: http://hl7.org/fhir/sid/icd-10, code: G44.1) to a concept URL (e.g. http://purl.bioontology.org/ontology/ICD10/G44.1) and vice versa. I'm doing this to solve a problem relating to FHIR RDF generation (see my latest comment on that issue here: w3c/hcls-fhir-rdf#94 (comment)), for which I'd like to be able to modify the hl7.terminology NPM package to add a "prefix" field for a few CodingSystem/NodeSystem entries as an example.

Thanks so much for your help!

Incorrect property code in UTG/input/sourceOfTruth/v2/v2-tables.xml

For all concept entries for "tables" that are actually v3 CodeSystems, the property code v2cs-uri is used. The correct code is v2-cs-uri.

Example:

  <concept>
    <code value="0719"/>
    <display value="Access Restriction Reason Code"/>
    <definition value="Table of codes specifying the reason for the restricted access.  Note these codes are maintained within HL7, but outside of Version 2."/>
    ...
    <property>
      <code value="v2cs-uri"/>
      <valueString value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
    </property>
     ...
  </concept>

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.