Skip to main content

fhir_r5 0.15.0 copy "fhir_r5: ^0.15.0" to clipboard
fhir_r5: ^0.15.0 copied to clipboard

FHIR® R5 resources and data types for Dart and Flutter: strongly typed, immutable model classes with JSON, YAML, and XML serialization.

fhir_r5 #

0.15.0 #

  • Decimals keep their exact text in JSON. fromJsonString, toJsonString and prettyPrint keep 1.50 as 1.50 and 0.010 as 0.010; they used to give 1.5 and 0.01. https://hl7.org/fhir/R5/datatypes.html#decimal: "Implementations SHALL handle decimal values in ways that preserve and respect the precision of the value as represented for presentation purposes". Round-tripping every published example of this version changed about 200 decimals before and none after. toJson() still returns a Dart number, so code reading json['value'] as num is unchanged; only text keeps the exact digits. The codec (fhirJsonDecode, fhirJsonEncode, FhirJsonNumber) is fhir_node 0.6.2's, re-exported here.
  • Breaking: a choice element takes one value. Passing two values for one choice element (deceasedBoolean and deceasedDateTime, or deceasedX and a shortcut) throws an ArgumentError naming the element; it used to keep the first silently. https://hl7.org/fhir/R5/formats.html#choice: "the authoring system must create a single element with a datatype chosen from among the list of permitted datatypes". A constructor that takes choice shortcuts is therefore no longer const (a const constructor cannot throw): const Patient() becomes Patient().
  • getChildrenByName('id') on an element or primitive with no id returns an empty list; it threw.

0.14.2 #

  • README: install with dart pub add, which picks the current version. The README pinned ^0.6.x.
  • // ignore: comments for a lint the package no longer runs are removed. No code change.

0.14.1 #

  • A narrative is checked as HL7's validator checks it. FhirXhtml (Narrative.div) now applies txt-1 and txt-2 with the element and attribute lists of HL7's Java validator (hapifhir/org.hl7.fhir.core XhtmlValidator), and FhirXhtml.narrativeProblems(xhtml) says why a value is refused. Newly accepted: <sub>, <address>, <kbd>, <bdo>, <map>, <area>, and table and link attributes HL7 allows (headers, scope, rel, hreflang, xml:space, ...). Newly refused, with a FormatException at parse: an a href with a javascript: or vbscript: scheme; a root element other than <div>; a narrative with no text and no image (txt-2; a narrative with status empty still carries "No human-readable text provided" or the like); an attribute HL7 allows only on another element (href on a <span>, src on a <p>, border on a <td>); a DOCTYPE. All 4,672 narratives in the R5 examples parse.

0.14.0 #

  • No code changes; version aligned with the fhir_r5 0.14.0 family release

0.13.0 #

  • A bound code carries its CodeSystem. Every enum constant's system is the CodeSystem the code is defined in, with that CodeSystem's version; it used to be the ValueSet's url, which is not a code system. A value parsed from JSON, or built from a string, now carries the system, version and display of the constant it matches; it used to carry none, so fhir_r5_db indexed every code element (status, gender, ...) with no system and status=<system>|final, :in and :not-in could never match one (fhirant REVIEW-2026-09-17 Q8). withElement keeps them too. toJson is unchanged. Stores indexed before this need a reindex.
  • FhirDateTimeBase.valueDateTime is the instant the value denotes. A value with Z or an explicit offset is returned in UTC, as DateTime.parse does: 2013-01-14T10:00:00+02:00 is 08:00Z. It used to build a local DateTime from the wall-clock components and discard the offset, so that value read 10:00 in whatever zone the machine ran in, and was right only where the machine's zone happened to equal the offset. Every date, and a dateTime written without an offset, has no instant of its own and is still returned in the local zone, which is what R4B search §3.1.1.4.7 asks for ("Where both search parameters and resource element date times do not have time zones, the servers local time zone should be assumed"). Found through fhir_r4_db, which indexes every date parameter from this value.

0.12.0 #

  • No code changes; version aligned with the fhir_r4 0.12.0 family release

0.9.0 #

  • No code changes; version aligned with the fhir_r5 0.9.0 family release

0.8.0 #

  • No code changes; version aligned with the fhir_r5 0.8.0 family release

0.7.0 #

  • BREAKING: MedicationrequestStatus -> MedicationRequestStatus and MessageheaderResponseRequest -> MessageHeaderResponseRequest (with their ...Enum and ...CopyWithImpl companions) — these ValueSet-derived enum names came from miscased tokens in HL7's own spec data (GH fhir_r4#34). The old names remain available as deprecated typedef aliases and will be removed in a future release. Verified against the full spec input that these two were the only miscased generated names
  • The generator now restores canonical type-name casing for all ValueSet-derived enum names, so this class of bug cannot recur
  • README: fixed non-compiling examples found by the docs verification pass

0.6.1 #

  • Fix: fractional timezone offsets (+05:30 India, +05:45 Nepal, -03:30 Newfoundland, ...) were truncated to whole hours when rendering the value string (the object held the correct offset; serialization hardcoded ':00' minutes). Round-trips now preserve them; regression tests added
  • Tests are now machine-timezone-independent (verified under UTC, Eastern, +05:30 and +05:45)

0.6.0 #

  • Family release train: all fhir-fli packages released in lockstep at 0.6.0
  • BREAKING: FhirBase.equalsDeepWithNull and FhirBase.listEquals are now static (they are two-argument null-safe predicates and never used the receiver; matches the reference implementation's static Base.compareDeep). Call them as FhirBase.equalsDeepWithNull(a, b) / FhirBase.listEquals(l1, l2); instance-style calls no longer compile. Restores use outside FhirBase (GH fhir_r4#30)
  • FhirBase implements the FhirNode reflection contract (fhir_node ^0.6.0) — the seam the model-independent fhirpath and cql engines build on
  • Generated fhirTypeHierarchy table so subtype checks work without a populated canonical-resource cache
  • xml constraint widened to '>=6.6.1 <8.0.0'
  • README rewritten and verified against the API; analyzer clean under very_good_analysis

0.5.1 #

  • Improved documentation and README files

0.5.0 #

  • Unified versioning across all fhir_r5 packages
  • Updated dependencies

0.4.4 #

  • Fixed getChildrenByName null checks for polymorphic fields

0.4.3 #

  • Fixed issue about DateTimes not setting isUtc when timezone +00:00
  • Fixed issue about DateTime equalsDeep with different timezones Issue 26
  • Added more flexible fromJson to primitives. NOTE, the OUTPUT is still what is required by FHIR to make it compliant with servers. Refernce PR 22 by bartekwk2
  • Fixed copyWith generation error described in this PR 28 by bartekwk2
  • Added ability to define type of Polymorphics for most fields (but not for required ones)
  • Changed some of the equality functions, moved from Utils into FhirBase
  • Changed some of the quality functions IN FhirBase to non-static
  • Fixed addition and subtraction fo ExtendedDuration to FhirDateTimeBase
  • Fixed construction of String for FhirDateTimeBase where year is less than 4 digits
  • Fixed plus and subtract for FhirTime
  • Fixed deepEquals in Primitives

0.4.2 #

  • Fixed bug not allowing DateTime to be passed to FhirDate

0.4.1 #

  • added back getChildrenByType to PrimitiveType

0.4.0 #

  • Sigh, immediately decided to change some things
  • copyWith now accepts a null value to clear a field
  • removed clear, empty, setChildByName, typeByElement, createProperty

0.3.1 #

  • forgot to add example

0.3.0 #

0.3.0-2 #

  • split back up into smaller packages, that seems to be how most people use it

0.3.0-1 #

  • Lots and Lots of changes.
  • Once I get Mapping working properly, I'll create some actual documentation

0.2.0 #

  • Getting ready for FlutterCon!
  • Updated dependencies
  • Added documentation

0.1.0+2 #

  • Added ability to store versionIds as DataTimes instead of just integers (useful for syncing)
  • Added a "sync" box in the Hive db. When turned on, saves all resources when updated, to allow easily finding them for syncing.
  • Updated to work with updated primitives package (that has a lot more functionality with FhirBase)
  • Added a deprecated parser to fhirpath for traversing tests

0.1.0+1 #

  • Overhaul. The packages were getting too big, and most people don't use all of them at the same time. So now, one package, all the functionality.
  • Addressed this issue pointed out by fokusfpa - by just returning the OperationOutcome
  • All FHIR dependencies should now be within this package.
  • All dependencies updated except for collection, http_parser, and meta because there are some issues with the flutter version
0
likes
160
points
848
downloads

Documentation

API reference

Publisher

verified publisherfhirfli.dev

Weekly Downloads

FHIR® R5 resources and data types for Dart and Flutter: strongly typed, immutable model classes with JSON, YAML, and XML serialization.

Homepage
Repository (GitHub)
View/report issues

Topics

#fhir #hl7 #healthcare #interoperability #serialization

License

MIT (license)

Dependencies

collection, fhir_node, uuid, xml, yaml

More

Packages that depend on fhir_r5