MCPcopy Create free account
hub / github.com/OpenDRG/DRG_Java / GroupProxy

Class GroupProxy

drg_group/quanzhou_2023/GroupProxy.java:24–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22import java.util.stream.Stream;
23
24public class GroupProxy {
25 private static Map<String,String> ZD_INFO=Base.readDict("ICD","ZD_INFO",0,1);
26 private static Map<String,String> SS_INFO=Base.readDict("ICD","SS_INFO",0,1);
27 private static Map<String,String> ZD_MAP=Base.readDict("ICD","ZD_MAP",0,1);
28 private static Map<String,String> SS_MAP=Base.readDict("ICD","SS_MAP",0,1);
29 private static Map<String,String> CCE=Base.readDict("DATA","CCE",0,1);
30 private static Map<String,String> MCC=Base.readDict("DATA","MCC",0,1);
31 private static Map<String,String> CC=Base.readDict("DATA","CC",0,1);
32 private static Set<String> SS_VALID=Base.readSet("DATA","SS_VALID");
33 private static Map<String,String> DRG=Base.readDict("DATA","DRG",0,1);
34 private static Messages checkMessages=new Messages();
35 private Function<MedicalRecord,GroupResult> groupFunc=x->Grouper_quanzhou_2023.group(x);
36 private boolean TRANS_CODE=false;
37 public GroupProxy(){
38 }
39 public GroupProxy(boolean TRANS_CODE){
40 this.TRANS_CODE=TRANS_CODE;
41 }
42 public GroupProxy(Function<MedicalRecord,GroupResult> groupFunc){
43 this.groupFunc=groupFunc;
44 }
45 public GroupProxy(boolean TRANS_CODE,Function<MedicalRecord,GroupResult> groupFunc){
46 this.TRANS_CODE=TRANS_CODE;
47 this.groupFunc=groupFunc;
48 }
49 private static DrgGroupStatus trans(MedicalRecord record){
50 int i=-1;
51 for (String x:record.zdList){
52 i++;
53 String zd=x;
54 if (ZD_MAP.containsKey(x)){
55 zd=ZD_MAP.get(x);
56 if (!zd.equals(x)){
57 record.zdList[i]=zd;
58 checkMessages.putMessage(record.Index, String.format("%s->%s",x,zd));
59 }
60 }else{
61 checkMessages.putMessage(record.Index, String.format("诊断%s无法转换为分组器支持的编码",zd));
62 return DrgGroupStatus.ZD_NOT_MAPPING;
63 }
64 }
65 i=-1;
66 for (String x:record.ssList){
67 i++;
68 String ss=x;
69 if (SS_MAP.containsKey(x)){
70 ss=SS_MAP.get(x);
71 if (!ss.equals(x)){
72 record.ssList[i]=ss;
73 checkMessages.putMessage(record.Index, String.format("%s->%s",x,ss));
74 }
75 }else{
76 checkMessages.putMessage(record.Index, String.format("手术操作%s无法转换为分组器支持的编码",ss));
77 return DrgGroupStatus.SS_NOT_MAPPING;
78 }
79 }
80 return null;
81 }

Callers

nothing calls this directly

Calls 3

readDictMethod · 0.95
readSetMethod · 0.95
groupMethod · 0.95

Tested by

no test coverage detected