Frontend for phellow.community – an open source patient portal respecting KHZG requirements.
In order for this project to work as expected, you need to have:
- a SurrealDB Instance running and accessible
- an Identity Provider (IdP) with OAuth2
- a working FHIR Server
Follow the volta guide Getting started to install volta.
After installing volta, install pnpm
:
volta install pnpm
After cloning the repository, change into the project directory and install the dependencies:
pnpm i
Then build the web app:
pnpm run build
Finally launch the sample docker-compose via:
docker-compose -f docker-compose.sample.yaml up --build --force-recreate
You can now visit http://localhost:8081/login to see the login. Simply press login and you will be redirected to the dashboard. For this demo app instance, the login mechanism is handled in the background.
To stop running, press Ctrl-C
.
After cloning the repository, install the dependencies:
pnpm i
Then configure your endpoints in a .env
file (You can use the .env.mockoon.local
file, if you
want to run a demo environment using the provided Mockoon config. To do so
quickly, symlink the file: ln -s .env.mockoon .env
).
When using your own endpoints, it's easiest to copy the contents of .env.example
for all the
configurable variables and customize the values for your system.
In order for sessions to work, you need have a running SurrealDB instance
the backend can connect to. You can launch one in a Docker container with
the following command (--user
and -pass
have to match the SURREALDB_USER
& SURREALDB_PASS
values in your .env
file):
docker run --name surrealdb -d -p 8800:8000 surrealdb/surrealdb:latest start --user qlUwnyAXd --pass ig7x0lm9s9Vq4Qy -A
Launch the project in development mode and open the url printed by the command in your browser:
pnpm run dev
The frontend relies on Server-Side-Rendering (SSR) through SvelteKit. For more details, read architecture.md.
Read session.md.
This project uses Paraglide JS. It is highly recommended to use the VS Code extension Sherlock.
- Structured Data
- Patients can view structured data in the form of FHIR Observations.
- Anamnesis
- Patients can submit their anamnesis documents in the form of a FHIR QuestionnaireResponse.
- PROM/PREM
- Patient Reported Outcome Measures (PROM) & Patient Reported Experience Measures (PREM) can be collected.
- Schedule Appointments
- Patients can schedule an appointment with your institution.
In order to deploy, you need two components:
- The built SvelteKit application
- A surrealDB instance
pnpm run build
The outputs are located in the build
directory. For more details, see
Building your app in the SvelteKit
documentation.
First build the app as shown in the previous section, then you can use the Dockerfile. For an
example on how to deploy multiple services, see docker-compose.sample.yaml
.
Our Sources.
- FHIR Observations provided by Polar Project is greatly appreciated
Add a debugging script to package.json
:
"scripts": {
…
"debug": "NODE_OPTIONS='--inspect' vite dev",
…
},
Run the command:
pnpm run debug
Go to arc://inspect and hit Inspect in the process started in the previous step.
Place the debugger
statement in your server-side code and start debugging right from DevTools.