{"id":19664272,"url":"https://github.com/beda-software/emr-template","last_synced_at":"2025-05-05T14:42:40.629Z","repository":{"id":250365647,"uuid":"834003296","full_name":"beda-software/emr-template","owner":"beda-software","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-24T11:09:02.000Z","size":1170,"stargazers_count":1,"open_issues_count":2,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-24T12:24:20.532Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"MDX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beda-software.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-07-26T08:11:36.000Z","updated_at":"2025-04-24T11:09:05.000Z","dependencies_parsed_at":"2024-07-26T21:29:26.070Z","dependency_job_id":"0b3b1056-804b-4fb6-a6fc-30331fe6725e","html_url":"https://github.com/beda-software/emr-template","commit_stats":null,"previous_names":["beda-software/emr-template"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beda-software%2Femr-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beda-software%2Femr-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beda-software%2Femr-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beda-software%2Femr-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beda-software","download_url":"https://codeload.github.com/beda-software/emr-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252516232,"owners_count":21760745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T16:17:20.115Z","updated_at":"2025-05-05T14:42:40.605Z","avatar_url":"https://github.com/beda-software.png","language":"MDX","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EMR template\n\n- [Docs](https://docs.emr.beda.software/Developers%20Guide/custom-emr-build)\n- [Beda EMR](https://github.com/beda-software/fhir-emr)\n\n## Intro\n\nBeda EMR is designed to be a framework for building EHR and EMR solutions on top of it. This article describes how you can build your own custom version of Beda EMR suitable for your needs.\n\nWe prepared [Beda EMR template](https://github.com/beda-software/emr-template) for quick project initialization. The template\n- uses [vitejs](https://vitejs.dev/) and [yarn](https://yarnpkg.com/) for building frontend;\n- already includes all required dev dependencies;\n- includes [Beda EMR](https://github.com/beda-software/fhir-emr) as dependency so you could use containers, components, utils, etc. for you EMR;\n- has [linter](https://eslint.org/), [prettier](https://prettier.io/) and [husky](https://typicode.github.io/husky/) configured for better development experience;\n- includes basic [lingui](https://lingui.dev/) configuration\n- includes custom [aidbox types](https://docs.aidbox.app/storage-1/aidbox-and-fhir-formats)\n- has [storybook](https://storybook.js.org/) configured for development your custom components\n\n## Quick start guide\n\n1. Initialize the project.\nStart with fork or clone of [Beda EMR template](https://github.com/beda-software/emr-template).\n\n2. Initialize [Beda EMR](https://github.com/beda-software/fhir-emr) submodule.\n```\ngit submodule update --init\n```\n\n3. Copy local configuration file for development\n```\ncp contrib/emr-config/config.local.js contrib/emr-config/config.js\n```\n\n4. Prepare to run\n```\nyarn\n```\n\n5. Build language locales\n```\nyarn compile\n```\n\n6. Run\n```\nyarn start\n```\n\nNow you have fhir-emr under your full control.\n\nNext steps:\n- you can copy the whole https://github.com/beda-software/fhir-emr/blob/master/src/containers/App/index.tsx into your workspace to adjust routes and adjust page components.\n- you can replace the patient dashboard and theme as the next step of customization.\n\n\n## Running backend\n\nCopy envs\n```\ncp contrib/fhir-emr/.env.tpl contrib/fhir-emr/.env\n```\n\nadd your aidbox license to .env\n\n```\ncd contrib/fhir-emr\ndocker-compose up\n```\n\n## Adding new code to EMR submodule\n\nYou can update code of EMR inside `contrib/fhir-emr` directory.\nBut to see your changes you need to run\n\n```\nyarn prepare\n```\n\nRemember to push or make pull request for your changes in [Beda EMR](https://github.com/beda-software/fhir-emr) if you want them to be applied.\n\nThen add updated submodule to your git commit\n```\ngit add contrib/fhir-emr\ngit commit -m \"Update submodule\"\n```\n\n## Language locales\n\nIf you have new messages in your app that need to be translated use \n\n```\nyarn extract\n```\n\nthen add the translations and run\n\n```\nyarn compile\n```\n\n## Storybook\n\nStorybook works out of the box. If you need to create your own components you can create stories for them.\n\nTo run storybook use\n```\nyarn storybook\n```\n\nThe main storybook for Beda EMR also publicly available [here](https://master--64b7c5c51809d460dc448e6b.chromatic.com/).\n\n## Imports troubleshooting\n\n\u003cb\u003e1. If you face typescript/eslint error like\u003c/b\u003e\n\n```js\nModule '\"@beda.software/emr/utils\"' has no exported member 'getPersonAge'\n```\n\nMake sure that `getPersonAge` was used somewhere in the Beda EMR or it was explicitly exported\n\n```js\nexport * from './relative-date.ts';\n```\n\n\u003cb\u003e 2. If you face next eslint error when you import interface or type\u003c/b\u003e\n\n```js\nUnable to resolve path to module '@beda.software/emr/dist/components/Dashboard/types'.(eslintimport/no-unresolved)\n\n```\n\nMake sure to add  `type` when for your import\n\n```js\nimport type { Dashboard } from '@beda.software/emr/dist/components/Dashboard/types';\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeda-software%2Femr-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeda-software%2Femr-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeda-software%2Femr-template/lists"}