Pathology Node Catalog
The 8 pathology-specific node types in the editor palette and their canonical-state mappings.
The 8 pathology-specific node types that appear in the editor palette. Each maps to a canonical state in state-machine.md and renders as a custom card in
PathologyNodeCanvas.
Node Type Enum
Defined in web/src/common/components/medical/builder/pathology-workflow-editor/types/index.ts:
export enum PathologyNodeType {
REGISTER = 'pathology-register', // pending → received
GROSSING = 'pathology-grossing', // received → grossing
SLIDE_PREP = 'pathology-slide-prep', // grossing → slide_prep
SLIDE_SCAN = 'pathology-slide-scan', // slide_prep → slide_scan
SIGN_OUT = 'pathology-sign-out', // slide_scan → sign_out
RELEASE = 'pathology-release', // sign_out → released
REJECT = 'pathology-reject', // pending → rejected (terminal)
AMEND = 'pathology-amend', // released → sign_out (audit-tracked)
}
Catalog
| Node | State | Default Color | Default Icon | Has Queue | Cockpit Actions |
|---|---|---|---|---|---|
pathology-register |
received |
#ff9800 |
app_registration |
yes | Accept, Reject |
pathology-grossing |
grossing |
#8e24aa |
content_cut |
yes | Start, Complete, Hold |
pathology-slide-prep |
slide_prep |
#00acc1 |
science |
yes | Mark Stained, Re-cut |
pathology-slide-scan |
slide_scan |
#3949ab |
qr_code_scanner |
yes | Mark Scanned, Skip |
pathology-sign-out |
sign_out |
#43a047 |
assignment_ind |
yes | Open Microscope, Release |
pathology-release |
released |
#2e7d32 |
verified |
no | View Report, Amend |
pathology-reject |
rejected |
#e53935 |
block |
no | View Reason |
pathology-amend |
sign_out (re-entry) |
#fb8c00 |
history_edu |
yes | Open Amendment |
Schema (per node)
Every pathology node extends the base WorkflowNode interface from worklist-editor/types/index.ts with a pathologyMeta block:
interface PathologyWorkflowNode extends WorkflowNode {
apiType: 'labRequestPathology'; // fixed — routes to diagnostic.labRequest service
data: {
type: PathologyNodeType;
title: string; // English label
title_ja?: string; // Japanese (market pack: medos-japan)
title_th?: string; // Thai (market pack: medos-thailand)
title_fil?: string; // Filipino (market pack: medos-philippines)
color: string;
icon: string; // MUI icon name
pathologyMeta: {
canonicalState: string; // 'received' | 'grossing' | ...
requiresSignature: boolean; // true for sign_out, release, amend
requiresPhoto: boolean; // true for grossing
slaMinutes: number; // turnaround target in minutes
priority: 'routine' | 'urgent' | 'stat';
biohazardLevel: 1 | 2 | 3 | 4; // BSL classification for handling
};
cockpitActions: CockpitAction[];
queueConfig: QueueConfig; // reused from worklist-editor
};
}
Renderers
Each node has a dedicated React component in pathology-workflow-editor/nodes/:
| File | Renders |
|---|---|
PathologyRegisterNode.tsx |
Orange card with intake counter + reject badge |
PathologyGrossingNode.tsx |
Purple card with block count + photo indicator |
PathologySlidePrepNode.tsx |
Cyan card with stain matrix (H&E / IHC / Special) |
PathologySlideScanNode.tsx |
Indigo card with scanner status + queue depth |
PathologySignoutNode.tsx |
Green card with pathologist avatar + waiting count |
PathologyReleaseNode.tsx |
Dark green card with report status + signature pill |
PathologyRejectNode and PathologyAmendNode reuse _GenericPathologyNode since they are terminal/edge cases.
All renderers are pure presentational — they read from node.data and emit onConfigure(nodeId) to open the side panel. State mutation happens in the running app, not in the editor.
Adding a New Node Type
Bilingualism is mandatory (rule #7 in CLAUDE.md). To add a new pathology node:
- Add an entry to
PathologyNodeTypeenum - Create a renderer in
nodes/Node.tsx - Register it in
nodes/index.ts(thePATHOLOGY_NODE_REGISTRYmap) - Add a default-data factory in
defaults/pathology-default-workflow.ts - Add a row to the catalog table above
- Add transition rows to state-machine.md
- Add
title_ja/title_th/title_filtranslations