fhirproxy-utils
v1.0.8
Published
Utility helpers and schema formatters for OpenMRS frontend modules integrating with REST web services..
Downloads
299
Maintainers
Readme
fhirproxy-utils
Utility helpers, data formatters, and mock schemas for OpenMRS frontend modules integrating with REST web services and FHIR proxy layers.
Overview
This library simplifies data manipulation and structural verification when building OpenMRS Microfrontends (ESM) that communicate with the core REST and FHIR API proxies.
- Data Formatters: Standardizes patient vital signs, FHIR resources, and demographic payloads.
- Schema Validation: Ensures incoming API responses match frontend model definitions.
- Mock Generators: Provides consistent test objects for local development and component simulation.
Installation
npm install fhirproxy-utils
Usage
Import the utility suite to format or validate API payloads within your OpenMRS ESM modules:
const { formatPatientVitals } = require('fhirproxy-utils');
// Example mapping of raw API response to component state
const rawData = { blood_pressure: "120/80", heart_rate: 72 };
const formatted = formatPatientVitals(rawData);
console.log('Processed Data Valid:', formatted.isValid);
Maintenance & Community
This package is an open-source community contribution designed to streamline frontend development workflows for OpenMRS implementations and proxy configurations.
License
Distributed under the ISC License.
