Skip to content

Bundle structure reference

This page describes the internal structure of a .pemr bundle.

The .pemr file acts as a portable container for the patient's medical record used by CareFlow Kids and CareView Family.

Although the bundle should normally be accessed only through the applications, understanding its structure can be useful for advanced users and developers.


Typical bundle layout

A .pemr bundle contains a small set of structured components:

.pemr
├── db.sqlite
├── manifest.json
└── docs/

Each component has a specific role in storing the medical record.


db.sqlite

db.sqlite is the structured medical database.

It contains the core clinical information, including:

  • patient information
  • visits
  • growth measurements
  • notes
  • structured clinical data

This database is the primary source of medical data used to generate reports, growth charts, and visit summaries.

For security reasons, the database is protected by:

  • encryption
  • integrity verification (HMAC / SHA‑256)

Applications verify the integrity of the database before opening the bundle.


manifest.json

manifest.json stores bundle metadata.

This file may include information such as:

  • bundle version
  • creation date
  • application compatibility information

The manifest helps the applications understand how to interpret the bundle contents.


docs/

The docs/ directory contains attached medical documents.

Typical files stored here include:

  • laboratory reports
  • vaccination certificates
  • imaging reports
  • specialist letters
  • other medical attachments

These files are stored separately from the database so they can be easily viewed by the applications.


Why this structure is used

Separating the bundle into three components provides several advantages:

  • structured data remains organized in the database
  • documents remain simple files that can be rendered easily
  • metadata allows version control and compatibility checks

This design keeps .pemr bundles compact, portable, and reliable.


Important note

Even though the bundle structure is documented here, .pemr bundles should not be modified manually.

Changing internal files outside CareFlow Kids or CareView Family may:

  • break integrity verification
  • corrupt the record
  • make the bundle unreadable

Bundles should always be updated through the application interface.


Example structure

flowchart TD
    A[.pemr bundle]
    A --> B[db.sqlite\nStructured medical database]
    A --> C[manifest.json\nBundle metadata]
    A --> D[docs/\nAttached medical documents]