@moa1h/react-advanced-odontogram 0.0.0-stage → 2.8.1

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/package.json CHANGED
@@ -1,6 +1,113 @@
1
- {
2
- "name": "@moa1h/react-advanced-odontogram",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
1
+ {
2
+ "name": "@moa1h/react-advanced-odontogram",
3
+ "version": "2.8.1",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "description": "Interactive, SVG-based dental odontogram (dental chart) for React + TypeScript, with per-tooth charting settings and JSON state export.",
7
+ "author": "Moath Hussam",
8
+ "homepage": "https://react-advanced-odontogram.vercel.app/",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/ZoliQua/React-Advanced-Odontogram.git"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/ZoliQua/React-Advanced-Odontogram/issues"
15
+ },
16
+ "keywords": [
17
+ "odontogram",
18
+ "dental-chart",
19
+ "dental-charting",
20
+ "dentistry",
21
+ "dental-records",
22
+ "react",
23
+ "typescript",
24
+ "svg",
25
+ "fhir",
26
+ "icdas"
27
+ ],
28
+ "sideEffects": [
29
+ "**/*.css"
30
+ ],
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "files": [
35
+ "dist",
36
+ "tooth-settings.json",
37
+ "tooth-charting-guide.json",
38
+ "THIRD-PARTY-NOTICES.md"
39
+ ],
40
+ "main": "./dist/odontogram.js",
41
+ "module": "./dist/odontogram.js",
42
+ "types": "./dist/index.d.ts",
43
+ "exports": {
44
+ ".": {
45
+ "types": "./dist/index.d.ts",
46
+ "import": "./dist/odontogram.js"
47
+ },
48
+ "./controls": {
49
+ "types": "./dist/index.d.ts",
50
+ "import": "./dist/odontogram.js"
51
+ },
52
+ "./tooth-settings.json": "./tooth-settings.json",
53
+ "./tooth-charting-guide.json": "./tooth-charting-guide.json",
54
+ "./style.css": "./dist/style.css"
55
+ },
56
+ "engines": {
57
+ "node": ">=20.19.0"
58
+ },
59
+ "scripts": {
60
+ "dev": "vite",
61
+ "build": "tsc -b && vite build",
62
+ "build:lib": "vite build --config vite.lib.config.ts",
63
+ "lint": "eslint .",
64
+ "preview": "vite preview",
65
+ "test": "vitest run",
66
+ "test:watch": "vitest",
67
+ "test:coverage": "vitest run --coverage",
68
+ "parity:capture": "PARITY_CAPTURE=1 vitest run src/__tests__/parity/capture.test.ts",
69
+ "docs": "typedoc",
70
+ "prepublishOnly": "npm run build:lib",
71
+ "fhir:codesystem": "FHIR_CODESYSTEM_WRITE=1 vitest run src/__tests__/fhir-codesystem.test.ts src/__tests__/fhir-valuesets.test.ts",
72
+ "test:e2e": "playwright test"
73
+ },
74
+ "peerDependencies": {
75
+ "react": "^18 || ^19",
76
+ "react-dom": "^18 || ^19"
77
+ },
78
+ "dependencies": {
79
+ "dompurify": "^3.4.16",
80
+ "jspdf": "^4.2.1"
81
+ },
82
+ "devDependencies": {
83
+ "@eslint/js": "^9.39.2",
84
+ "@microsoft/api-extractor": "^7.58.12",
85
+ "@playwright/test": "^1.63.0",
86
+ "@testing-library/jest-dom": "^6.9.1",
87
+ "@testing-library/react": "^16.3.2",
88
+ "@types/fhir": "^0.0.44",
89
+ "@types/jsdom": "^28.0.0",
90
+ "@types/react": "^18.3.3",
91
+ "@types/react-dom": "^18.3.0",
92
+ "@vitejs/plugin-react": "^4.3.1",
93
+ "autoprefixer": "^10.4.20",
94
+ "eslint": "^9.39.2",
95
+ "eslint-plugin-react": "^7.37.5",
96
+ "eslint-plugin-react-hooks": "^5.1.0-rc.0",
97
+ "eslint-plugin-react-refresh": "^0.4.9",
98
+ "gh-pages": "^6.3.0",
99
+ "globals": "^15.15.0",
100
+ "jiti": "^2.6.1",
101
+ "jsdom": "^28.1.0",
102
+ "postcss": "^8.4.45",
103
+ "react": "^18.3.1",
104
+ "react-dom": "^18.3.1",
105
+ "tailwindcss": "^3.4.10",
106
+ "typedoc": "^0.28.17",
107
+ "typescript": "^5.5.3",
108
+ "typescript-eslint": "^8.53.1",
109
+ "vite": "^7.3.1",
110
+ "vite-plugin-dts": "^5.0.3",
111
+ "vitest": "^4.0.18"
112
+ }
113
+ }
@@ -0,0 +1,124 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "description": "Reference for recording diagnoses and proposed treatment on individual teeth with React Advanced Odontogram.",
4
+ "optionsReference": "./tooth-settings.json",
5
+ "selection": {
6
+ "description": "Selection-based functions apply to every tooth currently selected in the chart.",
7
+ "getSelectedTeethFunction": "getSelectedTeeth"
8
+ },
9
+ "diagnoses": {
10
+ "description": "Most diagnoses are derived from clinical tooth findings. Do not write diagnoses directly into a tooth record; use the chart functions so the finding, drawing, and exported diagnosis stay in sync.",
11
+ "addFunction": "addDiagnosisToSelection",
12
+ "removeFunction": "removeDiagnosisFromSelection",
13
+ "overrideFunction": "setDxOverrideForSelection",
14
+ "overrideModes": ["add", "suppress", null],
15
+ "toothDiagnosisKeys": [
16
+ "caries",
17
+ "cariesCementum",
18
+ "cariesArrested",
19
+ "pulpitis",
20
+ "pulpNecrosis",
21
+ "apicalPeriodontitisAcute",
22
+ "apicalPeriodontitisChronic",
23
+ "radicularCyst",
24
+ "periapicalAbscess",
25
+ "periapicalAbscessSinus",
26
+ "condensingOsteitis",
27
+ "resorption",
28
+ "attrition",
29
+ "abrasion",
30
+ "erosion",
31
+ "abfraction",
32
+ "calculus",
33
+ "fluorosis",
34
+ "tetracyclineStain",
35
+ "postEruptiveColour",
36
+ "toothLoss",
37
+ "retainedRoot",
38
+ "toothFracture"
39
+ ],
40
+ "addFunctionSupportedKeys": "All toothDiagnosisKeys except caries. Caries must be recorded on a surface with setCariesSurfaceForSelection.",
41
+ "clinicalFindingFunctions": {
42
+ "caries": ["setCariesSurfaceForSelection", "setCariesActiveDepthForSelection"],
43
+ "rootCaries": ["setRootCariesForSelection"],
44
+ "pulpAndEndodontics": ["setPulpEndoForSelection"],
45
+ "apicalDiagnosis": ["setApicalDxForSelection", "setPeriapicalTypeForSelection"],
46
+ "resorption": ["setResorptionForSelection"],
47
+ "toothWear": ["setWearEdgeForSelection", "setWearCervicalForSelection"],
48
+ "discoloration": ["setDiscolorationForSelection"],
49
+ "calculus": ["setCalculusForSelection"],
50
+ "toothFracture": [
51
+ "setBrokenMesialForSelection",
52
+ "setBrokenIncisalForSelection",
53
+ "setBrokenDistalForSelection"
54
+ ],
55
+ "toothStatus": ["setToothSelectionForSelection", "setSubstrateForSelection"]
56
+ },
57
+ "important": [
58
+ "Diagnosis keys are identifiers, not display labels; use getToothDiagnoses or the diagnosis catalog for labels and codes.",
59
+ "Periodontitis and gingivitis are periodontal diagnoses, not toothDiagnosisKeys.",
60
+ "Peri-implant diagnoses are recorded on an implant using setPeriImplantForSelection."
61
+ ]
62
+ },
63
+ "treatmentPlan": {
64
+ "description": "The treatment plan is a separate chart, not a separate set of tooth fields. Switch to Plan mode before calling the same selection-based setters; the first visit to Plan starts as a copy of Status.",
65
+ "statusModeFunction": "setChartMode",
66
+ "planModeValue": "plan",
67
+ "statusModeValue": "status",
68
+ "getPlanChangesFunction": "getPlanChanges",
69
+ "getPlanChartFunction": "getPlanChart",
70
+ "setPlanChartFunction": "setPlanChart",
71
+ "procedureFields": {
72
+ "toothAndExtraction": [
73
+ "toothSelection",
74
+ "toothSubstrate",
75
+ "extractionPlan",
76
+ "missingClosed"
77
+ ],
78
+ "restorative": [
79
+ "caries",
80
+ "cariesSeverity",
81
+ "rootCaries",
82
+ "fillingSurfaceMaterials",
83
+ "fissureSealing",
84
+ "restorationType",
85
+ "restorationMaterial",
86
+ "crownNeeded",
87
+ "crownReplace",
88
+ "crownLeakage",
89
+ "bridgePillar",
90
+ "parapulpalPin"
91
+ ],
92
+ "endodonticAndApical": [
93
+ "endo",
94
+ "endoResection",
95
+ "pulpDx",
96
+ "apicalDx",
97
+ "periapicalType",
98
+ "resorptionType"
99
+ ],
100
+ "orthodontic": [
101
+ "orthoAppliance",
102
+ "orthoDrift",
103
+ "orthoVertical",
104
+ "orthoRotation"
105
+ ],
106
+ "prosthetic": [
107
+ "prosthesis",
108
+ "restorationType",
109
+ "restorationMaterial"
110
+ ]
111
+ },
112
+ "example": [
113
+ "setChartMode(\"plan\")",
114
+ "setRestorationForSelection(\"crown|zircon\")",
115
+ "getPlanChanges()",
116
+ "setChartMode(\"status\")"
117
+ ],
118
+ "important": [
119
+ "The Plan chart uses the same tooth fields and option values as Status; see tooth-settings.json.",
120
+ "Selection-based setters update the active chart only.",
121
+ "Plan tooth-selection choices are limited to none, tooth-base, and implant, except an existing tooth value remains available."
122
+ ]
123
+ }
124
+ }
@@ -0,0 +1,159 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "numberingSystem": "FDI",
4
+ "teeth": {
5
+ "permanent": [
6
+ 18, 17, 16, 15, 14, 13, 12, 11,
7
+ 21, 22, 23, 24, 25, 26, 27, 28,
8
+ 48, 47, 46, 45, 44, 43, 42, 41,
9
+ 31, 32, 33, 34, 35, 36, 37, 38
10
+ ],
11
+ "primary": [
12
+ 55, 54, 53, 52, 51,
13
+ 61, 62, 63, 64, 65,
14
+ 85, 84, 83, 82, 81,
15
+ 71, 72, 73, 74, 75
16
+ ]
17
+ },
18
+ "settings": {
19
+ "toothSelection": {
20
+ "type": "enum",
21
+ "options": ["none", "tooth-base", "milktooth", "implant", "tooth-under-gum"]
22
+ },
23
+ "toothSubstrate": {
24
+ "type": "enum",
25
+ "options": ["natural", "radix", "broken", "crownprep"]
26
+ },
27
+ "caries": {
28
+ "type": "surfaceSet",
29
+ "options": [
30
+ "caries-subcrown",
31
+ "caries-buccal",
32
+ "caries-lingual",
33
+ "caries-mesial",
34
+ "caries-distal",
35
+ "caries-occlusal"
36
+ ]
37
+ },
38
+ "cariesSeverity": {
39
+ "type": "surfaceMap",
40
+ "surfaces": ["buccal", "lingual", "mesial", "distal", "occlusal"],
41
+ "values": [0, 1, 2, 3, 4, 5, 6]
42
+ },
43
+ "rootCaries": {
44
+ "type": "enum",
45
+ "options": ["none", "active", "arrested", "active-cavitated"]
46
+ },
47
+ "restoration": {
48
+ "type": "object",
49
+ "fields": ["restorationType", "restorationMaterial", "fillingSurfaceMaterials", "fissureSealing", "fillingDefect"]
50
+ },
51
+ "pulpAndApicalDiagnosis": {
52
+ "type": "object",
53
+ "fields": ["endo", "pulpDx", "pulpLatin", "apicalDx", "periapicalType", "resorptionType", "endoResection"]
54
+ },
55
+ "endodonticTreatment": {
56
+ "type": "object",
57
+ "fields": [
58
+ "treatmentStatus",
59
+ "treatmentType",
60
+ "sessions",
61
+ "canals",
62
+ "obturationStatus",
63
+ "finalRestoration",
64
+ "notes"
65
+ ],
66
+ "treatmentStatus": {
67
+ "type": "enum",
68
+ "options": ["planned", "in-progress", "completed", "interrupted"]
69
+ },
70
+ "treatmentType": {
71
+ "type": "enum",
72
+ "options": ["initial-root-canal", "retreatment"]
73
+ },
74
+ "canals": {
75
+ "type": "array",
76
+ "itemFields": [
77
+ "canalName",
78
+ "rootName",
79
+ "workingLengthMm",
80
+ "referencePoint",
81
+ "measurementMethod",
82
+ "finalFileSize",
83
+ "taper",
84
+ "obturationMaterial",
85
+ "notes"
86
+ ],
87
+ "measurementMethod": {
88
+ "type": "enum",
89
+ "options": ["apex-locator", "radiograph", "combined", "other"]
90
+ }
91
+ },
92
+ "obturationStatus": {
93
+ "type": "enum",
94
+ "options": ["not-started", "partially-completed", "completed"]
95
+ },
96
+ "finalRestoration": {
97
+ "type": "enum",
98
+ "options": ["pending", "temporary", "permanent-filling", "crown", "other"]
99
+ }
100
+ },
101
+ "orthodontics": {
102
+ "type": "object",
103
+ "fields": ["orthoAppliance", "orthoDrift", "orthoVertical", "orthoRotation"]
104
+ },
105
+ "toothDetails": {
106
+ "type": "object",
107
+ "fields": [
108
+ "prosthesis",
109
+ "mobility",
110
+ "wearEdge",
111
+ "wearCervical",
112
+ "discoloration",
113
+ "brokenMesial",
114
+ "brokenIncisal",
115
+ "brokenDistal",
116
+ "contactMesial",
117
+ "contactDistal",
118
+ "extractionWound",
119
+ "extractionPlan",
120
+ "missingClosed",
121
+ "bridgePillar",
122
+ "crownLeakage",
123
+ "crownReplace",
124
+ "crownNeeded",
125
+ "parapulpalPin"
126
+ ]
127
+ },
128
+ "periodontalFindings": {
129
+ "type": "object",
130
+ "fields": [
131
+ "calculus",
132
+ "mods",
133
+ "periImplant",
134
+ "cejVisibility",
135
+ "rootConcavity",
136
+ "gingivalThickness",
137
+ "millerClass",
138
+ "perio"
139
+ ]
140
+ },
141
+ "diagnoses": {
142
+ "type": "map",
143
+ "field": "dxOverrides"
144
+ },
145
+ "notesAndExtensions": {
146
+ "type": "object",
147
+ "fields": ["note", "customStates"]
148
+ }
149
+ },
150
+ "availability": {
151
+ "sharedByAllTeeth": true,
152
+ "surfaces": ["buccal", "lingual", "mesial", "distal", "occlusal"],
153
+ "conditionalFields": {
154
+ "periImplant": "implant teeth",
155
+ "perio": "periodontal charting data",
156
+ "cariesSeverity": "surface-specific; supported values are 0 through 6"
157
+ }
158
+ }
159
+ }