fhir_db 0.0.1 copy "fhir_db: ^0.0.1" to clipboard
fhir_db: ^0.0.1 copied to clipboard

outdated

A wrapper for Sembast and SQFlite to enable easy, local and secure storage of fhir resources

example/example.dart

import 'package:fhir/r4.dart';
import 'package:fhir_db/resource_dao.dart';

void main() async {
  final pw1 = 'new_password';
  final pw2 = 'newer_password';
  final ResourceDao resourceDao = ResourceDao();
  final resultPatient = await resourceDao.save(
    pw1,
    Patient(
      resourceType: 'Patient',
      name: [HumanName(text: 'New Patient Name')],
      birthDate: Date(DateTime.now()),
    ),
  );
  final resultOrganization = await resourceDao.save(
    pw1,
    Organization(
      resourceType: 'Organization',
      name: 'HSWT LLC',
    ),
  );
  final resultObservation = await resourceDao.save(
    pw1,
    Observation(
        resourceType: 'Observation', code: CodeableConcept(text: 'text')),
  );
  final patientList =
      await resourceDao.getAllSortedById(pw1, resourceType: 'Patient');
  await resourceDao.updatePw(pw1, pw2);
  for (var i in patientList) {
    print((i as Patient).toJson());
  }
}
14
likes
0
pub points
44%
popularity

Publisher

verified publisherfhirfli.dev

A wrapper for Sembast and SQFlite to enable easy, local and secure storage of fhir resources

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

crypto, encrypt, fhir, flutter, meta, path, path_provider, sembast, sembast_sqflite, sqflite

More

Packages that depend on fhir_db