Commit 3c27f7bb8396ed5fefa26290738a424c666a6434

Authored by shiyang
1 parent 795cddadd2

4.11附表枚举getName(String id),getId(String name);可以互相查询

Showing 3 changed files with 125 additions and 15 deletions

platform-operate-api/src/main/java/com/lyms/hospitalapi/lhxfy/model/enums/CareerEnums.java View file @ 3c27f7b
... ... @@ -5,11 +5,13 @@
5 5 * 职业
6 6 */
7 7 public enum CareerEnums {
8   - A("1", "早孕B超"),
9   - B("2", "排卵日期"),
10   - C("3", "同房日期"),
11   - D("4", "中孕B超"),
12   - E("5", "其他");
  8 + Career01("01", "农民"),
  9 + Career02("02", "工人"),
  10 + Career03("03", "家务"),
  11 + Career04("04", "经商"),
  12 + Career05("05", "服务业"),
  13 + Career06("06", "教师/公务员/职员等"),
  14 + Career07("07", "其他");
13 15  
14 16 CareerEnums(String id, String name) {
15 17 this.id = id;
... ... @@ -22,6 +24,15 @@
22 24 for (CareerEnums value : values) {
23 25 if (value.getId().equals(id)) {
24 26 return value.getName();
  27 + }
  28 + }
  29 + return "";
  30 + }
  31 + public static String getId(String name) {
  32 + CareerEnums[] values = CareerEnums.values();
  33 + for (CareerEnums value : values) {
  34 + if (value.getName().equals(name)) {
  35 + return value.getId();
25 36 }
26 37 }
27 38 return "";
platform-operate-api/src/main/java/com/lyms/hospitalapi/lhxfy/model/enums/DiseaseEnums.java View file @ 3c27f7b
... ... @@ -5,11 +5,41 @@
5 5 * 出生缺陷儿--病种类型
6 6 */
7 7 public enum DiseaseEnums {
8   - A("1", "早孕B超"),
9   - B("2", "排卵日期"),
10   - C("3", "同房日期"),
11   - D("4", "中孕B超"),
12   - E("5", "其他");
  8 + Disease01("01", "无脑畸形"),
  9 + Disease02("02", "脊柱裂"),
  10 + Disease03("03", "脑膨出"),
  11 + Disease04("04", "先天性脑积水"),
  12 + Disease05("05", "腭裂"),
  13 + Disease06("06", "唇裂"),
  14 + Disease07("07", "唇裂并腭裂"),
  15 + Disease08("08", "小耳(包括无耳)"),
  16 + Disease09("09", "外耳其他畸形(小耳、无耳除外)"),
  17 + Disease10("10", "食道闭锁或狭窄"),
  18 + Disease11("11", "直肠肛门闭锁或狭窄(包括无肛)"),
  19 + Disease12("12", "尿道下裂"),
  20 + Disease13("13", "膀胱外翻"),
  21 + Disease14("14", "左侧马蹄内翻足"),
  22 + Disease15("15", "右侧马蹄内翻足"),
  23 + Disease16("16", "左手多指"),
  24 + Disease17("17", "右手多指"),
  25 + Disease18("18", "左脚多趾"),
  26 + Disease19("19", "右脚多趾"),
  27 + Disease20("20", "并指左"),
  28 + Disease21("21", "并指右"),
  29 + Disease22("22", "并趾左"),
  30 + Disease23("23", "并趾右"),
  31 + Disease24("24", "左上肢肢体短缩(包括缺指(趾)"),
  32 + Disease25("25", "裂手(足)"),
  33 + Disease26("26", "右上肢肢体短缩(包括缺指(趾)、裂手(足))"),
  34 + Disease27("27", "左下肢肢体短缩(包括缺指(趾)、裂手(足))"),
  35 + Disease28("28", "右下肢肢体短缩(包括缺指(趾)、裂手(足))"),
  36 + Disease29("29", "先天性膈疝"),
  37 + Disease30("30", "脐膨出"),
  38 + Disease31("31", "腹裂"),
  39 + Disease32("32", "联体双胎"),
  40 + Disease33("33", "唐氏综合征(21-三体综合征)"),
  41 + Disease34("34", "先天性心脏病"),
  42 + Disease35("35", "其他");
13 43  
14 44 DiseaseEnums(String id, String name) {
15 45 this.id = id;
... ... @@ -22,6 +52,15 @@
22 52 for (DiseaseEnums value : values) {
23 53 if (value.getId().equals(id)) {
24 54 return value.getName();
  55 + }
  56 + }
  57 + return "";
  58 + }
  59 + public static String getId(String name) {
  60 + DiseaseEnums[] values = DiseaseEnums.values();
  61 + for (DiseaseEnums value : values) {
  62 + if (value.getName().equals(name)) {
  63 + return value.getId();
25 64 }
26 65 }
27 66 return "";
platform-operate-api/src/main/java/com/lyms/hospitalapi/lhxfy/model/enums/NationEnums.java View file @ 3c27f7b
... ... @@ -5,11 +5,62 @@
5 5 * 民族
6 6 */
7 7 public enum NationEnums {
8   - A("1", "早孕B超"),
9   - B("2", "排卵日期"),
10   - C("3", "同房日期"),
11   - D("4", "中孕B超"),
12   - E("5", "其他");
  8 + Nation01("01", "汉族"),
  9 + Nation02("02", "满族"),
  10 + Nation03("03", "蒙古族"),
  11 + Nation04("04", "回族"),
  12 + Nation05("05", "藏族"),
  13 + Nation06("06", "维吾尔族"),
  14 + Nation07("07", "苗族"),
  15 + Nation08("08", "彝族"),
  16 + Nation09("09", "壮族"),
  17 + Nation10("10", "布依族"),
  18 + Nation11("11", "侗族"),
  19 + Nation12("12", "瑶族"),
  20 + Nation13("13", "白族"),
  21 + Nation14("14", "土家族"),
  22 + Nation15("15", "哈尼族"),
  23 + Nation16("16", "哈萨克族"),
  24 + Nation17("17", "傣族"),
  25 + Nation18("18", "黎族"),
  26 + Nation19("19", "傈僳族"),
  27 + Nation20("20", "佤族"),
  28 + Nation21("21", "畲族"),
  29 + Nation22("22", "高山族"),
  30 + Nation23("23", "拉祜族"),
  31 + Nation24("24", "水族"),
  32 + Nation25("25", "东乡族"),
  33 + Nation26("26", "纳西族"),
  34 + Nation27("27", "景颇族"),
  35 + Nation28("28", "柯尔克孜族"),
  36 + Nation29("29", "土族"),
  37 + Nation30("30", "达斡尔族"),
  38 + Nation31("31", "仫佬族"),
  39 + Nation32("32", "羌族"),
  40 + Nation33("33", "布朗族"),
  41 + Nation34("34", "撒拉族"),
  42 + Nation35("35", "毛南族"),
  43 + Nation36("36", "仡佬族"),
  44 + Nation37("37", "锡伯族"),
  45 + Nation38("38", "阿昌族"),
  46 + Nation39("39", "普米族"),
  47 + Nation40("40", "朝鲜族"),
  48 + Nation41("41", "塔吉克族"),
  49 + Nation42("42", "怒族"),
  50 + Nation43("43", "乌孜别克族"),
  51 + Nation44("44", "俄罗斯族"),
  52 + Nation45("45", "鄂温克族"),
  53 + Nation46("46", "德昂族"),
  54 + Nation47("47", "保安族"),
  55 + Nation48("48", "裕固族"),
  56 + Nation49("49", "京族"),
  57 + Nation50("50", "塔塔尔族"),
  58 + Nation51("51", "独龙族"),
  59 + Nation52("52", "鄂伦春族"),
  60 + Nation53("53", "赫哲族"),
  61 + Nation54("54", "门巴族"),
  62 + Nation55("55", "珞巴族"),
  63 + Nation56("56", "基诺族");
13 64  
14 65 NationEnums(String id, String name) {
15 66 this.id = id;
... ... @@ -22,6 +73,15 @@
22 73 for (NationEnums value : values) {
23 74 if (value.getId().equals(id)) {
24 75 return value.getName();
  76 + }
  77 + }
  78 + return "";
  79 + }
  80 + public static String getId(String name) {
  81 + NationEnums[] values = NationEnums.values();
  82 + for (NationEnums value : values) {
  83 + if (value.getName().equals(name)) {
  84 + return value.getId();
25 85 }
26 86 }
27 87 return "";