@Test public void testQueryPerson() throws Hl7v3TransformerException, JAXBException, IOException { String expectedQueryMessage = "Query Success! Given PID: PUI100010060001 Given UID: 2.16.840.1.113883.3.72.5.9.1 "; arrangeCommonValid(); PixManagerBean bean = sut.queryPatient(MRN, MRN_DOMAIN); assertNotNull(bean); assertEquals(expectedQueryMessage, bean.getQueryMessage()); assertEquals(EXPECTED_EID, bean.getQueryIdMap().get(EXPECTED_DOMAIN)); assertEquals("", bean.getAddMessage()); assertEquals("", bean.getUpdateMessage()); verify(marshallerMock, times(2)).marshal(anyObject()); }
@Override public PixManagerBean queryPatient(String mrn, String mrnDomain) { logger.debug("Received request to PIXQuery"); PixManagerBean pixMgrBean = new PixManagerBean(); try { String xmlFilePath = hl7v3Transformer.getPixQueryXml(mrn, mrnDomain, Hl7v3Transformer.XML_PIX_QUERY); PRPAIN201309UV02 request = new PRPAIN201309UV02(); PRPAIN201310UV02 response = new PRPAIN201310UV02(); request = requestXMLToJava.getPIXQueryReqObject(xmlFilePath, PixManagerConstants.ENCODE_STRING); logDebug("PIX QUERY Request: ", request); response = pixManagerService.pixManagerPRPAIN201309UV02(request); logDebug("PIX QUERY Response: ", response); pixManagerMessageHelper.getQueryMessage(response, pixMgrBean); } catch (Hl7v3TransformerException e) { pixManagerMessageHelper.getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_QUERY); throw new IllegalArgumentException(e); } catch (JAXBException | IOException e) { pixManagerMessageHelper.getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_QUERY); } return pixMgrBean; }
PixServiceImpl implements PixService { @Override public PixManagerBean queryPatient(String mrn, String mrnDomain) { logger.debug("Received request to PIXQuery"); PixManagerBean pixMgrBean = new PixManagerBean(); try { String xmlFilePath = hl7v3Transformer.getPixQueryXml(mrn, mrnDomain, Hl7v3Transformer.XML_PIX_QUERY); PRPAIN201309UV02 request = new PRPAIN201309UV02(); PRPAIN201310UV02 response = new PRPAIN201310UV02(); request = requestXMLToJava.getPIXQueryReqObject(xmlFilePath, PixManagerConstants.ENCODE_STRING); logDebug("PIX QUERY Request: ", request); response = pixManagerService.pixManagerPRPAIN201309UV02(request); logDebug("PIX QUERY Response: ", response); pixManagerMessageHelper.getQueryMessage(response, pixMgrBean); } catch (Hl7v3TransformerException e) { pixManagerMessageHelper.getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_QUERY); throw new IllegalArgumentException(e); } catch (JAXBException | IOException e) { pixManagerMessageHelper.getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_QUERY); } return pixMgrBean; } }
PixServiceImpl implements PixService { @Override public PixManagerBean queryPatient(String mrn, String mrnDomain) { logger.debug("Received request to PIXQuery"); PixManagerBean pixMgrBean = new PixManagerBean(); try { String xmlFilePath = hl7v3Transformer.getPixQueryXml(mrn, mrnDomain, Hl7v3Transformer.XML_PIX_QUERY); PRPAIN201309UV02 request = new PRPAIN201309UV02(); PRPAIN201310UV02 response = new PRPAIN201310UV02(); request = requestXMLToJava.getPIXQueryReqObject(xmlFilePath, PixManagerConstants.ENCODE_STRING); logDebug("PIX QUERY Request: ", request); response = pixManagerService.pixManagerPRPAIN201309UV02(request); logDebug("PIX QUERY Response: ", response); pixManagerMessageHelper.getQueryMessage(response, pixMgrBean); } catch (Hl7v3TransformerException e) { pixManagerMessageHelper.getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_QUERY); throw new IllegalArgumentException(e); } catch (JAXBException | IOException e) { pixManagerMessageHelper.getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_QUERY); } return pixMgrBean; } PixServiceImpl(String mrnDomain, String pidPrefix,
			PixManagerRequestXMLToJava requestXMLToJava,
			PixManagerService pixManagerService,
			PixManagerMessageHelper pixManagerMessageHelper,
			Hl7v3Transformer hl7v3Transformer, SimpleMarshaller simpleMarshaller); }
PixServiceImpl implements PixService { @Override public PixManagerBean queryPatient(String mrn, String mrnDomain) { logger.debug("Received request to PIXQuery"); PixManagerBean pixMgrBean = new PixManagerBean(); try { String xmlFilePath = hl7v3Transformer.getPixQueryXml(mrn, mrnDomain, Hl7v3Transformer.XML_PIX_QUERY); PRPAIN201309UV02 request = new PRPAIN201309UV02(); PRPAIN201310UV02 response = new PRPAIN201310UV02(); request = requestXMLToJava.getPIXQueryReqObject(xmlFilePath, PixManagerConstants.ENCODE_STRING); logDebug("PIX QUERY Request: ", request); response = pixManagerService.pixManagerPRPAIN201309UV02(request); logDebug("PIX QUERY Response: ", response); pixManagerMessageHelper.getQueryMessage(response, pixMgrBean); } catch (Hl7v3TransformerException e) { pixManagerMessageHelper.getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_QUERY); throw new IllegalArgumentException(e); } catch (JAXBException | IOException e) { pixManagerMessageHelper.getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_QUERY); } return pixMgrBean; } PixServiceImpl(String mrnDomain, String pidPrefix,
			PixManagerRequestXMLToJava requestXMLToJava,
			PixManagerService pixManagerService,
			PixManagerMessageHelper pixManagerMessageHelper,
			Hl7v3Transformer hl7v3Transformer, SimpleMarshaller simpleMarshaller); @Override String getEid(String mrn); @Override PixManagerBean queryPatient(String mrn, String mrnDomain); @Override PixManagerBean addPatient(PixPatientDto pixPatientDto); @Override PixManagerBean updatePatient(PixPatientDto pixPatientDto); }
PixServiceImpl implements PixService { @Override public PixManagerBean queryPatient(String mrn, String mrnDomain) { logger.debug("Received request to PIXQuery"); PixManagerBean pixMgrBean = new PixManagerBean(); try { String xmlFilePath = hl7v3Transformer.getPixQueryXml(mrn, mrnDomain, Hl7v3Transformer.XML_PIX_QUERY); PRPAIN201309UV02 request = new PRPAIN201309UV02(); PRPAIN201310UV02 response = new PRPAIN201310UV02(); request = requestXMLToJava.getPIXQueryReqObject(xmlFilePath, PixManagerConstants.ENCODE_STRING); logDebug("PIX QUERY Request: ", request); response = pixManagerService.pixManagerPRPAIN201309UV02(request); logDebug("PIX QUERY Response: ", response); pixManagerMessageHelper.getQueryMessage(response, pixMgrBean); } catch (Hl7v3TransformerException e) { pixManagerMessageHelper.getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_QUERY); throw new IllegalArgumentException(e); } catch (JAXBException | IOException e) { pixManagerMessageHelper.getGeneralExpMessage(e, pixMgrBean, PixManagerConstants.PIX_QUERY); } return pixMgrBean; } PixServiceImpl(String mrnDomain, String pidPrefix,
			PixManagerRequestXMLToJava requestXMLToJava,
			PixManagerService pixManagerService,
			PixManagerMessageHelper pixManagerMessageHelper,
			Hl7v3Transformer hl7v3Transformer, SimpleMarshaller simpleMarshaller); @Override String getEid(String mrn); @Override PixManagerBean queryPatient(String mrn, String mrnDomain); @Override PixManagerBean addPatient(PixPatientDto pixPatientDto); @Override PixManagerBean updatePatient(PixPatientDto pixPatientDto);  }