Swiftpack.co -  d4l-data4life/d4l-fhir-ios as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
d4l-data4life/d4l-fhir-ios
Fhir models for swift
.package(url: "https://github.com/d4l-data4life/d4l-fhir-ios.git", from: "0.21.1")

d4l-fhir-ios

Minimal FHIR standard models and data types for iOS

CocoaPods Compatible Swift Package Manager compatible License

Description

fastlane is used to manage fhir-parser and integrate generated models into Xcode project

fhir-parser is used to generate Swift models from JSON examples for latest FHIR standard

Swift-FHIR was used as inspiration for this project

Apple-FHIR R4 models were (tepmorarily) ported over because we needed a pod version of it

Required resources include:

  • Base classes for primitive data types
  • Rules and templates for mapping
  • Settings with custom profiles and build targets

Note: Check parser-resources for more info

Usage

Requirements

Installation

CocoaPods

To install with CocoaPods add the following lines (according to which model version you use) to the podfile.

source 'https://github.com/d4l-data4life/d4l-cocoapods-specs.git'

pod 'Data4LifeFHIR', '~> 0.21.1'
pod 'ModelsR4', '~> 0.21.1'

Note: For more info check README.

Swift Package Manager

To install with Swift Package Manager add this package as a dependency in Package.swift:

.package(url: "https://github.com/d4l-data4life/d4l-fhir-ios.git", .upToNextMinor(from: "0.21.1"))
.package(url: "https://github.com/d4l-data4life/d4l-utils-ios.git", .upToNextMinor(from: "0.6.0"))

Building

Install dependencies

bundler install

Generating models

Install Sourcery

brew install sourcery

Note: For other installation methods check README.

Static files

These directories are not generated and are not meant to be removed from the project. They include FHIR DateTime encoding/tests and helpers/tests for contained resources.

  • FhirStu3/Sources/Helpers
  • FhirStu3/Tests/Helpers
  • FhirStu3/Tests/PrimitiveTests
  • FhirR4

Generate stu3 models and embed into Xcode project

  1. Run fastlane to generate STU3 models, R4 helpers and R4 tests
fastlane generate_all

Note: It's possible to generated separately STU3 Models, R4 helpers or R4 tests, check Fastlane README for more information

Issues

FHIR Stu3 standard

  • String / Integer / Decimal / Bool / URL / Base64Binary should inherit Element
  • All properties dealing with binary data are represented as base64 String
  • R4 Models are currently copied and pasted from Apples framework because of incompatibilty with Cocoapods (a podspec cant distribute contained swift packages)
  • R4 Models are missing keypaths and NSCopying support yet

GitHub

link
Stars: 0
Last commit: 4 days ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

0.21.1
2 weeks ago

Pre-release

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API