Giter Site home page Giter Site logo

joshuamcginnis / illumina Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 21 KB

A collection of utilities for Illumina BaseSpace products.

Home Page: https://github.com/joshuamcginnis/illumina/

License: MIT License

Python 100.00%
api basespace bioinformatics clarity-lims cli fhir hl7

illumina's Introduction

Illumina BaseSpace API Utils

This repo contains some prototype utilities for various Illumina Basespace product APIs.

Table of Contents

FHIR to Clarity Sample XML (f2c)

This is the prototype for a utility that allows translation, translation and connection of raw HL7 data to third-party data sources such as Epic.

Basic Usage

$ python f2c.py --help
Usage: f2c.py [OPTIONS] COMMAND [ARGS]...

  HL7 FHIR to Clarity Payload Utility

Options:
  --help  Show this message and exit.

Commands:
  convert  Translate a FHIR order message to a Clarity LMS /service API...

Save a local FHIR SampleRequest xml and pass it's path to the app.

python f2c.py convert -i path/to/file.xml

Running the Examples

Several example ServiceRequest xml's are available for testing in examples. You can run them like so:

$ python f2c.py convert -i examples/fhir/servicerequest-genetics.xml

<?xml version="1.0" ?>
<smp:samplecreation xmlns:smp="http://genologics.com/ri/sample"
                    xmlns:udf="http://genologics.com/ri/userdefined">
    <name>ABCB4 gene mutation analysis</name>
    <project uri="http://localhost:8080/api/v2/projects/ADM243"/>
    <location>
        <container uri="http://localhost:8080/api/v2/containers/27-100001"/>
        <value>1:1</value>
    </location>
    <date-received>2022-08-23 14:42:46.052753</date-received>
    <udf:field name="request_id">genetics-example-1</udf:field>
    <udf:field name="intent">original-order</udf:field>
    <udf:field name="subject">Patient/example</udf:field>
    <udf:field name="coding_system">http://loinc.org</udf:field>
    <udf:field name="code">49874-1</udf:field>
</smp:samplecreation>

How it Works

Per the most current Hl7 FHIR standards, orders are constructed primarily as <ServiceRequest> objects (with the exception of <MedicationRequest> not currently supported). Previous standards defined an <Order>, but this has since been removed and replaced.

ServiceRequest is a record of a proposal/plan or order for a service to be performed that would result in a Procedure, Observation, DiagnosticReport, ImagingStudy or similar resource.

For now, this project only supports mapping <ServiceRequests> to Clarity Sample creation xml, but is designed to support future mappings between FHIR elements and Clarity LMS xml requests.

FHIR Maps

FHIR maps are python objects which map <ServiceRequest> objects to python objects via xpath.

See: src\fhir_maps\service_request_map.py

These maps are composable and can be used to construct and confine mappings with strict types between FHIR elements to pythonic objects.

Clarity XML Builder

See: src\clarity_xml_builder.py This is the main class for building the sample request xml by mapping the fields defined in FHIR Maps to the Clarity LMS Service creation fields.

Project Setup

Requirements

  • Conda (or virtualenv)
  • Python 3+

Recreate the python environment and install deps:

$ conda env create -f * environment.yml

Helpful links

illumina's People

Contributors

joshuamcginnis avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

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.