{"id":50742986,"url":"https://github.com/ohcnetwork/care_ai_widgets_fe","last_synced_at":"2026-06-10T18:30:41.445Z","repository":{"id":354620187,"uuid":"1224350650","full_name":"ohcnetwork/care_ai_widgets_fe","owner":"ohcnetwork","description":"AI-powered clinical widgets for Care frontend — configurable, prompt-driven insights embedded in patient encounter views.","archived":false,"fork":false,"pushed_at":"2026-05-04T10:16:03.000Z","size":139,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-23T06:42:38.967Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://care-ai-widgets-fe.pages.dev/","language":"TypeScript","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/ohcnetwork.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-29T07:40:18.000Z","updated_at":"2026-05-04T10:16:08.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ohcnetwork/care_ai_widgets_fe","commit_stats":null,"previous_names":["ohcnetwork/care_ai_widgets_fe"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ohcnetwork/care_ai_widgets_fe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohcnetwork%2Fcare_ai_widgets_fe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohcnetwork%2Fcare_ai_widgets_fe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohcnetwork%2Fcare_ai_widgets_fe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohcnetwork%2Fcare_ai_widgets_fe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ohcnetwork","download_url":"https://codeload.github.com/ohcnetwork/care_ai_widgets_fe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohcnetwork%2Fcare_ai_widgets_fe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34165482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2026-06-10T18:30:40.554Z","updated_at":"2026-06-10T18:30:41.438Z","avatar_url":"https://github.com/ohcnetwork.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Care AI Widgets — Frontend Plugin\n\nA [Care](https://github.com/ohcnetwork/care_fe) frontend plugin that adds **AI-powered clinical widgets** to the encounter overview. Clinicians can configure prompt-driven widgets that call an AI backend and render structured outputs — summaries, scores, ranked lists, and rich markdown — directly inside the patient chart.\n\n---\n\n## ✨ Features\n\n| Widget Type | Description |\n|---|---|\n| **Cited Summary** | 3–5 sentence encounter brief with source citations |\n| **Ranked List** | Prioritised clinical risks with severity scores and reasoning |\n| **Score** | Clinical scoring (e.g. NEWS2) with component breakdown |\n| **Markdown** | Structured prose sections with callout support (warning / info) |\n\n- **Template gallery** — pre-built prompts for common clinical tasks (encounter brief, active risks, discharge education, open questions, NEWS2).\n- **Custom widgets** — create your own with a name, prompt, model selector, and output type.\n- **Per-user storage** — widget configurations are saved to `localStorage`, scoped by user.\n- **Copy to clipboard** — one-click plain-text export of any widget output.\n\n## 🏗️ Architecture\n\n```\nsrc/\n├── components/AIWidgets/\n│   ├── api.ts              # API endpoint definition\n│   ├── types.ts            # Shared TypeScript types\n│   ├── schemas.ts          # JSON response schemas per widget type\n│   ├── templates.ts        # Built-in widget templates\n│   ├── store.ts            # Jotai atoms (per-user localStorage)\n│   ├── summarize.ts        # Output → plain-text converters\n│   ├── WidgetRunner.tsx     # Executes a single widget \u0026 renders result\n│   ├── WidgetSlot.tsx       # Renders all enabled widgets for an encounter\n│   ├── SettingsPage.tsx     # Widget management UI\n│   ├── EditorDialog.tsx     # Create / edit widget dialog\n│   └── renderers/\n│       ├── CitedSummaryWidget.tsx\n│       ├── MarkdownWidget.tsx\n│       ├── RankedListWidget.tsx\n│       └── ScoreWidget.tsx\n├── pages/\n│   ├── WidgetList.tsx       # /users/:user/ai-widgets\n│   └── WidgetEditor.tsx     # /users/:user/ai-widgets/:id\n└── manifest.tsx             # Plugin manifest (routes, nav items)\n```\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- A running [Care frontend](https://github.com/ohcnetwork/care_fe) dev environment\n\n\u003e [!IMPORTANT]\n\u003e This plugin requires the [**Care AI backend**](https://github.com/ohcnetwork/care_ai_be) plugin to be installed and running on your Care server. It provides the `/api/care_ai/encounter/{encounterId}/ask/` endpoint that powers all AI widget functionality. Without it, widgets will not be able to generate any output.\n\n### Install \u0026 Run\n\n```bash\n# Clone the repo\ngit clone https://github.com/ohcnetwork/care_ai_widgets_fe.git\ncd care_ai_widgets_fe\n\n# Install dependencies\nnpm install\n\n# Start dev server (build in watch mode + preview)\nnpm start\n```\n\n### Available Scripts\n\n| Script | Description |\n|---|---|\n| `npm start` | Build in watch mode and serve preview |\n| `npm run build` | Production build via Vite |\n| `npm run lint` | Run ESLint |\n| `npm run lint-fix` | Auto-fix lint issues |\n| `npm run format` | Format with Prettier |\n| `npm run sort-locales` | Sort locale JSON keys |\n\n## 🔌 Plugin Integration\n\nThis plugin is registered via `manifest.tsx`:\n\n- **Routes** — `/facility/:facilityId/users/:user/ai-widgets` (list \u0026 editor)\n- **Components** — `EncounterOverviewTop` injects the `WidgetSlot` into the encounter overview\n- **User Nav** — adds an \"AI Widgets\" link (✨) to the user dropdown menu\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohcnetwork%2Fcare_ai_widgets_fe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fohcnetwork%2Fcare_ai_widgets_fe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohcnetwork%2Fcare_ai_widgets_fe/lists"}