public HL7Segment(String s, char fieldSeparator, String encodingCharacters) { this.fieldSeparator = fieldSeparator; this.encodingCharacters = encodingCharacters; this.fields = split(s, fieldSeparator); }
private static void configureBind(HL7Pix hl7pix, CommandLine cl) { String appAtHost = cl.getOptionValue("b"); if (appAtHost != null) { String[] appHost = HL7Segment.split(appAtHost, '@'); hl7pix.setSendingApplication(appHost[0]); if (appHost.length > 1) hl7pix.conn.setHostname(appHost[1]); } }
private static void configureBind(HL7Pix hl7pix, CommandLine cl) { String appAtHost = cl.getOptionValue("b"); if (appAtHost != null) { String[] appHost = HL7Segment.split(appAtHost, '@'); hl7pix.setSendingApplication(appHost[0]); if (appHost.length > 1) hl7pix.conn.setHostname(appHost[1]); } }
public void setSendingApplicationWithFacility(String s) { String[] ss = split(s, '|'); setField(2, ss[0]); if (ss.length > 1) setField(3, ss[1]); }
public void setReceivingApplicationWithFacility(String s) { String[] ss = split(s, '|'); setField(4, ss[0]); if (ss.length > 1) setField(5, ss[1]); }
private static void configureConnect(HL7Pix hl7pix, CommandLine cl) throws MissingOptionException, ParseException { String appAtHostPort = cl.getOptionValue("c"); if (appAtHostPort == null) throw new MissingOptionException( CLIUtils.rb.getString("missing-connect-opt")); String[] appHostPort = HL7Segment.split(appAtHostPort , '@'); if (appHostPort.length != 2) throw new ParseException(CLIUtils.rb.getString("invalid-connect-opt")); String[] hostPort = HL7Segment.split(appHostPort[1], ':'); if (hostPort.length != 2) throw new ParseException(CLIUtils.rb.getString("invalid-connect-opt")); hl7pix.setReceivingApplication(appHostPort[0]); hl7pix.remote.setHostname(hostPort[0]); hl7pix.remote.setPort(Integer.parseInt(hostPort[1])); hl7pix.remote.setHttpProxy(cl.getOptionValue("proxy")); }
private static void configureConnect(HL7Pix hl7pix, CommandLine cl) throws MissingOptionException, ParseException { String appAtHostPort = cl.getOptionValue("c"); if (appAtHostPort == null) throw new MissingOptionException( CLIUtils.rb.getString("missing-connect-opt")); String[] appHostPort = HL7Segment.split(appAtHostPort , '@'); if (appHostPort.length != 2) throw new ParseException(CLIUtils.rb.getString("invalid-connect-opt")); String[] hostPort = HL7Segment.split(appHostPort[1], ':'); if (hostPort.length != 2) throw new ParseException(CLIUtils.rb.getString("invalid-connect-opt")); hl7pix.setReceivingApplication(appHostPort[0]); hl7pix.remote.setHostname(hostPort[0]); hl7pix.remote.setPort(Integer.parseInt(hostPort[1])); hl7pix.remote.setHttpProxy(cl.getOptionValue("proxy")); }