@Test public void testInsertVuid() { PatientDemographics pt = null; VistaDataChunk chunk = VistaDataChunk.createVistaDataChunk("1", "", exampleChunkNode, "document", 1, 1, pt, null, true, VistaDataChunk.NEW_OR_UPDATE); testSubject.insertVuidFromDocDefUid(chunk); assertNotNull(chunk.getJsonMap()); assertEquals("The vuid was not correct.", "urn:va:vuid:4693715", chunk.getJsonMap().get("documentDefUidVuid")); }
public void insertVuidFromDocDefUid(VistaDataChunk chunk) { if ((chunk != null) && (jdsTemplate != null)) { LOG.debug("insertVuidFromDocDefUid: jmsTemplate was AutoWired - Yeah!!!"); @SuppressWarnings("unused") Map<String, Object> chunkMap = chunk.getJsonMap(); LOG.debug("insertVuidFromDocDefUid: before change - chunkMap:" + LoggingUtil.mapContentsOutput(" ", "chunkMap: ", chunkMap)); LOG.debug("insertVuidFromDocDefUid: before change - content:" + chunk.getContent()); LOG.debug("insertVuidFromDocDefUid: before change - json:" + chunk.getJson()); Object oDocDefUid = chunkMap.get("documentDefUid"); if ((oDocDefUid != null) && (oDocDefUid instanceof String)) { String sDocDefUid = (String) oDocDefUid; String sVuid = getVuidForDocDefId(sDocDefUid); if (NullChecker.isNotNullish(sVuid)) { chunkMap.put("documentDefUidVuid", sVuid); ObjectMapper jsonMapper = new ObjectMapper(); try { String sContent = jsonMapper.writeValueAsString(chunkMap); chunk.setContent(sContent); } catch (JsonProcessingException e) { LOG.error("insertVuidFromDocDefUid: Exception occurred updating content for vuid: " + sVuid, e); } LOG.debug("insertVuidFromDocDefUid: inserted vuid: " + sVuid + " into map for documentDefUid: " + sDocDefUid); } else { LOG.debug("insertVuidFromDocDefUid: no vuid found for documentDefUid: " + sDocDefUid); } } else { LOG.debug("insertVuidFromDocDefUid: no documentDefUid found"); } } else { LOG.debug("insertVuidFromDocDefUid: jmsTemplate was null - Boo!!!"); } }
JLVDocDefUtil { public void insertVuidFromDocDefUid(VistaDataChunk chunk) { if ((chunk != null) && (jdsTemplate != null)) { LOG.debug("insertVuidFromDocDefUid: jmsTemplate was AutoWired - Yeah!!!"); @SuppressWarnings("unused") Map<String, Object> chunkMap = chunk.getJsonMap(); LOG.debug("insertVuidFromDocDefUid: before change - chunkMap:" + LoggingUtil.mapContentsOutput(" ", "chunkMap: ", chunkMap)); LOG.debug("insertVuidFromDocDefUid: before change - content:" + chunk.getContent()); LOG.debug("insertVuidFromDocDefUid: before change - json:" + chunk.getJson()); Object oDocDefUid = chunkMap.get("documentDefUid"); if ((oDocDefUid != null) && (oDocDefUid instanceof String)) { String sDocDefUid = (String) oDocDefUid; String sVuid = getVuidForDocDefId(sDocDefUid); if (NullChecker.isNotNullish(sVuid)) { chunkMap.put("documentDefUidVuid", sVuid); ObjectMapper jsonMapper = new ObjectMapper(); try { String sContent = jsonMapper.writeValueAsString(chunkMap); chunk.setContent(sContent); } catch (JsonProcessingException e) { LOG.error("insertVuidFromDocDefUid: Exception occurred updating content for vuid: " + sVuid, e); } LOG.debug("insertVuidFromDocDefUid: inserted vuid: " + sVuid + " into map for documentDefUid: " + sDocDefUid); } else { LOG.debug("insertVuidFromDocDefUid: no vuid found for documentDefUid: " + sDocDefUid); } } else { LOG.debug("insertVuidFromDocDefUid: no documentDefUid found"); } } else { LOG.debug("insertVuidFromDocDefUid: jmsTemplate was null - Boo!!!"); } } }
JLVDocDefUtil { public void insertVuidFromDocDefUid(VistaDataChunk chunk) { if ((chunk != null) && (jdsTemplate != null)) { LOG.debug("insertVuidFromDocDefUid: jmsTemplate was AutoWired - Yeah!!!"); @SuppressWarnings("unused") Map<String, Object> chunkMap = chunk.getJsonMap(); LOG.debug("insertVuidFromDocDefUid: before change - chunkMap:" + LoggingUtil.mapContentsOutput(" ", "chunkMap: ", chunkMap)); LOG.debug("insertVuidFromDocDefUid: before change - content:" + chunk.getContent()); LOG.debug("insertVuidFromDocDefUid: before change - json:" + chunk.getJson()); Object oDocDefUid = chunkMap.get("documentDefUid"); if ((oDocDefUid != null) && (oDocDefUid instanceof String)) { String sDocDefUid = (String) oDocDefUid; String sVuid = getVuidForDocDefId(sDocDefUid); if (NullChecker.isNotNullish(sVuid)) { chunkMap.put("documentDefUidVuid", sVuid); ObjectMapper jsonMapper = new ObjectMapper(); try { String sContent = jsonMapper.writeValueAsString(chunkMap); chunk.setContent(sContent); } catch (JsonProcessingException e) { LOG.error("insertVuidFromDocDefUid: Exception occurred updating content for vuid: " + sVuid, e); } LOG.debug("insertVuidFromDocDefUid: inserted vuid: " + sVuid + " into map for documentDefUid: " + sDocDefUid); } else { LOG.debug("insertVuidFromDocDefUid: no vuid found for documentDefUid: " + sDocDefUid); } } else { LOG.debug("insertVuidFromDocDefUid: no documentDefUid found"); } } else { LOG.debug("insertVuidFromDocDefUid: jmsTemplate was null - Boo!!!"); } } JLVDocDefUtil(JdsOperations jdsTemplate); }
JLVDocDefUtil { public void insertVuidFromDocDefUid(VistaDataChunk chunk) { if ((chunk != null) && (jdsTemplate != null)) { LOG.debug("insertVuidFromDocDefUid: jmsTemplate was AutoWired - Yeah!!!"); @SuppressWarnings("unused") Map<String, Object> chunkMap = chunk.getJsonMap(); LOG.debug("insertVuidFromDocDefUid: before change - chunkMap:" + LoggingUtil.mapContentsOutput(" ", "chunkMap: ", chunkMap)); LOG.debug("insertVuidFromDocDefUid: before change - content:" + chunk.getContent()); LOG.debug("insertVuidFromDocDefUid: before change - json:" + chunk.getJson()); Object oDocDefUid = chunkMap.get("documentDefUid"); if ((oDocDefUid != null) && (oDocDefUid instanceof String)) { String sDocDefUid = (String) oDocDefUid; String sVuid = getVuidForDocDefId(sDocDefUid); if (NullChecker.isNotNullish(sVuid)) { chunkMap.put("documentDefUidVuid", sVuid); ObjectMapper jsonMapper = new ObjectMapper(); try { String sContent = jsonMapper.writeValueAsString(chunkMap); chunk.setContent(sContent); } catch (JsonProcessingException e) { LOG.error("insertVuidFromDocDefUid: Exception occurred updating content for vuid: " + sVuid, e); } LOG.debug("insertVuidFromDocDefUid: inserted vuid: " + sVuid + " into map for documentDefUid: " + sDocDefUid); } else { LOG.debug("insertVuidFromDocDefUid: no vuid found for documentDefUid: " + sDocDefUid); } } else { LOG.debug("insertVuidFromDocDefUid: no documentDefUid found"); } } else { LOG.debug("insertVuidFromDocDefUid: jmsTemplate was null - Boo!!!"); } } JLVDocDefUtil(JdsOperations jdsTemplate); JdsOperations getJdsTemplate(); void setJdsTemplate(JdsOperations jdsTemplate); void insertVuidFromDocDefUid(VistaDataChunk chunk); }
JLVDocDefUtil { public void insertVuidFromDocDefUid(VistaDataChunk chunk) { if ((chunk != null) && (jdsTemplate != null)) { LOG.debug("insertVuidFromDocDefUid: jmsTemplate was AutoWired - Yeah!!!"); @SuppressWarnings("unused") Map<String, Object> chunkMap = chunk.getJsonMap(); LOG.debug("insertVuidFromDocDefUid: before change - chunkMap:" + LoggingUtil.mapContentsOutput(" ", "chunkMap: ", chunkMap)); LOG.debug("insertVuidFromDocDefUid: before change - content:" + chunk.getContent()); LOG.debug("insertVuidFromDocDefUid: before change - json:" + chunk.getJson()); Object oDocDefUid = chunkMap.get("documentDefUid"); if ((oDocDefUid != null) && (oDocDefUid instanceof String)) { String sDocDefUid = (String) oDocDefUid; String sVuid = getVuidForDocDefId(sDocDefUid); if (NullChecker.isNotNullish(sVuid)) { chunkMap.put("documentDefUidVuid", sVuid); ObjectMapper jsonMapper = new ObjectMapper(); try { String sContent = jsonMapper.writeValueAsString(chunkMap); chunk.setContent(sContent); } catch (JsonProcessingException e) { LOG.error("insertVuidFromDocDefUid: Exception occurred updating content for vuid: " + sVuid, e); } LOG.debug("insertVuidFromDocDefUid: inserted vuid: " + sVuid + " into map for documentDefUid: " + sDocDefUid); } else { LOG.debug("insertVuidFromDocDefUid: no vuid found for documentDefUid: " + sDocDefUid); } } else { LOG.debug("insertVuidFromDocDefUid: no documentDefUid found"); } } else { LOG.debug("insertVuidFromDocDefUid: jmsTemplate was null - Boo!!!"); } } JLVDocDefUtil(JdsOperations jdsTemplate); JdsOperations getJdsTemplate(); void setJdsTemplate(JdsOperations jdsTemplate); void insertVuidFromDocDefUid(VistaDataChunk chunk);  }