private void addModel(String version, String[] newPackageNames) { if (customModelClasses.containsKey(version)) { // the new packages must be added after the existing ones. String[] existingPackageNames = customModelClasses.get(version); customModelClasses.put(version, StringUtil.concatenate(existingPackageNames, newPackageNames)); } else { customModelClasses.put(version, newPackageNames); } }
/** * Inverse of {@link #isBlank(String)} */ public static boolean isNotBlank(String theString) { return !isBlank(theString); }
protected void addSuperstructureApplication(String theChild, String theStructure) { StringUtil.validateNotEmpty(theChild); StringUtil.validateNotEmpty(theStructure); if (!myChildNameToStructures.containsKey(theChild)) { myChildNameToStructures.put(theChild, new HashSet<String>()); } myChildNameToStructures.get(theChild).add(theStructure); }
/** * 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);
/** * 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);
/** * Inverse of {@link #isBlank(String)} */ public static boolean isNotBlank(String theString) { return !isBlank(theString); }
protected void addSuperstructureApplication(String theChild, String theStructure) { StringUtil.validateNotEmpty(theChild); StringUtil.validateNotEmpty(theStructure); if (!myChildNameToStructures.containsKey(theChild)) { myChildNameToStructures.put(theChild, new HashSet<String>()); } myChildNameToStructures.get(theChild).add(theStructure); }
private void addModel(String version, String[] newPackageNames) { if (customModelClasses.containsKey(version)) { // the new packages must be added after the existing ones. String[] existingPackageNames = customModelClasses.get(version); customModelClasses.put(version, StringUtil.concatenate(existingPackageNames, newPackageNames)); } else { customModelClasses.put(version, newPackageNames); } }
protected void applySuperStructureName(Message theMessage) throws HL7Exception { if (theMessage instanceof AbstractSuperMessage) { if (theMessage.getName() == null) { Terser t = new Terser(theMessage); String name = null; try { name = t.get("/MSH-9-3"); } catch (HL7Exception e) { // ignore } if (StringUtil.isBlank(name)) { name = t.get("/MSH-9-1") + "_" + t.get("/MSH-9-2"); } ((AbstractSuperMessage)theMessage).setName(name); } } }
protected void applySuperStructureName(Message theMessage) throws HL7Exception { if (theMessage instanceof AbstractSuperMessage) { if (theMessage.getName() == null) { Terser t = new Terser(theMessage); String name = null; try { name = t.get("/MSH-9-3"); } catch (HL7Exception e) { // ignore } if (StringUtil.isBlank(name)) { name = t.get("/MSH-9-1") + "_" + t.get("/MSH-9-2"); } ((AbstractSuperMessage)theMessage).setName(name); } } }
if (StringUtil.isBlank(versionId)) { versionId = Version.highestAvailableVersionOrDefault().getVersion();
if (StringUtil.isBlank(versionId)) { versionId = Version.highestAvailableVersionOrDefault().getVersion();