| | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.smartor.service.impl.RemoteDataSaveServiceImpl; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | import java.net.ServerSocket; |
| | | import java.net.Socket; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.Instant; |
| | | import java.time.ZoneId; |
| | | import java.time.ZonedDateTime; |
| | | import java.util.*; |
| | | import java.util.concurrent.Executor; |
| | | import java.util.concurrent.Executors; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | |
| | | @RestController |
| | | @Slf4j |
| | |
| | | //获取返回数据 |
| | | String messageControlID = list.get(9); |
| | | String timeOfAnEvent = list.get(6); |
| | | String senderApp = list.get(2); |
| | | String senderFac = list.get(3); |
| | | // String senderApp = list.get(2); |
| | | // String senderFac = list.get(3); |
| | | |
| | | String dataType = list.get(8); |
| | | if (StringUtils.isNotEmpty(dataType)) { |
| | |
| | | ACK ack = new ACK(); |
| | | ack.initQuickstart("ACK", "2.4", "P"); |
| | | // 设置MSH段的字段 |
| | | ack.getMSH().getSendingApplication().getNamespaceID().setValue("HIS"); |
| | | ack.getMSH().getSendingFacility().getNamespaceID().setValue(senderFac); |
| | | ack.getMSH().getReceivingApplication().getNamespaceID().setValue(senderApp); |
| | | ack.getMSH().getReceivingFacility().getNamespaceID().setValue(senderFac); |
| | | ack.getMSH().getSendingApplication().getNamespaceID().setValue("SF"); |
| | | // ack.getMSH().getSendingFacility().getNamespaceID().setValue(senderFac); |
| | | ack.getMSH().getSendingFacility().getNamespaceID().setValue("SF"); |
| | | // ack.getMSH().getReceivingApplication().getNamespaceID().setValue(senderApp); |
| | | ack.getMSH().getReceivingApplication().getNamespaceID().setValue("QN"); |
| | | // ack.getMSH().getReceivingFacility().getNamespaceID().setValue(senderFac); |
| | | ack.getMSH().getReceivingFacility().getNamespaceID().setValue("QN"); |
| | | ack.getMSH().getDateTimeOfMessage().getTimeOfAnEvent().setValue(timeOfAnEvent); |
| | | ack.getMSH().getMessageType().getMessageType().setValue("ACK"); |
| | | ack.getMSH().getMessageType().getTriggerEvent().setValue("ACK"); |