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.
IomtFhirClient uses Swift Package Manager to manage dependencies. It is recommended that you use Xcode 11 or newer to add IomtFhirClient to your project.
- Using Xcode 11 go to File > Swift Packages > Add Package Dependency
- Paste the project URL: https://github.com/microsoft/iomt-fhir-client
- Click on next and select the project target
An IomtFhirClient can be instantiated using a connection string.
let iomtFhirClient = try IomtFhirClient.CreateFromConnectionString(connectionString: "YOUR_CONNECTION_STRING")
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)
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
}
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.
- Submit bugs and help us verify fixes as they are checked in.
- Review the source code changes.
- Contribute bug fixes.
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.