react-advanced-odontogram 2.0.2 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -1335
- package/dist/index.d.ts +716 -4
- package/dist/odontogram.js +3209 -2398
- package/dist/odontogram.js.map +1 -1
- package/package.json +7 -8
- package/dist/App.d.ts +0 -148
- package/dist/DualStateConfirm.d.ts +0 -25
- package/dist/ExportOptionsModal.d.ts +0 -26
- package/dist/PerioChart.d.ts +0 -67
- package/dist/PerioSidebar.d.ts +0 -1
- package/dist/SettingsModal.d.ts +0 -84
- package/dist/bridgeOverlay.d.ts +0 -116
- package/dist/fhir/codesystems.d.ts +0 -51
- package/dist/fhir/fieldMappings.d.ts +0 -35
- package/dist/fhir/fromFhir.d.ts +0 -7
- package/dist/fhir/primitives.d.ts +0 -16
- package/dist/fhir/toFhir.d.ts +0 -20
- package/dist/fhir/toFhirPerio.d.ts +0 -70
- package/dist/fhir/types.d.ts +0 -108
- package/dist/i18n/translations.d.ts +0 -27
- package/dist/i18n/useI18n.d.ts +0 -39
- package/dist/odontogram.d.ts +0 -1214
- package/dist/perioClassification.d.ts +0 -90
- package/dist/perioExport.d.ts +0 -13
- package/dist/perioGraphic.d.ts +0 -496
- package/dist/perioIndexNames.d.ts +0 -29
- package/dist/perioPdf.d.ts +0 -77
- package/dist/plugin.d.ts +0 -63
- package/dist/registry/axes.d.ts +0 -9
- package/dist/registry/fhir.d.ts +0 -3
- package/dist/registry/fromFhir.d.ts +0 -3
- package/dist/registry/restorations.d.ts +0 -26
- package/dist/registry/svgActivate.d.ts +0 -15
- package/dist/registry/svgLayers.d.ts +0 -14
- package/dist/registry/types.d.ts +0 -70
- package/dist/registry/uiOptions.d.ts +0 -17
- package/dist/registry/validate.d.ts +0 -4
- package/dist/status_extras.d.ts +0 -58
- package/dist/theme.d.ts +0 -51
- package/dist/tour.d.ts +0 -9
- package/dist/utils/numbering.d.ts +0 -23
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-advanced-odontogram",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Interactive, SVG-based dental odontogram (dental chart) editor for React + TypeScript — multi-surface caries/filling charting, endodontic/prosthetic/periodontal states, FDI/Universal/Palmer numbering, HL7 FHIR R4 export/import, and ICDAS scoring.",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"scripts": {
|
|
49
49
|
"dev": "vite",
|
|
50
50
|
"build": "tsc -b && vite build",
|
|
51
|
-
"build:lib": "vite build --config vite.lib.config.ts
|
|
51
|
+
"build:lib": "vite build --config vite.lib.config.ts",
|
|
52
52
|
"lint": "eslint .",
|
|
53
53
|
"preview": "vite preview",
|
|
54
54
|
"test": "vitest run",
|
|
@@ -63,15 +63,11 @@
|
|
|
63
63
|
"react-dom": "^18 || ^19"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"jspdf": "^4.
|
|
67
|
-
"nanoid": "^5.0.7",
|
|
68
|
-
"react-hook-form": "^7.53.0",
|
|
69
|
-
"react-router-dom": "^6.26.2"
|
|
66
|
+
"jspdf": "^4.2.1"
|
|
70
67
|
},
|
|
71
68
|
"devDependencies": {
|
|
72
|
-
"react": "^18.3.1",
|
|
73
|
-
"react-dom": "^18.3.1",
|
|
74
69
|
"@eslint/js": "^9.39.2",
|
|
70
|
+
"@microsoft/api-extractor": "^7.58.12",
|
|
75
71
|
"@testing-library/jest-dom": "^6.9.1",
|
|
76
72
|
"@testing-library/react": "^16.3.2",
|
|
77
73
|
"@types/fhir": "^0.0.44",
|
|
@@ -89,11 +85,14 @@
|
|
|
89
85
|
"jiti": "^2.6.1",
|
|
90
86
|
"jsdom": "^28.1.0",
|
|
91
87
|
"postcss": "^8.4.45",
|
|
88
|
+
"react": "^18.3.1",
|
|
89
|
+
"react-dom": "^18.3.1",
|
|
92
90
|
"tailwindcss": "^3.4.10",
|
|
93
91
|
"typedoc": "^0.28.17",
|
|
94
92
|
"typescript": "^5.5.3",
|
|
95
93
|
"typescript-eslint": "^8.53.1",
|
|
96
94
|
"vite": "^7.3.1",
|
|
95
|
+
"vite-plugin-dts": "^5.0.3",
|
|
97
96
|
"vitest": "^4.0.18"
|
|
98
97
|
}
|
|
99
98
|
}
|
package/dist/App.d.ts
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { clearSelection, setOcclusalVisible, setWisdomVisible, setShowBase, setHealthyPulpVisible, registerPlugins, setPluginState, getPluginState, getToothStateSummary, getOdontogramSummary, formatToothLabel, onStateChange, setReadOnly, getReadOnly, setNotesEnabled, getNotesEnabled, setIcdasEnabled, getIcdasEnabled, setPulpDetailLevel, getPulpDetailLevel, setSecondaryCariesMode, getSecondaryCariesMode, setRootCariesMode, getRootCariesMode, setRadiographicDepthMode, getRadiographicDepthMode, setCariesDepthEnabled, getCariesDepthEnabled, setWearDetailLevel, getWearDetailLevel, setDiscolorationDetailLevel, getDiscolorationDetailLevel, setSurfaceNotation, getSurfaceNotation, exportFhir, exportImage, exportSvg, setImportFormat, getPerioViewMode, setPerioViewMode, getPerioRowVisibility, setPerioRowVisibility, getPerioIndexNameMode, setPerioIndexNameMode, isDualStateConfirmPending, acceptDualStateConfirm, cancelDualStateConfirm } from "./odontogram";
|
|
2
|
-
export { clearSelection, setOcclusalVisible, setWisdomVisible, setShowBase, setHealthyPulpVisible, registerPlugins, setPluginState, getPluginState, getToothStateSummary, getOdontogramSummary, formatToothLabel, onStateChange, setReadOnly, getReadOnly, setNotesEnabled, getNotesEnabled, setIcdasEnabled, getIcdasEnabled, setPulpDetailLevel, getPulpDetailLevel, setSecondaryCariesMode, getSecondaryCariesMode, setRootCariesMode, getRootCariesMode, setRadiographicDepthMode, getRadiographicDepthMode, setCariesDepthEnabled, getCariesDepthEnabled, setWearDetailLevel, getWearDetailLevel, setDiscolorationDetailLevel, getDiscolorationDetailLevel, setSurfaceNotation, getSurfaceNotation, exportFhir, exportImage, exportSvg, setImportFormat, getPerioViewMode, setPerioViewMode, getPerioRowVisibility, setPerioRowVisibility, getPerioIndexNameMode, setPerioIndexNameMode, isDualStateConfirmPending, acceptDualStateConfirm, cancelDualStateConfirm };
|
|
3
|
-
export { default as PerioChart } from "./PerioChart";
|
|
4
|
-
import type { PulpDetailLevel, SecondaryCariesMode, RootCariesMode, RadiographicDepthMode, ToothDetailLevel, SurfaceNotation } from "./odontogram";
|
|
5
|
-
export type { PulpDetailLevel, SecondaryCariesMode, RootCariesMode, RadiographicDepthMode, ToothDetailLevel, SurfaceNotation, PerioViewMode, PerioRowId, PerioIndexNameMode } from "./odontogram";
|
|
6
|
-
export type { OdontogramSummary, OdontogramSummarySection } from "./odontogram";
|
|
7
|
-
export type { FhirExportOptions } from "./fhir/types";
|
|
8
|
-
export { startIntroTour } from "./tour";
|
|
9
|
-
import type { Language } from "./i18n/translations";
|
|
10
|
-
import type { NumberingSystem } from "./utils/numbering";
|
|
11
|
-
import { type OdontogramThemeConfig } from "./theme";
|
|
12
|
-
export type { OdontogramThemeConfig };
|
|
13
|
-
import type { OdontogramPlugin, PluginLayer } from "./plugin";
|
|
14
|
-
export type { OdontogramPlugin, PluginLayer };
|
|
15
|
-
/**
|
|
16
|
-
* Props for the main Odontogram application component.
|
|
17
|
-
*
|
|
18
|
-
* All props are optional — when omitted, the component operates in
|
|
19
|
-
* **standalone** mode with internal state. When provided, the component
|
|
20
|
-
* operates in **controlled** mode and delegates state to the parent.
|
|
21
|
-
*/
|
|
22
|
-
type AppProps = {
|
|
23
|
-
/** Override the UI language (controlled mode). */
|
|
24
|
-
language?: Language;
|
|
25
|
-
/** Callback when the user changes the language. */
|
|
26
|
-
onLanguageChange?: (lang: Language) => void;
|
|
27
|
-
/** Override the tooth numbering system (controlled mode). */
|
|
28
|
-
numberingSystem?: NumberingSystem;
|
|
29
|
-
/** Callback when the user changes the numbering system. */
|
|
30
|
-
onNumberingChange?: (system: NumberingSystem) => void;
|
|
31
|
-
/** Override dark mode state (controlled mode). */
|
|
32
|
-
darkMode?: boolean;
|
|
33
|
-
/** Callback when the user toggles dark mode. */
|
|
34
|
-
onDarkModeChange?: (dark: boolean) => void;
|
|
35
|
-
/**
|
|
36
|
-
* Custom theme configuration. Overrides the default color palette via
|
|
37
|
-
* CSS custom properties (`--odon-*`). See {@link OdontogramThemeConfig}.
|
|
38
|
-
*/
|
|
39
|
-
themeConfig?: OdontogramThemeConfig;
|
|
40
|
-
/**
|
|
41
|
-
* Custom SVG plugins for extending the odontogram with additional visual
|
|
42
|
-
* overlays and per-tooth custom state. See {@link OdontogramPlugin}.
|
|
43
|
-
*/
|
|
44
|
-
plugins?: OdontogramPlugin[];
|
|
45
|
-
/**
|
|
46
|
-
* When true, disables all interactions (click, touch, keyboard).
|
|
47
|
-
* Useful for print/report/view modes.
|
|
48
|
-
*/
|
|
49
|
-
readOnly?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* When true, enables per-tooth notes. Double-click a tooth to add/edit a note.
|
|
52
|
-
* Notes are shown in hover tooltips and included in JSON export/import.
|
|
53
|
-
*/
|
|
54
|
-
enableNotes?: boolean;
|
|
55
|
-
/**
|
|
56
|
-
* Enable ICDAS II per-surface caries scoring (0–6). When enabled, the depth
|
|
57
|
-
* selector/popup expose ICDAS codes 1–6 and the surface indicator shows a
|
|
58
|
-
* numeric badge; otherwise the 3-level scale is used.
|
|
59
|
-
*/
|
|
60
|
-
enableIcdas?: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Pulp-diagnosis detail level for the pulp control:
|
|
63
|
-
* `"simple"` (healthy / pulpitis), `"aae"` (4 AAE pulp diagnoses, default) or
|
|
64
|
-
* `"latin"` (9 practical-Latin subtypes). A stored value round-trips at every
|
|
65
|
-
* level; the level only governs how the pulp control presents it.
|
|
66
|
-
*/
|
|
67
|
-
pulpDetailLevel?: PulpDetailLevel;
|
|
68
|
-
/**
|
|
69
|
-
* Secondary-caries (CARS) granularity for the per-surface score picker:
|
|
70
|
-
* `"simple"` ([0,3]), `"standard"` ([0,1,3,6], default) or `"full"` ([0..6]).
|
|
71
|
-
* A stored score round-trips at every mode; the mode only governs the offered
|
|
72
|
-
* option list. (The mode UI lives in the Settings modal; this prop is the
|
|
73
|
-
* controlled entry point.)
|
|
74
|
-
*/
|
|
75
|
-
secondaryCariesMode?: SecondaryCariesMode;
|
|
76
|
-
/**
|
|
77
|
-
* Root-caries granularity for the per-tooth picker: `"simple"` (none /
|
|
78
|
-
* present, default) or `"severity"` (the full none/active/arrested/
|
|
79
|
-
* active-cavitated enum). Non-collapsing across modes.
|
|
80
|
-
*/
|
|
81
|
-
rootCariesMode?: RootCariesMode;
|
|
82
|
-
/**
|
|
83
|
-
* Radiographic-depth granularity for the per-surface picker: `"off"`
|
|
84
|
-
* (hidden, default), `"threeLevel"` (superficial/middle/deep) or `"detailed"`
|
|
85
|
-
* (E1..D3). When off, the per-surface radiographic badge is not shown.
|
|
86
|
-
*/
|
|
87
|
-
radiographicDepthMode?: RadiographicDepthMode;
|
|
88
|
-
/**
|
|
89
|
-
* Whether the visual caries-depth encoding (per-surface depth picker + the
|
|
90
|
-
* opacity/contour depth tier in the render) is active. Default `true`; set
|
|
91
|
-
* `false` to render caried surfaces at the SVG default with no depth tier.
|
|
92
|
-
*/
|
|
93
|
-
cariesDepthEnabled?: boolean;
|
|
94
|
-
/**
|
|
95
|
-
* Detail level for the per-tooth wear control: `"simple"` (yes/no toggle for
|
|
96
|
-
* attrition) or `"complex"` (wear type per edge and cervix, default).
|
|
97
|
-
*/
|
|
98
|
-
wearDetailLevel?: ToothDetailLevel;
|
|
99
|
-
/**
|
|
100
|
-
* Detail level for the per-tooth discoloration control: `"simple"` (yes/no
|
|
101
|
-
* toggle) or `"complex"` (choose the discoloration cause, default).
|
|
102
|
-
*/
|
|
103
|
-
discolorationDetailLevel?: ToothDetailLevel;
|
|
104
|
-
/**
|
|
105
|
-
* Surface-notation mode for caries/filling surface letters + captions:
|
|
106
|
-
* `"full"` (default) makes them position-aware (incisal on an anterior
|
|
107
|
-
* tooth, labial on an anterior buccal surface, palatal on an upper lingual
|
|
108
|
-
* surface) or `"simple"` (always the tooth-independent B/O/L set).
|
|
109
|
-
*/
|
|
110
|
-
surfaceNotation?: SurfaceNotation;
|
|
111
|
-
/**
|
|
112
|
-
* Whether the Statuses panel (`#statusCard`) is shown. Default `true`. The
|
|
113
|
-
* panel visibility is a settings-driven wrapper around the section — the
|
|
114
|
-
* section's own imperative collapse/expand behavior is unaffected.
|
|
115
|
-
*/
|
|
116
|
-
showStatusCard?: boolean;
|
|
117
|
-
/**
|
|
118
|
-
* Whether the Orthodontics panel (`#orthoCard`) is shown. Default `true`.
|
|
119
|
-
* Composes with the panel's own imperative ortho-eligibility gate (hidden
|
|
120
|
-
* when no selected tooth is ortho-eligible) — both must be satisfied for
|
|
121
|
-
* the panel to render.
|
|
122
|
-
*/
|
|
123
|
-
showOrthoCard?: boolean;
|
|
124
|
-
};
|
|
125
|
-
/**
|
|
126
|
-
* Root React component for the Odontogram Editor.
|
|
127
|
-
*
|
|
128
|
-
* Renders the full dental chart UI: top bar with language/numbering/dark-mode
|
|
129
|
-
* controls, the SVG tooth grid, and the right-hand control panel for setting
|
|
130
|
-
* tooth states (caries, fillings, crowns, endo, inflammation, etc.).
|
|
131
|
-
*
|
|
132
|
-
* @example
|
|
133
|
-
* ```tsx
|
|
134
|
-
* // Standalone usage
|
|
135
|
-
* <App />
|
|
136
|
-
*
|
|
137
|
-
* // Controlled by a host application
|
|
138
|
-
* <App
|
|
139
|
-
* language="en"
|
|
140
|
-
* onLanguageChange={setLang}
|
|
141
|
-
* numberingSystem="FDI"
|
|
142
|
-
* onNumberingChange={setNumbering}
|
|
143
|
-
* darkMode={isDark}
|
|
144
|
-
* onDarkModeChange={setDark}
|
|
145
|
-
* />
|
|
146
|
-
* ```
|
|
147
|
-
*/
|
|
148
|
-
export default function App({ language, onLanguageChange, numberingSystem, onNumberingChange, darkMode, onDarkModeChange, themeConfig, plugins, readOnly: readOnlyProp, enableNotes, enableIcdas, pulpDetailLevel, secondaryCariesMode, rootCariesMode, radiographicDepthMode, cariesDepthEnabled, wearDetailLevel, discolorationDetailLevel, surfaceNotation, showStatusCard: showStatusCardProp, showOrthoCard: showOrthoCardProp, }: AppProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/** Translation function signature (subset of `useI18n`'s `t`). */
|
|
2
|
-
type TFn = (key: string, params?: Record<string, string | number>) => string;
|
|
3
|
-
/**
|
|
4
|
-
* DS-1 Task 2: blocking confirm dialog shown BEFORE a status-mode edit is
|
|
5
|
-
* applied to a tooth the user has already planned (which would make the status
|
|
6
|
-
* chart diverge from the plan). Mirrors {@link SettingsModal}'s dialog contract:
|
|
7
|
-
*
|
|
8
|
-
* - `role="dialog"` + `aria-modal`, labelled by its message; root id
|
|
9
|
-
* `#dualStateConfirm`.
|
|
10
|
-
* - Esc cancels; backdrop click cancels; focus is trapped inside while open and
|
|
11
|
-
* returned to the opener element on close.
|
|
12
|
-
* - "Igen" accepts (apply the divergent edit), "Mégse" cancels (revert the
|
|
13
|
-
* control). Both labels + the message come through `t`.
|
|
14
|
-
*
|
|
15
|
-
* The dialog owns no state — accept/cancel are driven entirely by the caller
|
|
16
|
-
* (the odontogram module's deferred `apply`/`revert`), so the same instance can
|
|
17
|
-
* back a single-tooth edit or a whole batch.
|
|
18
|
-
*/
|
|
19
|
-
export default function DualStateConfirm({ open, t, onAccept, onCancel, }: {
|
|
20
|
-
open: boolean;
|
|
21
|
-
t: TFn;
|
|
22
|
-
onAccept: () => void;
|
|
23
|
-
onCancel: () => void;
|
|
24
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/** Translation function signature (subset of `useI18n`'s `t`). */
|
|
2
|
-
type TFn = (key: string, params?: Record<string, string | number>) => string;
|
|
3
|
-
/**
|
|
4
|
-
* UI-3b Task 7: the "PDF report…" export-settings dialog. Mirrors
|
|
5
|
-
* {@link DualStateConfirm}'s dialog contract exactly:
|
|
6
|
-
*
|
|
7
|
-
* - `.odon-confirm-backdrop` / `.odon-confirm-modal`, `role="dialog"` +
|
|
8
|
-
* `aria-modal`, labelled via `useId()`.
|
|
9
|
-
* - Esc cancels; backdrop click cancels; focus is trapped inside while open
|
|
10
|
-
* and returned to the opener element on close.
|
|
11
|
-
*
|
|
12
|
-
* Behavior: four checkboxes (all default ON) — patient data, odontogram +
|
|
13
|
-
* description, perio status, perio description + footer — plus name/exam-date
|
|
14
|
-
* inputs that write straight through the P4a `setPatientName`/`setExamDate`
|
|
15
|
-
* setters (same pattern as `PerioSidebar`'s case-meta panel). When
|
|
16
|
-
* {@link hasAnyPerioData} is false the two perio checkboxes are `disabled`
|
|
17
|
-
* (a "no perio data" note is shown) and are forced off in the opts handed to
|
|
18
|
-
* `exportPdf()` regardless of their checked state — belt-and-suspenders on
|
|
19
|
-
* top of `exportPdf()`'s own internal auto-skip.
|
|
20
|
-
*/
|
|
21
|
-
export default function ExportOptionsModal({ open, t, onClose, }: {
|
|
22
|
-
open: boolean;
|
|
23
|
-
t: TFn;
|
|
24
|
-
onClose: () => void;
|
|
25
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
export {};
|
package/dist/PerioChart.d.ts
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { type PerioOverlayLayer } from "./odontogram";
|
|
2
|
-
import { type TemplateDocCache } from "./perioGraphic";
|
|
3
|
-
/**
|
|
4
|
-
* PG-B Task 2/3: draw (or clear) the overlay for ONE arch band. UI-3a Task 2:
|
|
5
|
-
* each aspect has its OWN standalone arch SVG (`buildBuccalArchSvg`/
|
|
6
|
-
* `buildPalatalArchSvg`), each mounted into its own grid cell
|
|
7
|
-
* (`buccalCell`/`palatalCell` — see `buildArch`), so a buccal-aspect mark is
|
|
8
|
-
* appended into `svg.perio-tooth-arch-buccal` and a palatal-aspect mark into
|
|
9
|
-
* `svg.perio-tooth-arch-palatal`.
|
|
10
|
-
* Stale overlay layers are removed first (scoped to `container`, i.e. both
|
|
11
|
-
* SVGs), so this is safe to call on every state / layer change. The overlay
|
|
12
|
-
* `<g>` is appended INTO the SAME oriented row group the teeth + curve ride
|
|
13
|
-
* in its OWN svg (`.perio-tooth-row-buccal` / `.perio-tooth-row-palatal-
|
|
14
|
-
* inner`), so the T1 occlusal-to-occlusal flip carries the marks along with
|
|
15
|
-
* the teeth — one coordinate space, no divergent geometry (it reuses
|
|
16
|
-
* `archToothLayout` + `PERIO_MM_PX`, exactly like `drawArchCurves`).
|
|
17
|
-
*
|
|
18
|
-
* `none` draws nothing (after the stale clear), so selecting None leaves a
|
|
19
|
-
* bare arch. Exported for direct unit testing against a hand-built template
|
|
20
|
-
* cache (see pgb-switcher.test.ts / pgb-mm-overlays.test.ts); the component
|
|
21
|
-
* calls it from the graphic effect.
|
|
22
|
-
*/
|
|
23
|
-
export declare function drawArchOverlay(cache: TemplateDocCache, container: HTMLElement | null, teeth: readonly number[], layer: PerioOverlayLayer): void;
|
|
24
|
-
/**
|
|
25
|
-
* Full-screen perio-chart overlay (periodontal-arc sub-project P2). Task 1
|
|
26
|
-
* shipped the shell (dialog contract, open/close API) with an empty
|
|
27
|
-
* `#perioOverlayGrid` placeholder; THIS task (Task 2) fills it with the full-mouth
|
|
28
|
-
* grid + a summary bar, bound to the P1 data core
|
|
29
|
-
* (`setPerioSite`/`getToothPerio`/`getToothCal`/`getPerioSummary`/
|
|
30
|
-
* `getPerioChart`). Keyboard auto-advance between cells is Task 3 — plain
|
|
31
|
-
* `change` listeners are enough here.
|
|
32
|
-
*
|
|
33
|
-
* The 32-tooth x 6-site grid (~450+ interactive cells) is built with plain
|
|
34
|
-
* DOM (`buildArch`), NOT JSX/React state, and updated via targeted
|
|
35
|
-
* `syncToothCells` calls rather than a full React re-render (R3 perf) — see
|
|
36
|
-
* `syncOneTooth`/`fullResync` below. Only the compact summary bar is
|
|
37
|
-
* React-controlled (`useState`), since re-rendering ~4 numbers on every edit
|
|
38
|
-
* is cheap. `suppressResyncRef` prevents the grid's own edits from ALSO
|
|
39
|
-
* triggering a redundant full resync via the `onStateChange` subscription
|
|
40
|
-
* (setPerioSite/setToothMobility both fire it synchronously) — external
|
|
41
|
-
* edits (dual-state chart-mode switch, or another consumer editing perio
|
|
42
|
-
* data while the overlay is open) still trigger the full resync normally.
|
|
43
|
-
*
|
|
44
|
-
* Layers OVER the odontogram, which it never unmounts: `position: fixed`,
|
|
45
|
-
* full-screen, high z-index (`.perio-overlay` in `index.css`). Mirrors
|
|
46
|
-
* `SettingsModal`'s dialog contract — `role="dialog"` + `aria-modal`, Esc
|
|
47
|
-
* closes, backdrop click closes, focus trap + focus-restore on close — on a
|
|
48
|
-
* single element (`#perioOverlay` itself is the dialog; there is no separate
|
|
49
|
-
* backdrop element, unlike `SettingsModal`).
|
|
50
|
-
*
|
|
51
|
-
* **"Dental Chart" graphical redesign, Task 1 (presentation only):** the
|
|
52
|
-
* optional `inline` prop selects a second chrome for the SAME body (grid +
|
|
53
|
-
* summary bar) — a plain panel (`#perioInlinePanel`) meant to fill the chart
|
|
54
|
-
* area in place of the hidden-but-mounted odontogram, instead of the
|
|
55
|
-
* fixed-position modal dialog. `open`/`onClose` are the MODAL chrome's
|
|
56
|
-
* contract and are ignored when `inline` is true (the caller controls
|
|
57
|
-
* mount/unmount of an inline instance directly via conditional rendering,
|
|
58
|
-
* the same way any other React content area would be swapped) — there is
|
|
59
|
-
* nothing to "close" in an embedded panel. Dialog-only concerns (focus
|
|
60
|
-
* trap/restore, Esc-to-close, backdrop click, `role="dialog"`) do not apply
|
|
61
|
-
* to the inline chrome at all.
|
|
62
|
-
*/
|
|
63
|
-
export default function PerioChart({ open, onClose, inline, }: {
|
|
64
|
-
open?: boolean;
|
|
65
|
-
onClose?: () => void;
|
|
66
|
-
inline?: boolean;
|
|
67
|
-
}): import("react/jsx-runtime").JSX.Element;
|
package/dist/PerioSidebar.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function PerioSidebar(): import("react/jsx-runtime").JSX.Element;
|
package/dist/SettingsModal.d.ts
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
2
|
-
import type { Language } from "./i18n/translations";
|
|
3
|
-
import type { NumberingSystem } from "./utils/numbering";
|
|
4
|
-
import type { PulpDetailLevel, SecondaryCariesMode, RootCariesMode, RadiographicDepthMode, ToothDetailLevel, SurfaceNotation, PerioViewMode, PerioRowId, PerioIndexNameMode } from "./odontogram";
|
|
5
|
-
/** Translation function signature (subset of `useI18n`'s `t`). */
|
|
6
|
-
type TFn = (key: string, params?: Record<string, string | number>) => string;
|
|
7
|
-
/**
|
|
8
|
-
* The full set of live setting values + change handlers the modal drives.
|
|
9
|
-
*
|
|
10
|
-
* Every field maps 1:1 to an existing App-level piece of state / module
|
|
11
|
-
* accessor — the modal never owns behavior, it only surfaces the controls.
|
|
12
|
-
* New settings are added here and wired into a tab's `render()`.
|
|
13
|
-
*/
|
|
14
|
-
export type SettingsState = {
|
|
15
|
-
numbering: NumberingSystem;
|
|
16
|
-
onNumbering: (value: NumberingSystem) => void;
|
|
17
|
-
language: Language;
|
|
18
|
-
onLanguage: (value: Language) => void;
|
|
19
|
-
isDark: boolean;
|
|
20
|
-
onToggleDark: () => void;
|
|
21
|
-
toothInfo: boolean;
|
|
22
|
-
onToothInfo: (value: boolean) => void;
|
|
23
|
-
secondaryCariesMode: SecondaryCariesMode;
|
|
24
|
-
onSecondaryCariesMode: (value: SecondaryCariesMode) => void;
|
|
25
|
-
icdas: boolean;
|
|
26
|
-
onIcdas: (value: boolean) => void;
|
|
27
|
-
cariesDepth: boolean;
|
|
28
|
-
onCariesDepth: (value: boolean) => void;
|
|
29
|
-
rootCariesMode: RootCariesMode;
|
|
30
|
-
onRootCariesMode: (value: RootCariesMode) => void;
|
|
31
|
-
radiographicDepthMode: RadiographicDepthMode;
|
|
32
|
-
onRadiographicDepthMode: (value: RadiographicDepthMode) => void;
|
|
33
|
-
pulpLevel: PulpDetailLevel;
|
|
34
|
-
onPulpLevel: (value: PulpDetailLevel) => void;
|
|
35
|
-
wearDetailLevel: ToothDetailLevel;
|
|
36
|
-
onWearDetailLevel: (value: ToothDetailLevel) => void;
|
|
37
|
-
discolorationDetailLevel: ToothDetailLevel;
|
|
38
|
-
onDiscolorationDetailLevel: (value: ToothDetailLevel) => void;
|
|
39
|
-
surfaceNotation: SurfaceNotation;
|
|
40
|
-
onSurfaceNotation: (value: SurfaceNotation) => void;
|
|
41
|
-
notes: boolean;
|
|
42
|
-
onNotes: (value: boolean) => void;
|
|
43
|
-
showStatusCard: boolean;
|
|
44
|
-
onShowStatusCard: (value: boolean) => void;
|
|
45
|
-
showOrthoCard: boolean;
|
|
46
|
-
onShowOrthoCard: (value: boolean) => void;
|
|
47
|
-
perioViewMode: PerioViewMode;
|
|
48
|
-
onPerioViewMode: (value: PerioViewMode) => void;
|
|
49
|
-
perioRowVisibility: Record<PerioRowId, boolean>;
|
|
50
|
-
onPerioRowVisibility: (id: PerioRowId, visible: boolean) => void;
|
|
51
|
-
perioIndexNameMode: PerioIndexNameMode;
|
|
52
|
-
onPerioIndexNameMode: (value: PerioIndexNameMode) => void;
|
|
53
|
-
};
|
|
54
|
-
/** Context handed to every tab's `render()`. */
|
|
55
|
-
type TabContext = {
|
|
56
|
-
t: TFn;
|
|
57
|
-
s: SettingsState;
|
|
58
|
-
};
|
|
59
|
-
/**
|
|
60
|
-
* Declarative tab registry. Adding a settings section is a matter of pushing a
|
|
61
|
-
* new `{ id, titleKey, render }` entry (and its i18n keys) — no structural
|
|
62
|
-
* changes to the modal shell. `render` receives the live settings + `t`.
|
|
63
|
-
*/
|
|
64
|
-
type SettingsTab = {
|
|
65
|
-
id: string;
|
|
66
|
-
titleKey: string;
|
|
67
|
-
render: (ctx: TabContext) => ReactNode;
|
|
68
|
-
};
|
|
69
|
-
export declare const SETTINGS_TABS: SettingsTab[];
|
|
70
|
-
/**
|
|
71
|
-
* Focus-trapped, ARIA-labelled settings dialog. Opened from the topbar gear.
|
|
72
|
-
*
|
|
73
|
-
* - `role="dialog"` + `aria-modal`, labelled by its title.
|
|
74
|
-
* - Esc closes; backdrop click closes; focus is trapped inside while open and
|
|
75
|
-
* returned to the opener element on close.
|
|
76
|
-
* - Content is driven by the declarative {@link SETTINGS_TABS} registry.
|
|
77
|
-
*/
|
|
78
|
-
export default function SettingsModal({ open, onClose, t, settings, }: {
|
|
79
|
-
open: boolean;
|
|
80
|
-
onClose: () => void;
|
|
81
|
-
t: TFn;
|
|
82
|
-
settings: SettingsState;
|
|
83
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
84
|
-
export {};
|
package/dist/bridgeOverlay.d.ts
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
/** Minimal shape of tooth state this module reads. */
|
|
2
|
-
export interface BridgeToothState {
|
|
3
|
-
restorationType?: string;
|
|
4
|
-
restorationMaterial?: string;
|
|
5
|
-
bridgePillar?: boolean;
|
|
6
|
-
}
|
|
7
|
-
/** Reads a tooth's current state by FDI tooth number. May return undefined. */
|
|
8
|
-
export type GetToothState = (toothNo: number) => BridgeToothState | undefined | null;
|
|
9
|
-
/** Maps a restoration material key to a solid CSS color for the saddle bar. */
|
|
10
|
-
export type MaterialColor = (material: string) => string;
|
|
11
|
-
/** Vertical center of the saddle bar, as a fraction of tile height (gum line),
|
|
12
|
-
* for an UPPER-arch tile. */
|
|
13
|
-
export declare const SADDLE_Y_FRACTION = 0.72;
|
|
14
|
-
/**
|
|
15
|
-
* Vertical center of the saddle bar for a LOWER-arch tile. Lower-arch tiles
|
|
16
|
-
* are rendered rotated 180°, so the naive mirror (`1 - SADDLE_Y_FRACTION` =
|
|
17
|
-
* 0.28) did not match the connector artwork. Recon measured the connector art
|
|
18
|
-
* at ~0.81 from the tile top in the un-rotated template, which lands at
|
|
19
|
-
* ~0.19 after the 180° lower-arch rotation. This is a visual estimate and may
|
|
20
|
-
* need one more nudge.
|
|
21
|
-
*/
|
|
22
|
-
export declare const SADDLE_Y_FRACTION_LOWER = 0.19;
|
|
23
|
-
/** Thickness of the saddle bar, as a fraction of tile height. */
|
|
24
|
-
export declare const SADDLE_THICKNESS = 0.09;
|
|
25
|
-
/** How far the bar overlaps into each adjacent tile, as a fraction of tile width. */
|
|
26
|
-
export declare const SADDLE_OVERLAP = 0.12;
|
|
27
|
-
/** Default color resolver used when no `materialColor` dependency is provided. */
|
|
28
|
-
export declare function defaultMaterialColor(material: string): string;
|
|
29
|
-
/**
|
|
30
|
-
* Derive multi-tooth bridge spans from tooth state.
|
|
31
|
-
*
|
|
32
|
-
* A span is a maximal run of consecutive teeth WITHIN a single arch where each
|
|
33
|
-
* tooth is a bridge tooth (`restorationType === "bridge"` OR `bridgePillar`).
|
|
34
|
-
* Only runs of length >= 2 are returned (an isolated bridge tooth is not a span).
|
|
35
|
-
*
|
|
36
|
-
* Documented limitation: two distinct bridges that happen to sit on adjacent
|
|
37
|
-
* teeth (e.g. 13-14 and 15-16 with a shared-looking gum line) are merged into a
|
|
38
|
-
* single run, because state carries no per-bridge grouping id. This matches the
|
|
39
|
-
* per-tooth rendering, which likewise cannot tell them apart.
|
|
40
|
-
*
|
|
41
|
-
* @param getState - Reads a tooth's state by FDI number.
|
|
42
|
-
* @returns Arrays of consecutive tooth numbers, each of length >= 2.
|
|
43
|
-
*/
|
|
44
|
-
export declare function detectBridgeSpans(getState: GetToothState): number[][];
|
|
45
|
-
/** A tile's box in grid-relative coordinates (x = left - gridLeft, etc.). */
|
|
46
|
-
export interface GridRelativeRect {
|
|
47
|
-
x: number;
|
|
48
|
-
y: number;
|
|
49
|
-
width: number;
|
|
50
|
-
height: number;
|
|
51
|
-
}
|
|
52
|
-
/** Resolves a tooth's tile box in grid-relative coordinates, or null if hidden. */
|
|
53
|
-
export type RectFor = (toothNo: number) => GridRelativeRect | null;
|
|
54
|
-
/** A single saddle bar to draw, in grid-relative coordinates. */
|
|
55
|
-
export interface BridgeBar {
|
|
56
|
-
x: number;
|
|
57
|
-
y: number;
|
|
58
|
-
width: number;
|
|
59
|
-
height: number;
|
|
60
|
-
fill: string;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Compute the saddle bars that fill the inter-tile gaps of every span. This is
|
|
64
|
-
* the single source of truth for bar geometry, shared by the live overlay and
|
|
65
|
-
* the export pass.
|
|
66
|
-
*
|
|
67
|
-
* Guards: any pair whose tile rect is missing or zero-sized (occlusal view,
|
|
68
|
-
* collapsed arch) is skipped rather than throwing. A pair whose computed width
|
|
69
|
-
* is non-positive (overlapping tiles) is also skipped.
|
|
70
|
-
*
|
|
71
|
-
* @param spans - Output of {@link detectBridgeSpans}.
|
|
72
|
-
* @param getState - Reads a tooth's state by FDI number (for material color).
|
|
73
|
-
* @param rectFor - Resolves each tooth's grid-relative tile box.
|
|
74
|
-
* @param materialColor - Resolves a material key to a solid color.
|
|
75
|
-
*/
|
|
76
|
-
export declare function computeBridgeBars(spans: number[][], getState: GetToothState, rectFor: RectFor, materialColor: MaterialColor): BridgeBar[];
|
|
77
|
-
/** Dependencies for {@link renderBridgeOverlay}. */
|
|
78
|
-
export interface RenderBridgeOverlayDeps {
|
|
79
|
-
/** The `#toothGrid` element (host of the overlay). */
|
|
80
|
-
grid: HTMLElement | null;
|
|
81
|
-
/** Reads a tooth's state by FDI number. */
|
|
82
|
-
getState: GetToothState;
|
|
83
|
-
/** Optional material -> color resolver; defaults to {@link defaultMaterialColor}. */
|
|
84
|
-
materialColor?: MaterialColor;
|
|
85
|
-
}
|
|
86
|
-
/** The class marking the single engine-owned overlay SVG. */
|
|
87
|
-
export declare const BRIDGE_OVERLAY_CLASS = "bridge-overlay";
|
|
88
|
-
/** The class marking each saddle bar rect (live + export). */
|
|
89
|
-
export declare const BRIDGE_BAR_CLASS = "bridge-overlay-bar";
|
|
90
|
-
/**
|
|
91
|
-
* Resolve a tooth's side-view tile box in grid-relative coordinates, or null if
|
|
92
|
-
* the tile is absent or hidden (zero-sized). Shared by the live overlay and the
|
|
93
|
-
* export pass so both read geometry identically.
|
|
94
|
-
*
|
|
95
|
-
* @param grid - The `#toothGrid` element.
|
|
96
|
-
* @param gridRect - The grid's own `getBoundingClientRect()` (origin).
|
|
97
|
-
* @param toothNo - FDI tooth number.
|
|
98
|
-
*/
|
|
99
|
-
export declare function tileRectFor(grid: HTMLElement, gridRect: {
|
|
100
|
-
left: number;
|
|
101
|
-
top: number;
|
|
102
|
-
}, toothNo: number): GridRelativeRect | null;
|
|
103
|
-
/**
|
|
104
|
-
* Ensure a single `<svg class="bridge-overlay">` child of the grid and (re)draw
|
|
105
|
-
* the bridge-span saddle bars into it. Idempotent: clears and redraws on every
|
|
106
|
-
* call. No-op (never throws) when the grid is absent or there are no spans.
|
|
107
|
-
*
|
|
108
|
-
* The overlay is positioned by CSS (`position:absolute; inset:0`); its intrinsic
|
|
109
|
-
* size/viewBox is synced to the grid box so bar coordinates map 1:1 to pixels.
|
|
110
|
-
*/
|
|
111
|
-
export declare function renderBridgeOverlay(deps: RenderBridgeOverlayDeps): void;
|
|
112
|
-
/**
|
|
113
|
-
* Build a saddle-bar `<rect>` SVG element in the current document. Shared by the
|
|
114
|
-
* live overlay and the export path so the two draw identical geometry.
|
|
115
|
-
*/
|
|
116
|
-
export declare function barRect(bar: BridgeBar): SVGRectElement;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Canonical system URLs and coding maps for the FHIR export.
|
|
3
|
-
*
|
|
4
|
-
* - Local codes mirror the engine's own enum values and are ALWAYS emitted,
|
|
5
|
-
* guaranteeing round-trip fidelity even where no standard code exists. The
|
|
6
|
-
* local system is currently the ONLY coding emitted for clinical states.
|
|
7
|
-
* - SNOMED CT is not yet active: `SNOMED_CODES` is currently empty and no
|
|
8
|
-
* `CodeEntry` sets `snomed`, so no SNOMED coding is emitted. When populated
|
|
9
|
-
* (with codes verified against the official SNOMED CT browser), entries are
|
|
10
|
-
* emitted as additional codings in the export; they are additive, never required.
|
|
11
|
-
*/
|
|
12
|
-
/** Local CodeSystem canonical URL (engine-owned codes). */
|
|
13
|
-
export declare const LOCAL_SYSTEM = "https://github.com/ZoliQua/React-Odontogram-Modul/fhir/CodeSystem/odontogram";
|
|
14
|
-
/** ISO 3950 / FDI tooth designation system. */
|
|
15
|
-
export declare const FDI_SYSTEM = "urn:iso:std:iso:3950";
|
|
16
|
-
/** SNOMED CT system URL. */
|
|
17
|
-
export declare const SNOMED_SYSTEM = "http://snomed.info/sct";
|
|
18
|
-
/**
|
|
19
|
-
* ICD-10 (WHO) system URL, per HL7's registered identifier for it. SP-perio
|
|
20
|
-
* P4b Task 3: the engine's first ICD-coded resource (the periodontitis/
|
|
21
|
-
* gingivitis Condition, K05.*) uses this system. BNO-10 (the Hungarian
|
|
22
|
-
* national ICD-10 clinical modification) mirrors the WHO K05.* codes
|
|
23
|
-
* 1:1 for this code range, so no separate BNO coding is emitted.
|
|
24
|
-
*/
|
|
25
|
-
export declare const ICD10_SYSTEM = "http://hl7.org/fhir/sid/icd-10";
|
|
26
|
-
/**
|
|
27
|
-
* ICDAS II (International Caries Detection and Assessment System) reference URL.
|
|
28
|
-
* Documentation constant: per-surface caries codes (1–6) are emitted as the
|
|
29
|
-
* caries component's `valueInteger`; this URL identifies the scoring system.
|
|
30
|
-
*/
|
|
31
|
-
export declare const ICDAS_SYSTEM = "https://www.icdas.org";
|
|
32
|
-
/** A single coded value: required local code, optional verified SNOMED code. */
|
|
33
|
-
export interface CodeEntry {
|
|
34
|
-
code: string;
|
|
35
|
-
display: string;
|
|
36
|
-
snomed?: string;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Local value maps, keyed by enum group then by enum value.
|
|
40
|
-
* `display` strings are English (the export is language-neutral data).
|
|
41
|
-
*/
|
|
42
|
-
export declare const LOCAL_VALUE_MAPS: Record<string, Record<string, CodeEntry>>;
|
|
43
|
-
/**
|
|
44
|
-
* Verified SNOMED CT codes, keyed by "<group>:<value>".
|
|
45
|
-
* CURRENTLY EMPTY — so no SNOMED coding is emitted by the export; the local
|
|
46
|
-
* system is the only coding produced for clinical states. When entries are
|
|
47
|
-
* added here (codes verified against the official SNOMED CT browser), they are
|
|
48
|
-
* emitted as additional codings in the export. The mapper works with or without
|
|
49
|
-
* entries — they are purely additive.
|
|
50
|
-
*/
|
|
51
|
-
export declare const SNOMED_CODES: Record<string, string>;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Declarative description of how each serialized tooth field becomes one or
|
|
3
|
-
* more FHIR Observations. The generic emitter in toFhir.ts reads this table,
|
|
4
|
-
* so adding coverage means adding a row here.
|
|
5
|
-
*/
|
|
6
|
-
export type FieldKind = "enum" | "boolean" | "set" | "restoration";
|
|
7
|
-
interface BaseMapping {
|
|
8
|
-
/** Key in the ToothRecord. */
|
|
9
|
-
field: string;
|
|
10
|
-
/** Local code for the finding TYPE (Observation.code). */
|
|
11
|
-
findingCode: string;
|
|
12
|
-
findingDisplay: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Discriminated by `kind`. enum/set/restoration require a `valueGroup`, so the
|
|
16
|
-
* emitter in toFhir.ts never needs a non-null assertion. `restoration` also
|
|
17
|
-
* requires `surfacesField`; `boolean` carries no value decoding.
|
|
18
|
-
*/
|
|
19
|
-
export type FieldMapping = (BaseMapping & {
|
|
20
|
-
kind: "enum";
|
|
21
|
-
valueGroup: string;
|
|
22
|
-
skipValue?: string;
|
|
23
|
-
}) | (BaseMapping & {
|
|
24
|
-
kind: "set";
|
|
25
|
-
valueGroup: string;
|
|
26
|
-
}) | (BaseMapping & {
|
|
27
|
-
kind: "restoration";
|
|
28
|
-
valueGroup: string;
|
|
29
|
-
surfacesField: string;
|
|
30
|
-
skipValue?: string;
|
|
31
|
-
}) | (BaseMapping & {
|
|
32
|
-
kind: "boolean";
|
|
33
|
-
});
|
|
34
|
-
export declare const FIELD_MAPPINGS: FieldMapping[];
|
|
35
|
-
export {};
|
package/dist/fhir/fromFhir.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { OdontogramExportPayload } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* Invert buildFhirBundle: parse a FHIR R4 collection Bundle produced by this
|
|
4
|
-
* module back into the {version, globals, teeth} payload importStatus expects.
|
|
5
|
-
* Only LOCAL_SYSTEM codings are trusted (round-trip). Tolerant of bad input.
|
|
6
|
-
*/
|
|
7
|
-
export declare function parseFhirBundle(bundle: unknown): OdontogramExportPayload;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { CodeableConcept, Observation, ToothRecord } from "./types";
|
|
2
|
-
import { type CodeEntry } from "./codesystems";
|
|
3
|
-
export declare const PLACEHOLDER_PATIENT_ID = "odontogram-subject";
|
|
4
|
-
export declare const PLACEHOLDER_PATIENT_FULLURL = "urn:uuid:odontogram-subject";
|
|
5
|
-
/** Build a CodeableConcept: always a local coding, plus SNOMED when verified. */
|
|
6
|
-
export declare function concept(system: string, entry: CodeEntry, snomedKey?: string): CodeableConcept;
|
|
7
|
-
/** Decode an enum value via a value-map group, tolerating unknown values. */
|
|
8
|
-
export declare function valueConcept(group: string, value: string): CodeableConcept;
|
|
9
|
-
/** The Observation.code identifying a finding TYPE (engine-local). */
|
|
10
|
-
export declare function findingConcept(code: string, display: string): CodeableConcept;
|
|
11
|
-
/** FDI/ISO 3950 tooth bodySite. The internal key is already an FDI number. */
|
|
12
|
-
export declare function toothBodySite(fdi: string): CodeableConcept;
|
|
13
|
-
export declare const EXAM_CATEGORY: CodeableConcept[];
|
|
14
|
-
export declare const baseObservation: (subjectRef: string, tooth: string, code: CodeableConcept) => Observation;
|
|
15
|
-
export declare function localCode(cc: unknown): string | undefined;
|
|
16
|
-
export declare function ensureTooth(teeth: Record<string, ToothRecord>, id: string): ToothRecord;
|
package/dist/fhir/toFhir.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Bundle, OdontogramExportPayload, FhirExportOptions } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* Convert a serialized odontogram payload into a FHIR R4 collection Bundle.
|
|
4
|
-
* Pure: no DOM, no network. Tolerant of malformed input (never throws).
|
|
5
|
-
*
|
|
6
|
-
* SP-perio P1 Task 3: per-site periodontal probing (`ToothRecord.perio`)
|
|
7
|
-
* does not fit the registry's one-field-per-tooth axis shape, so it is
|
|
8
|
-
* appended by a bespoke builder (`appendPerioObservations`, toFhirPerio.ts)
|
|
9
|
-
* AFTER the registry-driven per-tooth Observations below — a tooth with no
|
|
10
|
-
* charted perio sites contributes nothing, so payloads without perio data
|
|
11
|
-
* (including every existing parity fixture) are unaffected.
|
|
12
|
-
*
|
|
13
|
-
* SP-perio P4b Task 3: the engine's first FHIR Condition — the 2017 World
|
|
14
|
-
* Workshop periodontitis/gingivitis diagnosis (ICD-10/BNO K05) — is appended
|
|
15
|
-
* AFTER `appendPerioObservations` by `appendPerioCondition` (same file). A
|
|
16
|
-
* payload whose final classification is "health" contributes nothing, so
|
|
17
|
-
* every existing parity fixture (none of which derives a periodontal
|
|
18
|
-
* diagnosis) is unaffected.
|
|
19
|
-
*/
|
|
20
|
-
export declare function buildFhirBundle(payload: OdontogramExportPayload, options?: FhirExportOptions): Bundle;
|