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

Create a task demo app #3555

Merged
merged 45 commits into from
Jan 19, 2024
Merged

Create a task demo app #3555

merged 45 commits into from
Jan 19, 2024

Conversation

ksmith94
Copy link
Collaborator

This will create a demo app based around the task workflow, including creating, editing, and deleting tasks, as well as bots based around common task-related workflows.

Copy link

vercel bot commented Dec 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
medplum-app ⬜️ Ignored (Inspect) Visit Preview Jan 19, 2024 10:46pm
medplum-storybook ⬜️ Ignored (Inspect) Visit Preview Jan 19, 2024 10:46pm
medplum-www ⬜️ Ignored (Inspect) Visit Preview Jan 19, 2024 10:46pm

@ksmith94 ksmith94 self-assigned this Dec 15, 2023
Copy link
Contributor

sweep-ai bot commented Dec 15, 2023

Apply Sweep Rules to your PR?

  • Apply: All new business logic should have corresponding unit tests.
  • Apply: Refactor large functions to be more modular.
  • Apply: Add docstrings to all functions and file headers.

examples/medplum-task-example-app/app/README.md Outdated Show resolved Hide resolved
examples/medplum-task-example-app/app/src/App.tsx Outdated Show resolved Hide resolved
examples/medplum-task-example-app/app/src/App.tsx Outdated Show resolved Hide resolved
examples/medplum-task-example-app/app/src/App.tsx Outdated Show resolved Hide resolved
examples/medplum-task-example-app/bots/medplum.config.json Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Jan 9, 2024

prettier errors have been resolved. Thank you.

#0aad2f1c55dcbcb1c9147bb684a1c0bca2d9d95f

Copy link

github-actions bot commented Jan 12, 2024

Messages
📖 @medplum/core: 153.1 kB
📖 @medplum/react: 336.9 kB

Generated by 🚫 dangerJS against 2e942fe

@rahul1 rahul1 marked this pull request as ready for review January 12, 2024 08:45
@rahul1 rahul1 requested a review from a team as a code owner January 12, 2024 08:45
Copy link
Member

@rahul1 rahul1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready for review

@rahul1 rahul1 force-pushed the kevin-task-demo-app branch 2 times, most recently from 7fa5fb1 to 9b716a0 Compare January 18, 2024 05:20
ksmith94 and others added 10 commits January 17, 2024 21:20
Create and deploy bots and create message data

Edit bots based on feedback

Make edits based on review

Update clinical profile and break out role queues for specific roles

Update file structure and make changes based on review

Update search pages for task specific tabs

Create page and route to upload data and remove task specific search page

Remove Error Boundary to reduce flicker

Update display of Task title

Delete unused queue pages

Add task actions back to task page

Update folder structure with data subdirs and get field and filters working on search controls

Update business status value set and add dependency to patient chart

Update readme

Reverting root package.json changes

Fixing package-lock.json

Fix prettier

Upgrade Task Demo to use `RouteProvider`

Simplify role loading to prevent links flickering

Clean up folder structure

Implement Upload pages

Update tab handling logic for search page

Minor copy change

Use

- Use DocumentReference instead of Media (#3698)

- Attach PDF to DiagnosticReport.presentedForm

Support a Linux Agent artifact on the publish GitHub Actions. Fixes 3699 (#3700)

* Rename Agent installer script to reference win64

* Add linux agent artifact and publishing workflow

Update copy and add practitioner roles value set

Remove unnecessary current tab state

Revert "Support a Linux Agent artifact on the publish GitHub Actions. Fixes 3699 (#3700)"

This reverts commit 165fabb.

Revert "- Use DocumentReference instead of Media (#3698)"

This reverts commit 1a8c561.

Remove unused RoleQueue page

Fixing package-lock?
.github/workflows/publish.yml Outdated Show resolved Hide resolved
scripts/build-agent-installer-linux.sh Outdated Show resolved Hide resolved
scripts/build-agent-installer-win64.sh Outdated Show resolved Hide resolved

const tab = window.location.pathname.split('/').pop();
const currentTab = tab && tabs.map((t) => t.toLowerCase()).includes(tab) ? tab : tabs[0].toLowerCase();
console.log('Current tab', tab);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete this

Copy link
Member

@codyebberson codyebberson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall lgtm, thanks @ksmith94 👍

Nothing major, just some topics that I think we should align on for example apps, as we want these to exemplify Medplum best practices:

  • I'm tempted to remove the dependabot.yml files from all examples to reduce noise
  • We should align on ESBuild vs tsc for bots without imports, again to reduce noise
  • There are a bunch of checks for if (!task.id) - I assume those were mostly done to satisfy the TypeScript compiler, when you can safely assume that task.id is populated
  • Let's remove all debugging console.log() calls

General comments, out of scope for this PR:

  • Quite a bit of duplicate code for notifications.show() - we have this same problem in the main packages/app. I wonder if we should align on 2-3 standard notifications in packages/react for these common cases to reduce boilerplate

Again, overall, really great work. Thanks @ksmith94

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need ESBuild here, vs just using tsc? Let's discuss offline w/ @rahul1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm tempted to remove the dependabot.yml files from all examples to reduce noise

I'm fine either way. Since we are syncing examples to external repos, I wasn't sure if it was required for that case. But of the root dependabot is handling this, we should be ok

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a bunch of checks for if (!task.id) - I assume those were mostly done to satisfy the TypeScript compiler, when you can safely assume that task.id is populated

Is the recommended solution casting task.id as string?

Copy link
Member

@ThatOneBro ThatOneBro Jan 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the recommended solution casting task.id as string?

Yes I think that should work!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @codyebberson! I've addressed all the comments and changed (!task.id) checks to cast them as task.id as string in all the instances it uses them. I also updated all the modals to use useDisclosure.

examples/medplum-task-demo/src/App.tsx Outdated Show resolved Hide resolved
examples/medplum-task-demo/src/pages/NotesPage.tsx Outdated Show resolved Hide resolved
examples/medplum-task-demo/src/pages/ResourcePage.tsx Outdated Show resolved Hide resolved
examples/medplum-task-demo/src/pages/SearchPage.tsx Outdated Show resolved Hide resolved
examples/medplum-task-demo/src/pages/TaskPage.tsx Outdated Show resolved Hide resolved
Copy link
Member

@rahul1 rahul1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix build errors, then approved!

@rahul1 rahul1 enabled auto-merge January 19, 2024 22:48
Copy link

sonarcloud bot commented Jan 19, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@rahul1 rahul1 added this pull request to the merge queue Jan 19, 2024
Merged via the queue into main with commit 82e2427 Jan 19, 2024
20 checks passed
@rahul1 rahul1 deleted the kevin-task-demo-app branch January 19, 2024 23:03
medplumbot added a commit that referenced this pull request Jan 21, 2024
Fixes #3753 - root constraint validation (#3779)
Fixes #3614 - configurable agent log level (#3781)
Fixed validateDOMNesting warning (#3780)
Fixes #3775 - AsyncAutocomplete call onChange on remove (#3777)
Dependency upgrades (#3774)
Remove notice to contact `info@medplum.com` to enable open patient registration (#3776)
Move logger from server to core (#3773)
Create a task demo app (#3555)
Add docs for setting up CORS when self-hosting (#3752)
Export NotesDisplay from @medplum/react (#3759)
Fixes #3751 - restore AsyncAutocomplete props (#3758)
Add CodeSystem validate-code operation (#3705)
Update provider directory docs to administration section (#3747)
Avoid error on SearchPage while schema is being requested (#3757)
Fixes #3755 - allow embedding PDFs on external domains (#3756)
Fixes #3653 - Agent handle DICOM C-STORE (#3736)
ci(madge): add `madge` job for PRs against `medplum/test-actions` (#3745)
Handle websocket max payload exceeded (#3750)
Implement CodeSystem lookup operation (#3702)
Require super admin for CodeSystem import (#3739)
Add OTel documentation (#3738)
Better error on unique constraint violation (#3743)
Dependency upgrades (#3744)
feat(examples): add live chat example (#3713)
Move response utils to separate file (#3742)
Fix wrapping CodeSystem import handler (#3741)
Add lookup table to index CodeSystem codings (#3731)
github-merge-queue bot pushed a commit that referenced this pull request Jan 21, 2024
Fixes #3753 - root constraint validation (#3779)
Fixes #3614 - configurable agent log level (#3781)
Fixed validateDOMNesting warning (#3780)
Fixes #3775 - AsyncAutocomplete call onChange on remove (#3777)
Dependency upgrades (#3774)
Remove notice to contact `info@medplum.com` to enable open patient registration (#3776)
Move logger from server to core (#3773)
Create a task demo app (#3555)
Add docs for setting up CORS when self-hosting (#3752)
Export NotesDisplay from @medplum/react (#3759)
Fixes #3751 - restore AsyncAutocomplete props (#3758)
Add CodeSystem validate-code operation (#3705)
Update provider directory docs to administration section (#3747)
Avoid error on SearchPage while schema is being requested (#3757)
Fixes #3755 - allow embedding PDFs on external domains (#3756)
Fixes #3653 - Agent handle DICOM C-STORE (#3736)
ci(madge): add `madge` job for PRs against `medplum/test-actions` (#3745)
Handle websocket max payload exceeded (#3750)
Implement CodeSystem lookup operation (#3702)
Require super admin for CodeSystem import (#3739)
Add OTel documentation (#3738)
Better error on unique constraint violation (#3743)
Dependency upgrades (#3744)
feat(examples): add live chat example (#3713)
Move response utils to separate file (#3742)
Fix wrapping CodeSystem import handler (#3741)
Add lookup table to index CodeSystem codings (#3731)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

4 participants