How ohcnetwork/care_pretty_print_fe works
This React plugin lets CARE healthcare workers find a patient and print an ID card from the facility route or CARE patient actions. Search submits identifiers through the request client; the results and selection are handled in the search page, which presents the browser-print card. CARE action wrappers also expose that card, while a separate Zebra path generates ZPL and uses the printer manager. The README documents QR lookup and these entry points. Some page and printer code was only excerpted, so the graph omits unshown details rather than assuming additional calls.
Main entry points: PatientSearchPage.tsx Patient search · PatientIdCardPrint.tsx Browser ID card · phone-input.tsx Phone input · ZebraZC300CardPrint.tsx Zebra card print
Components 21
CARE entry points
- Plugin manifest
src/manifest.ts - Facility route
src/routes.tsx - Patient home action
src/components/PatientHomeActionsWrapper.tsx - Profile print action
src/components/PrintIDCardButtonWrapper.tsx
Patient search
- Patient search
src/pages/PatientSearchPage.tsx - CARE API requests
src/lib/requests.ts - Patient data types
src/types/types.ts
Card printing
- Browser ID card
src/components/PatientIdCardPrint.tsx - Patient formatting
src/utils.ts - Zebra card print
src/components/ZebraZC300CardPrint.tsx - Printer manager
src/utils/ZC300PrinterManager.ts
Interface and utilities
- Button
src/components/ui/button.tsx - Card UI
src/components/ui/card.tsx - Text input
src/components/ui/input.tsx - Phone input
src/components/ui/phone-input.tsx - Command selector
src/components/ui/command.tsx - Popover
src/components/ui/popover.tsx - Scroll area
src/components/ui/scroll-area.tsx
Other components
- Healthcare worker
- CARE API
- Zebra Browser Print
Connections 32
- Plugin manifest → Facility route: registers
src/manifest.ts - Plugin manifest → Patient home action: registers
src/manifest.ts - Plugin manifest → Profile print action: registers
src/manifest.ts - Facility route → Patient search: routes to
src/routes.tsx - Healthcare worker → Patient search: searches
README.md - Healthcare worker → Patient home action: opens
README.md - Healthcare worker → Profile print action: opens
README.md - Patient home action → Browser ID card: renders
src/components/PatientHomeActionsWrapper.tsx - Patient home action → Zebra card print: renders
src/components/PatientHomeActionsWrapper.tsx - Profile print action → Browser ID card: renders
src/components/PrintIDCardButtonWrapper.tsx - Patient search → CARE API requests: requests
src/pages/PatientSearchPage.tsx - CARE API requests → CARE API: fetches
src/lib/requests.ts - Patient search → Browser ID card: renders
src/pages/PatientSearchPage.tsx - Patient search → Patient data types: uses types
src/pages/PatientSearchPage.tsx - Patient search → Button: renders
src/pages/PatientSearchPage.tsx - Patient search → Card UI: renders
src/pages/PatientSearchPage.tsx - Patient search → Text input: renders
src/pages/PatientSearchPage.tsx - Patient search → Phone input: renders
src/pages/PatientSearchPage.tsx - Browser ID card → Patient formatting: formats data
src/components/PatientIdCardPrint.tsx - Browser ID card → Patient data types: uses types
src/components/PatientIdCardPrint.tsx - Browser ID card → Button: renders
src/components/PatientIdCardPrint.tsx - Browser ID card → Healthcare worker: opens print dialog
README.md - Zebra card print → Patient formatting: formats data
src/components/ZebraZC300CardPrint.tsx - Zebra card print → Patient data types: uses types
src/components/ZebraZC300CardPrint.tsx - Zebra card print → Button: renders
src/components/ZebraZC300CardPrint.tsx - Zebra card print → Printer manager: connects and prints
src/components/ZebraZC300CardPrint.tsx - Printer manager → Zebra Browser Print: controls printer
src/utils/ZC300PrinterManager.ts - Phone input → Button: renders
src/components/ui/phone-input.tsx - Phone input → Command selector: renders
src/components/ui/phone-input.tsx - Phone input → Text input: renders
src/components/ui/phone-input.tsx - Phone input → Popover: uses trigger
src/components/ui/phone-input.tsx - Phone input → Scroll area: renders
src/components/ui/phone-input.tsx