/** * Check if expected error (XDSPatientIdDoesNotMatch) is returned if an Association references two * XDSObjects with different patientId's. * * @throws Exception */ @Test public void checkErrorPatIdDoesntMatch() throws Exception { log.info( "\n############################# TEST: check error PatId doesn't Match ############################"); SubmitObjectsRequest req = XDSTestUtil.getSubmitObjectsRequest(TEST_METADATA_FILENAME); RegistryObjectType obj = (RegistryObjectType) req.getRegistryObjectList().getIdentifiable().get(0).getValue(); XDSTestUtil.setExternalIdentifierValue( obj.getExternalIdentifier(), XDSConstants.UUID_XDSDocumentEntry_patientId, "test1234_2^^^&1.2.3.45.4.3.2.1&ISO"); doRegisterDocumentAndCheckError( req, XDSException.XDS_ERR_PATID_DOESNOT_MATCH, "Check Unknown PID"); }
@Test public void checkErrorMergedPatId() throws Exception { log.info( "\n############################# TEST: check merged PatId ############################"); String mergedPID = XDSTestUtil.TEST_PID_MERGED + XDSTestUtil.TEST_ISSUER; session.linkPatient(mergedPID, XDSTestUtil.TEST_PID_1 + XDSTestUtil.TEST_ISSUER); SubmitObjectsRequest req = XDSTestUtil.getSubmitObjectsRequest(TEST_METADATA_FILENAME); RegistryObjectType obj = (RegistryObjectType) req.getRegistryObjectList().getIdentifiable().get(0).getValue(); XDSTestUtil.setExternalIdentifierValue( obj.getExternalIdentifier(), XDSConstants.UUID_XDSDocumentEntry_patientId, mergedPID); doRegisterDocumentAndCheckError( req, XDSException.XDS_ERR_PATID_DOESNOT_MATCH, "Check merged PID"); session.linkPatient(mergedPID, null); }
public StringBuilder appendFields( ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { super.appendFields(locator, buffer, strategy); { ObjectRefListType theAffectedObjects; theAffectedObjects = this.getAffectedObjects(); strategy.appendField(locator, this, "affectedObjects", buffer, theAffectedObjects); } { String theEventType; theEventType = this.getEventType(); strategy.appendField(locator, this, "eventType", buffer, theEventType); } { XMLGregorianCalendar theTimestamp; theTimestamp = this.getTimestamp(); strategy.appendField(locator, this, "timestamp", buffer, theTimestamp); } { String theUser; theUser = this.getUser(); strategy.appendField(locator, this, "user", buffer, theUser); } { String theRequestId; theRequestId = this.getRequestId(); strategy.appendField(locator, this, "requestId", buffer, theRequestId); } return buffer; }
public StringBuilder appendFields( ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { super.appendFields(locator, buffer, strategy); { InternationalStringType theUsageDescription; theUsageDescription = this.getUsageDescription(); strategy.appendField(locator, this, "usageDescription", buffer, theUsageDescription); } { List<String> theUsageParameter; theUsageParameter = (((this.usageParameter != null) && (!this.usageParameter.isEmpty())) ? this.getUsageParameter() : null); strategy.appendField(locator, this, "usageParameter", buffer, theUsageParameter); } { String theServiceBinding; theServiceBinding = this.getServiceBinding(); strategy.appendField(locator, this, "serviceBinding", buffer, theServiceBinding); } { String theSpecificationObject; theSpecificationObject = this.getSpecificationObject(); strategy.appendField(locator, this, "specificationObject", buffer, theSpecificationObject); } return buffer; }
public StringBuilder appendFields( ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { super.appendFields(locator, buffer, strategy); { RegistryObjectListType theRegistryObjectList; theRegistryObjectList = this.getRegistryObjectList(); strategy.appendField(locator, this, "registryObjectList", buffer, theRegistryObjectList); } return buffer; }