-
Notifications
You must be signed in to change notification settings - Fork 538
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
Labs #9260
Draft
yash-learner
wants to merge
151
commits into
ohcnetwork:develop
Choose a base branch
from
yash-learner:issues/8683/lab-orders
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Labs #9260
Changes from 110 commits
Commits
Show all changes
151 commits
Select commit
Hold shift + click to select a range
22994f9
Add lab tests translation and sidebar navigation item
yash-learner e5e36d4
Add Lab Test routes and component for lab orders
yash-learner 2f5f4d6
Get tabs working
yash-learner 77f3368
Add @tanstack/react-table package
yash-learner a6868ba
Add shadcn Input and Table components
yash-learner 8a8c6f3
WIP get table structure
yash-learner 43b867b
WIP: get a basic structure for filtering
yash-learner cf8a514
Add shadcn separator
yash-learner a72e921
Add primary button variant styles
yash-learner a3a0795
Enhance TableFilter component with separators and clear filters funct…
yash-learner 18c768e
Update OrderPlaced component layout with improved spacing
yash-learner 60ae09c
Add shadcn Badge component
yash-learner d51bbff
Enhance DataTable component to support badge rendering for specific c…
yash-learner da56b83
Refactor OrderPlaced component to enhance filtering and add action bu…
yash-learner f6d6aab
Add shadcn Label and Radio Group components
yash-learner 4c3530a
Add radio button support to TableFilter component
yash-learner 1d08121
Add priority radio filter to OrderPlaced component and update initial…
yash-learner 2c7b06b
WIP: support multi select
yash-learner 9cb2081
Add shadcn Card and Collapsible components
yash-learner f39490c
WIP: Collect specimen page
yash-learner 462c3ae
Add sample collection UI and refactors
yash-learner 59e18d4
Fix layout alignment
yash-learner 129d3fa
Add barcode SVG icon
yash-learner 7caaa65
Add more UI elements
yash-learner c245b20
Add SendSpecimen route and enhance SpecimenCollected component
yash-learner 26913b9
Rename page title from "Lab Tests" to "Lab Orders"
yash-learner cc466a9
Add SendSpecimen component for specimen dispatch functionality
yash-learner 300de49
Add recieve state components
yash-learner 6c0fecd
Remove mock labs data from ReceiveSpecimen component
yash-learner caf36b7
Get remote button working and move some values
yash-learner 18653e7
Replace Cross2Icon with CrossCircledIcon
yash-learner 8806e57
Add more UI elements in ReceiveSpecimen
yash-learner 0bd7f74
Merge branch 'develop' into issues/8683/lab-orders
yash-learner 4e304d6
Remove duplicate primary button variant
yash-learner e7ba845
Make input work with changes came from develop remote
yash-learner 60689c9
Update sidebar icon for lab tests to use duotone microscope
yash-learner 200c632
Add SentToLab component
yash-learner 902cac6
Add received badge style to DataTable component
yash-learner af5d02d
Minor Changes
yash-learner b91e00e
Add basic Process speciem UI elements
yash-learner 6a8e632
Move buttons to buttom
yash-learner 66a6a0e
added create lab order form, lab order code select and wired them
khavinshankar b4eb957
Add results table
yash-learner 5802c0a
added list service requests component
khavinshankar 51b3484
Merge branch 'issues/8683/lab-orders' of github.com:yash-learner/care…
khavinshankar 6b813a9
wired labs flow till results entry
khavinshankar f8844e7
Add static Aliquot creation component
yash-learner d6cc353
Add static select analyzer
yash-learner 6da9f74
WIP: Improve the timeline styling
yash-learner d1b7f5b
Add clock history SVG icon
yash-learner 2c5beff
Add static Review result page
yash-learner ec26c1f
Add more static UI
yash-learner 783cf01
wired labs review flow
khavinshankar afcfd70
Merge branch 'develop' into issues/8683/lab-orders
yash-learner ec119e2
Wire note and priority
yash-learner a405ee4
Add utility function to map keys to Badge variants
yash-learner 96a00f6
Implement priority badge variant mapping
yash-learner 692ecbc
Add new badge variants
yash-learner 13de824
Update priority variant mapping and enhance Badge styling
yash-learner 5394951
Imrpove styling
yash-learner 0543496
Improve styling of the specimen collection
yash-learner 44f81b1
Add ResultTable component
yash-learner 8df9d4b
Use extracted out ResultTable
yash-learner dffbb5e
Add shadcn sekeleton loading
yash-learner 548b4cd
Add DataTableSkeleton component
yash-learner cb70ec5
Add table skeleton loading to all the tabs
yash-learner 2f80f46
Add skeleton loading for ListEncounter
yash-learner 9fec8ae
Remove @tanstack/react-table for now
yash-learner c14c33e
Merge branch 'develop' into issues/8683/lab-orders
yash-learner 0c1ecef
Run npm run install-all
yash-learner 3affc0f
Wire and UI changes
yash-learner 65fdbb3
Wire and reduce code repetition
yash-learner f287897
Extract out the timeline into a component and make it dynamic
yash-learner 229a4d0
WIP: Use extracted out timeline
yash-learner ad51d1d
Use dynamic ServiceRequestTimeline component in result component
yash-learner 7087c04
WIP: Wiring remaining steps in collect
yash-learner 64db5d3
Add empty message to DataTable component
yash-learner c207020
Use tanstack useQuery
yash-learner ba1b276
Use tanstack useMutation
yash-learner 4eed610
Conditionally render Collapsible for consolidated report
yash-learner 986a4fa
Extract out the Consolidated result collapsabile into a component
yash-learner 4b74345
Refactor ReviewResult to use ConsolidatedTestResults component and re…
yash-learner 7661154
Add note field to DiagnosticReport request type
yash-learner e0216e9
Fix note field rendering to handle undefined text value
yash-learner f4fd9d4
Slice the order id
yash-learner 02b6195
added lab apis and lab order tabs structure
khavinshankar eadc061
added lab order question along with types
khavinshankar f44f59c
added encounter lab orders list
khavinshankar 9a09fa2
added collect specimen page and respective components
khavinshankar cfdb9b6
added all the lab order tabs
khavinshankar 88406e0
added send specimen page (partially done)
khavinshankar 752d7a7
Merge branch 'labs-final' into issues/8683/lab-orders
yash-learner 1e5c277
Clean up after merge of labs-final
yash-learner 62e7781
add lab_tests link to sidebar navigation
yash-learner a8391e4
add localization strings for lab order tabs
yash-learner 875d3cb
add specimen collection localization and priority color coding in lab…
yash-learner c32e659
Re-wire all priority badges in all tabs
yash-learner 4c3a8a6
Re-wire the sendspecimen
yash-learner 818c2e0
Merge branch 'develop' into issues/8683/lab-orders
yash-learner df85fbb
Add SpecimenInfoCard
yash-learner 7f0bd4f
Add half circle icon
yash-learner f6e4e64
Make service request timeline work with multiple orders and re-wire m…
yash-learner 9219d87
WIP: re-wiring the Receive Specimen
yash-learner 1e0a9f8
WIP: re-wiring & re-refactoring the Process specimen
yash-learner 06566d9
Merge branch 'develop' into issues/8683/lab-orders
yash-learner a0378bf
Add lab tests link to facility navigation
yash-learner 1a0adeb
WIP: Re-wire refactor process specimen
yash-learner 586da36
WIP: lot of re-wiring, re-factor
yash-learner 6d3f6a0
WIP: Lot of re-wiring re-factor
yash-learner 86575c5
WIP: refactor re-wire
yash-learner 6928cb1
Extract out form and card
yash-learner fcc7f7d
Refactor specimen integrity form schema and improve barcode input han…
yash-learner eca77f7
Add optional note input to specimen integrity form and update display…
yash-learner c9e1be5
Tiny clean up
yash-learner 3c83300
Rename LabObservationQuestion to DiagnosticReportForm and update imports
yash-learner 1d5676f
Tiny clean up
yash-learner d3bbfc5
Merge branch 'develop' into issues/8683/lab-orders
yash-learner 86a8edb
This method somehow got missed while merging develop
yash-learner e90ecbc
Wire the organization for lab
yash-learner 2030406
Small clean up
yash-learner 3232ac8
Refactor SendSpecimenForm to use translation for form validation and …
yash-learner 35f5300
WIP: use zod & shadcn form for diagnosticreport form
yash-learner aff11f2
Add utility functions to display patient name and ID
yash-learner a0001f9
Update barcode input placeholder for clarity
yash-learner f607ee6
Improve UI/UX & add i18ln keys
yash-learner a3afded
Tiny changes
yash-learner 95d6a7b
Add displayPriority utility function
yash-learner 1f02c25
Wire displaying with util functions
yash-learner 94bf3f6
Enhance specimen condition validation and improve form layout
yash-learner 7ea4297
Use cn
yash-learner f3bd1f1
Add Results and wip add loading animation
yash-learner 8e2f067
Temp fix need to replace with phase
yash-learner c7c7979
Extract patient Details into a component
yash-learner 060a235
Use PatientDetails component
yash-learner 4fb62e8
Enhance button styling in Results and ReviewResult components
yash-learner 0d7fd02
Refactor ReviewResult component to use shadcn form & zod for conclusi…
yash-learner e8b63f0
Refactor Results component to use query for fetching diagnostic repor…
yash-learner 2644385
Add loading indicators to forms and buttons in Lab components
yash-learner 6ee8698
Fix linting errors
yash-learner f0b3ea3
Merge branch 'develop' into issues/8683/lab-orders
yash-learner 5668e40
Add service request phases and corresponding display labels and colors
yash-learner 002d239
Enhance EncounterLabOrdersList to display priority and phase with cor…
yash-learner 73c0274
Remove some styles in badge
yash-learner 9c02cc8
Add loading skeletons to CollectSpecimenFormCard during specimen coll…
yash-learner 301a71b
Add loading skeletons to CollectSpecimen component
yash-learner 97f0a01
Small cleanup
yash-learner 8cf93fb
Enhance LabObservationItem to include tooltips for unit selection and…
yash-learner eae70d9
Wire units properly
yash-learner 1d56ef1
Add loading skeleton to ResultTable for pending state
yash-learner 1fa99f4
Improve validation to unit code in DiagnosticReportForm
yash-learner 07a9e18
Update resulttable to handle the units and results
yash-learner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { LABS_BASE_ROUTE } from "@/components/Lab/constants"; | ||
import { CollectSpecimen } from "@/components/Lab/pages/CollectSpecimen"; | ||
import LabOrderTabs from "@/components/Lab/pages/LabOrderTabs"; | ||
import ReviewRequired from "@/components/Lab/pages/LabOrderTabs/ReviewRequired"; | ||
import { ProcessSpecimen } from "@/components/Lab/pages/ProcessSpecimen"; | ||
import { ReceiveSpecimen } from "@/components/Lab/pages/ReceiveSpecimen"; | ||
import { ReviewResult } from "@/components/Lab/pages/ReviewResult"; | ||
import SendSpecimen from "@/components/Lab/pages/SendSpecimen"; | ||
|
||
import { AppRoutes } from "@/Routers/AppRouter"; | ||
|
||
const LabRoutes: AppRoutes = { | ||
[`${LABS_BASE_ROUTE}/process`]: () => <ProcessSpecimen />, | ||
[`${LABS_BASE_ROUTE}/send_to_lab`]: () => <SendSpecimen />, | ||
[`${LABS_BASE_ROUTE}/receive_at_lab`]: () => <ReceiveSpecimen />, | ||
[`${LABS_BASE_ROUTE}`]: () => <LabOrderTabs />, | ||
[`${LABS_BASE_ROUTE}/:tab`]: () => <LabOrderTabs />, | ||
[`${LABS_BASE_ROUTE}/:encounterId/collect`]: ({ encounterId }) => ( | ||
<CollectSpecimen encounterId={encounterId} /> | ||
), | ||
[`${LABS_BASE_ROUTE}/:specimenId/process`]: ({ specimenId }) => ( | ||
<ProcessSpecimen specimenId={specimenId} /> | ||
), | ||
[`${LABS_BASE_ROUTE}/:diagnosticReportId/review`]: ({ | ||
diagnosticReportId, | ||
}) => <ReviewResult diagnosticReportId={diagnosticReportId} />, | ||
|
||
[`${LABS_BASE_ROUTE}/:diagnosticReportId/result`]: ({ | ||
diagnosticReportId, | ||
}) => <ReviewResult diagnosticReportId={diagnosticReportId} />, | ||
}; | ||
|
||
export default LabRoutes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { BadgeProps } from "@/components/ui/badge"; | ||
|
||
/** | ||
* Dynamically maps keys to Badge variants using a provided mapping object. | ||
* | ||
* @param key - The key to map (e.g., "routine", "asap"). | ||
* @param mapping - The mapping object that links keys to Badge variants. | ||
* @param defaultVariant - A fallback variant to use if the key is not found. | ||
*/ | ||
export const mapKeyToBadgeVariant = ( | ||
key: string | undefined, | ||
mapping: Record<string, BadgeProps["variant"]>, | ||
defaultVariant: BadgeProps["variant"] = "default", | ||
): BadgeProps["variant"] => { | ||
return mapping[key?.toLowerCase() || ""] || defaultVariant; | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these svgs, let's use library icons as much as possible,
Also, this half circle should be implemented as logic, should be dynamic