fhir_dart 0.1.4 fhir_dart: ^0.1.4 copied to clipboard
A Dart package that provides full support for all FHIR (Fast Healthcare Interoperability Resources) R4 resources in Dart, enabling parsing, manipulation, and serialization.
example/fhir_dart_example.dart
import 'package:fhir_dart/fhir_dart.dart';
import 'json_examples.dart';
void main() {
final Account accountWithGurantor = Account.fromJson(
accountWithGurantorMap,
);
print(accountWithGurantor.runtimeType); // Account
print(accountWithGurantor.id); // the id of the account (e.g. 'ewg')
print(accountWithGurantor.toJson()); // json object (Map<String, dynamic>)
final Account accountWithGurantorCopy = accountWithGurantor.copyWith(
id: 'newId',
);
print(accountWithGurantorCopy.id); // newId
}