class BaseNeuroDeficiencyRisks { constructor(age) { this.age = age; } calculate_risks_age() { return null; } calculate_risks_asa(category) { return null; } calculate_risks_cci(category) { return null; } } class CommonNewNeuroDeficitRisks extends BaseNeuroDeficiencyRisks { calculate_risks_age() { if (this.age <= 5) return {'min': 9.4, 'max': 25}; if (this.age <= 10) return {'min': 9.4, 'max': 18.2}; if (this.age <= 15) return {'min': 3.6, 'max': 9.4}; if (this.age <= 17) return {'min': 0, 'max': 9.4}; if (this.age <= 25) return {'min': 0, 'max': 5.8}; if (this.age <= 30) return {'min': 1.3, 'max': 5.8}; if (this.age <= 40) return {'min': 3, 'max': 5.8}; if (this.age <= 45) return {'min': 2.2, 'max': 6}; if (this.age <= 50) return {'min': 5.8, 'max': 9}; if (this.age <= 55) return {'min': 5.8, 'max': 7.5}; if (this.age <= 59) return {'min': 5.8, 'max': 8.5}; if (this.age <= 60) return {'min': 7.5, 'max': 11}; if (this.age <= 65) return {'min': 9, 'max': 11}; if (this.age <= 70) return {'min': 9.8, 'max': 11.4}; if (this.age <= 75) return {'min': 11, 'max': 19.2}; return {'min': 11, 'max': 19}; } calculate_risks_asa(category) { if (category < 0 || category > 3) return null; if (this.age < 18 || this.age > 59) { if (category === 1) return {'min': 5.6, 'max': 5.6}; if (category === 2) return {'min': 6.2, 'max': 6.2}; if (category === 3) return {'min': 11.2, 'max': 11.2}; } else { if (category === 1) return {'min': 5.6, 'max': 5.6}; if (category === 2) return {'min': 4.6, 'max': 6.2}; if (category === 3) return {'min': 9, 'max': 11.2}; } } calculate_risks_cci(category) { if (category < 0 || category > 9) return null; if (category < 1) return {'min': 4.7, 'max': 4.7}; if (category <= 3) return {'min': 8.6, 'max': 8.6}; if (category <= 6) return {'min': 6.9, 'max': 6.9}; if (category <= 9) return {'min': 25, 'max': 25}; } } class CommonComplicationNeuroDeficiencyRisks extends BaseNeuroDeficiencyRisks { calculate_risks_age() { if (this.age <= 5) return {'min': 0, 'max': 9.4}; if (this.age <= 10) return {'min': 9.1, 'max': 14.3}; if (this.age <= 15) return {'min': 9.4, 'max': 13.3}; if (this.age <= 17) return {'min': 7.7, 'max': 13.3}; if (this.age <= 20) return {'min': 2.8, 'max': 10.7}; if (this.age <= 25) return {'min': 2.7, 'max': 11.1}; if (this.age <= 30) return {'min': 0, 'max': 4.4}; if (this.age <= 35) return {'min': 0.9, 'max': 4.4}; if (this.age <= 40) return {'min': 2.2, 'max': 4.4}; if (this.age <= 44) return {'min': 2.8, 'max': 4.6}; if (this.age <= 45) return {'min': 4.4, 'max': 5.4}; if (this.age <= 50) return {'min': 4.4, 'max': 5.4}; if (this.age <= 55) return {'min': 4.4, 'max': 5.4}; if (this.age <= 59) return {'min': 4.4, 'max': 5.7}; if (this.age <= 60) return {'min': 5.4, 'max': 8.3}; if (this.age <= 65) return {'min': 6.9, 'max': 8.3}; if (this.age <= 70) return {'min': 8.2, 'max': 10.7}; if (this.age <= 74) return {'min': 8.2, 'max': 12.1}; if (this.age <= 75) return {'min': 8.3, 'max': 12.1}; return {'min': 8.3, 'max': 16.7}; } calculate_risks_asa(category) { if (category < 0 || category > 3) return null; if (this.age < 60) { if (category === 1) return {'min': 5, 'max': 5}; if (category === 2) return {'min': 4.9, 'max': 4.9}; if (category === 3) return {'min': 7.6, 'max': 7.6}; } else { if (category === 1) return {'min': 5, 'max': 7.9}; if (category === 2) return {'min': 4.9, 'max': 7}; if (category === 3) return {'min': 7.6, 'max': 10}; } } calculate_risks_cci(category) { if (category < 0 || category > 9) return null; if (category < 1) return {'min': 4.2, 'max': 4.2}; if (category <= 3) return {'min': 6.4, 'max': 6.4}; if (category <= 6) return {'min': 4, 'max': 4}; if (category <= 9) return {'min': 25, 'max': 25}; } } class EndovascularNewNeuroDeficitRisks extends BaseNeuroDeficiencyRisks { calculate_risks_age() { if (this.age <= 5) return {'min': 14.3, 'max': 50}; if (this.age <= 17) return {'min': 0, 'max': 14.3}; //TODO: тут возможно другие диапазоны if (this.age <= 30) return {'min': 0, 'max': 2.1}; if (this.age <= 35) return {'min': 2.1, 'max': 3.3}; if (this.age <= 40) return {'min': 2.1, 'max': 3.2}; if (this.age <= 44) return {'min': 1.1, 'max': 2.1}; if (this.age <= 45) return {'min': 1.1, 'max': 5}; if (this.age <= 50) return {'min': 5, 'max': 6.5}; if (this.age <= 55) return {'min': 3.3, 'max': 5}; if (this.age <= 59) return {'min': 5, 'max': 6.8}; if (this.age <= 60) return {'min': 6, 'max': 6.8}; if (this.age <= 65) return {'min': 6, 'max': 7.9}; if (this.age <= 65) return {'min': 6, 'max': 7.9}; if (this.age <= 74) return {'min': 5.6, 'max': 6}; if (this.age <= 75) return {'min': 5.6, 'max': 20}; return {'min': 20, 'max': 33.3}; } calculate_risks_asa(category) { if (category < 0 || category > 3) return null; if (this.age < 60) { if (category === 1) return {'min': 2.4, 'max': 2.4}; if (category === 2) return {'min': 3.8, 'max': 3.8}; if (category === 3) return {'min': 10.7, 'max': 10.7}; } else { if (category === 1) return {'min': 0, 'max': 2.4}; if (category === 2) return {'min': 3.8, 'max': 4.2}; if (category === 3) return {'min': 10.7, 'max': 16}; } } calculate_risks_cci(category) { if (category < 0 || category > 9) return null; if (category === 0) return {'min': 3.1, 'max': 3.1}; if (category <= 3) return {'min': 5.4, 'max': 5.4}; if (category <= 6) return {'min': 0, 'max': 0}; if (category <= 9) return {'min': 33.3, 'max': 33.3}; } } class EndovascularComplicationNeuroDeficiencyRisks extends BaseNeuroDeficiencyRisks { calculate_risks_age() { if (this.age <= 15) return {'min': 0, 'max': 0}; if (this.age <= 17) return {'min': 0, 'max': 20}; if (this.age <= 20) return {'min': 2.1, 'max': 20}; if (this.age <= 35) return {'min': 0, 'max': 2.3}; if (this.age <= 40) return {'min': 1.1, 'max': 2.3}; if (this.age <= 44) return {'min': 2.1, 'max': 5.4}; if (this.age <= 45) return {'min': 2.3, 'max': 5.4}; if (this.age <= 50) return {'min': 1.9, 'max': 2.5}; if (this.age <= 55) return {'min': 2.3, 'max': 2.5}; if (this.age <= 59) return {'min': 2.3, 'max': 3}; if (this.age <= 60) return {'min': 3, 'max': 5}; if (this.age <= 65) return {'min': 5, 'max': 5.4}; if (this.age <= 70) return {'min': 4.4, 'max': 5.4}; if (this.age <= 74) return {'min': 5.4, 'max': 5.6}; if (this.age <= 75) return {'min': 5.4, 'max': 20}; return {'min': 5.4, 'max': 33.3}; } calculate_risks_asa(category) { if (category < 0 || category > 3) return null; if (18 <= this.age && this.age < 60) { if (category === 1) return {'min': 1, 'max': 1.2}; if (category === 2) return {'min': 2.6, 'max': 3.3}; if (category === 3) return {'min': 4.4, 'max': 6.4}; } else { if (category === 1) return {'min': 1, 'max': 1}; if (category === 2) return {'min': 3.3, 'max': 3.3}; if (category === 3) return {'min': 6.4, 'max': 6.4}; } } calculate_risks_cci(category) { if (category < 0 || category > 9) return null; if (category < 1) return {'min': 2.5, 'max': 2.5}; if (category <= 3) return {'min': 3.4, 'max': 3.4}; if (category <= 6) return {'min': 0, 'max': 0}; if (category <= 9) return {'min': 33.3, 'max': 33.3}; } } class MicrosurgeryNewNeuroDeficitRisks extends BaseNeuroDeficiencyRisks { calculate_risks_age() { if (this.age <= 5) return {'min': 0, 'max': 12.5}; if (this.age <= 10) return {'min': 8, 'max': 16.7}; if (this.age <= 15) return {'min': 5.3, 'max': 9.1}; if (this.age <= 17) return {'min': 0, 'max': 8}; if (this.age <= 25) return {'min': 0, 'max': 7.7}; if (this.age <= 30) return {'min': 4, 'max': 7.7}; if (this.age <= 40) return {'min': 4.2, 'max': 7.7}; if (this.age <= 45) return {'min': 3.3, 'max': 7.8}; if (this.age <= 50) return {'min': 7.7, 'max': 11}; if (this.age <= 55) return {'min': 7.7, 'max': 9.3}; if (this.age <= 59) return {'min': 7.7, 'max': 9.7}; if (this.age <= 60) return {'min': 9.3, 'max': 13.8}; if (this.age <= 65) return {'min': 9.7, 'max': 13.8}; if (this.age <= 70) return {'min': 12.2, 'max': 16.3}; if (this.age <= 74) return {'min': 13.7, 'max': 26.5}; if (this.age <= 75) return {'min': 0, 'max': 24.3}; return {'min': 0, 'max': 24.3}; } calculate_risks_asa() { return null; } calculate_risks_cci(category) { if (category < 0 || category > 9) return null; if (category === 0) return {'min': 6.8, 'max': 6.8}; if (category === 1) return {'min': 7, 'max': 7}; if (category === 2) return {'min': 12.3, 'max': 12.3}; if (category === 3) return {'min': 17.2, 'max': 17.2}; if (category === 4) return {'min': 7.7, 'max': 7.7}; if (category === 5) return {'min': 14.3, 'max': 14.3}; if (category <= 6) return {'min': 0, 'max': 0}; if (category <= 9) return null; if (category === 9) return {'min': 0, 'max': 0}; } } class MicrosurgeryComplicationNeuroDeficitRisks extends BaseNeuroDeficiencyRisks { calculate_risks_age() { if (this.age <= 17) return {'min': 12, 'max': 12}; if (this.age <= 44) return {'min': 3.8, 'max': 3.8}; if (this.age <= 59) return {'min': 7.6, 'max': 7.6}; if (this.age <= 74) return {'min': 10.1, 'max': 10.1}; return {'min': 0, 'max': 0}; } calculate_risks_asa() { return null; } calculate_risks_cci() { return null; } }