// HealthManagementSystem — 画面固有設定（app-core.js が window.SYSTEM_CONFIG を読む）
window.SYSTEM_CONFIG = {
  domains: [
  { id: "health-checkups", label: "健康診断", endpoint: "/api/health-checkups",
    cols: [{ key: "subjectName", label: "受診者氏名" }, { key: "checkupType", label: "健診種別", badge: true }, { key: "scheduledDate", label: "予定日" }, { key: "status", label: "状態", badge: true }, { key: "createdAt", label: "登録日時" }],
    createFields: [{ name: "subjectName", label: "受診者氏名", required: true, placeholder: "山田 太郎" }, { name: "checkupType", label: "健診種別", required: true, type: "select", options: ["specific_health", "cancer_screening", "dental", "mental_health", "infant", "pregnant"] }, { name: "scheduledDate", label: "予定日", required: true, type: "date" }] },
  { id: "health-results", label: "健診結果", endpoint: "/api/health-results",
    cols: [{ key: "checkupId", label: "健診ID" }, { key: "examinedDate", label: "実施日" }, { key: "overallJudgment", label: "総合判定", badge: true }, { key: "recordedAt", label: "記録日時" }],
    createFields: [{ name: "checkupId", label: "健診ID", required: true, placeholder: "登録済み健診のIDを入力" }, { name: "examinedDate", label: "実施日", required: true, type: "date" }, { name: "overallJudgment", label: "総合判定", type: "select", options: ["A", "B", "C", "D", "E"] }] },
],
  calc: { title: "健診対象の試算", endpoint: "/api/checkup/eligibility", primary: { key: "eligible", label: "対象", format: "bool" }, fields: [ { key: "checkupType", label: "健診種別", type: "select", options: ["特定健診","後期高齢者健診","胃がん検診","大腸がん検診","肺がん検診","子宮頸がん検診","乳がん検診","骨粗しょう症検診"] }, { key: "age", label: "年齢", type: "number", placeholder: "50" }, { key: "sex", label: "性別", type: "select", options: [ { value: "M", label: "男" }, { value: "F", label: "女" } ] } ] },
};
