|
@@ -8,6 +8,7 @@ import com.lantone.qc.pub.model.entity.Clinical;
|
|
import com.lantone.qc.pub.model.entity.PD;
|
|
import com.lantone.qc.pub.model.entity.PD;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
import java.util.Collection;
|
|
import java.util.Collection;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
@@ -22,16 +23,35 @@ import java.util.Map;
|
|
@Component
|
|
@Component
|
|
public class BEH0005 extends QCCatalogue {
|
|
public class BEH0005 extends QCCatalogue {
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
|
+ List<Integer> time_index = new ArrayList<>();
|
|
List<Clinical> clinicals = inputInfo.getBeHospitalizedDoc().getChiefLabel().getClinicals();
|
|
List<Clinical> clinicals = inputInfo.getBeHospitalizedDoc().getChiefLabel().getClinicals();
|
|
String chief_text = inputInfo.getBeHospitalizedDoc().getChiefLabel().getText();
|
|
String chief_text = inputInfo.getBeHospitalizedDoc().getChiefLabel().getText();
|
|
int year = chief_text.indexOf("年");
|
|
int year = chief_text.indexOf("年");
|
|
|
|
+ if(year != -1){
|
|
|
|
+ time_index.add(year);
|
|
|
|
+ }
|
|
int month = chief_text.indexOf("月");
|
|
int month = chief_text.indexOf("月");
|
|
|
|
+ if(month != -1){
|
|
|
|
+ time_index.add(month);
|
|
|
|
+ }
|
|
|
|
+ int week = chief_text.indexOf("周");
|
|
|
|
+ if(week != -1){
|
|
|
|
+ time_index.add(week);
|
|
|
|
+ }
|
|
int day = chief_text.indexOf("天");
|
|
int day = chief_text.indexOf("天");
|
|
- System.out.println();
|
|
|
|
- if(year<month && month<day){
|
|
|
|
- status = "0";
|
|
|
|
|
|
+ if(day != -1){
|
|
|
|
+ time_index.add(day);
|
|
|
|
+ }
|
|
|
|
+ if(time_index.size()>0){
|
|
|
|
+ int min = time_index.get(0);
|
|
|
|
+ for (Integer data:time_index) {
|
|
|
|
+ if(data<min){
|
|
|
|
+ min = data;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(min == time_index.get(0)){
|
|
|
|
+ status = "0";
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|