Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@
| 機能項目 | 仕様 | 対応フィールド | 実装方法 |
|---------|------|---------------|----------|
| キーワード欄 | スペース区切り複数語 AND、前方/部分一致切替、検索対象種別 (日本語名/英語名/別名/all) 切替 | `name` / `nameKana` / `nameEnglish` / `synonyms[]` / `symptoms.mainSymptoms[]` / ICD-10 章コード・範囲 (`all` のみ症状・ICD-10 も対象) | サーバー (`keyword` / `keyword_match` / `keyword_target`) |
| ICD-10 章フィルタ | 22 章から指定 | `icd10Chapter: Icd10Chapter` (`chapter_i`〜`chapter_xxii`) | サーバー (`icd10_chapter`) |
| 診療科フィルタ | 16 科から指定 (フィールド側 `List<MedicalDepartment>` の包含判定) | `medicalDepartment` | サーバー (`department`) |
| 慢性度フィルタ | `chronicity` (4 値) | 同左 | サーバー (`chronicity`) |
| ICD-10 章フィルタ | 22 章から指定 (複数指定 OR 結合) | `icd10Chapter: List<Icd10Chapter>` (`chapter_i`〜`chapter_xxii`) | サーバー (`icd10_chapter`) |
| 診療科フィルタ | 16 科から指定 (複数指定 OR 結合、フィールド側 `List<MedicalDepartment>` の包含判定) | `medicalDepartment: List<MedicalDepartment>` | サーバー (`department`) |
| 慢性度フィルタ | `chronicity` (4 値、複数指定 OR 結合) | `chronicity: List<Chronicity>` | サーバー (`chronicity`) |
| 感染性フィルタ | `infectious` (bool) | 同左 | サーバー (`infectious`) |
| 症状名フィルタ | `symptoms.mainSymptoms[]` 全文検索 | 同左 | サーバー (`symptom_keyword`) |
| 発症様式フィルタ | `onsetPattern` (5 値、複数指定 OR 結合) | 同左 | サーバー (`onset_pattern`) |
Expand All @@ -184,8 +184,7 @@

**共通仕様**:

- 複数指定可のフィルタ (`regulatory_class`, `dosage_form`, `route`, `precaution_category`, `onset_pattern`, `exam_category`) は **OR 結合**。AND 結合が必要な場合は別途要件追加
- 単一指定のフィルタ (`icd10_chapter`, `department`, `chronicity`) は値一致のみ
- 複数指定可のフィルタ (`regulatory_class`, `dosage_form`, `route`, `precaution_category`, `icd10_chapter`, `department`, `chronicity`, `onset_pattern`, `exam_category`) は **OR 結合**。AND 結合が必要な場合は別途要件追加
- キーワード欄と絞り込みの組合せは AND (キーワード ∧ フィルタすべて ∧ ソート)
- **キーワード検索発火タイミング**: 画面内の検索ボタン押下、またはソフトキーボードの送信アクションキー押下 (Flutter `TextField.onSubmitted` / iOS `onSubmit`) のいずれか。debounce 入力中の Live 検索は対象外 (1 文字入力ごとに `search_history` が入力途中文字列で埋まる履歴汚染と、`total_count` バッジ・結果リストが入力 1 文字ごとに大幅に変動する UX 不安定性を避けるため)
- 絞り込み条件 (フィルタ / ソート / 一致モード / キーワード対象種別) を 1 つでも変更した時点で結果リストをリセットしページング初期化、即時再検索を発火
Expand Down Expand Up @@ -343,9 +342,9 @@
| `keyword` | String | - | 任意 (スペース区切り AND) | 不可 |
| `keyword_match` | String | `partial` | `prefix` \| `partial` | 不可 |
| `keyword_target` | String | `name` | `name` \| `name_english` \| `synonyms` \| `all` | 不可 |
| `icd10_chapter` | String | - | 22 値 (`Icd10Chapter.@SerialName`、`chapter_i`〜`chapter_xxii`) | 不可 |
| `department` | String | - | 16 値 (`MedicalDepartment.@SerialName`) | 不可 |
| `chronicity` | String | - | 4 値 (`Chronicity.@SerialName`) | 不可 |
| `icd10_chapter` | String | - | 22 値 (`Icd10Chapter.@SerialName`、`chapter_i`〜`chapter_xxii`) | 可 (OR) |
| `department` | String | - | 16 値 (`MedicalDepartment.@SerialName`) | 可 (OR) |
| `chronicity` | String | - | 4 値 (`Chronicity.@SerialName`) | 可 (OR) |
| `infectious` | Bool | - | `true` \| `false` | 不可 |
| `symptom_keyword` | String | - | 任意 (`symptoms.mainSymptoms[]` 全文検索) | 不可 |
| `onset_pattern` | String | - | 5 値 (`OnsetPattern` enum **constant 名**) | 可 (OR) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ JSON フィールド名は camelCase。値は API クエリパラメータの wi
keyword: String?,
keywordMatch: "partial" | "prefix", // 既定 "partial"
keywordTarget: "generic" | "brand" | "both" | "all", // 既定 "both"
regulatoryClass: String?, // 単一: RegulatoryClass の @SerialName 値 (例: "prescription_required")
dosageForm: String?, // 単一: DosageForm の @SerialName 値 (例: "tablet")
route: String?, // 単一: RouteOfAdministration の @SerialName 値 (例: "oral")
regulatoryClass: List<String>?, // 複数: RegulatoryClass の @SerialName 値 (例: "prescription_required")
dosageForm: List<String>?, // 複数: DosageForm の @SerialName 値 (例: "tablet")
route: List<String>?, // 複数: RouteOfAdministration の @SerialName 値 (例: "oral")
categoryAtc: String?, // 単一: ATC コード先頭 1 文字 (例: "A")
therapeuticCategory: String?, // 単一: TherapeuticCategory の enum 名 (例: "ALIMENTARY_METABOLISM")
adverseReactionKeyword: String?,
Expand All @@ -53,9 +53,9 @@ JSON フィールド名は camelCase。値は API クエリパラメータの wi
keyword: String?,
keywordMatch: "partial" | "prefix", // 既定 "partial"
keywordTarget: "name" | "name_english" | "synonyms" | "all", // 既定 "name"
icd10Chapter: String?, // 単一: Icd10Chapter の @SerialName 値 (例: "i")
department: String?, // 単一: MedicalDepartment の @SerialName 値 (例: "internal_medicine")
chronicity: String?, // 単一: Chronicity の @SerialName 値 (例: "chronic")
icd10Chapter: List<String>?, // 複数: Icd10Chapter の @SerialName 値 (例: "chapter_i")
department: List<String>?, // 複数: MedicalDepartment の @SerialName 値 (例: "internal_medicine")
chronicity: List<String>?, // 複数: Chronicity の @SerialName 値 (例: "chronic")
infectious: Bool?,
symptomKeyword: String?,
onsetPattern: List<String>, // 複数: OnsetPattern の enum 名 (例: "ACUTE")
Expand Down
99 changes: 72 additions & 27 deletions fictional-drug-and-disease-ref/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -532,32 +532,47 @@
"description" : "規制区分の `@SerialName` 値 (例: `prescription_required`)。指定時は `regulatory_class` リストに含まれるものに絞り込み",
"required" : false,
"deprecated" : false,
"explode" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string",
"title" : "String"
"type" : "array",
"items" : {
"type" : "string",
"title" : "String"
},
"title" : "StringArray"
}
}, {
"name" : "route",
"in" : "query",
"description" : "投与経路の `@SerialName` 値 (例: `oral`)。指定時は `route_of_administration` が一致するものに絞り込み",
"required" : false,
"deprecated" : false,
"explode" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string",
"title" : "String"
"type" : "array",
"items" : {
"type" : "string",
"title" : "String"
},
"title" : "StringArray"
}
}, {
"name" : "dosage_form",
"in" : "query",
"description" : "剤形の `@SerialName` 値 (例: `tablet`)。指定時は `dosage_form` が一致するものに絞り込み",
"required" : false,
"deprecated" : false,
"explode" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string",
"title" : "String"
"type" : "array",
"items" : {
"type" : "string",
"title" : "String"
},
"title" : "StringArray"
}
}, {
"name" : "therapeutic_category",
Expand Down Expand Up @@ -631,10 +646,15 @@
"description" : "特定背景患者カテゴリ (`PrecautionPopulationCategory` の enum 名 (例: `PREGNANT` / `GERIATRIC`))。複数指定時 (`?precaution_category=A&precaution_category=B`) は OR 結合、他フィルタとは AND 結合。未知の値は HTTP 400 + `ErrorResponse(code=\"INVALID_PRECAUTION_CATEGORY\")` を返す。",
"required" : false,
"deprecated" : false,
"explode" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string",
"title" : "String"
"type" : "array",
"items" : {
"type" : "string",
"title" : "String"
},
"title" : "StringArray"
}
} ],
"responses" : {
Expand Down Expand Up @@ -1072,32 +1092,47 @@
"description" : "ICD-10 章コードの `@SerialName` 値 (例: `chapter_i`)。指定時は `icd10_chapter` が一致するものに絞り込み",
"required" : false,
"deprecated" : false,
"explode" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string",
"title" : "String"
"type" : "array",
"items" : {
"type" : "string",
"title" : "String"
},
"title" : "StringArray"
}
}, {
"name" : "department",
"in" : "query",
"description" : "診療科の `@SerialName` 値 (例: `internal_medicine`)。指定時は `medical_department` リストに含まれるものに絞り込み",
"required" : false,
"deprecated" : false,
"explode" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string",
"title" : "String"
"type" : "array",
"items" : {
"type" : "string",
"title" : "String"
},
"title" : "StringArray"
}
}, {
"name" : "chronicity",
"in" : "query",
"description" : "慢性度の `@SerialName` 値 (例: `chronic`)。指定時は `chronicity` が一致するものに絞り込み",
"required" : false,
"deprecated" : false,
"explode" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string",
"title" : "String"
"type" : "array",
"items" : {
"type" : "string",
"title" : "String"
},
"title" : "StringArray"
}
}, {
"name" : "infectious",
Expand Down Expand Up @@ -1171,21 +1206,31 @@
"description" : "発症パターン (`OnsetPattern` の enum 名、例: `ACUTE`)。複数指定時は OR 結合、他フィルタとは AND 結合。未知の値は HTTP 400 + `ErrorResponse(code=\"INVALID_ONSET_PATTERN\")` を返す。",
"required" : false,
"deprecated" : false,
"explode" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string",
"title" : "String"
"type" : "array",
"items" : {
"type" : "string",
"title" : "String"
},
"title" : "StringArray"
}
}, {
"name" : "exam_category",
"in" : "query",
"description" : "検査カテゴリ (`ExamCategory` の enum 名、例: `IMAGING`)。複数指定時は OR 結合、他フィルタとは AND 結合。未知の値は HTTP 400 + `ErrorResponse(code=\"INVALID_EXAM_CATEGORY\")` を返す。",
"required" : false,
"deprecated" : false,
"explode" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string",
"title" : "String"
"type" : "array",
"items" : {
"type" : "string",
"title" : "String"
},
"title" : "StringArray"
}
}, {
"name" : "has_pharmacological_treatment",
Expand Down