Skip to content

Commit

Permalink
Merge pull request masslight#128 from masslight/add-uc
Browse files Browse the repository at this point in the history
feat: add urgent care
  • Loading branch information
saewitz authored Feb 1, 2024
2 parents e8a3474 + aad3fbd commit bde5c6b
Show file tree
Hide file tree
Showing 482 changed files with 40,646 additions and 2,227 deletions.
5 changes: 4 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ packages/**/node_modules/
package-lock.json
packages/**/scripts/
packages/**/build/
packages/**/dist/
packages/**/dist/
packages/utils/
vite.config.ts
vitest.config.ts
40 changes: 21 additions & 19 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ module.exports = {
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
'plugin:prettier/recommended',
'plugin:typescript-sort-keys/recommended',
//'plugin:typescript-sort-keys/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./tsconfig.base.json', './packages/**/tsconfig.json'],
tsconfigRootDir: __dirname,
project: ['./tsconfig.base.json', './packages/**/tsconfig.json', './apps/**/tsconfig.json'],
},
plugins: ['@typescript-eslint', 'typescript-sort-keys'],
plugins: ['@typescript-eslint' /*, 'typescript-sort-keys'*/],
root: true,
rules: {
'@typescript-eslint/explicit-function-return-type': [
Expand All @@ -29,23 +29,25 @@ module.exports = {
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
'@typescript-eslint/no-unused-vars': 'off',
'react/jsx-key': 'off',
//'@typescript-eslint/no-unused-vars': [
// 'error',
// {
// argsIgnorePattern: '^_',
// varsIgnorePattern: '^_',
// },
//],
'prefer-promise-reject-errors': 'error',
'react/jsx-sort-props': [
'error',
{
locale: 'auto',
multiline: 'ignore',
reservedFirst: ['key'],
},
],
'sort-keys': ['error', 'asc', { caseSensitive: true, minKeys: 2, natural: true }],
//'react/jsx-sort-props': [
// 'error',
// {
// locale: 'auto',
// multiline: 'ignore',
// reservedFirst: ['key'],
// },
//],
//'sort-keys': ['error', 'asc', { caseSensitive: true, minKeys: 2, natural: true }],
},
settings: {
react: {
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ jobs:
name: 'secrets.json'
json: ${{ secrets.OTTEHR_SECRETS_JSON }}

- name: Move env file into .env folder
run: mkdir -p packages/zambdas/.env/ && cp secrets.json packages/zambdas/.env/${{ vars.ENVIRONMENT }}.json
#- name: Move env file into .env folder
# run: mkdir -p packages/ehr/zambdas/.env/ && cp secrets.json packages/ehr/zambdas/.env/${{ vars.ENVIRONMENT }}.json

- name: Set the zambdas/.env/dev.json
run: cp packages/ehr/zambdas/.env/local.template.json packages/ehr/zambdas/.env/dev.json

- id: get-store-path
run: echo STORE_PATH=$(pnpm store path) >> $GITHUB_OUTPUT
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
.pnpm-store
.eslintcache
build
.DS_Store
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ To proceed with this setup guide, it is assumed that you have access to a ZapEHR
Visit [https://github.com/masslight/ottehr/fork](https://github.com/masslight/ottehr/fork) and fork the repository.
2. **Clone Your Fork:**
Copy the HTTPS clone link of your fork and execute the following command in your preferred folder:
Copy the SSH clone link of your fork and execute the following command in your preferred folder:
```bash
git clone https://github.com/{{your-git-user-name}}/{{ottehr-fork-name}}.git
git clone git@github.com:{your_profile}/ottehr.git
```
3. (Optional) **Add Ottehr as Upstream:**
If desired, add the original Ottehr repository as an upstream remote:
Expand Down
97 changes: 92 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
"private": true,
"scripts": {
"test": "pnpm recursive run test",
"build": "sh ./scripts/build.sh",
"build": "sh ./scripts/build-uc.sh",
"lint": "eslint packages/",
"start": "pnpm start:local",
"start:local": "pnpm recursive run start:local",
"ehr:start": "pnpm --filter 'ottehr-ehr-*' --stream=true start:local",
"start:local": "pnpm --filter 'ottehr-*' --stream=true start:local",
"start:dev": "pnpm recursive run start:dev",
"start:dev2": "pnpm recursive run start:dev2",
"start:testing": "pnpm recursive run start:testing",
"start:staging": "pnpm recursive run start:staging",
"update": "pnpm recursive up -L -i"
"update": "pnpm recursive up -L -i",
"uc:start": "turbo start --filter=ottehr-urgent-care-zambdas --filter=ottehr-urgent-care-intake-ui"
},
"packageManager": "[email protected]",
"engines": {
Expand All @@ -32,24 +34,109 @@
]
},
"devDependencies": {
"@types/uuid": "9.0.7",
"@auth0/auth0-react": "^1.12.0",
"@aws-sdk/client-s3": "^3.272.0",
"@changesets/cli": "2.26.2",
"@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5",
"@hookform/resolvers": "^2.9.10",
"@mui/lab": "^5.0.0-alpha.115",
"@mui/material": "^5.14.18",
"@mui/system": "^5.10.16",
"@mui/x-date-pickers": "^5.0.10",
"@sendgrid/mail": "^7.7.0",
"@sentry/react": "^7.80.1",
"@twilio/conversations": "^2.4.1",
"@types/fhir": "^0.0.35",
"@types/jsonwebtoken": "9.0.4",
"@types/luxon": "^3.1.0",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"@vitejs/plugin-react": "^4.1.1",
"@zapehr/sdk": "1.0.15",
"aws-lambda": "^1.0.7",
"browserslist-to-esbuild": "^1.2.0",
"concurrently": "8.2.2",
"env-cmd": "^10.1.0",
"eslint": "^8.29.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-typescript-sort-keys": "^3.1.0",
"fast-json-patch": "^3.1.1",
"i18next-browser-languagedetector": "^7.0.1",
"luxon": "^3.1.1",
"mixpanel-browser": "^2.45.0",
"node-fetch": "2.6.1",
"pdf-lib": "^1.17.1",
"prettier": "^2.8.0",
"typescript": "^4.7.4"
"query-string": "^7.1.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.40.0",
"react-i18next": "^12.2.0",
"react-imask": "^6.4.3",
"react-markdown": "^9.0.0",
"react-query": "^3.39.3",
"react-router-dom": "^6.3.0",
"short-uuid": "^4.2.2",
"twilio": "^4.18.0",
"typescript": "^4.7.4",
"vite": "^4.5.0",
"vite-plugin-istanbul": "5.0.0",
"vite-plugin-svgr": "^4.1.0",
"vite-tsconfig-paths": "^4.2.1",
"web-vitals": "^2.1.4",
"yup": "^0.32.11",
"zustand": "^4.4.6",
"uuid": "9.0.1"
},
"dependencies": {
"@playwright/test": "^1.39.0",
"@sentry/vite-plugin": "^2.10.2",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"@types/aws-lambda": "^8.10.109",
"@types/fhir": "^0.0.35",
"@types/jest": "^27.5.2",
"@types/luxon": "^3.1.0",
"@types/mixpanel-browser": "^2.38.1",
"@types/node": "^18.11.18",
"@types/node-fetch": "^2.6.2",
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@typescript-eslint/eslint-plugin": "^5.5.0",
"@typescript-eslint/parser": "^5.5.0",
"@vitest/coverage-v8": "^0.34.6",
"@types/inquirer": "^8.0.0",
"aws-lambda": "^1.0.7",
"axios": "1.5.1",
"jsonwebtoken": "9.0.2"
"env-cmd": "^10.1.0",
"eslint": "^8.51.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-react-hooks": "^4.6.0",
"happy-dom": "^12.10.3",
"husky": "^8.0.0",
"jest": "^29.6.2",
"jose": "5.2.0",
"jsonwebtoken": "9.0.2",
"lint-staged": "^15.0.2",
"prettier": "^3.0.0",
"react-scripts": "^5.0.1",
"serverless": "^3.26.0",
"serverless-esbuild": "^1.45.1",
"serverless-offline": "^12.0.3",
"serverless-plugin-typescript": "^2.1.5",
"ts-node": "^10.9.1",
"turbo": "^1.11.3",
"typescript": "^4.9.5",
"vite-plugin-node-polyfills": "^0.16.0",
"vitest": "^0.34.6",
"web-vitals": "^2.1.4",
"inquirer": "^8.0.0"
}
}
18 changes: 0 additions & 18 deletions packages/app/src/components/NotFound.tsx

This file was deleted.

5 changes: 5 additions & 0 deletions packages/ehr/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.serverless
.esbuild
.env
.env.local
.local.json
23 changes: 23 additions & 0 deletions packages/ehr/front-end/env/.env.local-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
PORT=3200
VITE_APP_IS_LOCAL=true
VITE_APP_ZAPEHR_APPLICATION_CLIENT_ID=placeholder_client_id
VITE_APP_ZAPEHR_APPLICATION_DOMAIN=https://auth.zapehr.com
VITE_APP_ZAPEHR_APPLICATION_AUDIENCE=https://api.zapehr.com
VITE_APP_ZAPEHR_APPLICATION_REDIRECT_URL=http://localhost:3200
VITE_APP_ZAPEHR_CONNECTION_NAME=
VITE_APP_MUI_X_LICENSE_KEY=
VITE_APP_ORGANIZATION_NAME_LONG=Ottehr
VITE_APP_ORGANIZATION_NAME_SHORT=Ottehr
VITE_APP_FHIR_API_URL=https://fhir-api.zapehr.com
VITE_APP_PROJECT_API_URL=https://project-api.zapehr.com/v1
VITE_APP_PROJECT_API_ZAMBDA_URL=http://localhost:3201/local
VITE_APP_INTAKE_ZAMBDAS_URL=http://localhost:3000/local
VITE_APP_CHECK_IN_ZAMBDA_ID=check-in
VITE_APP_GET_APPOINTMENTS_ZAMBDA_ID=get-appointments
VITE_APP_GET_PATIENT_ZAMBDA_ID=get-patient
VITE_APP_GET_PATIENTS_ZAMBDA_ID=get-patients
VITE_APP_CREATE_APPOINTMENT_ZAMBDA_ID=create-appointment
VITE_APP_UPDATE_USER_ZAMBDA_ID=update-user
VITE_APP_DEACTIVATE_USER_ZAMBDA_ID=deactivate-user
VITE_APP_GET_PAPERWORK_ZAMBDA_ID=get-paperwork
VITE_APP_GET_TOKEN_FOR_CONVERSATION_ZAMBDA_ID=get-token-for-conversation
21 changes: 21 additions & 0 deletions packages/ehr/front-end/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="./public/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="./public/logo192.png" />
<link rel="manifest" href="./public/manifest.json" />
<title>Ottehr EHR</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="./src/index.tsx"></script>
</body>
</html>
81 changes: 81 additions & 0 deletions packages/ehr/front-end/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"name": "ottehr-ehr-front-end",
"version": "1.2.1",
"private": true,
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"scripts": {
"start": "pnpm run start:local",
"start:local": "vite --host 0.0.0.0 --mode default",
"build": "npm run build:development",
"build:local": "ENV=local npm run build-skeleton",
"build:development": "ENV=development npm run build-skeleton",
"build:testing": "ENV=testing npm run build-skeleton",
"build:staging": "ENV=staging npm run build-skeleton",
"build:production": "ENV=production npm run build-skeleton",
"build-skeleton": "tsc && vite build --mode ${ENV}",
"preview": "vite preview --port 3200",
"lint": "eslint",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"dependencies": {
"@auth0/auth0-react": "^1.12.0",
"@mui/icons-material": "^5.14.9",
"@mui/lab": "^5.0.0-alpha.122",
"@mui/material": "^5.10.17",
"@mui/x-data-grid-pro": "^6.3.0",
"@mui/x-date-pickers": "^5.0.20",
"@mui/x-date-pickers-pro": "^5.0.20",
"@twilio/conversations": "^2.4.1",
"@zapehr/sdk": "^1.0.15",
"chart.js": "^4.4.1",
"fast-json-patch": "^3.1.1",
"luxon": "^3.2.1",
"react": "^18.2.0",
"react-chartjs-2": "^5.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.40.0",
"react-i18next": "^12.2.0",
"react-imask": "^6.4.3",
"react-number-format": "^5.3.1",
"react-router-dom": "^6.3.0",
"react-toastify": "^9.1.3",
"tsconfig": "*",
"utils": "*"
},
"devDependencies": {
"@testing-library/jest-dom": "^6.2.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^28.1.8",
"@types/luxon": "^3.2.0",
"@types/mixpanel-browser": "^2.47.5",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"@typescript-eslint/eslint-plugin": "^6.18.1",
"@typescript-eslint/parser": "^6.18.1",
"@vitejs/plugin-react": "^4.1.1",
"@vitejs/plugin-react-swc": "3.4.0",
"@vitest/coverage-v8": "^0.34.6",
"browserslist-to-esbuild": "^1.2.0",
"env-cmd": "^10.1.0",
"jest": "28",
"react-scripts": "^5.0.1",
"vite": "^4.5.0",
"vite-plugin-svgr": "^4.1.0",
"vite-tsconfig-paths": "^4.2.1",
"vitest": "^0.34.6",
"web-vitals": "^2.1.4"
}
}
Binary file added packages/ehr/front-end/public/favicon.ico
Binary file not shown.
Loading

0 comments on commit bde5c6b

Please sign in to comment.