package com.iamberry.wechat.core.entity.questionnaire;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @company	深圳爱贝源科技有限公司
 * @website www.iamberry.com
 * @author 	献
 * @tel		18271840547
 * @date	2016年10月28日
 * @explain	BMI结果参照表
 */
public final class BMIReference implements Serializable {

	private static final long serialVersionUID = -8346520212337911708L;

	private int age;		// 月龄
	
	private int sex;		// 宝宝性别
	
	private double N3SD;	// 低于三个标准值
	
	private double N2SD;	// 低于两个标准值
	
	private double N1SD;	// 低于一个标准值
	
	private double N0SD;	// 正常值
	
	private double P1SD;	// 高于一个正常值
	
	private double P2SD;	// 高于两个正常值
	
	private double P3SD;	// 高于三个正常值
	
	/**
	 * 根据用户性别、月龄获取BMI
	 * @param age
	 * @param sex	1:男孩；2：女孩
	 * @return
	 */
	public static BMIReference getBMI(int age, int sex) {
		// 如果BMI数据为空，那么初始化
		if (bmi.isEmpty()) {
			synchronized (bmi) {
				initBMI();
			}
		}
		return bmi.get(age + "-" + sex);
	}
	
	
	
	public static String getBMIText(int age) {
		String strage = "";
		//判断年龄段！
		 if(age<=3){ // 3月
			strage = "3月";
		}else if(age<=6){ //6月
			strage = "6月";
		}else if(age<=12){ //12
			strage = "12月";
		}else if(age<=15){ //15
			strage = "15月";
		}else if(age<=18){ //18
			strage = "18月";
		}else if(age<=24){//24
			strage = "24月";
		}else if(age<=30){ //30 2岁半
			strage = "2岁";
		}else if(age<=36){ //36 3岁
			strage = "3岁";
		}else if(age<=48){ //48 4岁
			strage = "3岁";
		}else if(age<=60){ //60 5岁
			strage = "3岁";
		}
		return strage;
	}


	/**
	 * 缓存对应的BMI，因为只是获取，那么不需要保证多线程安全，只是需要在数据初始化的时候保证多线程安全问题
	 */
	private static final Map<String, BMIReference> bmi = new HashMap<String, BMIReference>();
	public static final Map<String, String> bmitext = new HashMap<String, String>();
	
	/**
	 * 初始化BMI数据
	 */
	private static void initBMI() {
		
		//1-3月
		bmitext.put("3月1", "宝宝体重严重过轻，要留意是否营养不良哦，可以找医生做全面健康检查。喝奶粉的宝宝可以适当喝浓点；母乳喂养的宝宝，应加强妈妈的饮食营养，增加富含优质蛋白质的鱼禽蛋肉等高营养食物的摄入。");
		bmitext.put("3月2", "宝宝有体重过轻的风险,建议增强宝宝饮食营养。喝奶粉的宝宝可以适当喝浓点；母乳喂养的宝宝，应加强妈妈的饮食营养，增加富含优质蛋白质的鱼禽蛋肉等高营养食物的摄入。");
		bmitext.put("3月3", "宝宝体重身型匀称，发育得非常好。继续保持全面足量营养，同时丰富户外活动，让身体棒棒，快高长大。");
		bmitext.put("3月4", "宝宝有体重过重的风险，喝奶粉的宝宝可以适当喝淡点；母乳喂养的宝宝，应调整妈妈的饮食结构，控制高能量高脂肪的摄入，增加新鲜蔬果的食用。多进行户外活动，帮助宝宝健康发育。");
		bmitext.put("3月5", "宝宝较肥胖，应重视宝宝的体重问题。喝奶粉的宝宝可以适当喝淡点；母乳喂养的宝宝，应调整妈妈的饮食结构，少量多餐，多吃蔬菜水果，减少肉类主食类的摄入，多进行户外活动，帮助宝宝恢复健康体重。");
		//4-6月
		bmitext.put("6月1", "宝宝体重严重过轻，要留意是否营养不良哦，可以找医生做全面健康检查。喝奶粉的宝宝可以适当喝浓点；母乳喂养的宝宝，应加强妈妈的饮食营养，增加富含优质蛋白质的鱼禽蛋肉等高营养食物的摄入。");
		bmitext.put("6月2", "宝宝有体重过轻的风险,建议增强宝宝饮食营养。喝奶粉的宝宝可以适当喝浓点；母乳喂养的宝宝，应加强妈妈的饮食营养，增加富含优质蛋白质的鱼禽蛋肉等高营养食物的摄入。");
		bmitext.put("6月3", "宝宝体重身型匀称，发育得非常好。继续保持全面足量营养，同时丰富户外活动，让身体棒棒，快高长大。");
		bmitext.put("6月4", "宝宝有体重过重的风险，喝奶粉的宝宝可以适当喝淡点；母乳喂养的宝宝，应调整妈妈的饮食结构，控制高能量高脂肪的摄入，增加新鲜蔬果的食用。多进行户外活动，帮助宝宝健康发育。");
		bmitext.put("6月5", "宝宝较肥胖，应重视宝宝的体重问题。喝奶粉的宝宝可以适当喝淡点；母乳喂养的宝宝，应调整妈妈的饮食结构，少量多餐，多吃蔬菜水果，减少肉类主食类的摄入，多进行户外活动，帮助宝宝恢复健康体重。");
		//7-12
		bmitext.put("12月1", "宝宝体重严重过轻，要留意是否营养不良哦，可以找医生做全面健康检查。喝奶粉的宝宝可以适当喝浓点；母乳喂养的宝宝，应加强妈妈的饮食营养；另外辅食多增加富含优质蛋白质的鱼禽蛋肉等高营养食物。");
		bmitext.put("12月2", "宝宝有体重过轻的风险,建议增强宝宝饮食营养。喝奶粉的宝宝可以适当喝浓点；母乳喂养的宝宝，应加强妈妈的饮食营养；另外辅食多增加富含优质蛋白质的鱼禽蛋肉等高营养食物。");
		bmitext.put("12月3", "宝宝体重身型匀称，发育得非常好。继续保持全面足量营养，同时丰富户外活动，让身体棒棒，快高长大。");
		bmitext.put("12月4", "宝宝有体重过重的风险，喝奶粉的宝宝可以适当喝淡点；母乳喂养的宝宝，应调整妈妈的饮食结构，控制高能量高脂肪的摄入；宝宝辅食多增加新鲜蔬果，多进行户外活动，帮助宝宝健康发育。");
		bmitext.put("12月5", "宝宝较肥胖，应重视宝宝的体重问题。喝奶粉的宝宝可以适当喝淡点；母乳喂养的宝宝，应调整妈妈的饮食结构，减少肉类主食类的摄入；宝宝辅食多增加新鲜蔬果，多进行户外活动，帮助宝宝恢复健康体重。");
		//13-15
		bmitext.put("15月1", "宝宝体重严重过轻，要留意是否营养不良哦，可以找医生做全面健康检查。宝宝的饮食要注意添加，富含优质蛋白质的鱼禽蛋肉等高营养食物，每天喝牛奶或吃豆制品，多进行户外活动，让身体棒棒。");
		bmitext.put("15月2", "宝宝有体重过轻的风险,建议增强宝宝饮食营养。多摄入富含优质蛋白质的鱼禽蛋肉等高营养食物，每天喝牛奶或吃豆制品，多进行户外活动，让身体棒棒。");
		bmitext.put("15月3", "宝宝体重身型匀称，发育得非常好。继续保持全面均衡营养，荤素搭配品种多样；同时丰富户外活动，让身体棒棒，快高长大。");
		bmitext.put("15月4", "宝宝有体重过重的风险，需要注意宝宝的饮食均衡。多鼓励宝宝吃蔬菜水果，减少肉类主食类或零食的摄入，多进行户外活动，帮助宝宝健康发育。");
		bmitext.put("15月5", "宝宝较肥胖，应重视宝宝的体重问题。从饮食运动各方面加强控制，少量多餐，避免暴饮暴食；多鼓励宝宝吃蔬菜水果，减少肉类主食类或零食的摄入，多进行户外活动，帮助宝宝恢复健康体重。");
		//16-18
		bmitext.put("18月1", "宝宝体重严重过轻，要留意是否营养不良哦，可以找医生做全面健康检查。宝宝的饮食要注意添加，富含优质蛋白质的鱼禽蛋肉等高营养食物，每天喝牛奶或吃豆制品，多进行户外活动，让身体棒棒。");		
		bmitext.put("18月2", "宝宝有体重过轻的风险,建议增强宝宝饮食营养。多摄入富含优质蛋白质的鱼禽蛋肉等高营养食物，每天喝牛奶或吃豆制品，多进行户外活动，让身体棒棒。");	
		bmitext.put("18月3", "宝宝体重身型匀称，发育得非常好。继续保持全面均衡营养，荤素搭配品种多样；同时丰富户外活动，让身体棒棒，快高长大。");
		bmitext.put("18月4", "宝宝有体重过重的风险，需要注意宝宝的饮食均衡。多鼓励宝宝吃蔬菜水果，减少肉类主食类或零食的摄入，多进行户外活动，帮助宝宝健康发育。");	
		bmitext.put("18月5", "宝宝较肥胖，应重视宝宝的体重问题。从饮食运动各方面加强控制，少量多餐，避免暴饮暴食；多鼓励宝宝吃蔬菜水果，减少肉类主食类或零食的摄入，多进行户外活动，帮助宝宝恢复健康体重。");			
		//19-24
		bmitext.put("24月1", "宝宝体重严重过轻，要留意是否营养不良哦，可以找医生做全面健康检查。宝宝的饮食要注意添加，富含优质蛋白质的鱼禽蛋肉等高营养食物，每天喝牛奶或吃豆制品，多进行户外活动，让身体棒棒。");					
		bmitext.put("24月2", "宝宝有体重过轻的风险,建议增强宝宝饮食营养。多摄入富含优质蛋白质的鱼禽蛋肉等高营养食物，每天喝牛奶或吃豆制品，多进行户外活动，让身体棒棒。");					
		bmitext.put("24月3", "宝宝体重身型匀称，发育得非常好。继续保持全面均衡营养，荤素搭配品种多样；同时丰富户外活动，让身体棒棒，快高长大。");					
		bmitext.put("24月4", "宝宝有体重过重的风险，需要注意宝宝的饮食均衡。多鼓励宝宝吃蔬菜水果，减少肉类主食类或零食的摄入，多进行户外活动，帮助宝宝健康发育。");					
		bmitext.put("24月5", "宝宝较肥胖，应重视宝宝的体重问题。从饮食运动各方面加强控制，少量多餐，避免暴饮暴食；多鼓励宝宝吃蔬菜水果，减少肉类主食类或零食的摄入，多进行户外活动，帮助宝宝恢复健康体重。");	
		
		//2-2岁半
		bmitext.put("2岁1","宝宝体重严重过轻，要留意是否营养不良哦，可以找医生做全面健康检查。宝宝的饮食要注意添加，富含优质蛋白质的鱼禽蛋肉等高营养食物，每天喝牛奶或吃豆制品，多进行户外活动或运动锻炼，让身体棒棒。");				
		bmitext.put("2岁2","宝宝有体重过轻的风险,建议增强宝宝饮食营养。多摄入富含优质蛋白质的鱼禽蛋肉等高营养食物，每天喝牛奶或吃豆制品，多进行户外活动或运动锻炼，让身体棒棒。");				
		bmitext.put("2岁3","宝宝体重身型匀称，发育得非常好。继续保持全面均衡营养，荤素搭配品种多样；同时丰富户外活动，多进行运动锻炼，让身体棒棒，快高长大。");			
		bmitext.put("2岁4","宝宝有体重过重的风险，需要注意宝宝的饮食均衡。多鼓励宝宝吃蔬菜水果，减少肉类主食类或零食的摄入，多进行户外活动或运动锻炼，帮助宝宝健康发育。");				
		bmitext.put("2岁5","宝宝较肥胖，应重视宝宝的体重问题。从饮食运动各方面加强控制，少量多餐，避免暴饮暴食；多鼓励宝宝吃蔬菜水果，减少肉类主食类或零食的摄入，多进行户外活动或运动锻炼，帮助宝宝恢复健康体重。");				
		
		//2岁半-3岁
		bmitext.put("3岁1","宝宝体重严重过轻，要留意是否营养不良哦，可以找医生做全面健康检查。宝宝的饮食要注意添加，富含优质蛋白质的鱼禽蛋肉等高营养食物，每天喝牛奶或吃豆制品，多进行户外活动或运动锻炼，让身体棒棒。");					
		bmitext.put("3岁2","宝宝有体重过轻的风险,建议增强宝宝饮食营养。多摄入富含优质蛋白质的鱼禽蛋肉等高营养食物，每天喝牛奶或吃豆制品，多进行户外活动或运动锻炼，让身体棒棒。");					
		bmitext.put("3岁3","宝宝体重身型匀称，发育得非常好。继续保持全面均衡营养，荤素搭配品种多样；同时丰富户外活动，多进行运动锻炼，让身体棒棒，快高长大。");				
		bmitext.put("3岁4","宝宝有体重过重的风险，需要注意宝宝的饮食均衡。多鼓励宝宝吃蔬菜水果，减少肉类主食类或零食的摄入，多进行户外活动或运动锻炼，帮助宝宝健康发育。");					
		bmitext.put("3岁5","宝宝较肥胖，应重视宝宝的体重问题。从饮食运动各方面加强控制，少量多餐，避免暴饮暴食；多鼓励宝宝吃蔬菜水果，减少肉类主食类或零食的摄入，多进行户外活动或运动锻炼，帮助宝宝恢复健康体重。");					
		
		//3岁-4岁
		bmitext.put("4岁1","宝宝体重严重过轻，要留意是否营养不良哦，可以找医生做全面健康检查。宝宝的饮食要注意添加，富含优质蛋白质的鱼禽蛋肉等高营养食物，每天喝牛奶或吃豆制品，多进行户外活动或运动锻炼，让身体棒棒。");					
		bmitext.put("4岁2","宝宝有体重过轻的风险,建议增强宝宝饮食营养。多摄入富含优质蛋白质的鱼禽蛋肉等高营养食物，每天喝牛奶或吃豆制品，多进行户外活动或运动锻炼，让身体棒棒。");					
		bmitext.put("4岁3","宝宝体重身型匀称，发育得非常好。继续保持全面均衡营养，荤素搭配品种多样；同时丰富户外活动，多进行运动锻炼，让身体棒棒，快高长大。");					
		bmitext.put("4岁4","宝宝有体重过重的风险，需要注意宝宝的饮食均衡。多鼓励宝宝吃蔬菜水果，减少肉类主食类或零食的摄入，多进行户外活动或运动锻炼，帮助宝宝健康发育。");					
		bmitext.put("4岁5","宝宝较肥胖，应重视宝宝的体重问题。从饮食运动各方面加强控制，少量多餐，避免暴饮暴食；多鼓励宝宝吃蔬菜水果，减少肉类主食类或零食的摄入，多进行户外活动或运动锻炼，帮助宝宝恢复健康体重。");					

		//4岁-5岁
		bmitext.put("5岁1","宝宝体重严重过轻，要留意是否营养不良哦，可以找医生做全面健康检查。宝宝的饮食要注意添加，富含优质蛋白质的鱼禽蛋肉等高营养食物，每天喝牛奶或吃豆制品，多进行户外活动或运动锻炼，让身体棒棒。");				
		bmitext.put("5岁2","宝宝有体重过轻的风险,建议增强宝宝饮食营养。多摄入富含优质蛋白质的鱼禽蛋肉等高营养食物，每天喝牛奶或吃豆制品，多进行户外活动或运动锻炼，让身体棒棒。");				
		bmitext.put("5岁3","宝宝体重身型匀称，发育得非常好。继续保持全面均衡营养，荤素搭配品种多样；同时丰富户外活动，多进行运动锻炼，让身体棒棒，快高长大。");				
		bmitext.put("5岁4","宝宝有体重过重的风险，需要注意宝宝的饮食均衡。多鼓励宝宝吃蔬菜水果，减少肉类主食类或零食的摄入，多进行户外活动或运动锻炼，帮助宝宝健康发育。");				
		bmitext.put("5岁5","宝宝较肥胖，应重视宝宝的体重问题。从饮食运动各方面加强控制，少量多餐，避免暴饮暴食；多鼓励宝宝吃蔬菜水果，减少肉类主食类或零食的摄入，多进行户外活动或运动锻炼，帮助宝宝恢复健康体重。");				


		
		
		// 如果上级调用方法getBMI()调用时出现已经初始化过但是还是在调用时，本方法内的处理
		if (!bmi.isEmpty()) {
			return;
		}
		
		// 男童
		BMIReference age0 = new BMIReference(0, 1, 10.2, 11.1, 12.2, 13.4, 14.8, 16.3, 18.1);
		bmi.put("0-1", age0);
		BMIReference age1 = new BMIReference(1, 1, 11.3, 12.4, 13.6, 14.9, 16.3, 17.8, 19.4);
		bmi.put("1-1", age1);
		BMIReference age2 = new BMIReference(2, 1, 12.5, 13.7, 15.0, 16.3, 17.8, 19.4, 21.1);
		bmi.put("2-1", age2);
		BMIReference age3 = new BMIReference(3, 1, 13.1, 14.3, 15.5, 16.9, 18.4, 20.0, 21.8);
		bmi.put("3-1", age3);
		BMIReference age4 = new BMIReference(4, 1, 13.4, 14.5, 15.8, 17.2, 18.7, 20.3, 22.1);
		bmi.put("4-1", age4);
		BMIReference age5 = new BMIReference(5, 1, 13.5, 14.7, 15.9, 17.3, 18.8, 20.5, 22.3);
		bmi.put("5-1", age5);
		BMIReference age6 = new BMIReference(6, 1, 13.6, 14.7, 16.0, 17.3, 18.8, 20.5, 22.3);
		bmi.put("6-1", age6);
		BMIReference age7 = new BMIReference(7, 1, 13.7, 14.8, 16.0, 17.3, 18.8, 20.5, 22.3);
		bmi.put("7-1", age7);
		BMIReference age8 = new BMIReference(8, 1, 13.6, 14.7, 15.9, 17.3, 18.7, 20.4, 22.2);
		bmi.put("8-1", age8);
		BMIReference age9 = new BMIReference(9, 1, 13.6, 14.7, 15.8, 17.2, 18.6, 20.3, 22.1);
		bmi.put("9-1", age9);
		BMIReference age10 = new BMIReference(10, 1, 13.5, 14.6, 15.7, 17.0, 18.5, 20.1, 22.0);
		bmi.put("10-1", age10);
		BMIReference age11 = new BMIReference(11, 1, 13.4, 14.5, 15.6, 16.9, 18.4, 20.0, 21.8);
		bmi.put("11-1", age11);
		BMIReference age12 = new BMIReference(12, 1, 13.4, 14.4, 15.5, 16.8, 18.2, 19.8, 21.6);
		bmi.put("12-1", age12);
		BMIReference age13 = new BMIReference(13, 1, 13.3, 14.3, 15.4, 16.7, 18.1, 19.7, 21.5);
		bmi.put("13-1", age13);
		BMIReference age14 = new BMIReference(14, 1, 13.2, 14.2, 15.3, 16.6, 18.0, 19.5, 21.3);
		bmi.put("14-1", age14);
		BMIReference age15 = new BMIReference(15, 1, 13.1, 14.1, 15.2, 16.4, 17.8, 19.4, 21.2);
		bmi.put("15-1", age15);
		BMIReference age16 = new BMIReference(16, 1, 13.1, 14.0, 15.1, 16.3, 17.7, 19.3, 21.0);
		bmi.put("16-1", age16);
		BMIReference age17 = new BMIReference(17, 1, 13.0, 13.9, 15.0, 16.2, 17.6, 19.1, 20.9);
		bmi.put("17-1", age17);
		BMIReference age18 = new BMIReference(18, 1, 12.9, 13.9, 14.9, 16.1, 17.5, 19.0, 20.8);
		bmi.put("18-1", age18);
		BMIReference age19 = new BMIReference(19, 1, 12.9, 13.8, 14.9, 16.1, 17.4, 18.9, 20.7);
		bmi.put("19-1", age19);
		BMIReference age20 = new BMIReference(20, 1, 12.8, 13.7, 14.8, 16.0, 17.3, 18.8, 20.6);
		bmi.put("20-1", age20);
		BMIReference age21 = new BMIReference(21, 1, 12.8, 13.7, 14.7, 15.9, 17.2, 18.7, 20.5);
		bmi.put("21-1", age21);
		BMIReference age22 = new BMIReference(22, 1, 12.7, 13.6, 14.7, 15.8, 17.2, 18.7, 20.4);
		bmi.put("22-1", age22);
		BMIReference age23 = new BMIReference(23, 1, 12.7, 13.6, 14.6, 15.8, 17.1, 18.6, 20.3);
		bmi.put("23-1", age23);
		BMIReference age24 = new BMIReference(24, 1, 12.9, 13.8, 14.8, 16.0, 17.3, 18.9, 20.6);
		bmi.put("24-1", age24);
		BMIReference age25 = new BMIReference(25, 1, 12.8, 13.8, 14.8, 16.0, 17.3, 18.8, 20.5);
		bmi.put("25-1", age25);
		BMIReference age26 = new BMIReference(26, 1, 12.8, 13.7, 14.8, 15.9, 17.3, 18.8, 20.5);
		bmi.put("26-1", age26);
		BMIReference age27 = new BMIReference(27, 1, 12.7, 13.7, 14.7, 15.9, 17.2, 18.7, 20.4);
		bmi.put("27-1", age27);
		BMIReference age28 = new BMIReference(28, 1, 12.7, 13.6, 14.7, 15.9, 17.2, 18.7, 20.4);
		bmi.put("28-1", age28);
		BMIReference age29 = new BMIReference(29, 1, 12.7, 13.6, 14.7, 15.8, 17.1, 18.6, 20.3);
		bmi.put("29-1", age29);
		BMIReference age30 = new BMIReference(30, 1, 12.6, 13.6, 14.6, 15.8, 17.1, 18.6, 20.2);
		bmi.put("30-1", age30);
		BMIReference age31 = new BMIReference(31, 1, 12.6, 13.5, 14.6, 15.8, 17.1, 18.5, 20.2);
		bmi.put("31-1", age31);
		BMIReference age32 = new BMIReference(32, 1, 12.5, 13.5, 14.6, 15.7, 17.0, 18.5, 20.1);
		bmi.put("32-1", age32);
		BMIReference age33 = new BMIReference(33, 1, 12.5, 13.5, 14.5, 15.7, 17.0, 18.5, 20.1);
		bmi.put("33-1", age33);
		BMIReference age34 = new BMIReference(34, 1, 12.5, 13.4, 14.5, 15.7, 17.0, 18.4, 20.0);
		bmi.put("34-1", age34);
		BMIReference age35 = new BMIReference(35, 1, 12.4, 13.4, 14.5, 15.6, 16.9, 18.4, 20.0);
		bmi.put("35-1", age35);
		BMIReference age36 = new BMIReference(36, 1, 12.4, 13.4, 14.4, 15.6, 16.9, 18.4, 20.0);
		bmi.put("36-1", age36);
		BMIReference age37 = new BMIReference(37, 1, 12.4, 13.3, 14.4, 15.6, 16.9, 18.3, 19.9);
		bmi.put("37-1", age37);
		BMIReference age38 = new BMIReference(38, 1, 12.3, 13.3, 14.4, 15.5, 16.8, 18.3, 19.9);
		bmi.put("38-1", age38);
		BMIReference age39 = new BMIReference(39, 1, 12.3, 13.3, 14.3, 15.5, 16.8, 18.3, 19.9);
		bmi.put("39-1", age39);
		BMIReference age40 = new BMIReference(40, 1, 12.3, 13.2, 14.3, 15.5, 16.8, 18.2, 19.9);
		bmi.put("40-1", age40);
		BMIReference age41 = new BMIReference(41, 1, 12.2, 13.2, 14.3, 15.5, 16.8, 18.2, 19.9);
		bmi.put("41-1", age41);
		BMIReference age42 = new BMIReference(42, 1, 12.2, 13.2, 14.3, 15.4, 16.8, 18.2, 19.8);
		bmi.put("42-1", age42);
		BMIReference age43 = new BMIReference(43, 1, 12.2, 13.2, 14.2, 15.4, 16.7, 18.2, 19.8);
		bmi.put("43-1", age43);
		BMIReference age44 = new BMIReference(44, 1, 12.2, 13.1, 14.2, 15.4, 16.7, 18.2, 19.8);
		bmi.put("44-1", age44);
		BMIReference age45 = new BMIReference(45, 1, 12.2, 13.1, 14.2, 15.4, 16.7, 18.2, 19.8);
		bmi.put("45-1", age45);
		BMIReference age46 = new BMIReference(46, 1, 12.1, 13.1, 14.2, 15.4, 16.7, 18.2, 19.8);
		bmi.put("46-1", age46);
		BMIReference age47 = new BMIReference(47, 1, 12.1, 13.1, 14.2, 15.3, 16.7, 18.2, 19.9);
		bmi.put("47-1", age47);
		BMIReference age48 = new BMIReference(48, 1, 12.1, 13.1, 14.1, 15.3, 16.7, 18.2, 19.9);
		bmi.put("48-1", age48);
		BMIReference age49 = new BMIReference(49, 1, 12.1, 13.0, 14.1, 15.3, 16.7, 18.2, 19.9);
		bmi.put("49-1", age49);
		BMIReference age50 = new BMIReference(50, 1, 12.1, 13.0, 14.1, 15.3, 16.7, 18.2, 19.9);
		bmi.put("50-1", age50);
		BMIReference age51 = new BMIReference(51, 1, 12.1, 13.0, 14.1, 15.3, 16.6, 18.2, 19.9);
		bmi.put("51-1", age51);
		BMIReference age52 = new BMIReference(52, 1, 12.0, 13.0, 14.1, 15.3, 16.6, 18.2, 19.9);
		bmi.put("52-1", age52);
		BMIReference age53 = new BMIReference(53, 1, 12.0, 13.0, 14.1, 15.3, 16.6, 18.2, 20.0);
		bmi.put("53-1", age53);
		BMIReference age54 = new BMIReference(54, 1, 12.0, 13.0, 14.0, 15.3, 16.6, 18.2, 20.0);
		bmi.put("54-1", age54);
		BMIReference age55 = new BMIReference(55, 1, 12.0, 13.0, 14.0, 15.2, 16.6, 18.2, 20.0);
		bmi.put("55-1", age55);
		BMIReference age56 = new BMIReference(56, 1, 12.0, 12.9, 14.0, 15.2, 16.6, 18.2, 20.1);
		bmi.put("56-1", age56);
		BMIReference age57 = new BMIReference(57, 1, 12.0, 12.9, 14.0, 15.2, 16.6, 18.2, 20.1);
		bmi.put("57-1", age57);
		BMIReference age58 = new BMIReference(58, 1, 12.0, 12.9, 14.0, 15.2, 16.6, 18.3, 20.2);
		bmi.put("58-1", age58);
		BMIReference age59 = new BMIReference(59, 1, 12.0, 12.9, 14.0, 15.2, 16.6, 18.3, 20.2);
		bmi.put("59-1", age59);
		BMIReference age60 = new BMIReference(60, 1, 12.0, 12.9, 14.0, 15.2, 16.6, 18.3, 20.3);
		bmi.put("60-1", age60);

		// 女童
		BMIReference ageG0 = new BMIReference(0, 2, 10.1, 11.1, 12.2, 13.3, 14.6, 16.1, 17.7);
		bmi.put("0-2", ageG0);
		BMIReference ageG1 = new BMIReference(1, 2, 10.8, 12.0, 13.2, 14.6, 16.0, 17.5, 19.1);
		bmi.put("1-2", ageG1);
		BMIReference ageG2 = new BMIReference(2, 2, 11.8, 13.0, 14.3, 15.8, 17.3, 19.0, 20.7);
		bmi.put("2-2", ageG2);
		BMIReference ageG3 = new BMIReference(3, 2, 12.4, 13.6, 14.9, 16.4, 17.9, 19.7, 21.5);
		bmi.put("3-2", ageG3);
		BMIReference ageG4 = new BMIReference(4, 2, 12.7, 13.9, 15.2, 16.7, 18.3, 20.0, 22.0);
		bmi.put("4-2", ageG4);
		BMIReference ageG5 = new BMIReference(5, 2, 12.9, 14.1, 15.4, 16.8, 18.4, 20.2, 22.2);
		bmi.put("5-2", ageG5);
		BMIReference ageG6 = new BMIReference(6, 2, 13.0, 14.1, 15.5, 16.9, 18.5, 20.3, 22.3);
		bmi.put("6-2", ageG6);
		BMIReference ageG7 = new BMIReference(7, 2, 13.0, 14.2, 15.5, 16.9, 18.5, 20.3, 22.3);
		bmi.put("7-2", ageG7);
		BMIReference ageG8 = new BMIReference(8, 2, 13.0, 14.1, 15.4, 16.8, 18.4, 20.2, 22.2);
		bmi.put("8-2", ageG8);
		BMIReference ageG9 = new BMIReference(9, 2, 12.9, 14.1, 15.3, 16.7, 18.3, 20.1, 22.1);
		bmi.put("9-2", ageG9);
		BMIReference ageG10 = new BMIReference(10, 2, 12.9, 14.0, 15.2, 16.6, 18.2, 19.9, 21.9);
		bmi.put("10-2", ageG10);
		BMIReference ageG11 = new BMIReference(11, 2, 12.8, 13.9, 15.1, 16.5, 18.0, 19.8, 21.8);
		bmi.put("11-2", ageG11);
		BMIReference ageG12 = new BMIReference(12, 2, 12.7, 13.8, 15.0, 16.4, 17.9, 19.6, 21.6);
		bmi.put("12-2", ageG12);
		BMIReference ageG13 = new BMIReference(13, 2, 12.6, 13.7, 14.9, 16.2, 17.7, 19.5, 21.4);
		bmi.put("13-2", ageG13);
		BMIReference ageG14 = new BMIReference(14, 2, 12.6, 13.6, 14.8, 16.1, 17.6, 19.3, 21.3);
		bmi.put("14-2", ageG14);
		BMIReference ageG15 = new BMIReference(15, 2, 12.5, 13.5, 14.7, 16.0, 17.5, 19.2, 21.1);
		bmi.put("15-2", ageG15);
		BMIReference ageG16 = new BMIReference(16, 2, 12.4, 13.5, 14.6, 15.9, 17.4, 19.1, 21.0);
		bmi.put("16-2", ageG16);
		BMIReference ageG17 = new BMIReference(17, 2, 12.4, 13.4, 14.5, 15.8, 17.3, 18.9, 20.9);
		bmi.put("17-2", ageG17);
		BMIReference ageG18 = new BMIReference(18, 2, 12.3, 13.3, 14.4, 15.7, 17.2, 18.8, 20.8);
		bmi.put("18-2", ageG18);
		BMIReference ageG19 = new BMIReference(19, 2, 12.3, 13.3, 14.4, 15.7, 17.1, 18.8, 20.7);
		bmi.put("19-2", ageG19);
		BMIReference ageG20 = new BMIReference(20, 2, 12.2, 13.2, 14.3, 15.6, 17.0, 18.7, 20.6);
		bmi.put("20-2", ageG20);
		BMIReference ageG21 = new BMIReference(21, 2, 12.2, 13.2, 14.3, 15.5, 17.0, 18.6, 20.5);
		bmi.put("21-2", ageG21);
		BMIReference ageG22 = new BMIReference(22, 2, 12.2, 13.1, 14.2, 15.5, 16.9, 18.5, 20.4);
		bmi.put("22-2", ageG22);
		BMIReference ageG23 = new BMIReference(23, 2, 12.2, 13.1, 14.2, 15.4, 16.9, 18.5, 20.4);
		bmi.put("23-2", ageG23);
		BMIReference ageG24 = new BMIReference(24, 2, 12.1, 13.1, 14.2, 15.4, 16.8, 18.4, 20.3);
		bmi.put("24-2", ageG24);
		BMIReference ageG25 = new BMIReference(25, 2, 12.4, 13.3, 14.4, 15.7, 17.1, 18.7, 20.6);
		bmi.put("25-2", ageG25);
		BMIReference ageG26 = new BMIReference(26, 2, 12.3, 13.3, 14.4, 15.6, 17.0, 18.7, 20.6);
		bmi.put("26-2", ageG26);
		BMIReference ageG27 = new BMIReference(27, 2, 12.3, 13.3, 14.4, 15.6, 17.0, 18.6, 20.5);
		bmi.put("27-2", ageG27);
		BMIReference ageG28 = new BMIReference(28, 2, 12.3, 13.3, 14.3, 15.6, 17.0, 18.6, 20.5);
		bmi.put("28-2", ageG28);
		BMIReference ageG29 = new BMIReference(29, 2, 12.3, 13.2, 14.3, 15.6, 17.0, 18.6, 20.4);
		bmi.put("29-2", ageG29);
		BMIReference ageG30 = new BMIReference(30, 2, 12.3, 13.2, 14.3, 15.5, 16.9, 18.5, 20.4);
		bmi.put("30-2", ageG30);
		BMIReference ageG31 = new BMIReference(31, 2, 12.2, 13.2, 14.3, 15.5, 16.9, 18.5, 20.4);
		bmi.put("31-2", ageG31);
		BMIReference ageG32 = new BMIReference(32, 2, 12.2, 13.2, 14.3, 15.5, 16.9, 18.5, 20.4);
		bmi.put("32-2", ageG32);
		BMIReference ageG33 = new BMIReference(33, 2, 12.2, 13.1, 14.2, 15.5, 16.9, 18.5, 20.3);
		bmi.put("33-2", ageG33);
		BMIReference ageG34 = new BMIReference(34, 2, 12.2, 13.1, 14.2, 15.4, 16.8, 18.5, 20.3);
		bmi.put("34-2", ageG34);
		BMIReference ageG35 = new BMIReference(35, 2, 12.1, 13.1, 14.2, 15.4, 16.8, 18.4, 20.3);
		bmi.put("35-2", ageG35);
		BMIReference ageG36 = new BMIReference(36, 2, 12.1, 13.1, 14.2, 15.4, 16.8, 18.4, 20.3);
		bmi.put("36-2", ageG36);
		BMIReference ageG37 = new BMIReference(37, 2, 12.1, 13.1, 14.1, 15.4, 16.8, 18.4, 20.3);
		bmi.put("37-2", ageG37);
		BMIReference ageG38 = new BMIReference(38, 2, 12.1, 13.0, 14.1, 15.4, 16.8, 18.4, 20.3);
		bmi.put("38-2", ageG38);
		BMIReference ageG39 = new BMIReference(39, 2, 12.0, 13.0, 14.1, 15.3, 16.8, 18.4, 20.3);
		bmi.put("39-2", ageG39);
		BMIReference ageG40 = new BMIReference(40, 2, 12.0, 13.0, 14.1, 15.3, 16.8, 18.4, 20.3);
		bmi.put("40-2", ageG40);
		BMIReference ageG41 = new BMIReference(41, 2, 12.0, 13.0, 14.1, 15.3, 16.8, 18.4, 20.4);
		bmi.put("41-2", ageG41);
		BMIReference ageG42 = new BMIReference(42, 2, 12.0, 12.9, 14.0, 15.3, 16.8, 18.4, 20.4);
		bmi.put("42-2", ageG42);
		BMIReference ageG43 = new BMIReference(43, 2, 11.9, 12.9, 14.0, 15.3, 16.8, 18.4, 20.4);
		bmi.put("43-2", ageG43);
		BMIReference ageG44 = new BMIReference(44, 2, 11.9, 12.9, 14.0, 15.3, 16.8, 18.5, 20.4);
		bmi.put("44-2", ageG44);
		BMIReference ageG45 = new BMIReference(45, 2, 11.9, 12.9, 14.0, 15.3, 16.8, 18.5, 20.5);
		bmi.put("45-2", ageG45);
		BMIReference ageG46 = new BMIReference(46, 2, 11.9, 12.9, 14.0, 15.3, 16.8, 18.5, 20.5);
		bmi.put("46-2", ageG46);
		BMIReference ageG47 = new BMIReference(47, 2, 11.8, 12.8, 14.0, 15.3, 16.8, 18.5, 20.5);
		bmi.put("47-2", ageG47);
		BMIReference ageG48 = new BMIReference(48, 2, 11.8, 12.8, 14.0, 15.3, 16.8, 18.5, 20.6);
		bmi.put("48-2", ageG48);
		BMIReference ageG49 = new BMIReference(49, 2, 11.8, 12.8, 13.9, 15.3, 16.8, 18.5, 20.6);
		bmi.put("49-2", ageG49);
		BMIReference ageG50 = new BMIReference(50, 2, 11.8, 12.8, 13.9, 15.3, 16.8, 18.6, 20.7);
		bmi.put("50-2", ageG50);
		BMIReference ageG51 = new BMIReference(51, 2, 11.8, 12.8, 13.9, 15.3, 16.8, 18.6, 20.7);
		bmi.put("51-2", ageG51);
		BMIReference ageG52 = new BMIReference(52, 2, 11.7, 12.8, 13.9, 15.2, 16.8, 18.6, 20.7);
		bmi.put("52-2", ageG52);
		BMIReference ageG53 = new BMIReference(53, 2, 11.7, 12.7, 13.9, 15.3, 16.8, 18.6, 20.8);
		bmi.put("53-2", ageG53);
		BMIReference ageG54 = new BMIReference(54, 2, 11.7, 12.7, 13.9, 15.3, 16.8, 18.7, 20.8);
		bmi.put("54-2", ageG54);
		BMIReference ageG55 = new BMIReference(55, 2, 11.7, 12.7, 13.9, 15.3, 16.8, 18.7, 20.9);
		bmi.put("55-2", ageG55);
		BMIReference ageG56 = new BMIReference(56, 2, 11.7, 12.7, 13.9, 15.3, 16.8, 18.7, 20.9);
		bmi.put("56-2", ageG56);
		BMIReference ageG57 = new BMIReference(57, 2, 11.7, 12.7, 13.9, 15.3, 16.9, 18.7, 21.0);
		bmi.put("57-2", ageG57);
		BMIReference ageG58 = new BMIReference(58, 2, 11.7, 12.7, 13.9, 15.3, 16.9, 18.8, 21.0);
		bmi.put("58-2", ageG58);
		BMIReference ageG59 = new BMIReference(59, 2, 11.6, 12.7, 13.9, 15.3, 16.9, 18.8, 21.0);
		bmi.put("59-2", ageG59);
		BMIReference ageG60 = new BMIReference(60, 2, 11.6, 12.7, 13.9, 15.3, 16.9, 18.8, 21.1);
		bmi.put("60-2", ageG60);
	}

	private BMIReference(int age, int sex, double n3sd, double n2sd,
			double n1sd, double n0sd, double p1sd, double p2sd, double p3sd) {
		super();
		this.age = age;
		this.sex = sex;
		N3SD = n3sd;
		N2SD = n2sd;
		N1SD = n1sd;
		N0SD = n0sd;
		P1SD = p1sd;
		P2SD = p2sd;
		P3SD = p3sd;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public int getSex() {
		return sex;
	}

	public void setSex(int sex) {
		this.sex = sex;
	}

	public double getN3SD() {
		return N3SD;
	}

	public void setN3SD(double n3sd) {
		N3SD = n3sd;
	}

	public double getN2SD() {
		return N2SD;
	}

	public void setN2SD(double n2sd) {
		N2SD = n2sd;
	}

	public double getN1SD() {
		return N1SD;
	}

	public void setN1SD(double n1sd) {
		N1SD = n1sd;
	}

	public double getN0SD() {
		return N0SD;
	}

	public void setN0SD(double n0sd) {
		N0SD = n0sd;
	}

	public double getP1SD() {
		return P1SD;
	}

	public void setP1SD(double p1sd) {
		P1SD = p1sd;
	}

	public double getP2SD() {
		return P2SD;
	}

	public void setP2SD(double p2sd) {
		P2SD = p2sd;
	}

	public double getP3SD() {
		return P3SD;
	}

	public void setP3SD(double p3sd) {
		P3SD = p3sd;
	}

	@Override
	public String toString() {
		return "BMIReference [age=" + age + ", sex=" + sex + ", N3SD=" + N3SD
				+ ", N2SD=" + N2SD + ", N1SD=" + N1SD + ", N0SD=" + N0SD
				+ ", P1SD=" + P1SD + ", P2SD=" + P2SD + ", P3SD=" + P3SD + "]";
	}
}
