Examples of HL7Segment


Examples of org.dcm4che3.hl7.HL7Segment

        public void parse(InputStream is) throws IOException,
                TransformerConfigurationException, SAXException {
            byte[] buf = new byte[256];
            int len = is.read(buf);
            HL7Segment msh = HL7Segment.parseMSH(buf, buf.length);
            String charsetName = HL7Charset.toCharsetName(msh.getField(17, charset));
            Reader reader = new InputStreamReader(
                    new SequenceInputStream(
                            new ByteArrayInputStream(buf, 0, len), is),
                    charsetName);
            TransformerHandler th = getTransformerHandler();
View Full Code Here

Examples of org.dcm4che3.hl7.HL7Segment

        conn.close(sock);
    }

    public void query(String pid, String[] domains) throws IOException {
        HL7Message qbp = HL7Message.makePixQuery(pid, domains);
        HL7Segment msh = qbp.get(0);
        msh.setSendingApplicationWithFacility(sendingApplication);
        msh.setReceivingApplicationWithFacility(receivingApplication);
        msh.setField(17, charset);
        mllp.writeMessage(qbp.getBytes(charset));
        if (mllp.readMessage() == null)
            throw new IOException("Connection closed by receiver");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.