/** * Returns the name of this structure (e.g. "ADT_A01", or "ORU_R01"). Note * that for super structures this value is explicitly set by the parser. */ public String getName() { if (StringUtil.isBlank(myName)) { String retVal = null; try { Terser t = new Terser(this); retVal = t.get("/MSH-9-3"); if (StringUtil.isBlank(retVal)) { String msh91 = t.get("/MSH-9-1"); String msh92 = t.get("/MSH-9-2"); if (StringUtil.isNotBlank(msh91) && StringUtil.isNotBlank(msh92)) { retVal = msh91 + "_" + msh92; } } } catch (HL7Exception e) { ourLog.debug("Failed to retrieve MSH-9", e); } return retVal; } return myName; }
/** * Returns the name of this structure (e.g. "ADT_A01", or "ORU_R01"). Note * that for super structures this value is explicitly set by the parser. */ public String getName() { if (StringUtil.isBlank(myName)) { String retVal = null; try { Terser t = new Terser(this); retVal = t.get("/MSH-9-3"); if (StringUtil.isBlank(retVal)) { String msh91 = t.get("/MSH-9-1"); String msh92 = t.get("/MSH-9-2"); if (StringUtil.isNotBlank(msh91) && StringUtil.isNotBlank(msh92)) { retVal = msh91 + "_" + msh92; } } } catch (HL7Exception e) { ourLog.debug("Failed to retrieve MSH-9", e); } return retVal; } return myName; }
if (this instanceof SuperStructure) { Map<String, String> eventMap = new DefaultModelClassFactory().getEventMapForVersion(version); if (StringUtil.isNotBlank(messageCode) && StringUtil.isNotBlank(messageTriggerEvent)) { String structure = eventMap.get(messageCode + "_" + messageTriggerEvent); Terser.set(msh, 9, 0, 3, 1, structure);
if (this instanceof SuperStructure) { Map<String, String> eventMap = new DefaultModelClassFactory().getEventMapForVersion(version); if (StringUtil.isNotBlank(messageCode) && StringUtil.isNotBlank(messageTriggerEvent)) { String structure = eventMap.get(messageCode + "_" + messageTriggerEvent); Terser.set(msh, 9, 0, 3, 1, structure);