first commit

This commit is contained in:
Yusron alamsyah
2026-03-13 10:45:28 +07:00
commit 6bb6a1d430
568 changed files with 51753 additions and 0 deletions
+83
View File
@@ -0,0 +1,83 @@
export type Point = {
x: number;
y: number;
};
export type Geometry = {
name: string;
vertices: Point[];
options?: Record<string, any>;
pos?: string;
};
export interface ToothGeometry {
top: { tl: Point; tr: Point; br: Point; bl: Point };
right: { tl: Point; tr: Point; br: Point; bl: Point };
bottom: { tl: Point; tr: Point; br: Point; bl: Point };
left: { tl: Point; tr: Point; br: Point; bl: Point };
middle: { tl: Point; tr: Point; br: Point; bl: Point };
}
export interface Tooth {
num: string;
bigBoxSize: number;
smallBoxSize: number;
x1: number;
y1: number;
x2: number;
y2: number;
cx: number;
cy: number;
geometry: ToothGeometry;
}
export enum OdontogramMode {
DEFAULT = 0,
AMF = 1,
COF = 2,
FIS = 3,
NVT = 4,
RCT = 5,
NON = 6,
UNE = 7,
PRE = 8,
ANO = 9,
CARIES = 10,
CFR = 11,
FMC = 12,
POC = 13,
RRX = 14,
MIS = 15,
IPX = 16,
FRM_ACR = 17,
BRIDGE = 18,
ARROW_TOP_LEFT = 19, // TOP-LEFT ARROW
ARROW_TOP_RIGHT = 20, // TOP-RIGHT ARROW
ARROW_TOP_TURN_LEFT = 21, // TOP-TURN-LEFT ARROW
ARROW_TOP_TURN_RIGHT = 22, // TOP-TURN-RIGHT ARROW
ARROW_BOTTOM_LEFT = 23, // BOTTOM-LEFT ARROW
ARROW_BOTTOM_RIGHT = 24, // BOTTOM-RIGHT ARROW
ARROW_BOTTOM_TURN_LEFT = 25, // BOTTOM-TURN-LEFT ARROW
ARROW_BOTTOM_TURN_RIGHT = 26, // BOTTOM-TURN-RIGHT ARROW
HAPUS = 100
// Arrow modes can be added here
}
export interface ToothCondition {
mode: OdontogramMode;
position: string;
toothNumber: string;
surface?: "T" | "R" | "B" | "L" | "M"; // Top, Right, Bottom, Left, Middle
group?: number; // Group number for bridge conditions
timestamp?: string; // Optional tracking
}
export interface OdontogramData {
conditions: ToothCondition[];
metadata: {
patientId?: string;
date: string;
dentist?: string;
};
currentMode?: OdontogramMode;
}