CLINICAL: Subject ID / Device 입력 제거 — BLE 기기 이름이 device 식별자

사용자 요청: "subject ID 빼고, Device도 BLE 기기 이름따라 기기가 다른거라
따로 설정안해도 될듯."

변경:
- ClinicalSession 모델: subjectId 필드 제거, ClinicalDevice enum 제거,
  device: ClinicalDevice → deviceName: String (BLE 연결된 기기 이름 자동 채움)
- folderName: "{deviceName}_{posture}_{step}_{timestamp}"
  예: "VBT26050202_SUPINE_ALIGN_0CM_2026-05-28_14-30-15"
- label: "{deviceName}_{posture}_{step}" (예: "VBT26050202_SUPINE_ALIGN_0CM")
- ClinicalSessionStore: lastSubjectId 제거 (Examiner/Notes만 기억)
- ClinicalHomeView:
  * Subject ID TextField 제거
  * Device segmented control 제거
  * BLE 연결 카드에 deviceName 그대로 표시 (자동 사용)
  * Start 버튼 enabled = isConnected 만으로 충분

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-26 12:33:26 +09:00
parent ab25b3c65d
commit 3080cd6b23
3 changed files with 16 additions and 40 deletions
@@ -8,8 +8,9 @@ import java.util.Locale
* 임상 R&D 측정 — "한 측정 단위" 모델.
*
* 한 ClinicalSession = 한 라벨 = 한 폴더 = 한 측정 사이클.
* 사용자가 BLE 연결 후 매번 라벨(Subject/Device/Posture/Step)을 입력하고
* 측정을 진행하면, 측정 종료 시점에 폴더가 finalize됨.
* 사용자가 BLE 연결 후 매번 자세/위치를 입력하고 측정 진행 → Back 시 폴더 finalize.
*
* 디바이스 식별자는 BLE 연결된 기기 이름(예: VBT26050202)을 자동으로 사용.
*
* 데이터 구조 (한 측정당):
* Downloads/VesiScan_Sessions/{folderName}/
@@ -19,10 +20,6 @@ import java.util.Locale
* └─ ble.log
*/
enum class ClinicalDevice(val label: String) {
A("Device A"), B("Device B"), C("Device C")
}
enum class ClinicalPosture(val label: String) {
SUPINE("Supine"), SITTING("Sitting"), STANDING("Standing")
}
@@ -42,8 +39,7 @@ enum class ClinicalStep(val label: String, val isAlignment: Boolean) {
}
data class ClinicalSession(
val subjectId: String, // "S001"
val device: ClinicalDevice,
val deviceName: String, // BLE 기기 이름 (예: "VBT26050202")
val posture: ClinicalPosture,
val step: ClinicalStep,
val examiner: String = "",
@@ -53,11 +49,11 @@ data class ClinicalSession(
) {
private val folderFmt = SimpleDateFormat("yyyy-MM-dd_HHmmss", Locale.US)
/** "S001_A_SUPINE_ALIGN_0CM_2026-05-28_14-30-15" */
/** "VBT26050202_SUPINE_ALIGN_0CM_2026-05-28_14-30-15" */
val folderName: String
get() = "${subjectId}_${device.name}_${posture.name}_${step.name}_${folderFmt.format(Date(startedAt))}"
get() = "${deviceName}_${posture.name}_${step.name}_${folderFmt.format(Date(startedAt))}"
/** clinical_label 컬럼/필드 값 (라벨링 자동) */
val label: String
get() = "${subjectId}_${device.name}_${posture.name}_${step.name}"
get() = "${deviceName}_${posture.name}_${step.name}"
}