GithubHelp home page GithubHelp logo

test-mass-forker-org-1 / iomt-fhir-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microsoft/iomt-fhir-client

0.0 0.0 0.0 36 KB

The IomtFhirClient Swift library simplifies sending IoMT (Internet of Medical Things) data to an IoMT FHIR Connector for Azure endpoint.

License: MIT License

Swift 100.00%

iomt-fhir-client's Introduction

IomtFhirClient Swift Library

Build Status

The IomtFhirClient Swift library simplifies sending IoMT (Internet of Medical Things) data to an IoMT FHIR Connector for Azure endpoint for persistance in a FHIR® server.

Installation

IomtFhirClient uses Swift Package Manager to manage dependencies. It is recommended that you use Xcode 11 or newer to add IomtFhirClient to your project.

  1. Using Xcode 11 go to File > Swift Packages > Add Package Dependency
  2. Paste the project URL: https://github.com/microsoft/iomt-fhir-client
  3. Click on next and select the project target

Basic Usage

Instantiate an IomtFhirClient

An IomtFhirClient can be instantiated using a connection string.

let iomtFhirClient = try IomtFhirClient.CreateFromConnectionString(connectionString: "YOUR_CONNECTION_STRING")

Create EventData

In the example below, a simple json payload is used to create an EventData object.

let json = "{\"eventPayload\":\"payload data\"}"

let payload = json.data(using: .utf8)

let eventData = EventData(data: payload)

Send the data to the Azure Event Hub

The IomtFhirClient has methods for sending single EventHub objects or collections.

do {
    try iomtFhirClient.send(eventData: eventData) { (success, error) in
        if (success && error == nil) {
            // The event was send successfully
        } else {
            // Handle any errors
        }
    }
} catch {
    // Handle any errors
}

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

There are many other ways to contribute to the IomtFhirClient Project.

See Contributing to IomtFhirClient for more information.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

FHIR® is the registered trademark of HL7 and is used with the permission of HL7. Use of the FHIR trademark does not constitute endorsement of this product by HL7.

iomt-fhir-client's People

Contributors

namalu 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.