Search in sources :

Example 1 with HL7DeviceExtension

use of org.dcm4che3.net.hl7.HL7DeviceExtension in project dcm4che by dcm4che.

the class JsonConfigurationTest method addHL7DeviceExtension.

private static void addHL7DeviceExtension(Device device) {
    Connection hl7 = new Connection("hl7", "localhost", 2575);
    hl7.setBindAddress("0.0.0.0");
    hl7.setClientBindAddress("0.0.0.0");
    hl7.setProtocol(Connection.Protocol.HL7);
    device.addConnection(hl7);
    HL7DeviceExtension ext = new HL7DeviceExtension();
    device.addDeviceExtension(ext);
    HL7Application hl7App = new HL7Application("*");
    ext.addHL7Application(hl7App);
    hl7App.addConnection(hl7);
    hl7App.setHL7DefaultCharacterSet(HL7_DEFAULT_CHARACTER_SET);
    hl7App.setAcceptedMessageTypes(HL7_MESSAGE_TYPES);
    hl7App.setAcceptedSendingApplications(HL7_ACCEPTED_SENDING_APPLICATIONS);
}
Also used : HL7Application(org.dcm4che3.net.hl7.HL7Application) HL7DeviceExtension(org.dcm4che3.net.hl7.HL7DeviceExtension)

Example 2 with HL7DeviceExtension

use of org.dcm4che3.net.hl7.HL7DeviceExtension in project dcm4che by dcm4che.

the class LdapHL7Configuration method markForUnregister.

@Override
protected void markForUnregister(Device prev, Device device, List<String> dns) {
    HL7DeviceExtension prevHL7Ext = prev.getDeviceExtension(HL7DeviceExtension.class);
    if (prevHL7Ext == null)
        return;
    HL7DeviceExtension hl7Ext = device.getDeviceExtension(HL7DeviceExtension.class);
    for (String name : prevHL7Ext.getHL7ApplicationNames()) {
        if (!name.equals("*") && (hl7Ext == null || hl7Ext.getHL7Application(name) == null))
            dns.add(hl7appDN(name, appNamesRegistryDN));
    }
}
Also used : HL7DeviceExtension(org.dcm4che3.net.hl7.HL7DeviceExtension)

Example 3 with HL7DeviceExtension

use of org.dcm4che3.net.hl7.HL7DeviceExtension in project dcm4che by dcm4che.

the class LdapHL7ConfigurationTest method createDevice.

private static Device createDevice(String name, String appName) throws Exception {
    Device device = new Device(name);
    HL7DeviceExtension hl7Ext = new HL7DeviceExtension();
    device.addDeviceExtension(hl7Ext);
    Connection conn = createConn("host.dcm4che.org", 2575);
    device.addConnection(conn);
    HL7Application app = createHL7App(appName, conn);
    hl7Ext.addHL7Application(app);
    return device;
}
Also used : HL7Application(org.dcm4che3.net.hl7.HL7Application) Device(org.dcm4che3.net.Device) HL7DeviceExtension(org.dcm4che3.net.hl7.HL7DeviceExtension) Connection(org.dcm4che3.net.Connection)

Example 4 with HL7DeviceExtension

use of org.dcm4che3.net.hl7.HL7DeviceExtension in project dcm4che by dcm4che.

the class JsonHL7Configuration method loadDeviceExtension.

@Override
public boolean loadDeviceExtension(Device device, JsonReader reader, ConfigurationDelegate config) throws ConfigurationException {
    if (!reader.getString().equals("hl7Application"))
        return false;
    HL7DeviceExtension ext = new HL7DeviceExtension();
    loadFrom(ext, reader, device, config);
    device.addDeviceExtension(ext);
    return true;
}
Also used : HL7DeviceExtension(org.dcm4che3.net.hl7.HL7DeviceExtension)

Example 5 with HL7DeviceExtension

use of org.dcm4che3.net.hl7.HL7DeviceExtension in project dcm4chee-arc-light by dcm4che.

the class ArchiveDeviceFactory method createHL7Device.

public static Device createHL7Device(String name, String appName, String host, int port, int tlsPort) {
    Device device = new Device(name);
    HL7DeviceExtension hl7Device = new HL7DeviceExtension();
    device.addDeviceExtension(hl7Device);
    HL7Application hl7app = new HL7Application(appName);
    hl7Device.addHL7Application(hl7app);
    Connection hl7 = new Connection("hl7", host, port);
    hl7.setProtocol(Connection.Protocol.HL7);
    device.addConnection(hl7);
    hl7app.addConnection(hl7);
    Connection hl7TLS = new Connection("hl7-tls", host, tlsPort);
    hl7TLS.setProtocol(Connection.Protocol.HL7);
    hl7TLS.setTlsCipherSuites(Connection.TLS_RSA_WITH_AES_128_CBC_SHA, Connection.TLS_RSA_WITH_3DES_EDE_CBC_SHA);
    device.addConnection(hl7TLS);
    hl7app.addConnection(hl7TLS);
    return device;
}
Also used : HL7Application(org.dcm4che3.net.hl7.HL7Application) HL7DeviceExtension(org.dcm4che3.net.hl7.HL7DeviceExtension)

Aggregations

HL7DeviceExtension (org.dcm4che3.net.hl7.HL7DeviceExtension)14 HL7Application (org.dcm4che3.net.hl7.HL7Application)10 Connection (org.dcm4che3.net.Connection)2 Device (org.dcm4che3.net.Device)2 IOException (java.io.IOException)1 PostConstruct (javax.annotation.PostConstruct)1 ActiveParticipant (org.dcm4che3.audit.ActiveParticipant)1 ActiveParticipantBuilder (org.dcm4che3.audit.ActiveParticipantBuilder)1 ConfigurationNotFoundException (org.dcm4che3.conf.api.ConfigurationNotFoundException)1 HL7Service (org.dcm4che3.net.hl7.service.HL7Service)1 DicomService (org.dcm4che3.net.service.DicomService)1