Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ENGAGE-HF Allergy Form #3

Open
wants to merge 31 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
220a328
add allergy form and medication selection components from engage
NikolaiMadlener Oct 22, 2024
44d7d93
use medplum fhir types
NikolaiMadlener Oct 23, 2024
b4ffc74
add dist to gitignore
NikolaiMadlener Oct 23, 2024
978399c
remove dist folder
NikolaiMadlener Oct 23, 2024
575c1c4
adjust workflows
NikolaiMadlener Oct 23, 2024
5a0d3ce
fix invalid hook call error
NikolaiMadlener Oct 24, 2024
591987a
add FHIR validation schemas, add allergy and observation FHIR types, …
NikolaiMadlener Nov 4, 2024
9b7829a
fix license headers
NikolaiMadlener Nov 4, 2024
d5a6b33
add UI tests to components
NikolaiMadlener Nov 7, 2024
4f2e1f6
add non-local spezi web design system package
NikolaiMadlener Nov 7, 2024
82c569e
update imports
NikolaiMadlener Nov 7, 2024
ab75f2c
formatting imports, fix tests by adding server deps inline to vite co…
NikolaiMadlener Nov 8, 2024
4e026ae
add missing input test in allergy form
NikolaiMadlener Nov 8, 2024
4a4b939
Update src/components/AllergyForm/MedicationSelect.tsx
NikolaiMadlener Nov 29, 2024
629f5d3
improve imports and decrease bundle size; remove unused storybook dep…
NikolaiMadlener Nov 29, 2024
761eb64
merge origin
NikolaiMadlener Nov 29, 2024
2621b34
fix dropdown menu
NikolaiMadlener Nov 30, 2024
d8737f7
lint
NikolaiMadlener Nov 30, 2024
d0c6a81
replace conditional with switch case in getObservationTypeUnits
NikolaiMadlener Nov 30, 2024
e0f96df
remove coding value of select in allergy form
NikolaiMadlener Nov 30, 2024
57d716d
ignore all config files in codecov
NikolaiMadlener Nov 30, 2024
7e3257f
update readme
NikolaiMadlener Dec 1, 2024
3101248
fix deployment badge
NikolaiMadlener Dec 1, 2024
6dde255
fix readme codecov link
NikolaiMadlener Dec 1, 2024
e9dc011
Update .github/workflows/deployment.yml
NikolaiMadlener Dec 16, 2024
38fe3da
Update package.json
NikolaiMadlener Dec 16, 2024
fc48687
clean up package.json and remove redundant dependencies
NikolaiMadlener Dec 23, 2024
9558d5c
Update src/components/AllergyForm/AllergyForm.test.tsx
NikolaiMadlener Dec 23, 2024
90f6ef5
resolve merge conflict
NikolaiMadlener Dec 23, 2024
ae73ad5
implement PR feedback
NikolaiMadlener Jan 3, 2025
7591b39
Updates to Allergy From (#11)
arkadiuszbachorski Jan 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .dockerignore

This file was deleted.

9 changes: 8 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
"parserOptions": {
"project": "./tsconfig.json"
},
"settings": {
"import/resolver": {
"typescript": {
"project": ["./tsconfig.json"]
}
}
},
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:@typescript-eslint/strict-type-checked",
Expand Down Expand Up @@ -103,7 +110,7 @@
},
"overrides": [
{
"files": ["app/**/*.ts?(x)", "**/*.stories.ts?(x)"],
"files": ["app/**/*.ts?(x)", "**/*.stories.ts?(x)", "vite.config.ts"],
"rules": {
"import/no-default-export": "off"
}
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
# This source file is part of the Stanford Biodesign Digital Health Spezi Web Health Components open-source project
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
#
Expand Down Expand Up @@ -35,9 +35,3 @@ jobs:
uses: StanfordBDHG/.github/.github/workflows/npm-test-and-coverage.yml@v2
secrets:
token: ${{ secrets.CODECOV_TOKEN }}
dockercomposetest:
name: Docker Compose & Test
uses: StanfordBDHG/.github/.github/workflows/docker-compose-test.yml@v2
with:
dockerComposeFile: docker-compose-development.yml
testscript: test.sh
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
# This source file is part of the Stanford Biodesign Digital Health Spezi Web Health Components open-source project
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
#
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#
# This source file is part of the Stanford Biodesign Digital Health Spezi Web Health Components open-source project
#
# SPDX-FileCopyrightText: 2024 Stanford University and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
#

name: Deployment

on:
release:
types: [published]
workflow_dispatch:

concurrency:
group: production
cancel-in-progress: false

jobs:
build-and-test:
name: Build and Test
uses: ./.github/workflows/build-and-test.yml
permissions:
contents: read
checks: write
actions: read
security-events: write
secrets: inherit
publishpackage:
name: Publish Package
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
scope: '@stanfordspezi'
- name: Clean Install
run: npm ci
- name: Set version
run: npm version --no-git-tag-version ${{ github.event.release.tag_name }}
- name: Build
run: npm run build
- name: Publish
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
40 changes: 0 additions & 40 deletions .github/workflows/main.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/monthly-markdown-link-check.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
# This source file is part of the Stanford Biodesign Digital Health Spezi Web Health Components open-source project
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
#
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/out/

# production
/build
/dist

# misc
.DS_Store
Expand Down
14 changes: 7 additions & 7 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
# This source file is part of the Stanford Biodesign Digital Health Spezi Web Health Components open-source project
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
# SPDX-FileCopyrightText: 2024 Stanford University and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
#
Expand All @@ -12,9 +12,9 @@ authors:
- family-names: 'Schmiedmayer'
given-names: 'Paul'
orcid: 'https://orcid.org/0000-0002-8607-9148'
- family-names: 'Ravi'
given-names: 'Vishnu'
orcid: 'https://orcid.org/0000-0003-0359-1275'
title: 'NextJSTemplate'
- family-names: 'Madlener'
given-names: 'Nikolai'
orcid: 'https://orcid.org/0009-0006-5059-6617'
title: 'Spezi Web Health Components'
doi: '10.5281/zenodo.10052055'
url: 'https://github.com/StanfordBDHG/NextJSTemplate'
url: 'https://github.com/StanfordSpezi/spezi-web-health-components'
8 changes: 4 additions & 4 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<!--

This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
This source file is part of the Stanford Biodesign Digital Health Spezi Web Health Components open-source project

SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
SPDX-FileCopyrightText: 2024 Stanford University and the project authors (see CONTRIBUTORS.md)

SPDX-License-Identifier: MIT

-->

# Stanford Biodesign Digital Health Next.js Template Contributors
# Stanford Biodesign Digital Health Spezi Web Health Components Contributors

- [Paul Schmiedmayer](https://github.com/PSchmiedmayer)
- [Vishnu Ravi](https://github.com/vishnuravi)
- [Nikolai Madlener](https://github.com/NikolaiMadlener)
67 changes: 0 additions & 67 deletions Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
Copyright (c) 2024 Stanford University and the project authors (see CONTRIBUTORS.md)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
2 changes: 1 addition & 1 deletion LICENSES/MIT.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
Copyright (c) 2024 Stanford University and the project authors (see CONTRIBUTORS.md)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
67 changes: 7 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,75 +1,22 @@
<!--

This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
This source file is part of the Stanford Biodesign Digital Health Spezi Web Health Components open-source project

SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
SPDX-FileCopyrightText: 2024 Stanford University and the project authors (see CONTRIBUTORS.md)

SPDX-License-Identifier: MIT

-->

# Biodesign Digital Health Next.js Template
# Biodesign Digital Health Spezi Web Health Components

[![Build and Test](https://github.com/StanfordBDHG/NextJSTemplate/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/StanfordBDHG/NextJSTemplate/actions/workflows/build-and-test.yml)
[![Deployment](https://github.com/StanfordBDHG/NextJSTemplate/actions/workflows/main.yml/badge.svg)](https://github.com/StanfordBDHG/NextJSTemplate/actions/workflows/main.yml)
[![codecov](https://codecov.io/gh/StanfordBDHG/NextJSTemplate/graph/badge.svg?token=dfQW5eZ2up)](https://codecov.io/gh/StanfordBDHG/NextJSTemplate)
[![Build and Test](https://github.com/StanfordSpezi/spezi-web-health-components/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/StanfordSpezi/spezi-web-health-components/actions/workflows/build-and-test.yml)
[![Deployment](https://github.com/StanfordSpezi/spezi-web-health-components/actions/workflows/main.yml/badge.svg)](https://github.com/StanfordSpezi/spezi-web-health-components/actions/workflows/main.yml)
[![codecov](https://codecov.io/gh/StanfordSpezi/spezi-web-health-components/graph/badge.svg?token=dfQW5eZ2up)](https://codecov.io/gh/StanfordSpezi/spezi-web-health-components)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10052055.svg)](https://doi.org/10.5281/zenodo.10052055)

## How To Use This Template

The template repository contains a template for a Next.js project providing automated GitHub Actions and setups for code linting, testing & test coverage reports, docker deployments, a docker compose setup, local packages for modular deployment, and documentation generation & deployment.

Follow these steps to customize it to your needs:

1. Rename the Next.js project.
2. Modify, add, or remove the local packages found at `/packages/*` to separate code into smaller modules.
3. Add dependencies and edit the project in `/app` and the local Node packages.

The main application is automatically deployed to https://stanfordbdhg.github.io/NextJSTemplate/.

The documentation of the local packages is automatically deployed to https://stanfordbdhg.github.io/NextJSTemplate/docs.

## Getting Started

You can run the project using the following command. You will need to install Node.js and npm, e.g., using [homebrew (recommended for macOS)](https://formulae.brew.sh/formula/node) or the official [Node.js installer](https://nodejs.org/en/download).

1. Install All Dependencies

```bash
npm install
```

1. Start the Next.js Application

```bash
npm run dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.<!-- markdown-link-check-disable-line -->

You can edit the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

## Docker

1. [Install Docker](https://docs.docker.com/get-docker/) on your machine.
2. Build the image and run the docker compose setup: `docker compose -f docker-compose-development.yml up`.

You can view your images created with `docker images`.

Open [http://localhost](http://localhost) with your browser to see the result. You can visit [http://localhost:8080](http://localhost:8080) to see the reverse proxy setup before the main application.<!-- markdown-link-check-disable-line -->

The `docker-compose.yml` setup contains a production-ready setup using a reverse proxy.

Every version of the application on the `main` branch is automatically packaged into docker images using the `main` tag. Every release is also published using the `latest` and respective version tags.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## License

Expand All @@ -78,7 +25,7 @@ This project is licensed under the MIT License. See [Licenses](https://github.co
## Contributors

This project is developed as part of the Stanford Byers Center for Biodesign at Stanford University.
See [CONTRIBUTORS.md](https://github.com/StanfordBDHG/NextJSTemplate/tree/main/CONTRIBUTORS.md) for a full list of all Next.js Template contributors.
See [CONTRIBUTORS.md](https://github.com/StanfordSpezi/spezi-web-health-components/tree/main/CONTRIBUTORS.md) for a full list of all contributors.

![Stanford Byers Center for Biodesign Logo](https://raw.githubusercontent.com/StanfordBDHG/.github/main/assets/biodesign-footer-light.png#gh-light-mode-only)
![Stanford Byers Center for Biodesign Logo](https://raw.githubusercontent.com/StanfordBDHG/.github/main/assets/biodesign-footer-dark.png#gh-dark-mode-only)
Binary file removed app/favicon.ico
Binary file not shown.
Loading
Loading