Coder Social home page Coder Social logo

sureshhardiya / intromat-fhir Goto Github PK

View Code? Open in Web Editor NEW
14.0 3.0 3.0 2.25 MB

GraphQL based Resource Server based on HL7 FHIR version R4

License: MIT License

Dockerfile 0.01% JavaScript 100.00%
graphql hl7-fhir-resources hie healthcare-information-exchange hl7 fhir fhir-server mongodb nodejs express

intromat-fhir's Introduction

Introduction

Intromat-FHIR is a HL7 FHIR compliant Resource server using nodejs, express, mongoDB, GraphQL and mongoose.

Motivation

There are several reasons why GraphQL based API is getting popular and can be found easily by simple Goole search. However, we have tried to formulate some of the empirical evidence supporting use of GRAPHQL in healthcare context. More can be found from the paper given below:

Mukhiya, S. K., Rabbi, F., I Pun, V. K., Rutle, A., & Lamo, Y. (2019). A GraphQL approach to Healthcare Information Exchange with HL7 FHIR. Procedia Computer Science, 160, 338-345. 10.1016/j.procs.2019.11.082

Interoperability is accepted as a fundamental necessity for the successful realization of Healthcare Information Systems. It can be achieved by utilizing consistent standards defining syntactic and semantic meaning of the information being exchanged. HL7 FHIR is one of such open standards for Health Information Exchange (HIE). While HL7 FHIR supports Representational State Transfer (REST) architecture and Service-oriented Architecture (SOA) for seamless information exchange, it inherits the inflexibility and complexity associated with the RESTful approach. GraphQL is a query language developed by Facebook that provides promising techniques to overcome these issues. In this paper, we exploit the use of GraphQL and HL7 FHIR for HIE; present an algorithm to map HL7 FHIR resources to a GraphQL schema, and created a prototype implementation of the approach and compare it with a RESTful approach. Our experimental results indicate that the combination of GraphQL and HL7 FHIR-based web APIs for HIE is performant, cost-effective, scalable and flexible to meet web and mobile clients requirements.

Roadmaps

  • Create all HL7 FHIR resources.
  • Create synthetic data factory for the resources and make the data open source for all users.
  • Create comprehensive authentication server.
  • Release mobile application supporting HL7 FHIR observation for sensors data

Supporters

Become supporter

We are a team of dedicated developers/researchers willing to make healthcare system better. We are always looking for ways where we can collaborate and help. Email [email protected] for further details.

Getting started

Here is the video tutorial: https://www.youtube.com/watch?v=VlU8feSYqPQ

intromat-fhir's People

Contributors

dependabot[bot] avatar hunghkit avatar jonasbacker avatar kolbein avatar martinheitmann avatar sureshhardiya avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

intromat-fhir's Issues

Creating resources with predefined ID

Is it possible to create resources in MongoDB with ID given by the queries? After clarifying with Sam how the resources should be mapped using 'uuid' from each Muzima model, these should be mapped to FHIR-side resources' id. _id seems to be defined as Element type. @sureshHARDIYA

Error when performing queries containing relations to several other resources

When performing a query that includes a relation to two or more FHIR resources for a single field:

query Observation {
    Observation(_id: "5e7a08d9dd081a3c58102642") {
        id
        status
        subject {
            ... on Patient {
                id
                active
            }
            ... on Location {
                id
                name
            }
        }
    }
}

The server throws an error:

{
    "errors": [
        {
            "path": [
                "Observation",
                "subject"
            ],
            "message": "Abstract type Observationsubject_subject_Union must resolve to an Object type at runtime for field Observation.subject with value [], received \"undefined\". Either the Observationsubject_subject_Union type should provide a \"resolveType\" function or each possible type should provide an \"isTypeOf\" function.",
            "locations": [
                {
                    "line": 5,
                    "column": 9
                }
            ],
            "extensions": {
                "resource": {
                    "resourceType": "OperationOutcome",
                    "issue": [
                        {
                            "severity": "error",
                            "code": "exception",
                            "diagnostics": "Abstract type Observationsubject_subject_Union must resolve to an Object type at runtime for field Observation.subject with value [], received \"undefined\". Either the Observationsubject_subject_Union type should provide a \"resolveType\" function or each possible type should provide an \"isTypeOf\" function."
                        }
                    ]
                }
            }
        }
    ],
    "data": {
        "Observation": {
            "id": "5e7a08d9dd081a3c58102642",
            "status": "final",
            "subject": null
        }
    }
}

Here, it has been manually confirmed that at least one patient exists, and the patient has been set in the query:

mutation ObservationCreate {
    ObservationCreate(resource: {

  resourceType: Observation,
  status: "final",
  subject: "5e7a082cdd081a3c5810263c",
  category: [
    {
      coding: [
        {
          system: "http://terminology.hl7.org/CodeSystem/observation-category",
          code: "vital-signs",
          display: "Vital Signs"
        }
      ]
    }
  ],
  code: {
    coding: [
      {
        system: "http://loinc.org",
        code: "29463-7",
        display: "Body Weight"
      },
      {
        system: "http://loinc.org",
        code: "3141-9",
        display: "Body weight Measured"
      },
      {
        system: "http://snomed.info/sct",
        code: "27113001",
        display: "Body weight"
      },
      {
        system: "http://acme.org/devices/clinical-codes",
        code: "body-weight",
        display: "Body Weight"
      }
    ]
  },
  effectiveDateTime: "2016-03-28",
  valueQuantity: {
    value: 185,
    unit: "lbs",
    system: "http://unitsofmeasure.org",
    code: "[lb_av]"
  }
}
) {
    id
    resourceType
}
}

How can we make these kinds of queries work?

Create Observation

Do you want to submit a request for change, improve documentation, or ask a question?

If asking a question, please attach the 'Question' label

If reporting a bug, please answer the following at minimum and add any additional information you think may be helpful

What is the current behavior?

What is the expected behavior?

What are the steps to reproduce?

What OS are you using and what version of node.js and @asymmetrik/graphql-fhir are you running?

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.