fhir_r4 0.3.0-1 copy "fhir_r4: ^0.3.0-1" to clipboard
fhir_r4: ^0.3.0-1 copied to clipboard

FHIR library for supporing the R4B Version of FHIR for Dart & Flutter.

Fhir R4 #

style: very good analysis Powered by Mason License: MIT

A Very Good Project created by Very Good CLI.

Installation 💻 #

❗ In order to start using Fhir R4 you must have the Dart SDK installed on your machine.

Install via dart pub add:

dart pub add fhir_r4

fhir_r4 #

R4b Version of the FHIR Specification

Big Update, Breaking changes for 0.3.0-1 #

### Macros - So I'm going to start using Macros for this version. This requires a higher dart version sdk: ">=3.5.0-152 <4.0.0" No I'm not. They're not quite ready for production yet. But there are still some breaking changes.

  • No more freezed. I really liked freezed, but it doesn't play nicely with some other code generators.
  • Speaking of which, since I'm already generating most of the class, I went ahead and generated toJson/fromJson and ==, no external code generation packages (as always, please let me know about mistakes)
  • All of the serializable methods and copyWith should still work as before.
  • Many more enums were incorporated than previously. I think this makes it easier to use, but it does make it less flexible. If you have a field with a value that is not allowed by the current enum, please let me know and I'll look into it.
  • I've moved the Primitive back into this package
  • Newly included FhirString, for standardization and because it's helpful in some other packages like fhir-mapping. I'm going to try and include almost all of the usual string functions so you should be able to work with it almost like you would a normal String in dart.
  • Primitives are much stricter than previously. They will throw an error if you try and have a value that is improperly formatted.
  • I'm also integrating the Element associated with the Primitive into the Primitive itself (this is closer to the original FHIR and XML version)
  • You should still be able to work with the the same as previously, but you can also access the Element associated. This does mean there may be times where a Primitive's value is null but the Element is not
  • Enums are going to follow this same pattern. As an Enum is essentially an enumerated Code value in FHIR, they also need to be associated with an Element, so the same rules are going to apply.

Updated Package #

  • This was originally multiple different packages, and each package supported all FHIR versions. This became too big and broke pub.dev. I have therefore grouped them together by FHIR version instead of by functionality.

  • This library now contains

    • fhir
    • fhir_at_rest
    • fhir_auth
    • fhir_bulk
    • fhir_db
    • fhir_path
    • fhir_yaml
  • Follow the links for the individual README files.

Say Hello #

  • As all parts of this are new (FHIR, Flutter, using the two together), I'd love to hear from you if you're working in this space. Open to PR, suggestions or requests. You can email me at grey@fhirfli.dev. Or, feel free to join our Slack!.

A Dart/Flutter package for working with FHIR® resources. 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.


Continuous Integration 🤖 #

Fhir R4 comes with a built-in GitHub Actions workflow powered by Very Good Workflows but you can also add your preferred CI/CD solution.

Out of the box, on each pull request and push, the CI formats, lints, and tests the code. This ensures the code remains consistent and behaves correctly as you add functionality or make changes. The project uses Very Good Analysis for a strict set of analysis options used by our team. Code coverage is enforced using the Very Good Workflows.


Running Tests 🧪 #

To run all unit tests:

dart pub global activate coverage 1.2.0
dart test --coverage=coverage
dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info

To view the generated coverage report you can use lcov.

# Generate Coverage Report
genhtml coverage/lcov.info -o coverage/

# Open Coverage Report
open coverage/index.html
3
likes
0
points
379
downloads

Publisher

verified publisherfhirfli.dev

Weekly Downloads

FHIR library for supporing the R4B Version of FHIR for Dart & Flutter.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

archive, collection, crypto, hive_ce, http, mime, rxdart, ucum, universal_io, uuid, xml, yaml

More

Packages that depend on fhir_r4