public String toString() { if (wrapper == null) { return "regx: " + regx.toString(); } else { return wrapper.toString(); } }
public void setPatientId(String s) { regx.setPatientId(s); }
public void setAssigningAuthority(String s) { regx.setAssigningAuthority(s); }
/** 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)); } }