|
@@ -34,18 +34,20 @@ public class BEH02902 extends QCCatalogue {
|
|
|
boolean findPlace = false;
|
|
|
String pacsText = pacsLabel.getText();
|
|
|
List<Pacs> pacses = pacsLabel.getPacses();
|
|
|
- for (Pacs pacs : pacses) {
|
|
|
- /* 时间为入院检查的时间,模型输出处理后结构为 name为空,pd不为空 */
|
|
|
- if (pacs.getName() == null && pacs.getPd() != null) {
|
|
|
- /* 模型先找到时间实体,找到后再从这个时间实体开始,往前往后找 */
|
|
|
- PD pd = pacs.getPd();
|
|
|
- String name = pd.getName();
|
|
|
- int timeIndex = pacsText.indexOf(name);
|
|
|
- String beforeTimeText = pacsText.substring(Math.max(timeIndex - 5, 0), timeIndex);
|
|
|
- String afterTimeText = pacsText.substring(timeIndex + name.length(), Math.min(timeIndex + name.length() + 10, pacsText.length()));
|
|
|
- if (beforeTimeText.contains("院") || afterTimeText.contains("院")) {
|
|
|
- findPlace = true;
|
|
|
- break;
|
|
|
+ if (pacses != null) {
|
|
|
+ for (Pacs pacs : pacses) {
|
|
|
+ /* 时间为入院检查的时间,模型输出处理后结构为 name为空,pd不为空 */
|
|
|
+ if (pacs.getName() == null && pacs.getPd() != null) {
|
|
|
+ /* 模型先找到时间实体,找到后再从这个时间实体开始,往前往后找 */
|
|
|
+ PD pd = pacs.getPd();
|
|
|
+ String name = pd.getName();
|
|
|
+ int timeIndex = pacsText.indexOf(name);
|
|
|
+ String beforeTimeText = pacsText.substring(Math.max(timeIndex - 5, 0), timeIndex);
|
|
|
+ String afterTimeText = pacsText.substring(timeIndex + name.length(), Math.min(timeIndex + name.length() + 10, pacsText.length()));
|
|
|
+ if (beforeTimeText.contains("院") || afterTimeText.contains("院")) {
|
|
|
+ findPlace = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|