/** Class constructor; creates a user interface and loads it with values from the props file. */ public ControlPanel() { super(); setLayout(new BorderLayout()); Configuration config = Configuration.getInstance(); config.setControlPanel(this); props = config.getProperties(); profiles = new Profiles(); profileLoader = new ProfileLoader(); profileSaver = new ProfileSaver(); profileDeleter = new ProfileDeleter(); selectorPanel = new SelectorPanel(); jsp = new JScrollPane(); jsp.setViewportView(selectorPanel); this.add(jsp, BorderLayout.CENTER); footerPanel = new FooterPanel(); this.add(footerPanel, BorderLayout.SOUTH); jsp.getVerticalScrollBar().setUnitIncrement(25); jsp.getVerticalScrollBar().setBlockIncrement(25); }
/** send this transaction. */ public IHETransactionResponse send() { System.out.println("IHETransactionResponse::send enter X"); System.out.println(" HL7URL: " + hl7URL); // NIST 129.6.24.143 // java.net.URI u = java.net.URI.create("http://129.6.24.143:9090"); // Oracle 24.205.75.156 // java.net.URI u = // java.net.URI.create("http://24.205.75.156:8080/PIXManager_Service/PIXManager"); java.net.URI u = java.net.URI.create(hl7URL); V3PixSource pixSource = new V3PixSource(u); // String senderApplication = "1.2.840.114350.1.13.99998.8735"; // String senderFacility = "1.2.840.114350.1.13.99998"; // String organizationalRoot= "1.2.840.114350.10"; // String rcvrApplication = "2.16.840.1.113883.3.72.6.5.100.144"; // String rcvrFacility = "2.16.840.1.113883.3.72.6.1"; String senderApplication = cfg.senderDeviceId; String senderFacility = cfg.senderDeviceName; String organizationalRoot = cfg.getUIDRootNoTrailer(); String rcvrApplication = receivingApplication; String rcvrFacility = receivingFacility; V3PixSourceRecordAdded v3RecordAddedMessage = new V3PixSourceRecordAdded( senderApplication, senderFacility, rcvrApplication, organizationalRoot); // For NIST // v3RecordAddedMessage.addPatientID("PIX", "2.16.840.1.113883.3.72.5.9.1", "NIST2010"); // For Oracle v3RecordAddedMessage.addPatientID( regx.getPatientId(), regx.getAssigningAuthorityOIDOnly(), "IHE"); v3RecordAddedMessage.addPatientName(reg.familyName, reg.givenName, "", "", ""); v3RecordAddedMessage.setPatientGender(reg.sex); v3RecordAddedMessage.setPatientBirthTime(reg.birthdate); v3RecordAddedMessage.addPatientAddress(reg.street, reg.city, "", reg.state, "", reg.zip, ""); // v3RecordAddedMessage.addPatientName("ALPHA", "ALAN", "", "", ""); // v3RecordAddedMessage.setPatientGender("F"); // v3RecordAddedMessage.setPatientBirthTime("19601212"); // v3RecordAddedMessage.addPatientAddress("4525 Scott", // "St Louis", // "", // "MO", // "", // "63110", // ""); v3RecordAddedMessage.setScopingOrganization("1.2.3", "GENEVA", "314-555-1000"); V3PixSourceAcknowledgement v3PixAck = null; System.out.println("Ready to send"); try { v3PixAck = pixSource.sendRecordAdded(v3RecordAddedMessage); System.out.println("Sent, must not have thrown an exception"); return new IHETransactionResponse(0, "Success: " + "dude"); } catch (Exception e) { System.out.println("Exception " + dumpException(e)); return new IHETransactionResponse(1, dumpException(e)); } }
public void setState(boolean enb) { element.enabled = enb; setSelected(enb); props.setProperty(element.id, "" + enb); Configuration.getInstance().setChanged(true); }
public SelectorPanel() { super(); Configuration config = Configuration.getInstance(); this.setLayout(new ColumnLayout(20)); this.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); add(new CPLabel("PIX Managers")); ConfigElement[] elements = config.getPIXMgrs(); for (int i = 0; i < elements.length; i++) { add(new CPCheckBox(elements[i])); } add(new CPLabel("Registries")); elements = config.getRegistries(); for (int i = 0; i < elements.length; i++) { add(new CPCheckBox(elements[i])); } add(new CPLabel("PDQ Managers")); elements = config.getPDQMgrs(); for (int i = 0; i < elements.length; i++) { add(new CPCheckBox(elements[i])); } add(new CPLabel("Repositories")); elements = config.getRepositories(); for (int i = 0; i < elements.length; i++) { add(new CPCheckBox(elements[i])); } add(new CRLF()); add(new CPLabel("EHR Systems")); elements = config.getEHRSystems(); for (int i = 0; i < elements.length; i++) { add(new CPCheckBox(elements[i])); } add(new CPLabel("DCM Systems")); elements = config.getDCMSystems(); for (int i = 0; i < elements.length; i++) { add(new CPCheckBox(elements[i])); } add(new CPLabel("Studies")); elements = config.getStudies(); for (int i = 0; i < elements.length; i++) { add(new CPCheckBox(elements[i])); } add(new CPLabel("DocSets")); elements = config.getDocSets(); for (int i = 0; i < elements.length; i++) { add(new CPCheckBox(elements[i])); } add(new CPLabel("Messages")); elements = config.getMessages(); for (int i = 0; i < elements.length; i++) { add(new CPCheckBox(elements[i])); } // Set the MouseAdapter to catch popup triggers. this.addMouseListener(new PopupListener()); }