{"_id":"@adeylab/esm-billing-app","name":"@adeylab/esm-billing-app","dist-tags":{"next":"1.3.1-pre.4","latest":"1.3.1-pre.4"},"versions":{"1.3.1-pre.4":{"name":"@adeylab/esm-billing-app","version":"1.3.1-pre.4","description":"O3 frontend module for handling billing concerns in healthcare settings","browser":"dist/adeylab-esm-billing-app.js","main":"src/index.ts","source":true,"license":"MPL-2.0","homepage":"https://github.com/openmrs/openmrs-esm-billing-app#readme","scripts":{"start":"openmrs develop --backend  https://emr.adeylab.com","analyze":"rspack --mode=production --env.analyze=true","build":"rspack --mode production","debug":"npm run serve","extract-translations":"i18next 'src/**/*.component.tsx' 'src/**/*.workspace.tsx' 'src/**/*.modal.tsx' 'src/index.ts' --config ./tools/i18next-parser.config.js","lint":"eslint src --ext ts,tsx --max-warnings=0","postinstall":"husky install","prettier":"prettier --config prettier.config.js --write \"src/**/*.{ts,tsx,css,scss}\" \"e2e/**/*.ts\"","serve":"rspack serve --mode=development","test-e2e":"playwright test","test":"cross-env TZ=UTC vitest run --passWithNoTests","test:watch":"cross-env TZ=UTC vitest watch","coverage":"cross-env TZ=UTC vitest run --coverage --passWithNoTests","typescript":"tsc","verify":"turbo lint && turbo typescript && turbo test --color --concurrency=5","cipublish":"npm publish"},"browserslist":["extends browserslist-config-openmrs"],"keywords":["openmrs"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/openmrs/openmrs-esm-billing-app.git#readme"},"bugs":{"url":"https://github.com/openmrs/openmrs-esm-billing-app/issues"},"dependencies":{"@carbon/react":"^1.83.0","@hookform/resolvers":"^3.3.4","classnames":"^2.5.1","fuzzy":"^0.1.3","lodash-es":"^4.17.21","react-hook-form":"^7.49.3","react-to-print":"^3.1.1","zod":"^3.22.4"},"peerDependencies":{"@openmrs/esm-framework":"10.x","react":"18.x","react-dom":"18.x","react-i18next":"16.x","rxjs":"6.x","swr":"2.x"},"devDependencies":{"@openmrs/esm-framework":"next","@playwright/test":"^1.53.2","@testing-library/dom":"^9.3.4","@testing-library/jest-dom":"^6.3.0","@testing-library/react":"14.3.1","@testing-library/user-event":"^14.5.2","@types/lodash-es":"^4.17.12","@types/react":"^18.3.21","@types/react-dom":"^18.3.0","@types/webpack-env":"^1.18.4","@typescript-eslint/eslint-plugin":"^8.0.0","@typescript-eslint/parser":"^8.0.0","@vitest/coverage-v8":"^4.0.18","concurrently":"^8.2.2","cross-env":"^7.0.3","d3-selection":"^3.0.0","dayjs":"^1.11.10","dotenv":"^16.4.1","eslint":"^8.57.0","eslint-plugin-import":"^2.31.0","eslint-plugin-jest-dom":"^5.5.0","eslint-plugin-playwright":"^2.2.2","eslint-plugin-react-hooks":"^5.0.0","eslint-plugin-testing-library":"^7.13.1","husky":"^9.0.6","i18next":"^25.0.0","i18next-parser":"^9.3.0","identity-obj-proxy":"^3.0.0","jsdom":"^29.0.2","lint-staged":"^15.2.10","lodash":"^4.17.21","openmrs":"next","prettier":"^3.2.4","react":"^18.3.1","react-dom":"^18.3.1","react-i18next":"^16.0.0","react-router-dom":"^6.21.3","rxjs":"^6.6.7","swr":"2.2.5","turbo":"^2.5.2","typescript":"^5.0.0","vitest":"^4.0.18"},"lint-staged":{"*.{ts,tsx}":"eslint --cache --fix --max-warnings 0","*.{css,scss,ts,tsx}":"prettier --write --list-different"},"packageManager":"yarn@4.10.3","_id":"@adeylab/esm-billing-app@1.3.1-pre.4","gitHead":"85ac918c16f405de0da17d27474b5109c7980a08","_nodeVersion":"18.20.8","_npmVersion":"10.8.2","dist":{"integrity":"sha512-HdOD2/pTfmsLQswojkWiVZe4QE09G7NXaKQRvCKDctExN+RewscHrhZ1+oK20FOzvRk7VD3Z5HKDmJSHKuNr2Q==","shasum":"431dbab7f2877fd444242e20e9529a5d4ceb6030","tarball":"https://registry.npmjs.org/@adeylab/esm-billing-app/-/esm-billing-app-1.3.1-pre.4.tgz","fileCount":136,"unpackedSize":10391128,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDgOW3lmz2JJq12Vecd8+UhpWAD1Dtn2q95gylrRdpmQQIgIRU8FbQWKQ0kV1xGLF9YEroRTyudJTIibJ3A/UaJJiE="}]},"_npmUser":{"name":"yeshewasg","email":"yeshewasg12@gmail.com"},"directories":{},"maintainers":[{"name":"yeshewasg","email":"yeshewasg12@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/esm-billing-app_1.3.1-pre.4_1783028952505_0.18576002294144955"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-02T21:49:12.375Z","1.3.1-pre.4":"2026-07-02T21:49:12.696Z","modified":"2026-07-02T21:49:12.873Z"},"maintainers":[{"name":"yeshewasg","email":"yeshewasg12@gmail.com"}],"description":"O3 frontend module for handling billing concerns in healthcare settings","homepage":"https://github.com/openmrs/openmrs-esm-billing-app#readme","keywords":["openmrs"],"repository":{"type":"git","url":"git+https://github.com/openmrs/openmrs-esm-billing-app.git#readme"},"bugs":{"url":"https://github.com/openmrs/openmrs-esm-billing-app/issues"},"license":"MPL-2.0","readme":"# O3 Billing App\n\n![OpenMRS CI](https://github.com/openmrs/openmrs-esm-billing-app/actions/workflows/ci.yml/badge.svg)\n\nA frontend module for O3 that manages healthcare billing workflows. It allows users to:\n\n- Generate and manage bills\n- Capture payments and insurance details\n- Configure billable services and categories\n- Integrate with visits and patient dashboards\n\nThis frontend module depends on the backend [Billing Module](https://github.com/openmrs/openmrs-module-billing). It also uses core OpenMRS REST APIs for visit attributes (to track payment status on visits) and concept lookups (to resolve service types and patient categories).\n\nFor more information, please see the\n[OpenMRS Frontend Developer Documentation](https://openmrs.atlassian.net/wiki/x/IABBHg).\n\n## Local development\n\nCheck out the developer documentation [in the OpenMRS Wiki](https://openmrs.atlassian.net/wiki/x/IABBHg).\n\nThis repo uses [yarn](https://yarnpkg.com).\n\nTo install the dependencies, run:\n\n```bash\nyarn\n```\n\nTo start a dev server, run:\n\n```bash\nyarn start\n```\n\nOnce the dev server launches, log in and select a location. You will get redirected to the home page. Once there:\n\n- Navigate to the Billing dashboard on the left panel to view the billing history. Additional billing functionality exists in the Patient Chart. You'll also find the Billable Services dashboard in the System Administration page.\n\n## Running tests\n\nTo run tests, run:\n\n```bash\nyarn test\n```\n\nTo run tests in `watch` mode, run:\n\n```bash\nyarn test:watch\n```\n\nTo run a specific test file, pass a pattern:\n\n```bash\nyarn test -- billing-dashboard\n```\n\nTo generate a `coverage` report, run:\n\n```bash\nyarn coverage\n```\n\nThis repo also includes a `yarn verify` script that runs linting, type checking, and tests via Turbo.\n\nTo run end-to-end tests, run:\n\n```bash\nyarn test-e2e\n```\n\nRead the [e2e testing guide](https://openmrs.atlassian.net/wiki/x/Z8CEAQ) to learn more about End-to-End tests in this project.\n\n## Configuration\n\nYou can customize billing behavior using OpenMRS frontend config overrides.\n\n### Example Config\n\n```json\n{\n  \"@adeylab/esm-billing-app\": {\n    \"defaultCurrency\": \"UGX\",\n    \"pageSize\": 20,\n    \"patientCategory\": {\n      \"paymentDetails\": \"<visit-attribute-type-uuid>\",\n      \"paymentMethods\": \"<visit-attribute-type-uuid>\",\n      \"policyNumber\": \"<visit-attribute-type-uuid>\",\n      \"insuranceScheme\": \"<visit-attribute-type-uuid>\",\n      \"patientCategory\": \"<visit-attribute-type-uuid>\",\n      \"formPayloadPending\": \"<visit-attribute-type-uuid>\"\n    },\n    \"categoryConcepts\": {\n      \"payingDetails\": \"<concept-uuid>\",\n      \"nonPayingDetails\": \"<concept-uuid>\",\n      \"insuranceDetails\": \"<concept-uuid>\"\n    },\n    \"nonPayingPatientCategories\": {\n      \"childUnder5\": \"<concept-uuid>\",\n      \"student\": \"<concept-uuid>\"\n    },\n    \"postBilledItems\": {\n      \"cashPoint\": \"<cash-point-uuid>\",\n      \"cashier\": \"<provider-uuid>\"\n    },\n    \"serviceTypes\": {\n      \"billableService\": \"<concept-set-uuid>\"\n    },\n    \"waiverPaymentModeUuid\": \"<payment-mode-uuid>\"\n  }\n}\n```\n\nAll UUIDs must reference resources that exist in your OpenMRS instance. See `src/config-schema.ts` for defaults and detailed descriptions of each property. Configuration can be managed via the app shell or import-map-deployer.\n\n#### Visit attribute types\n\nThe `patientCategory` config keys map to visit attribute types that store billing information on each visit. The following must exist in your backend:\n\n| Config key | Purpose | Default UUID |\n| --- | --- | --- |\n| `paymentDetails` | Whether the patient is paying or non-paying | `fbc0702d-b4c9-4968-be63-af8ad3ad6239` |\n| `paymentMethods` | Payment method (cash, insurance, etc.) | `8553afa0-bdb9-4d3c-8a98-05fa9350aa85` |\n| `policyNumber` | Insurance policy number | `aac48226-d143-4274-80e0-264db4e368ee` |\n| `insuranceScheme` | Insurance scheme name | `3a988e33-a6c0-4b76-b924-01abb998944b` |\n| `patientCategory` | Patient category classification | `3b9dfac8-9e4d-11ee-8c90-0242ac120002` |\n| `formPayloadPending` | Whether a billing form submission is pending | `919b51c9-8e2e-468f-8354-181bf3e55786` |\n\n#### Bill creation prerequisites\n\nCreating a bill requires a valid cash point and cashier (provider) UUID. The backend's `BillResource.save()` will attempt to load these from the cashier's active timesheet if the `billing.timesheetRequired` global property is set. Otherwise, the values from `postBilledItems.cashPoint` and `postBilledItems.cashier` in the frontend config are used. If neither is available, bill creation will fail.\n\n### Demo content alignment\n\nIf you are using the [demo content package](https://github.com/openmrs/openmrs-content-referenceapplication-demo), the following backend seeds are relevant (paths relative to that repo):\n\n- Billable services: `configuration/backend_configuration/billableservices/billableServices.csv`\n- Payment modes: `configuration/backend_configuration/paymentmodes/paymentModes.csv`\n- Cash points: `configuration/backend_configuration/cashpoints/cashPoints.csv`\n- Visit attribute types: `configuration/backend_configuration/attributetypes/attribute_types-core_demo.csv`\n- Receipt number generator: `configuration/backend_configuration/globalproperties/billing-core_demo.xml`\n\nThe following frontend config defaults match UUIDs seeded by the demo content:\n\n| Config key | Default UUID | Demo content match |\n| --- | --- | --- |\n| `patientCategory.paymentDetails` | `fbc0702d...` | \"Patient Type\" visit attribute type |\n| `patientCategory.paymentMethods` | `8553afa0...` | \"Payment Method\" visit attribute type |\n| `patientCategory.policyNumber` | `aac48226...` | \"Insurance Policy Number\" visit attribute type |\n| `patientCategory.insuranceScheme` | `3a988e33...` | \"Insurance Scheme\" visit attribute type |\n| `postBilledItems.cashPoint` | `54065383...` | \"OPD Cash Point\" cash point |\n\nThe following defaults are **not seeded** by the demo content and must be created manually or overridden:\n\n| Config key | Default UUID | What's needed |\n| --- | --- | --- |\n| `patientCategory.patientCategory` | `3b9dfac8...` | A visit attribute type for patient category classification |\n| `patientCategory.formPayloadPending` | `919b51c9...` | A visit attribute type for pending form status |\n| `postBilledItems.cashier` | `f9badd80...` | A provider UUID for the default cashier |\n| `waiverPaymentModeUuid` | `eb6173cb...` | A payment mode for bill waivers |\n| `serviceTypes.billableService` | `21b8cf43...` | A concept set whose members define billable service types |\n\n## Troubleshooting\n\nIf you notice that your local version of the application is not working or that there's a mismatch between what you see locally versus what's in [dev3](https://dev3.openmrs.org/openmrs/spa), you likely have outdated versions of core libraries. To update core libraries, run the following commands:\n\n```bash\n# Upgrade core libraries\nyarn up openmrs@next @openmrs/esm-framework@next\n```\n\n### Reset version specifiers to `next`. Don't commit actual version numbers\n\n```bash\ngit checkout package.json\n```\n\n### Run `yarn` to recreate the lockfile\n\n```bash\nyarn\n```\n\nPlease see the [Implementer Documentation](https://wiki.openmrs.org/pages/viewpage.action?pageId=224527013) for more information about configuring modules.\n\n## Design Patterns\n\nFor documentation about our design patterns, please visit our [design system](https://zeroheight.com/23a080e38/p/880723--introduction) documentation website.\n\n## Deployment\n\nSee [Creating a Distribution](https://openmrs.atlassian.net/wiki/x/IABBHg) for information about adding frontend modules to a distribution.\n\n## Contributing\n\nFor more information on how to get started, please refer to [OpenMRS Frontend Developer Documentation](https://openmrs.atlassian.net/wiki/x/94ABCQ).\n\nDetailed documentation on the Billing Module can be found [in the OpenMRS Wiki](https://openmrs.atlassian.net/wiki/x/0w2bAQ).\n","readmeFilename":"README.md","_rev":"1-c31ab6be7a67743796e1013efbe64374"}