feat: add relaxed arm circumference measurement and update related features
- Introduced `c_arm_relaxed` to the CircumferenceEntry model for tracking relaxed arm measurements. - Updated database schema to include `c_arm_relaxed` in the circumference_log table. - Implemented calculation for 28-day relaxed arm circumference change with `calculate_arm_relaxed_28d_delta`. - Enhanced placeholder resolver and registration to support new relaxed arm measurement. - Updated frontend components to accommodate the new measurement, including forms and CSV exports. - Improved documentation and guide data to reflect the addition of relaxed arm measurements.
This commit is contained in:
1 parent
0035d08149
commit
df0165bee3
16 files changed
+122
-33
No files matched your search
@@ -70,6 +70,7 @@ __all__ = [
|
||||
'calculate_hip_28d_delta',
|
||||
'calculate_chest_28d_delta',
|
||||
'calculate_arm_28d_delta',
|
||||
'calculate_arm_relaxed_28d_delta',
|
||||
'calculate_thigh_28d_delta',
|
||||
'calculate_waist_hip_ratio',
|
||||
'calculate_recomposition_quadrant',
|
||||
|
||||
@@ -370,7 +370,8 @@ def get_circumference_summary_data(
|
||||
('c_hip', 'Hüfte'),
|
||||
('c_thigh', 'Oberschenkel'),
|
||||
('c_calf', 'Wade'),
|
||||
('c_arm', 'Arm')
|
||||
('c_arm', 'Oberarm kontrahiert'),
|
||||
('c_arm_relaxed', 'Oberarm'),
|
||||
]
|
||||
|
||||
measurements = []
|
||||
@@ -401,7 +402,7 @@ def get_circumference_summary_data(
|
||||
})
|
||||
|
||||
# Calculate confidence based on how many points we have
|
||||
confidence = calculate_confidence(len(measurements), 8, "general")
|
||||
confidence = calculate_confidence(len(measurements), 9, "general")
|
||||
|
||||
if not measurements:
|
||||
return {
|
||||
@@ -640,10 +641,15 @@ def calculate_chest_28d_delta(profile_id: str) -> Optional[float]:
|
||||
|
||||
|
||||
def calculate_arm_28d_delta(profile_id: str) -> Optional[float]:
|
||||
"""Calculate 28-day arm circumference change (cm)"""
|
||||
"""28-Tage-Delta Oberarm kontrahiert (c_arm), cm."""
|
||||
return _calculate_circumference_delta(profile_id, 'c_arm', 28)
|
||||
|
||||
|
||||
def calculate_arm_relaxed_28d_delta(profile_id: str) -> Optional[float]:
|
||||
"""28-Tage-Delta Oberarm entspannt (c_arm_relaxed), cm."""
|
||||
return _calculate_circumference_delta(profile_id, 'c_arm_relaxed', 28)
|
||||
|
||||
|
||||
def calculate_thigh_28d_delta(profile_id: str) -> Optional[float]:
|
||||
"""Calculate 28-day thigh circumference change (cm)"""
|
||||
delta = _calculate_circumference_delta(profile_id, 'c_thigh', 28)
|
||||
|
||||
Reference in new issue
Block a user