@claudebernard/fhir-prescription-mocks
FHIR R5 mock bundles for prescription control — ready-to-use typed test fixtures for patient and prescription scenarios.
Published from the fhir-monorepo repository, whose version this package carries. Versions are
therefore sparse: a release only reaches npm when the mock data or the package itself changed.
Installation
npm install --save-dev @claudebernard/fhir-prescription-mocks
Usage
All exports are typed as Bundle from fhir/r5.
import {
patientComplete,
prescriptionComplete,
} from "@claudebernard/fhir-prescription-mocks";
// patientComplete is a Bundle — use it directly in your tests
expect(myValidator.validate(patientComplete)).toBe(true);
Available mocks
Patient bundles
| Export | Description |
|---|---|
patientMinimal | Minimal patient with required fields only |
patientComplete | Fully populated patient |
patientPediatric | Pediatric patient |
patientMultipleConditions | Patient with several active conditions |
patientRenalCreatinineClearance | Renal patient — creatinine clearance observation |
patientRenalGfrAbsolute | Renal patient — absolute GFR observation |
patientRenalGfrNormalized | Renal patient — normalized GFR observation |
patientUnderweightPastObservation | Underweight patient with a past observation |
patientUsa | USA patient |
Prescription bundles
| Export | Description |
|---|---|
prescriptionComplete | Complete prescription with multiple medications |
prescriptionSingleMedication | Prescription with a single medication line |
prescriptionWithAlternative | Prescription including a therapeutic alternative |
prescriptionWithDocumentReference | Prescription linked to a document reference |
prescriptionPosology | Prescription with detailed dosage instructions |
prescriptionUsa | USA prescription |
Automedication bundles
| Export | Description |
|---|---|
automedicationComplete | Self-reported OTC medication use — MedicationStatement resources (paracetamol, aspirin, diclofenac) plus their referenced Medication resources |
Only the exports listed above ship with the package (files: ["dist", "README.md"]) — the raw JSON
of the monorepo's fhir-mock/data/ is not published. In particular
composite-anonymous-context.json has no export yet, so it is not reachable from npm.
FHIR profile
All bundles conform to FHIR R5 and use French pharmaceutical coding systems (ATC, BCB, CIS, CIP13).
Changelog
1.3.1 (2026-07-22)
Bug Fixes
- only trigger implementation-guides when data/ actually changes (374f820)
1.3.0 (2026-07-22)
Bug Fixes
Features
- decompose mock bundles by FHIR resource type (09ba754)
Changelog
1.2.6 (2026-07-09)
Bug Fixes
- try adding the changelog to the npm readme (123efd3)