A Dart/Flutter package for working with FHIR® resources

FHIR

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.

It contains packages for the 3 released FHIR versions:

As well as the R5 Preview #3:

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

Tilo

Has made a bunch of contributions to these packages so far

Has also created his own awesome Flutter package, faiadashu (pub.dev, github), so check it out!

How To Use

In order to use this package in your app, you must include the following in your pubspec.yaml file under dependencies:

dependencies:
  fhir: ^0.2.4

Or if you want to include the most recent unreleased version from Github

fhir:
  git:
    url: git://github.com/MayJuun/fhir/tree/dev/fhir

Then, in any file where you're going to be using it, simply import it like this:

import 'package:fhir/r4.dart';

Or, you may need to rename the package, for instance, there are some variables FHIR uses that overlap with dart:core, or if you're going to be using more than oen version of FHIR in the same file:

import 'package:fhir/r4.dart' as r4;
import 'package:fhir/stu3.dart' as stu3;

And then just remember to append r4 or stu3 to any variables you use from the library.

Currently this package is really just for serializing/deserializing FHIR data, and being able to create FHIR resources.

To do something like create a patient, you can do the following::

var newPatient = Patient(
  resourceType: 'Patient',
  name: [
    HumanName(family: 'LastName', given: ['FirstName'])
  ],
  birthDate: Date('2020-01-01'),
  gender: PatientGender.female,
);

If you're instead trying to get data from a server (currently I haven't implemented SMART on FHIR so it would need to be an open server, HAPI for instance - make sure you choose the right version you're interested in), a very simple example of querying and then printing the result:

Future main() async {
  var server = 'https://hapi.fhir.org/baseR4';
  var headers = {'Content-type': 'application/json'};
  var desiredResource = 'Patient';
  var response = await get('$server/$desiredResource', headers: headers);
  var searchSetBundle = Bundle.fromJson(json.decode(response.body));
  print(searchSetBundle.toJson());
}

All of the FHIR resources are immutable classes using the freezed package, which means you can take advantage of it's functionality for things like copying/updating:

  var changePatientName = newPatient.copyWith(name: [
    HumanName(family: 'NewLastName', given: ['SameFirstName'])
  ]);

Primitive Values

Primitive values are these, things like instant, string, integer, etc. Howevever, because FHIR has some definitions of how they define some of these values that differ from Dart, I've made all of them (except String) and primitiveObject. This has a couple of useful things (and one or two annoying ones). In order to make something like an integer, you have to write it like this: Integer(128) or Integer('128). Yes, a little annoying, but it prevents inappropriate formatting, especially for things like dates that are a lot trickier. You can, however, check equality without this. For instance, Integer(128) == 128 will evaluate to true.

As I was saying, dates are tricker. For Date or DateTime you're allowed to use values of 2020, 2020-06, or 2020-06-01 (written of course Date('2020-06-01')). For Instant and DateTime you're also allowed to specify hours, minutes, seconds, milliseconds. For Instant at least hour, minute and second is required. So, the way I've decided to deal with dates is to first turn them into Strings. I then see if they are a Date with the isDate function. If they are, I check if they're more or less than 10 characters. If they're less than 10 characters, I store however many characters they are, and return this number when I print it out. If they're more than 10 characters, I check if there's a space in the 10 position and replaces it with a "T" (because FHIR doesn't allow 2017-01-01 00:00:00.000Z but will allow 2017-01-01T00:00:00.000Z.) I then parse it to a DateTime and then I change it to UTC. This is also how I return the value. THIS IS IMPORTANT because it means that if you specify anything with an hour, minute, second or millisecond, whether or not you assign it a timezone, this package will still change it and output it in UTC. This is mostly because I think that makes it easier to do any calculations with, because all times are going to be in UTC. Then, all you have to do is change it to the local timezone when you display it (if you want to).

Thus
input: FhirDateTime('2015-02-07T13:28:17-05:00'), output: 2015-02-07T18:28:17.000Z
input: FhirDateTime('2015-02-07T13:28:17'), output: 2015-02-07T13:28:17.000 - you're technically supposed to have a time zone when you specify more than a simple date
input: FhirDateTime('2017-01-01T00:00:00.000Z'), output: 2017-01-01T00:00:00.000Z

UPDATE: Hooray for user input!. Working with primitives has been nagging at me for a while now, and this gave me the impetus to try and fix it. It MOSTLY shouldn't effect anyone's code. It's still going to serialize/deserialize in the same way. The difference is that now you can get the value from the field without having to fold it (I love Dartz, but I don't think I was using it the best way for these). Now, however, you can do this:

final obs = Observation(
      code: CodeableConcept(), effectiveDateTime: FhirDateTime('2020-01-01'));
print(obs.effectiveDateTime == DateTime(2020, 1, 1)); // true

Note that this only works in one direction because the classes override the == operator. This means that if you try

print(DateTime(2020, 1, 1) == obs.effectiveDateTime); // false

It will be false, because it will use the DateTime == instead.

Validation

  • For validation testing, I run all of the sample files from hl7 through a tester. There is an errors.txt file in the test folder where all of the errors are reported (the file name and then the specific field). Currently the only errors involve Codes and IDs. The Codes have to due with the fact that code is not supposed to have leading or trailing white space. The issues with the IDs are that IDs are not supposed to be more than 64 characters, and these are 65. However, if it turns out that no one wants to enforce these as strictly as I do, I may relax them. Also, for r5, there are some fields that I'm not sure if they're supposed to be lists or not, and there are a number of reference I'm not sure if I have the correct name (because the names differe on the website vs. the downloadable schema). I've kept whichever one seemed to be present in the examples.
  • For validating the toYaml() functions, I first read the map into a Resource, convert it into Yaml, convert it back into a Resource, and then use that in the validation function above.
  • There are two files that seem to have random nulls in the middle, I'm not sure why, they don't seem to serve any purpose, and they don't currently transfer into Yaml at this point.

First Package

This is the first time I've ever created a package, feedback and pull requests are welcome. I've also been started to implement type checking using Freezed. But if you run into any issues with this, either incorrect validation, or frustrating to work with returned failures, please let me know.

Code Generation

I think it's the new compiling. It's actually great though, json_serializable and freezed are used extensively throughout. In order to allow a field to contain any resource, it is passed to the resource class and is passed to a switch case statement (which feels a little clunky, but I haven't managed a better way yet). I've removed the resource.g.dart files for all versions. It didn't appear to ever be used, but did lose me points on pub.dev. But if it changes your functionality, please let me know. It will state that there's an error when you run code generation however.

[WARNING] json_serializable:json_serializable on lib/dstu2/basic_types/resource.dart:
Missing "part 'resource.g.dart';".

Formatting Notes

  • Class names: upper camel case.
  • Variables: lower camel case.
  • File names: snake case.
  • FHIR nested classes (including enums) listed under the primary class
  • There are a number of FHIR fields that are reserved words in Dart. For these, I have added a '_' to the end of the field. (note that this does not change the json format, as when that happens the @JsonKey has been added to the field like so:
@JsonKey(name: 'extension') List<FhirExtension> extension_,

A couple special notes about DSTU2

  • Because Dstu2 is not formatted as well as the newer versions, a number of the names end up being extremely long. What I have decided to do is the following:
    • If the field/class id in the schema is a single word("id": "integer" or "id": "ValueSet"), that word is used as the field or class name.
    • If the id is more than a single word AND it is a primitive type ("id": "ValueSet.expansion.contains.display" which is a string), the last word is used as the type, in this case the field would be: String display
    • If the id is 2 words and is NOT a primitive type ("id": "ValueSet.expansion"), the type is the two words combined with upper camel case, and the field is the last word: ValueSetExpansion expansion
    • if the id is more than 2 words and NOT a primitive type ("id": "TestScript.setup.action.operation.requestHeader"), the type is the first, next to last and last word combined with upper camel case, and the field is the last word: TestScriptOperationRequestHeader requestHeader
  • Many of the element fields I have included because they are included as part of the test resources. I could not find a full list online, so there may still be some element fields that I have missed.

FHIR datatypes (these are R4 (which is what everyone should be using, but since EHR vendors are doing everything they can to not share data, I am also working on stu3 and dstu2 as well)

The full resource lists I've decided it's not worth upkeeping since HL7 does that already.

Resource Index Dstu2

Resource Index Stu3

Resource Index R4

Resource Index R5 Preview #3

FHIR® is a registered trademark of Health Level Seven International (HL7) and its use does not constitute an endorsement of products by HL7®

Use this package as a library

Depend on it

Run this command:

With Dart:

 $ dart pub add fhir

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):


dependencies:
  fhir: ^0.4.7

Alternatively, your editor might support dart pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:fhir/dstu2.dart';
import 'package:fhir/dstu2/basic_types/basic_types.dart';
import 'package:fhir/dstu2/basic_types/element.dart';
import 'package:fhir/dstu2/basic_types/element.freezed.dart';
import 'package:fhir/dstu2/basic_types/element.g.dart';
import 'package:fhir/dstu2/basic_types/fhir_extension.dart';
import 'package:fhir/dstu2/basic_types/fhir_extension.freezed.dart';
import 'package:fhir/dstu2/basic_types/fhir_extension.g.dart';
import 'package:fhir/dstu2/dstu2.dart';
import 'package:fhir/dstu2/general_types/general_types.dart';
import 'package:fhir/dstu2/general_types/general_types.enums.dart';
import 'package:fhir/dstu2/general_types/general_types.freezed.dart';
import 'package:fhir/dstu2/general_types/general_types.g.dart';
import 'package:fhir/dstu2/resource/resource.dart';
import 'package:fhir/dstu2/resource/resource.g.dart';
import 'package:fhir/dstu2/resource/resource_from_json.dart';
import 'package:fhir/dstu2/resource/resource_new_version.dart';
import 'package:fhir/dstu2/resource/resource_type_enum.dart';
import 'package:fhir/dstu2/resource/resource_utils.dart';
import 'package:fhir/dstu2/resource_types/clinical_types/care_provision/care_provision.dart';
import 'package:fhir/dstu2/resource_types/clinical_types/care_provision/care_provision.enums.dart';
import 'package:fhir/dstu2/resource_types/clinical_types/care_provision/care_provision.freezed.dart';
import 'package:fhir/dstu2/resource_types/clinical_types/care_provision/care_provision.g.dart';
import 'package:fhir/dstu2/resource_types/clinical_types/clinical_types.dart';
import 'package:fhir/dstu2/resource_types/clinical_types/diagnostics/diagnostics.dart';
import 'package:fhir/dstu2/resource_types/clinical_types/diagnostics/diagnostics.enums.dart';
import 'package:fhir/dstu2/resource_types/clinical_types/diagnostics/diagnostics.freezed.dart';
import 'package:fhir/dstu2/resource_types/clinical_types/diagnostics/diagnostics.g.dart';
import 'package:fhir/dstu2/resource_types/clinical_types/general/general.dart';
import 'package:fhir/dstu2/resource_types/clinical_types/general/general.enums.dart';
import 'package:fhir/dstu2/resource_types/clinical_types/general/general.freezed.dart';
import 'package:fhir/dstu2/resource_types/clinical_types/general/general.g.dart';
import 'package:fhir/dstu2/resource_types/clinical_types/medication_and_immunization/medication_and_immunization.dart';
import 'package:fhir/dstu2/resource_types/clinical_types/medication_and_immunization/medication_and_immunization.enums.dart';
import 'package:fhir/dstu2/resource_types/clinical_types/medication_and_immunization/medication_and_immunization.freezed.dart';
import 'package:fhir/dstu2/resource_types/clinical_types/medication_and_immunization/medication_and_immunization.g.dart';
import 'package:fhir/dstu2/resource_types/conformance_types/conformance_types.dart';
import 'package:fhir/dstu2/resource_types/conformance_types/content/content.dart';
import 'package:fhir/dstu2/resource_types/conformance_types/content/content.enums.dart';
import 'package:fhir/dstu2/resource_types/conformance_types/content/content.freezed.dart';
import 'package:fhir/dstu2/resource_types/conformance_types/content/content.g.dart';
import 'package:fhir/dstu2/resource_types/conformance_types/misc/misc.dart';
import 'package:fhir/dstu2/resource_types/conformance_types/misc/misc.enums.dart';
import 'package:fhir/dstu2/resource_types/conformance_types/misc/misc.freezed.dart';
import 'package:fhir/dstu2/resource_types/conformance_types/misc/misc.g.dart';
import 'package:fhir/dstu2/resource_types/conformance_types/operations_control/operations_control.dart';
import 'package:fhir/dstu2/resource_types/conformance_types/operations_control/operations_control.enums.dart';
import 'package:fhir/dstu2/resource_types/conformance_types/operations_control/operations_control.freezed.dart';
import 'package:fhir/dstu2/resource_types/conformance_types/operations_control/operations_control.g.dart';
import 'package:fhir/dstu2/resource_types/conformance_types/terminology/terminology.dart';
import 'package:fhir/dstu2/resource_types/conformance_types/terminology/terminology.enums.dart';
import 'package:fhir/dstu2/resource_types/conformance_types/terminology/terminology.freezed.dart';
import 'package:fhir/dstu2/resource_types/conformance_types/terminology/terminology.g.dart';
import 'package:fhir/dstu2/resource_types/financial_types/billing/billing.dart';
import 'package:fhir/dstu2/resource_types/financial_types/billing/billing.enums.dart';
import 'package:fhir/dstu2/resource_types/financial_types/billing/billing.freezed.dart';
import 'package:fhir/dstu2/resource_types/financial_types/billing/billing.g.dart';
import 'package:fhir/dstu2/resource_types/financial_types/financial_types.dart';
import 'package:fhir/dstu2/resource_types/financial_types/other/other.dart';
import 'package:fhir/dstu2/resource_types/financial_types/other/other.enums.dart';
import 'package:fhir/dstu2/resource_types/financial_types/other/other.freezed.dart';
import 'package:fhir/dstu2/resource_types/financial_types/other/other.g.dart';
import 'package:fhir/dstu2/resource_types/financial_types/payment/payment.dart';
import 'package:fhir/dstu2/resource_types/financial_types/payment/payment.enums.dart';
import 'package:fhir/dstu2/resource_types/financial_types/payment/payment.freezed.dart';
import 'package:fhir/dstu2/resource_types/financial_types/payment/payment.g.dart';
import 'package:fhir/dstu2/resource_types/financial_types/support/support.dart';
import 'package:fhir/dstu2/resource_types/financial_types/support/support.enums.dart';
import 'package:fhir/dstu2/resource_types/financial_types/support/support.freezed.dart';
import 'package:fhir/dstu2/resource_types/financial_types/support/support.g.dart';
import 'package:fhir/dstu2/resource_types/identification_types/devices/devices.dart';
import 'package:fhir/dstu2/resource_types/identification_types/devices/devices.enums.dart';
import 'package:fhir/dstu2/resource_types/identification_types/devices/devices.freezed.dart';
import 'package:fhir/dstu2/resource_types/identification_types/devices/devices.g.dart';
import 'package:fhir/dstu2/resource_types/identification_types/entities/entities.dart';
import 'package:fhir/dstu2/resource_types/identification_types/entities/entities.enums.dart';
import 'package:fhir/dstu2/resource_types/identification_types/entities/entities.freezed.dart';
import 'package:fhir/dstu2/resource_types/identification_types/entities/entities.g.dart';
import 'package:fhir/dstu2/resource_types/identification_types/groups/groups.dart';
import 'package:fhir/dstu2/resource_types/identification_types/groups/groups.enums.dart';
import 'package:fhir/dstu2/resource_types/identification_types/groups/groups.freezed.dart';
import 'package:fhir/dstu2/resource_types/identification_types/groups/groups.g.dart';
import 'package:fhir/dstu2/resource_types/identification_types/identification_types.dart';
import 'package:fhir/dstu2/resource_types/identification_types/individuals/individuals.dart';
import 'package:fhir/dstu2/resource_types/identification_types/individuals/individuals.enums.dart';
import 'package:fhir/dstu2/resource_types/identification_types/individuals/individuals.freezed.dart';
import 'package:fhir/dstu2/resource_types/identification_types/individuals/individuals.g.dart';
import 'package:fhir/dstu2/resource_types/infrastructure_types/documents_and_lists/documents_and_lists.dart';
import 'package:fhir/dstu2/resource_types/infrastructure_types/documents_and_lists/documents_and_lists.enums.dart';
import 'package:fhir/dstu2/resource_types/infrastructure_types/documents_and_lists/documents_and_lists.freezed.dart';
import 'package:fhir/dstu2/resource_types/infrastructure_types/documents_and_lists/documents_and_lists.g.dart';
import 'package:fhir/dstu2/resource_types/infrastructure_types/exchange/exchange.dart';
import 'package:fhir/dstu2/resource_types/infrastructure_types/exchange/exchange.enums.dart';
import 'package:fhir/dstu2/resource_types/infrastructure_types/exchange/exchange.freezed.dart';
import 'package:fhir/dstu2/resource_types/infrastructure_types/exchange/exchange.g.dart';
import 'package:fhir/dstu2/resource_types/infrastructure_types/information_tracking/information_tracking.dart';
import 'package:fhir/dstu2/resource_types/infrastructure_types/information_tracking/information_tracking.enums.dart';
import 'package:fhir/dstu2/resource_types/infrastructure_types/information_tracking/information_tracking.freezed.dart';
import 'package:fhir/dstu2/resource_types/infrastructure_types/information_tracking/information_tracking.g.dart';
import 'package:fhir/dstu2/resource_types/infrastructure_types/infrastructure_types.dart';
import 'package:fhir/dstu2/resource_types/infrastructure_types/structure/structure.dart';
import 'package:fhir/dstu2/resource_types/infrastructure_types/structure/structure.enums.dart';
import 'package:fhir/dstu2/resource_types/infrastructure_types/structure/structure.freezed.dart';
import 'package:fhir/dstu2/resource_types/infrastructure_types/structure/structure.g.dart';
import 'package:fhir/dstu2/resource_types/resource_types.dart';
import 'package:fhir/dstu2/resource_types/workflow_types/patient_management/patient_management.dart';
import 'package:fhir/dstu2/resource_types/workflow_types/patient_management/patient_management.enums.dart';
import 'package:fhir/dstu2/resource_types/workflow_types/patient_management/patient_management.freezed.dart';
import 'package:fhir/dstu2/resource_types/workflow_types/patient_management/patient_management.g.dart';
import 'package:fhir/dstu2/resource_types/workflow_types/scheduling/scheduling.dart';
import 'package:fhir/dstu2/resource_types/workflow_types/scheduling/scheduling.enums.dart';
import 'package:fhir/dstu2/resource_types/workflow_types/scheduling/scheduling.freezed.dart';
import 'package:fhir/dstu2/resource_types/workflow_types/scheduling/scheduling.g.dart';
import 'package:fhir/dstu2/resource_types/workflow_types/workflow1/workflow1.dart';
import 'package:fhir/dstu2/resource_types/workflow_types/workflow1/workflow1.enums.dart';
import 'package:fhir/dstu2/resource_types/workflow_types/workflow1/workflow1.freezed.dart';
import 'package:fhir/dstu2/resource_types/workflow_types/workflow1/workflow1.g.dart';
import 'package:fhir/dstu2/resource_types/workflow_types/workflow2/workflow2.dart';
import 'package:fhir/dstu2/resource_types/workflow_types/workflow2/workflow2.enums.dart';
import 'package:fhir/dstu2/resource_types/workflow_types/workflow2/workflow2.freezed.dart';
import 'package:fhir/dstu2/resource_types/workflow_types/workflow2/workflow2.g.dart';
import 'package:fhir/dstu2/resource_types/workflow_types/workflow_types.dart';
import 'package:fhir/dstu2/special_types/special_types.dart';
import 'package:fhir/dstu2/special_types/special_types.enums.dart';
import 'package:fhir/dstu2/special_types/special_types.freezed.dart';
import 'package:fhir/dstu2/special_types/special_types.g.dart';
import 'package:fhir/primitive_types/base64binary.dart';
import 'package:fhir/primitive_types/boolean.dart';
import 'package:fhir/primitive_types/canonical.dart';
import 'package:fhir/primitive_types/code.dart';
import 'package:fhir/primitive_types/date.dart';
import 'package:fhir/primitive_types/decimal.dart';
import 'package:fhir/primitive_types/fhir_date_time.dart';
import 'package:fhir/primitive_types/fhir_uri.dart';
import 'package:fhir/primitive_types/fhir_url.dart';
import 'package:fhir/primitive_types/id.dart';
import 'package:fhir/primitive_types/instant.dart';
import 'package:fhir/primitive_types/integer.dart';
import 'package:fhir/primitive_types/integer64.dart';
import 'package:fhir/primitive_types/markdown.dart';
import 'package:fhir/primitive_types/oid.dart';
import 'package:fhir/primitive_types/positive_int.dart';
import 'package:fhir/primitive_types/primitive_types.dart';
import 'package:fhir/primitive_types/time.dart';
import 'package:fhir/primitive_types/unsigned_int.dart';
import 'package:fhir/primitive_types/uuid.dart';
import 'package:fhir/r4.dart';
import 'package:fhir/r4/basic_types/basic_types.dart';
import 'package:fhir/r4/basic_types/element.dart';
import 'package:fhir/r4/basic_types/element.freezed.dart';
import 'package:fhir/r4/basic_types/element.g.dart';
import 'package:fhir/r4/basic_types/fhir_extension.dart';
import 'package:fhir/r4/basic_types/fhir_extension.freezed.dart';
import 'package:fhir/r4/basic_types/fhir_extension.g.dart';
import 'package:fhir/r4/draft_types/draft_types.dart';
import 'package:fhir/r4/draft_types/draft_types.freezed.dart';
import 'package:fhir/r4/draft_types/draft_types.g.dart';
import 'package:fhir/r4/general_types/general_types.dart';
import 'package:fhir/r4/general_types/general_types.enums.dart';
import 'package:fhir/r4/general_types/general_types.freezed.dart';
import 'package:fhir/r4/general_types/general_types.g.dart';
import 'package:fhir/r4/metadata_types/metadata_types.dart';
import 'package:fhir/r4/metadata_types/metadata_types.enums.dart';
import 'package:fhir/r4/metadata_types/metadata_types.freezed.dart';
import 'package:fhir/r4/metadata_types/metadata_types.g.dart';
import 'package:fhir/r4/r4.dart';
import 'package:fhir/r4/resource/resource.dart';
import 'package:fhir/r4/resource/resource.g.dart';
import 'package:fhir/r4/resource/resource_from_json.dart';
import 'package:fhir/r4/resource/resource_new_version.dart';
import 'package:fhir/r4/resource/resource_types_enum.dart';
import 'package:fhir/r4/resource/resource_utils.dart';
import 'package:fhir/r4/resource_types/base/base.dart';
import 'package:fhir/r4/resource_types/base/entities1/entities1.dart';
import 'package:fhir/r4/resource_types/base/entities1/entities1.enums.dart';
import 'package:fhir/r4/resource_types/base/entities1/entities1.freezed.dart';
import 'package:fhir/r4/resource_types/base/entities1/entities1.g.dart';
import 'package:fhir/r4/resource_types/base/entities2/entities2.dart';
import 'package:fhir/r4/resource_types/base/entities2/entities2.enums.dart';
import 'package:fhir/r4/resource_types/base/entities2/entities2.freezed.dart';
import 'package:fhir/r4/resource_types/base/entities2/entities2.g.dart';
import 'package:fhir/r4/resource_types/base/individuals/individuals.dart';
import 'package:fhir/r4/resource_types/base/individuals/individuals.enums.dart';
import 'package:fhir/r4/resource_types/base/individuals/individuals.freezed.dart';
import 'package:fhir/r4/resource_types/base/individuals/individuals.g.dart';
import 'package:fhir/r4/resource_types/base/management/management.dart';
import 'package:fhir/r4/resource_types/base/management/management.enums.dart';
import 'package:fhir/r4/resource_types/base/management/management.freezed.dart';
import 'package:fhir/r4/resource_types/base/management/management.g.dart';
import 'package:fhir/r4/resource_types/base/workflow/workflow.dart';
import 'package:fhir/r4/resource_types/base/workflow/workflow.enums.dart';
import 'package:fhir/r4/resource_types/base/workflow/workflow.freezed.dart';
import 'package:fhir/r4/resource_types/base/workflow/workflow.g.dart';
import 'package:fhir/r4/resource_types/clinical/care_provision/care_provision.dart';
import 'package:fhir/r4/resource_types/clinical/care_provision/care_provision.enums.dart';
import 'package:fhir/r4/resource_types/clinical/care_provision/care_provision.freezed.dart';
import 'package:fhir/r4/resource_types/clinical/care_provision/care_provision.g.dart';
import 'package:fhir/r4/resource_types/clinical/clinical.dart';
import 'package:fhir/r4/resource_types/clinical/diagnostics/diagnostics.dart';
import 'package:fhir/r4/resource_types/clinical/diagnostics/diagnostics.enums.dart';
import 'package:fhir/r4/resource_types/clinical/diagnostics/diagnostics.freezed.dart';
import 'package:fhir/r4/resource_types/clinical/diagnostics/diagnostics.g.dart';
import 'package:fhir/r4/resource_types/clinical/medications/medications.dart';
import 'package:fhir/r4/resource_types/clinical/medications/medications.freezed.dart';
import 'package:fhir/r4/resource_types/clinical/medications/medications.g.dart';
import 'package:fhir/r4/resource_types/clinical/request_and_response/request_and_response.dart';
import 'package:fhir/r4/resource_types/clinical/request_and_response/request_and_response.enums.dart';
import 'package:fhir/r4/resource_types/clinical/request_and_response/request_and_response.freezed.dart';
import 'package:fhir/r4/resource_types/clinical/request_and_response/request_and_response.g.dart';
import 'package:fhir/r4/resource_types/clinical/summary/summary.dart';
import 'package:fhir/r4/resource_types/clinical/summary/summary.enums.dart';
import 'package:fhir/r4/resource_types/clinical/summary/summary.freezed.dart';
import 'package:fhir/r4/resource_types/clinical/summary/summary.g.dart';
import 'package:fhir/r4/resource_types/financial/billing/billing.dart';
import 'package:fhir/r4/resource_types/financial/billing/billing.enums.dart';
import 'package:fhir/r4/resource_types/financial/billing/billing.freezed.dart';
import 'package:fhir/r4/resource_types/financial/billing/billing.g.dart';
import 'package:fhir/r4/resource_types/financial/financial.dart';
import 'package:fhir/r4/resource_types/financial/general/general.dart';
import 'package:fhir/r4/resource_types/financial/general/general.enums.dart';
import 'package:fhir/r4/resource_types/financial/general/general.freezed.dart';
import 'package:fhir/r4/resource_types/financial/general/general.g.dart';
import 'package:fhir/r4/resource_types/financial/payment/payment.dart';
import 'package:fhir/r4/resource_types/financial/payment/payment.enums.dart';
import 'package:fhir/r4/resource_types/financial/payment/payment.freezed.dart';
import 'package:fhir/r4/resource_types/financial/payment/payment.g.dart';
import 'package:fhir/r4/resource_types/financial/support/support.dart';
import 'package:fhir/r4/resource_types/financial/support/support.enums.dart';
import 'package:fhir/r4/resource_types/financial/support/support.freezed.dart';
import 'package:fhir/r4/resource_types/financial/support/support.g.dart';
import 'package:fhir/r4/resource_types/foundation/conformance/conformance.dart';
import 'package:fhir/r4/resource_types/foundation/conformance/conformance.enums.dart';
import 'package:fhir/r4/resource_types/foundation/conformance/conformance.freezed.dart';
import 'package:fhir/r4/resource_types/foundation/conformance/conformance.g.dart';
import 'package:fhir/r4/resource_types/foundation/documents/documents.dart';
import 'package:fhir/r4/resource_types/foundation/documents/documents.enums.dart';
import 'package:fhir/r4/resource_types/foundation/documents/documents.freezed.dart';
import 'package:fhir/r4/resource_types/foundation/documents/documents.g.dart';
import 'package:fhir/r4/resource_types/foundation/foundation.dart';
import 'package:fhir/r4/resource_types/foundation/other/other.dart';
import 'package:fhir/r4/resource_types/foundation/other/other.enums.dart';
import 'package:fhir/r4/resource_types/foundation/other/other.freezed.dart';
import 'package:fhir/r4/resource_types/foundation/other/other.g.dart';
import 'package:fhir/r4/resource_types/foundation/security/security.dart';
import 'package:fhir/r4/resource_types/foundation/security/security.enums.dart';
import 'package:fhir/r4/resource_types/foundation/security/security.freezed.dart';
import 'package:fhir/r4/resource_types/foundation/security/security.g.dart';
import 'package:fhir/r4/resource_types/foundation/terminology/terminology.dart';
import 'package:fhir/r4/resource_types/foundation/terminology/terminology.enums.dart';
import 'package:fhir/r4/resource_types/foundation/terminology/terminology.freezed.dart';
import 'package:fhir/r4/resource_types/foundation/terminology/terminology.g.dart';
import 'package:fhir/r4/resource_types/resource_types.dart';
import 'package:fhir/r4/resource_types/specialized/definitional_artifacts/definitional_artifacts.dart';
import 'package:fhir/r4/resource_types/specialized/definitional_artifacts/definitional_artifacts.enums.dart';
import 'package:fhir/r4/resource_types/specialized/definitional_artifacts/definitional_artifacts.freezed.dart';
import 'package:fhir/r4/resource_types/specialized/definitional_artifacts/definitional_artifacts.g.dart';
import 'package:fhir/r4/resource_types/specialized/evidence_based_medicine/evidence_based_medicine.dart';
import 'package:fhir/r4/resource_types/specialized/evidence_based_medicine/evidence_based_medicine.enums.dart';
import 'package:fhir/r4/resource_types/specialized/evidence_based_medicine/evidence_based_medicine.freezed.dart';
import 'package:fhir/r4/resource_types/specialized/evidence_based_medicine/evidence_based_medicine.g.dart';
import 'package:fhir/r4/resource_types/specialized/medication_definition/medication_definition.dart';
import 'package:fhir/r4/resource_types/specialized/medication_definition/medication_definition.freezed.dart';
import 'package:fhir/r4/resource_types/specialized/medication_definition/medication_definition.g.dart';
import 'package:fhir/r4/resource_types/specialized/public_health_and_research/public_health_and_research.dart';
import 'package:fhir/r4/resource_types/specialized/public_health_and_research/public_health_and_research.enums.dart';
import 'package:fhir/r4/resource_types/specialized/public_health_and_research/public_health_and_research.freezed.dart';
import 'package:fhir/r4/resource_types/specialized/public_health_and_research/public_health_and_research.g.dart';
import 'package:fhir/r4/resource_types/specialized/quality_reporting_and_testing/quality_reporting_and_testing.dart';
import 'package:fhir/r4/resource_types/specialized/quality_reporting_and_testing/quality_reporting_and_testing.enums.dart';
import 'package:fhir/r4/resource_types/specialized/quality_reporting_and_testing/quality_reporting_and_testing.freezed.dart';
import 'package:fhir/r4/resource_types/specialized/quality_reporting_and_testing/quality_reporting_and_testing.g.dart';
import 'package:fhir/r4/resource_types/specialized/specialized.dart';
import 'package:fhir/r4/special_types/special_types.dart';
import 'package:fhir/r4/special_types/special_types.enums.dart';
import 'package:fhir/r4/special_types/special_types.freezed.dart';
import 'package:fhir/r4/special_types/special_types.g.dart';
import 'package:fhir/r5.dart';
import 'package:fhir/r5/basic_types/basic_types.dart';
import 'package:fhir/r5/basic_types/element.dart';
import 'package:fhir/r5/basic_types/element.freezed.dart';
import 'package:fhir/r5/basic_types/element.g.dart';
import 'package:fhir/r5/basic_types/fhir_extension.dart';
import 'package:fhir/r5/basic_types/fhir_extension.freezed.dart';
import 'package:fhir/r5/basic_types/fhir_extension.g.dart';
import 'package:fhir/r5/draft_types/draft_types.dart';
import 'package:fhir/r5/draft_types/draft_types.enums.dart';
import 'package:fhir/r5/draft_types/draft_types.freezed.dart';
import 'package:fhir/r5/draft_types/draft_types.g.dart';
import 'package:fhir/r5/general_types/general_types.dart';
import 'package:fhir/r5/general_types/general_types.enums.dart';
import 'package:fhir/r5/general_types/general_types.freezed.dart';
import 'package:fhir/r5/general_types/general_types.g.dart';
import 'package:fhir/r5/metadata_types/metadata_types.dart';
import 'package:fhir/r5/metadata_types/metadata_types.enums.dart';
import 'package:fhir/r5/metadata_types/metadata_types.freezed.dart';
import 'package:fhir/r5/metadata_types/metadata_types.g.dart';
import 'package:fhir/r5/r5.dart';
import 'package:fhir/r5/resource/resource.dart';
import 'package:fhir/r5/resource/resource.g.dart';
import 'package:fhir/r5/resource/resource_from_json.dart';
import 'package:fhir/r5/resource/resource_new_version.dart';
import 'package:fhir/r5/resource/resource_types_enum.dart';
import 'package:fhir/r5/resource/resource_utils.dart';
import 'package:fhir/r5/resource_types/base/base.dart';
import 'package:fhir/r5/resource_types/base/entities1/entities1.dart';
import 'package:fhir/r5/resource_types/base/entities1/entities1.enums.dart';
import 'package:fhir/r5/resource_types/base/entities1/entities1.freezed.dart';
import 'package:fhir/r5/resource_types/base/entities1/entities1.g.dart';
import 'package:fhir/r5/resource_types/base/entities2/entities2.dart';
import 'package:fhir/r5/resource_types/base/entities2/entities2.enums.dart';
import 'package:fhir/r5/resource_types/base/entities2/entities2.freezed.dart';
import 'package:fhir/r5/resource_types/base/entities2/entities2.g.dart';
import 'package:fhir/r5/resource_types/base/individuals/individuals.dart';
import 'package:fhir/r5/resource_types/base/individuals/individuals.enums.dart';
import 'package:fhir/r5/resource_types/base/individuals/individuals.freezed.dart';
import 'package:fhir/r5/resource_types/base/individuals/individuals.g.dart';
import 'package:fhir/r5/resource_types/base/management/management.dart';
import 'package:fhir/r5/resource_types/base/management/management.enums.dart';
import 'package:fhir/r5/resource_types/base/management/management.freezed.dart';
import 'package:fhir/r5/resource_types/base/management/management.g.dart';
import 'package:fhir/r5/resource_types/base/workflow/workflow.dart';
import 'package:fhir/r5/resource_types/base/workflow/workflow.enums.dart';
import 'package:fhir/r5/resource_types/base/workflow/workflow.freezed.dart';
import 'package:fhir/r5/resource_types/base/workflow/workflow.g.dart';
import 'package:fhir/r5/resource_types/clinical/care_provision/care_provision.dart';
import 'package:fhir/r5/resource_types/clinical/care_provision/care_provision.enums.dart';
import 'package:fhir/r5/resource_types/clinical/care_provision/care_provision.freezed.dart';
import 'package:fhir/r5/resource_types/clinical/care_provision/care_provision.g.dart';
import 'package:fhir/r5/resource_types/clinical/clinical.dart';
import 'package:fhir/r5/resource_types/clinical/diagnostics/diagnostics.dart';
import 'package:fhir/r5/resource_types/clinical/diagnostics/diagnostics.enums.dart';
import 'package:fhir/r5/resource_types/clinical/diagnostics/diagnostics.freezed.dart';
import 'package:fhir/r5/resource_types/clinical/diagnostics/diagnostics.g.dart';
import 'package:fhir/r5/resource_types/clinical/medications/medications.dart';
import 'package:fhir/r5/resource_types/clinical/medications/medications.freezed.dart';
import 'package:fhir/r5/resource_types/clinical/medications/medications.g.dart';
import 'package:fhir/r5/resource_types/clinical/request_and_response/request_and_response.dart';
import 'package:fhir/r5/resource_types/clinical/request_and_response/request_and_response.enums.dart';
import 'package:fhir/r5/resource_types/clinical/request_and_response/request_and_response.freezed.dart';
import 'package:fhir/r5/resource_types/clinical/request_and_response/request_and_response.g.dart';
import 'package:fhir/r5/resource_types/clinical/summary/summary.dart';
import 'package:fhir/r5/resource_types/clinical/summary/summary.enums.dart';
import 'package:fhir/r5/resource_types/clinical/summary/summary.freezed.dart';
import 'package:fhir/r5/resource_types/clinical/summary/summary.g.dart';
import 'package:fhir/r5/resource_types/financial/billing/billing.dart';
import 'package:fhir/r5/resource_types/financial/billing/billing.enums.dart';
import 'package:fhir/r5/resource_types/financial/billing/billing.freezed.dart';
import 'package:fhir/r5/resource_types/financial/billing/billing.g.dart';
import 'package:fhir/r5/resource_types/financial/financial.dart';
import 'package:fhir/r5/resource_types/financial/general/general.dart';
import 'package:fhir/r5/resource_types/financial/general/general.enums.dart';
import 'package:fhir/r5/resource_types/financial/general/general.freezed.dart';
import 'package:fhir/r5/resource_types/financial/general/general.g.dart';
import 'package:fhir/r5/resource_types/financial/payment/payment.dart';
import 'package:fhir/r5/resource_types/financial/payment/payment.enums.dart';
import 'package:fhir/r5/resource_types/financial/payment/payment.freezed.dart';
import 'package:fhir/r5/resource_types/financial/payment/payment.g.dart';
import 'package:fhir/r5/resource_types/financial/support/support.dart';
import 'package:fhir/r5/resource_types/financial/support/support.enums.dart';
import 'package:fhir/r5/resource_types/financial/support/support.freezed.dart';
import 'package:fhir/r5/resource_types/financial/support/support.g.dart';
import 'package:fhir/r5/resource_types/foundation/conformance/conformance.dart';
import 'package:fhir/r5/resource_types/foundation/conformance/conformance.enums.dart';
import 'package:fhir/r5/resource_types/foundation/conformance/conformance.freezed.dart';
import 'package:fhir/r5/resource_types/foundation/conformance/conformance.g.dart';
import 'package:fhir/r5/resource_types/foundation/documents/documents.dart';
import 'package:fhir/r5/resource_types/foundation/documents/documents.enums.dart';
import 'package:fhir/r5/resource_types/foundation/documents/documents.freezed.dart';
import 'package:fhir/r5/resource_types/foundation/documents/documents.g.dart';
import 'package:fhir/r5/resource_types/foundation/foundation.dart';
import 'package:fhir/r5/resource_types/foundation/other/other.dart';
import 'package:fhir/r5/resource_types/foundation/other/other.enums.dart';
import 'package:fhir/r5/resource_types/foundation/other/other.freezed.dart';
import 'package:fhir/r5/resource_types/foundation/other/other.g.dart';
import 'package:fhir/r5/resource_types/foundation/security/security.dart';
import 'package:fhir/r5/resource_types/foundation/security/security.enums.dart';
import 'package:fhir/r5/resource_types/foundation/security/security.freezed.dart';
import 'package:fhir/r5/resource_types/foundation/security/security.g.dart';
import 'package:fhir/r5/resource_types/foundation/terminology/terminology.dart';
import 'package:fhir/r5/resource_types/foundation/terminology/terminology.enums.dart';
import 'package:fhir/r5/resource_types/foundation/terminology/terminology.freezed.dart';
import 'package:fhir/r5/resource_types/foundation/terminology/terminology.g.dart';
import 'package:fhir/r5/resource_types/resource_types.dart';
import 'package:fhir/r5/resource_types/specialized/definitional_artifacts/definitional_artifacts.dart';
import 'package:fhir/r5/resource_types/specialized/definitional_artifacts/definitional_artifacts.enums.dart';
import 'package:fhir/r5/resource_types/specialized/definitional_artifacts/definitional_artifacts.freezed.dart';
import 'package:fhir/r5/resource_types/specialized/definitional_artifacts/definitional_artifacts.g.dart';
import 'package:fhir/r5/resource_types/specialized/evidence_based_medicine/evidence_based_medicine.dart';
import 'package:fhir/r5/resource_types/specialized/evidence_based_medicine/evidence_based_medicine.enums.dart';
import 'package:fhir/r5/resource_types/specialized/evidence_based_medicine/evidence_based_medicine.freezed.dart';
import 'package:fhir/r5/resource_types/specialized/evidence_based_medicine/evidence_based_medicine.g.dart';
import 'package:fhir/r5/resource_types/specialized/medication_definition/medication_definition.dart';
import 'package:fhir/r5/resource_types/specialized/medication_definition/medication_definition.enums.dart';
import 'package:fhir/r5/resource_types/specialized/medication_definition/medication_definition.freezed.dart';
import 'package:fhir/r5/resource_types/specialized/medication_definition/medication_definition.g.dart';
import 'package:fhir/r5/resource_types/specialized/public_health_and_research/public_health_and_research.dart';
import 'package:fhir/r5/resource_types/specialized/public_health_and_research/public_health_and_research.enums.dart';
import 'package:fhir/r5/resource_types/specialized/public_health_and_research/public_health_and_research.freezed.dart';
import 'package:fhir/r5/resource_types/specialized/public_health_and_research/public_health_and_research.g.dart';
import 'package:fhir/r5/resource_types/specialized/quality_reporting_and_testing/quality_reporting_and_testing.dart';
import 'package:fhir/r5/resource_types/specialized/quality_reporting_and_testing/quality_reporting_and_testing.enums.dart';
import 'package:fhir/r5/resource_types/specialized/quality_reporting_and_testing/quality_reporting_and_testing.freezed.dart';
import 'package:fhir/r5/resource_types/specialized/quality_reporting_and_testing/quality_reporting_and_testing.g.dart';
import 'package:fhir/r5/resource_types/specialized/specialized.dart';
import 'package:fhir/r5/special_types/special_types.dart';
import 'package:fhir/r5/special_types/special_types.enums.dart';
import 'package:fhir/r5/special_types/special_types.freezed.dart';
import 'package:fhir/r5/special_types/special_types.g.dart';
import 'package:fhir/stu3.dart';
import 'package:fhir/stu3/basic_types/basic_types.dart';
import 'package:fhir/stu3/basic_types/element.dart';
import 'package:fhir/stu3/basic_types/element.freezed.dart';
import 'package:fhir/stu3/basic_types/element.g.dart';
import 'package:fhir/stu3/basic_types/fhir_extension.dart';
import 'package:fhir/stu3/basic_types/fhir_extension.freezed.dart';
import 'package:fhir/stu3/basic_types/fhir_extension.g.dart';
import 'package:fhir/stu3/general_types/general_types.dart';
import 'package:fhir/stu3/general_types/general_types.enums.dart';
import 'package:fhir/stu3/general_types/general_types.freezed.dart';
import 'package:fhir/stu3/general_types/general_types.g.dart';
import 'package:fhir/stu3/metadata_types/metadata_types.dart';
import 'package:fhir/stu3/metadata_types/metadata_types.enums.dart';
import 'package:fhir/stu3/metadata_types/metadata_types.freezed.dart';
import 'package:fhir/stu3/metadata_types/metadata_types.g.dart';
import 'package:fhir/stu3/resource/resource.dart';
import 'package:fhir/stu3/resource/resource.g.dart';
import 'package:fhir/stu3/resource/resource_from_json.dart';
import 'package:fhir/stu3/resource/resource_new_version.dart';
import 'package:fhir/stu3/resource/resource_types_enum.dart';
import 'package:fhir/stu3/resource/resource_utils.dart';
import 'package:fhir/stu3/resource_types/base/base.dart';
import 'package:fhir/stu3/resource_types/base/entities/entities.dart';
import 'package:fhir/stu3/resource_types/base/entities/entities.enums.dart';
import 'package:fhir/stu3/resource_types/base/entities/entities.freezed.dart';
import 'package:fhir/stu3/resource_types/base/entities/entities.g.dart';
import 'package:fhir/stu3/resource_types/base/individuals/individuals.dart';
import 'package:fhir/stu3/resource_types/base/individuals/individuals.enums.dart';
import 'package:fhir/stu3/resource_types/base/individuals/individuals.freezed.dart';
import 'package:fhir/stu3/resource_types/base/individuals/individuals.g.dart';
import 'package:fhir/stu3/resource_types/base/management/management.dart';
import 'package:fhir/stu3/resource_types/base/management/management.enums.dart';
import 'package:fhir/stu3/resource_types/base/management/management.freezed.dart';
import 'package:fhir/stu3/resource_types/base/management/management.g.dart';
import 'package:fhir/stu3/resource_types/base/workflow/workflow.dart';
import 'package:fhir/stu3/resource_types/base/workflow/workflow.enums.dart';
import 'package:fhir/stu3/resource_types/base/workflow/workflow.freezed.dart';
import 'package:fhir/stu3/resource_types/base/workflow/workflow.g.dart';
import 'package:fhir/stu3/resource_types/clinical/care_provision/care_provision.dart';
import 'package:fhir/stu3/resource_types/clinical/care_provision/care_provision.enums.dart';
import 'package:fhir/stu3/resource_types/clinical/care_provision/care_provision.freezed.dart';
import 'package:fhir/stu3/resource_types/clinical/care_provision/care_provision.g.dart';
import 'package:fhir/stu3/resource_types/clinical/clinical.dart';
import 'package:fhir/stu3/resource_types/clinical/diagnostics/diagnostics.dart';
import 'package:fhir/stu3/resource_types/clinical/diagnostics/diagnostics.enums.dart';
import 'package:fhir/stu3/resource_types/clinical/diagnostics/diagnostics.freezed.dart';
import 'package:fhir/stu3/resource_types/clinical/diagnostics/diagnostics.g.dart';
import 'package:fhir/stu3/resource_types/clinical/medications/medications.dart';
import 'package:fhir/stu3/resource_types/clinical/medications/medications.enums.dart';
import 'package:fhir/stu3/resource_types/clinical/medications/medications.freezed.dart';
import 'package:fhir/stu3/resource_types/clinical/medications/medications.g.dart';
import 'package:fhir/stu3/resource_types/clinical/request_and_response/request_and_response.dart';
import 'package:fhir/stu3/resource_types/clinical/request_and_response/request_and_response.enums.dart';
import 'package:fhir/stu3/resource_types/clinical/request_and_response/request_and_response.freezed.dart';
import 'package:fhir/stu3/resource_types/clinical/request_and_response/request_and_response.g.dart';
import 'package:fhir/stu3/resource_types/clinical/summary/summary.dart';
import 'package:fhir/stu3/resource_types/clinical/summary/summary.enums.dart';
import 'package:fhir/stu3/resource_types/clinical/summary/summary.freezed.dart';
import 'package:fhir/stu3/resource_types/clinical/summary/summary.g.dart';
import 'package:fhir/stu3/resource_types/financial/billing/billing.dart';
import 'package:fhir/stu3/resource_types/financial/billing/billing.enums.dart';
import 'package:fhir/stu3/resource_types/financial/billing/billing.freezed.dart';
import 'package:fhir/stu3/resource_types/financial/billing/billing.g.dart';
import 'package:fhir/stu3/resource_types/financial/financial.dart';
import 'package:fhir/stu3/resource_types/financial/general/general.dart';
import 'package:fhir/stu3/resource_types/financial/general/general.enums.dart';
import 'package:fhir/stu3/resource_types/financial/general/general.freezed.dart';
import 'package:fhir/stu3/resource_types/financial/general/general.g.dart';
import 'package:fhir/stu3/resource_types/financial/payment/payment.dart';
import 'package:fhir/stu3/resource_types/financial/payment/payment.enums.dart';
import 'package:fhir/stu3/resource_types/financial/payment/payment.freezed.dart';
import 'package:fhir/stu3/resource_types/financial/payment/payment.g.dart';
import 'package:fhir/stu3/resource_types/financial/support/support.dart';
import 'package:fhir/stu3/resource_types/financial/support/support.enums.dart';
import 'package:fhir/stu3/resource_types/financial/support/support.freezed.dart';
import 'package:fhir/stu3/resource_types/financial/support/support.g.dart';
import 'package:fhir/stu3/resource_types/foundation/conformance/conformance.dart';
import 'package:fhir/stu3/resource_types/foundation/conformance/conformance.enums.dart';
import 'package:fhir/stu3/resource_types/foundation/conformance/conformance.freezed.dart';
import 'package:fhir/stu3/resource_types/foundation/conformance/conformance.g.dart';
import 'package:fhir/stu3/resource_types/foundation/documents/documents.dart';
import 'package:fhir/stu3/resource_types/foundation/documents/documents.enums.dart';
import 'package:fhir/stu3/resource_types/foundation/documents/documents.freezed.dart';
import 'package:fhir/stu3/resource_types/foundation/documents/documents.g.dart';
import 'package:fhir/stu3/resource_types/foundation/foundation.dart';
import 'package:fhir/stu3/resource_types/foundation/other/other.dart';
import 'package:fhir/stu3/resource_types/foundation/other/other.enums.dart';
import 'package:fhir/stu3/resource_types/foundation/other/other.freezed.dart';
import 'package:fhir/stu3/resource_types/foundation/other/other.g.dart';
import 'package:fhir/stu3/resource_types/foundation/security/security.dart';
import 'package:fhir/stu3/resource_types/foundation/security/security.enums.dart';
import 'package:fhir/stu3/resource_types/foundation/security/security.freezed.dart';
import 'package:fhir/stu3/resource_types/foundation/security/security.g.dart';
import 'package:fhir/stu3/resource_types/foundation/terminology/terminology.dart';
import 'package:fhir/stu3/resource_types/foundation/terminology/terminology.enums.dart';
import 'package:fhir/stu3/resource_types/foundation/terminology/terminology.freezed.dart';
import 'package:fhir/stu3/resource_types/foundation/terminology/terminology.g.dart';
import 'package:fhir/stu3/resource_types/resource_types.dart';
import 'package:fhir/stu3/resource_types/resource_types.enums.dart';
import 'package:fhir/stu3/resource_types/specialized/clinical_decision_support/clinical_decision_support.dart';
import 'package:fhir/stu3/resource_types/specialized/clinical_decision_support/clinical_decision_support.enums.dart';
import 'package:fhir/stu3/resource_types/specialized/clinical_decision_support/clinical_decision_support.freezed.dart';
import 'package:fhir/stu3/resource_types/specialized/clinical_decision_support/clinical_decision_support.g.dart';
import 'package:fhir/stu3/resource_types/specialized/definitional_artifacts/definitional_artifacts.dart';
import 'package:fhir/stu3/resource_types/specialized/definitional_artifacts/definitional_artifacts.enums.dart';
import 'package:fhir/stu3/resource_types/specialized/definitional_artifacts/definitional_artifacts.freezed.dart';
import 'package:fhir/stu3/resource_types/specialized/definitional_artifacts/definitional_artifacts.g.dart';
import 'package:fhir/stu3/resource_types/specialized/public_health_and_research/public_health_and_research.dart';
import 'package:fhir/stu3/resource_types/specialized/public_health_and_research/public_health_and_research.enums.dart';
import 'package:fhir/stu3/resource_types/specialized/public_health_and_research/public_health_and_research.freezed.dart';
import 'package:fhir/stu3/resource_types/specialized/public_health_and_research/public_health_and_research.g.dart';
import 'package:fhir/stu3/resource_types/specialized/quality_reporting/quality_reporting.dart';
import 'package:fhir/stu3/resource_types/specialized/quality_reporting/quality_reporting.enums.dart';
import 'package:fhir/stu3/resource_types/specialized/quality_reporting/quality_reporting.freezed.dart';
import 'package:fhir/stu3/resource_types/specialized/quality_reporting/quality_reporting.g.dart';
import 'package:fhir/stu3/resource_types/specialized/specialized.dart';
import 'package:fhir/stu3/resource_types/specialized/testing/testing.dart';
import 'package:fhir/stu3/resource_types/specialized/testing/testing.enums.dart';
import 'package:fhir/stu3/resource_types/specialized/testing/testing.freezed.dart';
import 'package:fhir/stu3/resource_types/specialized/testing/testing.g.dart';
import 'package:fhir/stu3/special_types/special_types.dart';
import 'package:fhir/stu3/special_types/special_types.enums.dart';
import 'package:fhir/stu3/special_types/special_types.freezed.dart';
import 'package:fhir/stu3/special_types/special_types.g.dart';
import 'package:fhir/stu3/stu3.dart';

example/lib/main.dart

import 'package:fhir/r4.dart';

void main() {
  final patient = Patient(
    id: Id('12345'),
    active: Boolean(true),
    name: <HumanName>[
      HumanName(
        family: 'Atreides',
        given: ['Paul'],
      ),
    ],
    address: <Address>[Address(postalCode: '12345')],
    gender: PatientGender.male,
    birthDate: Date(DateTime(3071, 04, 25)),
  );

  print(patient.toYaml());

  final condition = Condition(
    subject: Reference(reference: 'Patient/12345'),
    clinicalStatus: CodeableConcept(
      coding: [
        Coding(
          system: FhirUri(
              'http://terminology.hl7.org/CodeSystem/condition-clinical'),
          code: Code('active'),
          display: 'Active',
        ),
      ],
    ),
    verificationStatus: CodeableConcept(
      coding: [
        Coding(
            system: FhirUri(
                'http://terminology.hl7.org/CodeSystem/condition-ver-status'),
            code: Code('confirmed'),
            display: 'Confirmed')
      ],
    ),
    category: [
      CodeableConcept(
        coding: [
          Coding(
            system: FhirUri(
                'http://hl7.org/fhir/us/core/CodeSystem/condition-category'),
            code: Code('health-concern'),
          )
        ],
      )
    ],
    code: CodeableConcept(
      coding: [
        Coding(
          system: FhirUri('http://factor.info/sct'),
          code: Code('32911000'),
          display: 'Homeless',
        ),
      ],
      text: 'Homeless (finding)',
    ),
    onsetPeriod: Period(
      start: FhirDateTime(
        DateTime(
          DateTime.now().year - 1,
          DateTime.now().month,
          DateTime.now().day,
        ),
      ),
    ),
  );

  print(condition.toYaml());

  final observation = Observation(
    subject: Reference(reference: 'Patient/12345'),
    status: ObservationStatus.final_,
    category: [
      CodeableConcept(
        coding: [
          Coding(
            system: FhirUri(
                'http://hl7.org/fhir/us/core/CodeSystem/condition-category'),
            code: Code('social-history'),
            display: 'Social History',
          )
        ],
      ),
      CodeableConcept(
        coding: [
          Coding(
            system: FhirUri(
                'http://hl7.org/fhir/us/core/CodeSystem/condition-category'),
            code: Code('survey'),
            display: 'Survey',
          )
        ],
      ),
    ],
    code: CodeableConcept(
      coding: [
        Coding(
          system: FhirUri('http://loinc.org'),
          code: Code('LA19952-3'),
          display: 'At risk',
        ),
      ],
      text: 'Food insecurity risk [HVS]',
    ),
    effectivePeriod: Period(
      start: FhirDateTime(
        DateTime(
          DateTime.now().year - 1,
          DateTime.now().month,
          DateTime.now().day,
        ),
      ),
    ),
    valueCodeableConcept: CodeableConcept(
      coding: [
        Coding(
          system: FhirUri('http://loinc.org'),
          code: Code('LA17956-6'),
          display: 'Unemployed',
        ),
      ],
      text: 'Unemployed',
    ),
  );

  print(observation.toYaml());
} 

Download Details:

Author: MayJuun

Source Code: https://github.com/MayJuun/fhir/tree/main/fhir

#dart  #flutter 

What is GEEK

Buddha Community

A Dart/Flutter package for working with FHIR® resources

Google's Flutter 1.20 stable announced with new features - Navoki

Flutter Google cross-platform UI framework has released a new version 1.20 stable.

Flutter is Google’s UI framework to make apps for Android, iOS, Web, Windows, Mac, Linux, and Fuchsia OS. Since the last 2 years, the flutter Framework has already achieved popularity among mobile developers to develop Android and iOS apps. In the last few releases, Flutter also added the support of making web applications and desktop applications.

Last month they introduced the support of the Linux desktop app that can be distributed through Canonical Snap Store(Snapcraft), this enables the developers to publish there Linux desktop app for their users and publish on Snap Store.  If you want to learn how to Publish Flutter Desktop app in Snap Store that here is the tutorial.

Flutter 1.20 Framework is built on Google’s made Dart programming language that is a cross-platform language providing native performance, new UI widgets, and other more features for the developer usage.

Here are the few key points of this release:

Performance improvements for Flutter and Dart

In this release, they have got multiple performance improvements in the Dart language itself. A new improvement is to reduce the app size in the release versions of the app. Another performance improvement is to reduce junk in the display of app animation by using the warm-up phase.

sksl_warm-up

If your app is junk information during the first run then the Skia Shading Language shader provides for pre-compilation as part of your app’s build. This can speed it up by more than 2x.

Added a better support of mouse cursors for web and desktop flutter app,. Now many widgets will show cursor on top of them or you can specify the type of supported cursor you want.

Autofill for mobile text fields

Autofill was already supported in native applications now its been added to the Flutter SDK. Now prefilled information stored by your OS can be used for autofill in the application. This feature will be available soon on the flutter web.

flutter_autofill

A new widget for interaction

InteractiveViewer is a new widget design for common interactions in your app like pan, zoom drag and drop for resizing the widget. Informations on this you can check more on this API documentation where you can try this widget on the DartPad. In this release, drag-drop has more features added like you can know precisely where the drop happened and get the position.

Updated Material Slider, RangeSlider, TimePicker, and DatePicker

In this new release, there are many pre-existing widgets that were updated to match the latest material guidelines, these updates include better interaction with Slider and RangeSliderDatePicker with support for date range and time picker with the new style.

flutter_DatePicker

New pubspec.yaml format

Other than these widget updates there is some update within the project also like in pubspec.yaml file format. If you are a flutter plugin publisher then your old pubspec.yaml  is no longer supported to publish a plugin as the older format does not specify for which platform plugin you are making. All existing plugin will continue to work with flutter apps but you should make a plugin update as soon as possible.

Preview of embedded Dart DevTools in Visual Studio Code

Visual Studio code flutter extension got an update in this release. You get a preview of new features where you can analyze that Dev tools in your coding workspace. Enable this feature in your vs code by _dart.previewEmbeddedDevTools_setting. Dart DevTools menu you can choose your favorite page embed on your code workspace.

Network tracking

The updated the Dev tools comes with the network page that enables network profiling. You can track the timings and other information like status and content type of your** network calls** within your app. You can also monitor gRPC traffic.

Generate type-safe platform channels for platform interop

Pigeon is a command-line tool that will generate types of safe platform channels without adding additional dependencies. With this instead of manually matching method strings on platform channel and serializing arguments, you can invoke native class and pass nonprimitive data objects by directly calling the Dartmethod.

There is still a long list of updates in the new version of Flutter 1.2 that we cannot cover in this blog. You can get more details you can visit the official site to know more. Also, you can subscribe to the Navoki newsletter to get updates on these features and upcoming new updates and lessons. In upcoming new versions, we might see more new features and improvements.

You can get more free Flutter tutorials you can follow these courses:

#dart #developers #flutter #app developed #dart devtools in visual studio code #firebase local emulator suite in flutter #flutter autofill #flutter date picker #flutter desktop linux app build and publish on snapcraft store #flutter pigeon #flutter range slider #flutter slider #flutter time picker #flutter tutorial #flutter widget #google flutter #linux #navoki #pubspec format #setup flutter desktop on windows

Terry  Tremblay

Terry Tremblay

1598396940

What is Flutter and why you should learn it?

Flutter is an open-source UI toolkit for mobile developers, so they can use it to build native-looking** Android and iOS** applications from the same code base for both platforms. Flutter is also working to make Flutter apps for Web, PWA (progressive Web-App) and Desktop platform (Windows,macOS,Linux).

flutter-mobile-desktop-web-embedded_min

Flutter was officially released in December 2018. Since then, it has gone a much stronger flutter community.

There has been much increase in flutter developers, flutter packages, youtube tutorials, blogs, flutter examples apps, official and private events, and more. Flutter is now on top software repos based and trending on GitHub.

Flutter meaning?

What is Flutter? this question comes to many new developer’s mind.

humming_bird_dart_flutter

Flutter means flying wings quickly, and lightly but obviously, this doesn’t apply in our SDK.

So Flutter was one of the companies that were acquired by **Google **for around $40 million. That company was based on providing gesture detection and recognition from a standard webcam. But later when the Flutter was going to release in alpha version for developer it’s name was Sky, but since Google already owned Flutter name, so they rename it to Flutter.

Where Flutter is used?

Flutter is used in many startup companies nowadays, and even some MNCs are also adopting Flutter as a mobile development framework. Many top famous companies are using their apps in Flutter. Some of them here are

Dream11

Dream11

NuBank

NuBank

Reflectly app

Reflectly app

Abbey Road Studios

Abbey Road Studios

and many more other apps. Mobile development companies also adopted Flutter as a service for their clients. Even I was one of them who developed flutter apps as a freelancer and later as an IT company for mobile apps.

Flutter as a service

#dart #flutter #uncategorized #flutter framework #flutter jobs #flutter language #flutter meaning #flutter meaning in hindi #google flutter #how does flutter work #what is flutter

Punith Raaj

1640672627

Flutter Hotel Booking UI - Book your Stay At A New Hotel With Flutter - Ep1

https://youtu.be/-tHUmjIkGJ4
Flutter Hotel Booking UI - Book your Stay At A New Hotel With Flutter - Ep1
#flutter #fluttertravelapp #hotelbookingui #flutter ui design 

In this video, I'm going to show you how to make a Cool Hotel Booking App using Flutter and visual studio code. 

In this tutorial, you will learn how to create a Splash Screen and Introduction Screen, how to implement a SmoothPageIndicator in Flutter. 

🚀 Nice, clean and modern Hotel Booking #App #UI made in #Flutter 

⚠️ IMPORTANT: If you want to learn, I strongly advise you to watch the video at a slow speed and try to follow the code and understand what is done, without having to copy the code, and then download it from GitHub. 

► Social Media 

    GitHub: https://github.com/Punithraaj 

    LinkedIn: https://www.linkedin.com/in/roaring-r...

    Twitter: https://twitter.com/roaringraaj

    Facebook: https://www.facebook.com/flutterdartacademy

I hope you liked it, and don't forget to like,comment, subscribe, share this video with your friends, and star the repository on GitHub! 

⭐️ Thanks for watching the video and for more updates don't forget to click on the notification.⭐️Please comment your suggestion for my improvement. ⭐️Remember to like, subscribe, share this video, and star the repo on Github :)Hope you enjoyed this video! If you loved it, you can Buy me a coffee : https://www.buymeacoffee.com/roaringraaj

#flutter riverpod #flutter travel app #appointment app flutter #morioh

Adobe XD plugin for Flutter with CodePen Tutorial

Recently Adobe XD releases a new version of the plugin that you can use to export designs directly into flutter widgets or screens. Yes, you read it right, now you can make and export your favorite design in Adobe XD and export all the design in the widget form or as a full-screen design, this can save you a lot of time required in designing.

What we will do?
I will make a simple design of a dialogue box with a card design with text over it as shown below. After you complete this exercise you can experiment with the UI. You can make your own components or import UI kits available with the Adobe XD.

#developers #flutter #adobe xd design export to flutter #adobe xd flutter code #adobe xd flutter code generator - plugin #adobe xd flutter plugin #adobe xd flutter plugin tutorial #adobe xd plugins #adobe xd to flutter #adobe xd tutorial #codepen for flutter.

6 Things About HTTP Request in Dart For Beginners

Introduction

If you are here and a beginner, that means you want to learn everything about making an API request using Dart in Flutter, then you are in the right place for the HTTP tutorial. So without wasting any time, let’s start with this flutter tutorial. We will cover the essential topics required to work with the HTTP request in Dart.

What is Rest API in Dart ?

rest api flow

Rest APIs are a way to fetch data from the internet in flutter or communicate the server from the app and get some essential information from your server to the app. This information can be regarding your app’s data, user’s data, or any data you want to share globally from your app to all of your users.

This HTTP request fetches in a unique JSON format, and then the information is fetched from the JSON and put in the UI of the app.

Every programming language has a way of some internet connectivity i.e, use this rest API developed on the server and fetch data from the internet. To use this request feature, we have to add HTTP package in flutter, add this flutter package add in your project to use the http feature. Add this HTTP package to your pubspec.yaml, and run a command in terminal :

flutter packages get

#dart #flutter #async await #async function #cancel http api request in flutter #fetch data from the internet #flutter cancel future #flutter get request example #flutter post request example #future of flutter #http tutorial