1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
| class CPDTestDummies: """ CPD测试假人 """ def __init__(self): self.dummies = { 'preemie': { 'age': '早产儿', 'weight': '1.5-2.5 kg', 'height': '40-50 cm', 'activities': ['睡眠', '轻微运动'] }, 'newborn': { 'age': '新生儿', 'weight': '2.5-4 kg', 'height': '50-55 cm', 'activities': ['睡眠', '哭泣', '轻微运动'] }, 'toddler': { 'age': '1-3岁', 'weight': '10-15 kg', 'height': '75-95 cm', 'activities': ['睡眠', '玩耍', '站立'] }, 'child': { 'age': '4-6岁', 'weight': '15-25 kg', 'height': '95-115 cm', 'activities': ['睡眠', '玩耍', '移动'] } } def simulate_activity(self, dummy_type, activity): """ 模拟活动 """ dummy = self.dummies[dummy_type] if activity == 'sleeping': return { 'movement': 'breathing_only', 'heart_rate': '80-120 bpm', 'respiration': '20-30 bpm' } elif activity == 'playing': return { 'movement': 'random', 'heart_rate': '100-150 bpm', 'respiration': '25-40 bpm' } elif activity == 'crying': return { 'movement': 'small', 'heart_rate': '120-160 bpm', 'respiration': '30-50 bpm' }
|