Clinical: Step/Posture 마지막 선택 유지 + BV 단계 제거
회의 결정 2건:
1. Step/Posture 유지
증상: 2cm 측정 후 돌아오면 Step이 0cm로 자동 reset되어 매번 다시 선택해야 함.
원인: ClinicalHomeView가 매번 ALIGN_0CM/SUPINE으로 초기화.
수정: ClinicalSessionStore.lastPosture / lastStep 추가, startMeasurement 시 저장.
ClinicalHomeView 초기값을 store의 last 값으로.
다른 입력값(examiner, notes, subject_type 등)과 동일한 패턴.
2. BV 단계 제거
회의 결정: Step에서 BV는 불필요.
ClinicalStep enum에서 BV 제거 — 5단계(ALIGN_0CM ~ ALIGN_4CM)만 유지.
다른 직접 참조 없어 안전 (LabeledSegmented가 enum.values()로 자동 반영).
step.isAlignment 필드는 유지 (JSON meta 호환) — 이제 모든 step이 true.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -30,9 +30,8 @@ enum class SubjectType(val label: String) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 측정 단계.
|
* 측정 단계 — 회의 결정으로 BV 제거. 정렬모드 알고리즘 개발용 5단계만.
|
||||||
* - ALIGN_0CM ~ ALIGN_4CM: 정렬모드 알고리즘 개발용 (기기 아래 끝 기준 치골 위 0~4cm)
|
* - ALIGN_0CM ~ ALIGN_4CM: 기기 아래 끝 기준 치골 위 0~4cm
|
||||||
* - BV: cradle 부착 후 본측정 (방광 추정 알고리즘 개발용)
|
|
||||||
*/
|
*/
|
||||||
enum class ClinicalStep(val label: String, val description: String, val isAlignment: Boolean) {
|
enum class ClinicalStep(val label: String, val description: String, val isAlignment: Boolean) {
|
||||||
ALIGN_0CM("0 cm", "기기 아래 끝이 치골 바로 위", true),
|
ALIGN_0CM("0 cm", "기기 아래 끝이 치골 바로 위", true),
|
||||||
@@ -40,7 +39,6 @@ enum class ClinicalStep(val label: String, val description: String, val isAlignm
|
|||||||
ALIGN_2CM("2 cm", "치골 위로 2 cm", true),
|
ALIGN_2CM("2 cm", "치골 위로 2 cm", true),
|
||||||
ALIGN_3CM("3 cm", "치골 위로 3 cm", true),
|
ALIGN_3CM("3 cm", "치골 위로 3 cm", true),
|
||||||
ALIGN_4CM("4 cm", "치골 위로 4 cm", true),
|
ALIGN_4CM("4 cm", "치골 위로 4 cm", true),
|
||||||
BV("BV", "Cradle 부착 후 본측정", false)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
data class ClinicalSession(
|
data class ClinicalSession(
|
||||||
|
|||||||
@@ -55,6 +55,11 @@ object ClinicalSessionStore {
|
|||||||
com.example.medilightv2android.models.SubjectType.PHANTOM
|
com.example.medilightv2android.models.SubjectType.PHANTOM
|
||||||
var lastTrueVolumeMl: String = "" // 문자열로 보관 (입력 폼과 동일 형식)
|
var lastTrueVolumeMl: String = "" // 문자열로 보관 (입력 폼과 동일 형식)
|
||||||
var lastAbdomenThicknessMm: String = ""
|
var lastAbdomenThicknessMm: String = ""
|
||||||
|
// 회의 결정: Step/Posture 마지막 선택 유지 — 매번 0cm로 리셋되는 불편 제거
|
||||||
|
var lastPosture: com.example.medilightv2android.models.ClinicalPosture =
|
||||||
|
com.example.medilightv2android.models.ClinicalPosture.SUPINE
|
||||||
|
var lastStep: com.example.medilightv2android.models.ClinicalStep =
|
||||||
|
com.example.medilightv2android.models.ClinicalStep.ALIGN_0CM
|
||||||
|
|
||||||
/** End 시점에 measurement.json 통합 생성용 — 측정 중 사이클 누적 */
|
/** End 시점에 measurement.json 통합 생성용 — 측정 중 사이클 누적 */
|
||||||
private val cyclesBuffer = mutableListOf<MeasurementCycle>()
|
private val cyclesBuffer = mutableListOf<MeasurementCycle>()
|
||||||
@@ -66,6 +71,8 @@ object ClinicalSessionStore {
|
|||||||
lastSubjectType = session.subjectType
|
lastSubjectType = session.subjectType
|
||||||
lastTrueVolumeMl = session.trueVolumeMl?.toString() ?: ""
|
lastTrueVolumeMl = session.trueVolumeMl?.toString() ?: ""
|
||||||
lastAbdomenThicknessMm = session.abdomenThicknessMm?.toString() ?: ""
|
lastAbdomenThicknessMm = session.abdomenThicknessMm?.toString() ?: ""
|
||||||
|
lastPosture = session.posture
|
||||||
|
lastStep = session.step
|
||||||
cyclesBuffer.clear()
|
cyclesBuffer.clear()
|
||||||
currentLogDir()?.mkdirs()
|
currentLogDir()?.mkdirs()
|
||||||
writeMeta(context)
|
writeMeta(context)
|
||||||
|
|||||||
+3
-2
@@ -59,8 +59,9 @@ fun ClinicalHomeView(appState: AppState) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 라벨 입력 state — 마지막 입력값 기억 (Store에서 자동 채움)
|
// 라벨 입력 state — 마지막 입력값 기억 (Store에서 자동 채움)
|
||||||
var posture by remember { mutableStateOf(ClinicalPosture.SUPINE) }
|
// 마지막 선택값 유지 — 매 측정마다 0cm/SUPINE으로 리셋되는 불편 제거 (회의 결정)
|
||||||
var step by remember { mutableStateOf(ClinicalStep.ALIGN_0CM) }
|
var posture by remember { mutableStateOf(ClinicalSessionStore.lastPosture) }
|
||||||
|
var step by remember { mutableStateOf(ClinicalSessionStore.lastStep) }
|
||||||
var examiner by remember { mutableStateOf(ClinicalSessionStore.lastExaminer) }
|
var examiner by remember { mutableStateOf(ClinicalSessionStore.lastExaminer) }
|
||||||
var notes by remember { mutableStateOf(ClinicalSessionStore.lastNotes) }
|
var notes by remember { mutableStateOf(ClinicalSessionStore.lastNotes) }
|
||||||
// 측정 대상 분류 (회의 결정: Phantom/Human/ETC 버튼)
|
// 측정 대상 분류 (회의 결정: Phantom/Human/ETC 버튼)
|
||||||
|
|||||||
Reference in New Issue
Block a user