From 531ce9ee6afdd8bddf54d7009a28154009f839ed Mon Sep 17 00:00:00 2001 From: Corvus400 <13657682+Corvus400@users.noreply.github.com> Date: Wed, 20 May 2026 22:41:15 +0900 Subject: [PATCH] docs: align multi-value query params Document OR semantics for disease filters and search history snapshots. Mark the affected OpenAPI query parameters as form-exploded arrays. --- ...26\343\203\227\343\203\251\343\203\263.md" | 15 ++- ...74\343\203\236\345\256\232\347\276\251.md" | 12 +-- fictional-drug-and-disease-ref/openapi.json | 99 ++++++++++++++----- 3 files changed, 85 insertions(+), 41 deletions(-) diff --git "a/fictional-drug-and-disease-ref/05_\345\214\273\350\226\254\345\223\201\343\203\273\347\226\276\346\202\243\343\203\236\343\202\271\343\202\277\343\202\242\343\203\227\343\203\252\350\251\263\347\264\260\345\214\226\343\203\227\343\203\251\343\203\263.md" "b/fictional-drug-and-disease-ref/05_\345\214\273\350\226\254\345\223\201\343\203\273\347\226\276\346\202\243\343\203\236\343\202\271\343\202\277\343\202\242\343\203\227\343\203\252\350\251\263\347\264\260\345\214\226\343\203\227\343\203\251\343\203\263.md" index 689340b..b945d4d 100644 --- "a/fictional-drug-and-disease-ref/05_\345\214\273\350\226\254\345\223\201\343\203\273\347\226\276\346\202\243\343\203\236\343\202\271\343\202\277\343\202\242\343\203\227\343\203\252\350\251\263\347\264\260\345\214\226\343\203\227\343\203\251\343\203\263.md" +++ "b/fictional-drug-and-disease-ref/05_\345\214\273\350\226\254\345\223\201\343\203\273\347\226\276\346\202\243\343\203\236\343\202\271\343\202\277\343\202\242\343\203\227\343\203\252\350\251\263\347\264\260\345\214\226\343\203\227\343\203\251\343\203\263.md" @@ -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` | サーバー (`department`) | -| 慢性度フィルタ | `chronicity` (4 値) | 同左 | サーバー (`chronicity`) | +| ICD-10 章フィルタ | 22 章から指定 (複数指定 OR 結合) | `icd10Chapter: List` (`chapter_i`〜`chapter_xxii`) | サーバー (`icd10_chapter`) | +| 診療科フィルタ | 16 科から指定 (複数指定 OR 結合、フィールド側 `List` の包含判定) | `medicalDepartment: List` | サーバー (`department`) | +| 慢性度フィルタ | `chronicity` (4 値、複数指定 OR 結合) | `chronicity: List` | サーバー (`chronicity`) | | 感染性フィルタ | `infectious` (bool) | 同左 | サーバー (`infectious`) | | 症状名フィルタ | `symptoms.mainSymptoms[]` 全文検索 | 同左 | サーバー (`symptom_keyword`) | | 発症様式フィルタ | `onsetPattern` (5 値、複数指定 OR 結合) | 同左 | サーバー (`onset_pattern`) | @@ -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 つでも変更した時点で結果リストをリセットしページング初期化、即時再検索を発火 @@ -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) | diff --git "a/fictional-drug-and-disease-ref/10_\346\244\234\347\264\242\345\261\245\346\255\264DB\343\202\271\343\202\255\343\203\274\343\203\236\345\256\232\347\276\251.md" "b/fictional-drug-and-disease-ref/10_\346\244\234\347\264\242\345\261\245\346\255\264DB\343\202\271\343\202\255\343\203\274\343\203\236\345\256\232\347\276\251.md" index 846d762..449d7de 100644 --- "a/fictional-drug-and-disease-ref/10_\346\244\234\347\264\242\345\261\245\346\255\264DB\343\202\271\343\202\255\343\203\274\343\203\236\345\256\232\347\276\251.md" +++ "b/fictional-drug-and-disease-ref/10_\346\244\234\347\264\242\345\261\245\346\255\264DB\343\202\271\343\202\255\343\203\274\343\203\236\345\256\232\347\276\251.md" @@ -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?, // 複数: RegulatoryClass の @SerialName 値 (例: "prescription_required") + dosageForm: List?, // 複数: DosageForm の @SerialName 値 (例: "tablet") + route: List?, // 複数: RouteOfAdministration の @SerialName 値 (例: "oral") categoryAtc: String?, // 単一: ATC コード先頭 1 文字 (例: "A") therapeuticCategory: String?, // 単一: TherapeuticCategory の enum 名 (例: "ALIMENTARY_METABOLISM") adverseReactionKeyword: String?, @@ -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?, // 複数: Icd10Chapter の @SerialName 値 (例: "chapter_i") + department: List?, // 複数: MedicalDepartment の @SerialName 値 (例: "internal_medicine") + chronicity: List?, // 複数: Chronicity の @SerialName 値 (例: "chronic") infectious: Bool?, symptomKeyword: String?, onsetPattern: List, // 複数: OnsetPattern の enum 名 (例: "ACUTE") diff --git a/fictional-drug-and-disease-ref/openapi.json b/fictional-drug-and-disease-ref/openapi.json index c0abcac..13704e1 100644 --- a/fictional-drug-and-disease-ref/openapi.json +++ b/fictional-drug-and-disease-ref/openapi.json @@ -532,10 +532,15 @@ "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", @@ -543,10 +548,15 @@ "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", @@ -554,10 +564,15 @@ "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", @@ -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" : { @@ -1072,10 +1092,15 @@ "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", @@ -1083,10 +1108,15 @@ "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", @@ -1094,10 +1124,15 @@ "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", @@ -1171,10 +1206,15 @@ "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", @@ -1182,10 +1222,15 @@ "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",