ResultsReview
<co-results-review>ResultsReview is the inbox detail for one resulted order: values against the prior draw, then Acknowledge, Comment, Route and Notify Patient. A critical value needs the read-back recorded before Acknowledge.
import { ResultsReview } from 'health-components';
Examples
Showcase
Routine
Read Only
Usage
<ResultsReview result={bmp} routeOptions={["Lisa Chen RN", "Cardiology nurse pool"]} />
When to use
- Results inbox detail pane; covering-clinician review.
When not to use
- Trends across many draws: ResultsTrendPanel.
Variants and states
| Variant | What it is |
|---|---|
| new | Grey New tag. |
| critical | Red alert; Acknowledge is disabled until "Read-back done" is ticked. |
| comment | Inline comment box. |
| route | Pick a person or pool, then Route. |
| routed | Blue tag with the recipient. |
| acknowledged | Green tag and a locked confirmation. |
| readOnly | Lock message for roles that cannot acknowledge. |
Clinical values
Every number renders through CareOS.ClinicalValue and CareOS.fmt (the clinical-values builder), matched by LOINC; measures that table lacks (NT-proBNP, lactate, vancomycin trough, CrCl, PHQ-9, per-kg doses) use a local table with the same rules: tabular figures, the unit always shown, fixed decimals per measure (potassium 1, sodium 0, creatinine 2), the reference range in the title or beside it, and H, L, HH or LL flags in words for screen readers. The flag says where the number sits against the adult reference range in the rules table; it does not say the number was measured correctly.
Accessibility
- A critical value uses role alert.
- Acknowledge says why it is disabled through the required checkbox next to it.
Do and don't
- Do: Show the prior value next to the new one.
- Don't: Allow acknowledging a critical value without a read-back.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
result * | ResultReviewResult | — | The resulted order; required |
routeOptions | string[] | none | People and pools the result can be routed to |
user | string | 'You' | Name of the signed-in user, used on new comments |
readOnly | boolean | false | View only (role cannot acknowledge) |
status | ResultReviewStatus | uncontrolled, starting at `result.status` | Review status (controlled) |
onStatusChange | (status: ResultReviewStatus) => void | none | Called when the status changes |
onAcknowledge | () => void | none | Called when the user acknowledges the result |
onComment | (comment: ResultReviewComment) => void | none | Called with a comment the user adds |
onRoute | (to: string) => void | none | Called with the person or pool the result is routed to |
onNotifyPatient | () => void | none | Called when the user clicks Notify Patient |
rangeContext | RangeContextId | the global context, else 'outpatient' | Which shared reference range flags use; the lab range on a result still wins |
Also accepts native attributes, including defaultChecked, defaultValue, autoFocus, plus className and event handlers on the root element.
Angular, Vue and HTML
Register the elements once (Angular guide), then use <co-results-review>. Attributes take strings; arrays and objects are set as properties (Angular [prop], Vue :prop) or as JSON attributes. Callbacks are DOM events with the value in event.detail.
<co-results-review user="…" read-only [result]="result" (co-status-change)="onStatusChange($event.detail)"></co-results-review>
| Kind | Name | Description |
|---|---|---|
| property / JSON attribute | result | The resulted order; required |
| property / JSON attribute | route-options / routeOptions | People and pools the result can be routed to; default none |
| attribute | user | Name of the signed-in user, used on new comments; default 'You' |
| attribute | read-only / readOnly | View only (role cannot acknowledge); default false |
| attribute | status | Review status (controlled); default uncontrolled, starting at `result.status` |
| attribute | range-context / rangeContext | Which shared reference range flags use; the lab range on a result still wins; default the global context, else 'outpatient' |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus | |
| event | co-status-change | Called when the status changes; default none (React: onStatusChange) |
| event | co-acknowledge | Called when the user acknowledges the result; default none (React: onAcknowledge) |
| event | co-comment | Called with a comment the user adds; default none (React: onComment) |
| event | co-route | Called with the person or pool the result is routed to; default none (React: onRoute) |
| event | co-notify-patient | Called when the user clicks Notify Patient; default none (React: onNotifyPatient) |