@Test public void testGetAddUpdateMessage_Update() throws JAXBException { final MCCIIN000002UV01 mCCIIN000002UV01 = (MCCIIN000002UV01) getPIXResObject( "xml/AddSample_MCCIIN000002UV01.xml", PixManagerConstants.ENCODE_STRING); final PixManagerBean pixManagerBean = new PixManagerBean(); sut.getAddUpdateMessage(mCCIIN000002UV01, pixManagerBean, PixManagerConstants.PIX_UPDATE); assertTrue( "Actual Update message " + pixManagerBean.getUpdateMessage(), pixManagerBean.getUpdateMessage() .startsWith("Update Success! ")); }
protected void getAddUpdateMessage(MCCIIN000002UV01 response, PixManagerBean pixMgrBean, String msg) { logger.debug("response ack code:" + response.getAcceptAckCode()); logger.debug("response type id: " + response.getTypeId()); final List<MCCIMT000200UV01Acknowledgement> ackmntList = response .getAcknowledgement(); for (final MCCIMT000200UV01Acknowledgement ackmnt : ackmntList) { if (ackmnt.getTypeCode().getCode().equals("CA")) { if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Success! "); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Success! "); } break; } else if (ackmnt.getTypeCode().getCode().equals("CE")) { final List<MCCIMT000200UV01AcknowledgementDetail> ackmntDetList = ackmnt .getAcknowledgementDetail(); for (final MCCIMT000200UV01AcknowledgementDetail ackDet : ackmntDetList) { logger.error(msg + " error : " + ackDet.getText().getContent()); if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Failure! " + ackDet.getText().getContent()); } else if (PixManagerConstants.PIX_UPDATE .equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Failure! " + ackDet.getText().getContent()); } break; } } else { if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Failure! "); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Failure! "); } } } }
PixOperationsServiceImpl implements PixOperationsService { protected void getAddUpdateMessage(MCCIIN000002UV01 response, PixManagerBean pixMgrBean, String msg) { logger.debug("response ack code:" + response.getAcceptAckCode()); logger.debug("response type id: " + response.getTypeId()); final List<MCCIMT000200UV01Acknowledgement> ackmntList = response .getAcknowledgement(); for (final MCCIMT000200UV01Acknowledgement ackmnt : ackmntList) { if (ackmnt.getTypeCode().getCode().equals("CA")) { if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Success! "); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Success! "); } break; } else if (ackmnt.getTypeCode().getCode().equals("CE")) { final List<MCCIMT000200UV01AcknowledgementDetail> ackmntDetList = ackmnt .getAcknowledgementDetail(); for (final MCCIMT000200UV01AcknowledgementDetail ackDet : ackmntDetList) { logger.error(msg + " error : " + ackDet.getText().getContent()); if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Failure! " + ackDet.getText().getContent()); } else if (PixManagerConstants.PIX_UPDATE .equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Failure! " + ackDet.getText().getContent()); } break; } } else { if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Failure! "); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Failure! "); } } } } }
PixOperationsServiceImpl implements PixOperationsService { protected void getAddUpdateMessage(MCCIIN000002UV01 response, PixManagerBean pixMgrBean, String msg) { logger.debug("response ack code:" + response.getAcceptAckCode()); logger.debug("response type id: " + response.getTypeId()); final List<MCCIMT000200UV01Acknowledgement> ackmntList = response .getAcknowledgement(); for (final MCCIMT000200UV01Acknowledgement ackmnt : ackmntList) { if (ackmnt.getTypeCode().getCode().equals("CA")) { if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Success! "); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Success! "); } break; } else if (ackmnt.getTypeCode().getCode().equals("CE")) { final List<MCCIMT000200UV01AcknowledgementDetail> ackmntDetList = ackmnt .getAcknowledgementDetail(); for (final MCCIMT000200UV01AcknowledgementDetail ackDet : ackmntDetList) { logger.error(msg + " error : " + ackDet.getText().getContent()); if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Failure! " + ackDet.getText().getContent()); } else if (PixManagerConstants.PIX_UPDATE .equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Failure! " + ackDet.getText().getContent()); } break; } } else { if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Failure! "); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Failure! "); } } } }  }
PixOperationsServiceImpl implements PixOperationsService { protected void getAddUpdateMessage(MCCIIN000002UV01 response, PixManagerBean pixMgrBean, String msg) { logger.debug("response ack code:" + response.getAcceptAckCode()); logger.debug("response type id: " + response.getTypeId()); final List<MCCIMT000200UV01Acknowledgement> ackmntList = response .getAcknowledgement(); for (final MCCIMT000200UV01Acknowledgement ackmnt : ackmntList) { if (ackmnt.getTypeCode().getCode().equals("CA")) { if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Success! "); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Success! "); } break; } else if (ackmnt.getTypeCode().getCode().equals("CE")) { final List<MCCIMT000200UV01AcknowledgementDetail> ackmntDetList = ackmnt .getAcknowledgementDetail(); for (final MCCIMT000200UV01AcknowledgementDetail ackDet : ackmntDetList) { logger.error(msg + " error : " + ackDet.getText().getContent()); if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Failure! " + ackDet.getText().getContent()); } else if (PixManagerConstants.PIX_UPDATE .equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Failure! " + ackDet.getText().getContent()); } break; } } else { if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Failure! "); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Failure! "); } } } }  @Override MCCIIN000002UV01 addPatientRegistryRecord(String c32xml); @Override String addPerson(String reqXMLPath); SimpleMarshaller getMarshaller(); XdsbRepositoryService getXdsbRepository(); XmlAttributeSetter getXmlAttributeSetter(); @Override RegistryResponse provideAndRegisterClinicalDocument(String c32xml); @Override PixManagerBean queryPerson(String xmlFilePath); @Override MCCIIN000002UV01 revisePatientRegistryRecord(String c32xml); void setMarshaller(SimpleMarshaller marshaller); void setPixManagerTransformService(
			PixManagerTransformService pixManagerTransformService); void setPixMgrService(PixManagerService pixMgrService); void setRequestXMLToJava(PixManagerRequestXMLToJava requestXMLToJava); void setXdsbRegistryGetter(XdsbRegistryGetter xdsbRegistryGetter); void setXdsbRepository(XdsbRepositoryService xdsbRepository); void setXmlAttributeSetter(XmlAttributeSetter xmlAttributeSetter); @Override String updatePatientAndAuthorId(String c32xml); @Override String updatePerson(String reqXMLPath); }
PixOperationsServiceImpl implements PixOperationsService { protected void getAddUpdateMessage(MCCIIN000002UV01 response, PixManagerBean pixMgrBean, String msg) { logger.debug("response ack code:" + response.getAcceptAckCode()); logger.debug("response type id: " + response.getTypeId()); final List<MCCIMT000200UV01Acknowledgement> ackmntList = response .getAcknowledgement(); for (final MCCIMT000200UV01Acknowledgement ackmnt : ackmntList) { if (ackmnt.getTypeCode().getCode().equals("CA")) { if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Success! "); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Success! "); } break; } else if (ackmnt.getTypeCode().getCode().equals("CE")) { final List<MCCIMT000200UV01AcknowledgementDetail> ackmntDetList = ackmnt .getAcknowledgementDetail(); for (final MCCIMT000200UV01AcknowledgementDetail ackDet : ackmntDetList) { logger.error(msg + " error : " + ackDet.getText().getContent()); if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Failure! " + ackDet.getText().getContent()); } else if (PixManagerConstants.PIX_UPDATE .equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Failure! " + ackDet.getText().getContent()); } break; } } else { if (PixManagerConstants.PIX_ADD.equalsIgnoreCase(msg)) { pixMgrBean.setAddMessage(msg + " Failure! "); } else if (PixManagerConstants.PIX_UPDATE.equalsIgnoreCase(msg)) { pixMgrBean.setUpdateMessage(msg + " Failure! "); } } } }  @Override MCCIIN000002UV01 addPatientRegistryRecord(String c32xml); @Override String addPerson(String reqXMLPath); SimpleMarshaller getMarshaller(); XdsbRepositoryService getXdsbRepository(); XmlAttributeSetter getXmlAttributeSetter(); @Override RegistryResponse provideAndRegisterClinicalDocument(String c32xml); @Override PixManagerBean queryPerson(String xmlFilePath); @Override MCCIIN000002UV01 revisePatientRegistryRecord(String c32xml); void setMarshaller(SimpleMarshaller marshaller); void setPixManagerTransformService(
			PixManagerTransformService pixManagerTransformService); void setPixMgrService(PixManagerService pixMgrService); void setRequestXMLToJava(PixManagerRequestXMLToJava requestXMLToJava); void setXdsbRegistryGetter(XdsbRegistryGetter xdsbRegistryGetter); void setXdsbRepository(XdsbRepositoryService xdsbRepository); void setXmlAttributeSetter(XmlAttributeSetter xmlAttributeSetter); @Override String updatePatientAndAuthorId(String c32xml); @Override String updatePerson(String reqXMLPath);  }