Java Code Examples for ca.uhn.hl7v2.model.v24.segment.NTE

The following are top voted examples for showing how to use ca.uhn.hl7v2.model.v24.segment.NTE. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: AvoinApotti   File: R01VoMapper.java   Source Code and License 6 votes vote down vote up
private IfOcsResCommentVoCollection getResultComments(AbstractGroup nte_group) throws HL7Exception
{
	// This is a cludge around an apparent bug in the HAPI library: One
	// empty
	// NTE (hanging off OBR) is created in the parsed structure even if it
	// wasn't sent in the message
	// so we know that if there's only one NTE and its comments are empty,
	// it's useless so disregard
	int NTEcount = nte_group.getAll("NTE").length;
	if (NTEcount == 0)
		return null;

	IfOcsResCommentVoCollection coll = new IfOcsResCommentVoCollection();
	NTE nte = getNTEFromAbstract(nte_group, 0);
	if ((NTEcount > 1 && (nte.getComment(0).getValue() == null)) || nte.getComment(0).getValue() != null)
	{
		for (int k = 0; k < NTEcount; k++)
			coll.add(getCommentVoFromSeg(getNTEFromAbstract(nte_group, k)));
	}
	return coll;
}
 
Example 2
Project: AvoinApotti   File: R01VoMapper.java   Source Code and License 6 votes vote down vote up
private IfOcsResCommentVo getCommentVoFromSeg(NTE nte) throws HL7Exception
{
	StringBuffer cmnt = new StringBuffer();
	IfOcsResCommentVo commentVo = new IfOcsResCommentVo();
	commentVo.setCmtSrc(nte.getSourceOfComment().getValue());

	for (int i = 0; i < nte.getComment().length; i++)
	{
		if(null!=nte.getComment(i).getValue())
		{
			cmnt.append(HL7Utils.fromHL7Text(nte.getComment(i).getValue()));
		}
	}

	if(cmnt.length()==0)
	{
		cmnt.append('\r');
	}
	commentVo.setCmtText(cmnt.toString());

	return commentVo;
}
 
Example 3
Project: AvoinApotti   File: O01VoMapper.java   Source Code and License 6 votes vote down vote up
private void renderNTE(NTE nte, String additClinNotes,Integer ID) throws HL7Exception
{
	//	NTE-1  Set ID
	if(ID==null)
	{
		nte.getSetIDNTE().setValue("1"); // Always only 1
	}
	else
	{
		nte.getSetIDNTE().setValue(ID.toString());
	}
	
	
	//	NTE-2  Source of comment
	nte.getSourceOfComment().setValue("P");  // Placer of the order
	
	// NTE-3  Comment
	nte.getComment(0).setValue(HL7Utils.toHL7Text(additClinNotes));		
	
	// NTE-4  Comment type
	nte.getCommentType().getText().setValue("R"); // General Remark
}
 
Example 4
Project: openMAXIMS   File: R01VoMapper.java   Source Code and License 6 votes vote down vote up
private IfOcsResCommentVoCollection getResultComments(AbstractGroup nte_group) throws HL7Exception
{
	// This is a cludge around an apparent bug in the HAPI library: One
	// empty
	// NTE (hanging off OBR) is created in the parsed structure even if it
	// wasn't sent in the message
	// so we know that if there's only one NTE and its comments are empty,
	// it's useless so disregard
	int NTEcount = nte_group.getAll("NTE").length;
	if (NTEcount == 0)
		return null;

	IfOcsResCommentVoCollection coll = new IfOcsResCommentVoCollection();
	NTE nte = getNTEFromAbstract(nte_group, 0);
	if ((NTEcount > 1 && (nte.getComment(0).getValue() == null)) || nte.getComment(0).getValue() != null)
	{
		for (int k = 0; k < NTEcount; k++)
			coll.add(getCommentVoFromSeg(getNTEFromAbstract(nte_group, k)));
	}
	return coll;
}
 
Example 5
Project: openMAXIMS   File: R01VoMapper.java   Source Code and License 6 votes vote down vote up
private IfOcsResCommentVo getCommentVoFromSeg(NTE nte) throws HL7Exception
{
	StringBuffer cmnt = new StringBuffer();
	IfOcsResCommentVo commentVo = new IfOcsResCommentVo();
	commentVo.setCmtSrc(nte.getSourceOfComment().getValue());

	for (int i = 0; i < nte.getComment().length; i++)
	{
		if(null!=nte.getComment(i).getValue())
		{
			cmnt.append(HL7Utils.fromHL7Text(nte.getComment(i).getValue()));
		}
	}

	if(cmnt.length()==0)
	{
		cmnt.append('\r');
	}
	commentVo.setCmtText(cmnt.toString());

	return commentVo;
}
 
Example 6
Project: openMAXIMS   File: O01VoMapper.java   Source Code and License 6 votes vote down vote up
private void renderNTE(NTE nte, String additClinNotes,Integer ID) throws HL7Exception
{
	//	NTE-1  Set ID
	if(ID==null)
	{
		nte.getSetIDNTE().setValue("1"); // Always only 1
	}
	else
	{
		nte.getSetIDNTE().setValue(ID.toString());
	}
	
	
	//	NTE-2  Source of comment
	nte.getSourceOfComment().setValue("P");  // Placer of the order
	
	// NTE-3  Comment
	nte.getComment(0).setValue(HL7Utils.toHL7Text(additClinNotes));		
	
	// NTE-4  Comment type
	nte.getCommentType().getText().setValue("R"); // General Remark
}
 
Example 7
Project: openMAXIMS   File: R01VoMapper.java   Source Code and License 6 votes vote down vote up
private IfOcsResCommentVoCollection getResultComments(AbstractGroup nte_group) throws HL7Exception
{
	// This is a cludge around an apparent bug in the HAPI library: One
	// empty
	// NTE (hanging off OBR) is created in the parsed structure even if it
	// wasn't sent in the message
	// so we know that if there's only one NTE and its comments are empty,
	// it's useless so disregard
	int NTEcount = nte_group.getAll("NTE").length;
	if (NTEcount == 0)
		return null;

	IfOcsResCommentVoCollection coll = new IfOcsResCommentVoCollection();
	NTE nte = getNTEFromAbstract(nte_group, 0);
	if ((NTEcount > 1 && (nte.getComment(0).getValue() == null)) || nte.getComment(0).getValue() != null)
	{
		for (int k = 0; k < NTEcount; k++)
			coll.add(getCommentVoFromSeg(getNTEFromAbstract(nte_group, k)));
	}
	return coll;
}
 
Example 8
Project: openMAXIMS   File: R01VoMapper.java   Source Code and License 6 votes vote down vote up
private IfOcsResCommentVo getCommentVoFromSeg(NTE nte) throws HL7Exception
{
	StringBuffer cmnt = new StringBuffer();
	IfOcsResCommentVo commentVo = new IfOcsResCommentVo();
	commentVo.setCmtSrc(nte.getSourceOfComment().getValue());

	for (int i = 0; i < nte.getComment().length; i++)
	{
		if(null!=nte.getComment(i).getValue())
		{
			cmnt.append(HL7Utils.fromHL7Text(nte.getComment(i).getValue()));
		}
	}

	if(cmnt.length()==0)
	{
		cmnt.append('\r');
	}
	commentVo.setCmtText(cmnt.toString());

	return commentVo;
}
 
Example 9
Project: openMAXIMS   File: O01VoMapper.java   Source Code and License 6 votes vote down vote up
private void renderNTE(NTE nte, String additClinNotes,Integer ID) throws HL7Exception
{
	//	NTE-1  Set ID
	if(ID==null)
	{
		nte.getSetIDNTE().setValue("1"); // Always only 1
	}
	else
	{
		nte.getSetIDNTE().setValue(ID.toString());
	}
	
	
	//	NTE-2  Source of comment
	nte.getSourceOfComment().setValue("P");  // Placer of the order
	
	// NTE-3  Comment
	nte.getComment(0).setValue(HL7Utils.toHL7Text(additClinNotes));		
	
	// NTE-4  Comment type
	nte.getCommentType().getText().setValue("R"); // General Remark
}
 
Example 10
Project: openmaxims-linux   File: R01VoMapper.java   Source Code and License 6 votes vote down vote up
private IfOcsResCommentVoCollection getResultComments(AbstractGroup nte_group) throws HL7Exception
{
	// This is a cludge around an apparent bug in the HAPI library: One
	// empty
	// NTE (hanging off OBR) is created in the parsed structure even if it
	// wasn't sent in the message
	// so we know that if there's only one NTE and its comments are empty,
	// it's useless so disregard
	int NTEcount = nte_group.getAll("NTE").length;
	if (NTEcount == 0)
		return null;

	IfOcsResCommentVoCollection coll = new IfOcsResCommentVoCollection();
	NTE nte = getNTEFromAbstract(nte_group, 0);
	if ((NTEcount > 1 && (nte.getComment(0).getValue() == null)) || nte.getComment(0).getValue() != null)
	{
		for (int k = 0; k < NTEcount; k++)
			coll.add(getCommentVoFromSeg(getNTEFromAbstract(nte_group, k)));
	}
	return coll;
}
 
Example 11
Project: openmaxims-linux   File: R01VoMapper.java   Source Code and License 6 votes vote down vote up
private IfOcsResCommentVo getCommentVoFromSeg(NTE nte) throws HL7Exception
{
	StringBuffer cmnt = new StringBuffer();
	IfOcsResCommentVo commentVo = new IfOcsResCommentVo();
	commentVo.setCmtSrc(nte.getSourceOfComment().getValue());

	for (int i = 0; i < nte.getComment().length; i++)
	{
		if(null!=nte.getComment(i).getValue())
		{
			cmnt.append(HL7Utils.fromHL7Text(nte.getComment(i).getValue()));
		}
	}

	if(cmnt.length()==0)
	{
		cmnt.append('\r');
	}
	commentVo.setCmtText(cmnt.toString());

	return commentVo;
}
 
Example 12
Project: openmaxims-linux   File: O01VoMapper.java   Source Code and License 6 votes vote down vote up
private void renderNTE(NTE nte, String additClinNotes,Integer ID) throws HL7Exception
{
	//	NTE-1  Set ID
	if(ID==null)
	{
		nte.getSetIDNTE().setValue("1"); // Always only 1
	}
	else
	{
		nte.getSetIDNTE().setValue(ID.toString());
	}
	
	
	//	NTE-2  Source of comment
	nte.getSourceOfComment().setValue("P");  // Placer of the order
	
	// NTE-3  Comment
	nte.getComment(0).setValue(HL7Utils.toHL7Text(additClinNotes));		
	
	// NTE-4  Comment type
	nte.getCommentType().getText().setValue("R"); // General Remark
}
 
Example 13
Project: elexis-3-core   File: HL7ReaderV24.java   Source Code and License 6 votes vote down vote up
private String getComments(ORU_R01_ORDER_OBSERVATION oobs, int i){
	String commentNTE = null;
	int size = oobs.getNTEReps();
	if (i > -1) {
		size = oobs.getOBSERVATION(i).getNTEReps();
	}
	
	for (int n = 0; n < size; n++) {
		NTE nte = oobs.getNTE(n);
		if (i > -1) {
			nte = oobs.getOBSERVATION(i).getNTE(n);
		}
		AbstractPrimitive comment = nte.getNte3_Comment(0);
		if (comment != null) {
			if (commentNTE != null) {
				commentNTE += "\n";
			} else {
				commentNTE = "";
			}
			commentNTE += comment.getValue();
		}
	}
	return commentNTE;
}
 
Example 14
Project: AvoinApotti   File: R01NasMapper.java   Source Code and License 5 votes vote down vote up
private boolean isValidNTE(NTE nte) throws HL7Exception
{
	if (nte == null)
		return false;
	String s1,s2,s3,s4;
	
	s1 = nte.getCommentType().getIdentifier().getValue();
	s2 = nte.getComment(0).getValue();
	s3 = nte.getSourceOfComment().getValue();
	s4 = nte.getSetIDNTE().getValue();
	
	if ((s1 == null || s1.equals("")) &&
		(s2 == null || s2.equals("")) &&
		(s3 == null || s3.equals("")) &&
		(s4 == null || s4.equals("")) )
		return false;
			
			
			
			//("")&& s2 == null && s3 == null && s4 == null)
		//return false;
	
	//if (s1.equals("") && s2.equals("") && s3.equals("") && s4.equals(""))
		//return false;
	
	
	return true;
}
 
Example 15
Project: openMAXIMS   File: R01NasMapper.java   Source Code and License 5 votes vote down vote up
private boolean isValidNTE(NTE nte) throws HL7Exception
{
	if (nte == null)
		return false;
	String s1,s2,s3,s4;
	
	s1 = nte.getCommentType().getIdentifier().getValue();
	s2 = nte.getComment(0).getValue();
	s3 = nte.getSourceOfComment().getValue();
	s4 = nte.getSetIDNTE().getValue();
	
	if ((s1 == null || s1.equals("")) &&
		(s2 == null || s2.equals("")) &&
		(s3 == null || s3.equals("")) &&
		(s4 == null || s4.equals("")) )
		return false;
			
			
			
			//("")&& s2 == null && s3 == null && s4 == null)
		//return false;
	
	//if (s1.equals("") && s2.equals("") && s3.equals("") && s4.equals(""))
		//return false;
	
	
	return true;
}
 
Example 16
Project: openMAXIMS   File: O13VoMapper.java   Source Code and License 5 votes vote down vote up
private TTANoteVo getTTANote(NTE nte) throws HL7Exception
{
	TTANoteVo note = new TTANoteVo();
	String date = nte.getComment(0).getValue();
	String comment = HL7Utils.getValueFromVariant(nte.getComment(0).getExtraComponents().getComponent(0), 0);
	String surname =HL7Utils.getValueFromVariant(nte.getSourceOfComment().getExtraComponents().getComponent(0),0);
	String forname =HL7Utils.getValueFromVariant(nte.getSourceOfComment().getExtraComponents().getComponent(1),0);
	String title =HL7Utils.getValueFromVariant(nte.getSourceOfComment().getExtraComponents().getComponent(4),0);
	
	StringBuilder fullName = new StringBuilder("");
	if(title!=null)
	{
		fullName.append(title);
		fullName.append(" ");
	}
	if(forname!=null)
	{
		fullName.append(forname);
		fullName.append(" ");
	}
	if(surname!=null)
	{
		fullName.append(surname);
	}
	
	note.setNoteDate(date);
	note.setTTAComment(comment);
	note.setSourceOfInformation(fullName.toString());
	return note;
}
 
Example 17
Project: openMAXIMS   File: R01NasMapper.java   Source Code and License 5 votes vote down vote up
private boolean isValidNTE(NTE nte) throws HL7Exception
{
	if (nte == null)
		return false;
	String s1,s2,s3,s4;
	
	s1 = nte.getCommentType().getIdentifier().getValue();
	s2 = nte.getComment(0).getValue();
	s3 = nte.getSourceOfComment().getValue();
	s4 = nte.getSetIDNTE().getValue();
	
	if ((s1 == null || s1.equals("")) &&
		(s2 == null || s2.equals("")) &&
		(s3 == null || s3.equals("")) &&
		(s4 == null || s4.equals("")) )
		return false;
			
			
			
			//("")&& s2 == null && s3 == null && s4 == null)
		//return false;
	
	//if (s1.equals("") && s2.equals("") && s3.equals("") && s4.equals(""))
		//return false;
	
	
	return true;
}
 
Example 18
Project: openmaxims-linux   File: R01NasMapper.java   Source Code and License 5 votes vote down vote up
private boolean isValidNTE(NTE nte) throws HL7Exception
{
	if (nte == null)
		return false;
	String s1,s2,s3,s4;
	
	s1 = nte.getCommentType().getIdentifier().getValue();
	s2 = nte.getComment(0).getValue();
	s3 = nte.getSourceOfComment().getValue();
	s4 = nte.getSetIDNTE().getValue();
	
	if ((s1 == null || s1.equals("")) &&
		(s2 == null || s2.equals("")) &&
		(s3 == null || s3.equals("")) &&
		(s4 == null || s4.equals("")) )
		return false;
			
			
			
			//("")&& s2 == null && s3 == null && s4 == null)
		//return false;
	
	//if (s1.equals("") && s2.equals("") && s3.equals("") && s4.equals(""))
		//return false;
	
	
	return true;
}
 
Example 19
Project: rassyeyanie   File: AbstractO19Processor.java   Source Code and License 5 votes vote down vote up
@Override
   protected void dispatchProcessFixture(AbstractMessage workingMessage)
    throws HL7Exception {
OMG_O19 message = (OMG_O19) workingMessage;
OMG_O19 clonedMessage = new OMG_O19();

this.transform(message.getMSH(),
	this.copySegment(message.getMSH(), clonedMessage.getMSH()));
this.transformNtes(HapiUtil.getAll(workingMessage, NTE.class));
this.transformOrders(HapiUtil.getAll(workingMessage,
	OMG_O19_ORDER.class));
this.transformPatient(HapiUtil.getAll(workingMessage,
	OMG_O19_PATIENT.class));

   }
 
Example 20
Project: rassyeyanie   File: AbstractCrisO01Test.java   Source Code and License 5 votes vote down vote up
private void testNte(int x, int y) throws HL7Exception {
	Structure expectedSegment = getExpected().getGroup("ORDER", x).get(
			NTE.class, y);
	Structure actualSegment = getActual().getGroup("ORDER", x)
			.getGroup("ORDER_DETAIL", 0).get(NTE.class, y);
	assertEquals(expectedSegment, actualSegment);
}
 
Example 21
Project: rassyeyanie   File: SymA03PimsA02.java   Source Code and License 5 votes vote down vote up
public void processMessage(@Body ADT_A03 to)
    throws HL7Exception
{
    this.transform(to.getMSH());
    this.transform(to.getEVN());
    this.transform(to.getPID());
    AbstractGroup zrefParent = getZrefParent(to);
    AbstractSegment zref = (AbstractSegment) zrefParent.get("ZRF");
    this.transform(to.getPV1(), zref);
    zref.clear();
    for (int i = 0; i < to.getDG1Reps(); i++)
    {
        to.getDG1(i).clear();
    }
    
    for (Structure al1 : zrefParent.getAll("AL1"))
    {
        ((AL1) al1).clear();
    }
    
    for (Structure nte : zrefParent.getAll("NTE"))
    {
        ((NTE) nte).clear();
    }
    
    if (zrefParent instanceof ADT_A03_PROCEDURE)
    {
        zrefParent.clear();
    }
}
 
Example 22
Project: rassyeyanie   File: SymA03PimsA01.java   Source Code and License 5 votes vote down vote up
public void dispatchProcessFixture(@Body ADT_A03 to)
    throws HL7Exception
{
    AbstractGroup zrefParent = getZrefParent(to);
    AbstractSegment zref = (AbstractSegment) zrefParent.get("ZRF");
    
    this.transform(to.getPV1(), zref, to.getEVN());
    this.transform(to.getEVN());
    this.transform(to.getMSH());
    this.transform(to.getPID());
    
    for (int i = 0; i < to.getDG1Reps(); i++)
    {
        to.getDG1(i).clear();
    }
    
    for (Structure al1 : zrefParent.getAll("AL1"))
    {
        ((AL1) al1).clear();
    }
    
    for (Structure nte : zrefParent.getAll("NTE"))
    {
        ((NTE) nte).clear();
    }
    
    if (zrefParent instanceof ADT_A03_PROCEDURE)
    {
        to.addNonstandardSegment("ZRF");
        Segment zrf = (Segment) to.insertRepetition("ZRF", 0);
        DeepCopy.copy(zref, zrf);
        to.insertRepetition("ZRF", 0);
        zrefParent.clear();
    }
    
}
 
Example 23
Project: rassyeyanie   File: SymA03PimsA03.java   Source Code and License 5 votes vote down vote up
public void processMessage(@Body ADT_A03 to)
    throws HL7Exception
{
    this.transform(to.getPID());
    AbstractGroup zrefParent = getZrefParent(to);
    AbstractSegment zref = (AbstractSegment) zrefParent.get("ZRF");
    this.transform(to.getPV1(), zref, to.getEVN());
    
    for (int i = 0; i < to.getDG1Reps(); i++)
    {
        to.getDG1(i).clear();
    }
    
    for (Structure al1 : zrefParent.getAll("AL1"))
    {
        ((AL1) al1).clear();
    }
    for (Structure nte : zrefParent.getAll("NTE"))
    {
        ((NTE) nte).clear();
    }
    
    this.transformZref(zref, to.getPV1());
    
    if (zrefParent instanceof ADT_A03_PROCEDURE)
    {
        zrefParent.clear();
    }
}
 
Example 24
Project: AvoinApotti   File: R01VoMapper.java   Source Code and License 4 votes vote down vote up
private String getReportTextFromOBXGroup(ORU_R01_ORCOBRNTECTDOBXNTEFT1CTI orc_group) throws HL7Exception
	{
		int componentCount = orc_group.getORU_R01_OBXNTEReps();
		StringBuffer ret = new StringBuffer();
		for (int i = 0; i < componentCount; i++)
		{
			ORU_R01_OBXNTE obx_nte = orc_group.getORU_R01_OBXNTE(i);
			OBX obx = obx_nte.getOBX();
//			String obValue=HL7Utils.fromHL7Text(HL7Utils.getValueFromVariant(obx.getObservationValue(0), 0)); //WDEV-6358
			
			
			Varies[] varies = obx.getObservationValue();
			String obValue="";
			if (null!=varies)
			{	
				 for (Varies varies2 : varies)
				 {
					 if(!"".equals(obValue)) // Add a new line if it is not the first
					 {
						 obValue+="\n"; // Newline: result is always displayed as html
					 }
					 String value = HL7Utils.fromHL7Text(HL7Utils.getValueFromVariant(varies2, 0));
					 if(null!=value)
						 obValue +=value; 
				}
			}

			
			
			if(null!=obValue)
				ret.append(obValue);
			ret.append("\r");
			int nteCount = obx_nte.getNTEReps();
			for (int j = 0; j < nteCount; j++)
			{
				NTE nte = obx_nte.getNTE(j);
				int commCount = nte.getComment().length;
				for (int k = 0; k < commCount; k++)
				{
					ret.append(HL7Utils.fromHL7Text(nte.getComment(k).getValue()));	
					ret.append("\r");
				}
			}			
		}
		String returnString = ret.toString();
		//http://jira/browse/WDEV-14838
		if(ConfigFlag.HL7.REMOVE_HL7_INDENT_FORMATTING.getValue())
		{
			if(null!=returnString) 
			{ 
				returnString = returnString.replaceAll("\\\\\\.in[\\+\\-](\\d)*\\\\", " "); 
			} 
		}
		return returnString;
	}
 
Example 25
Project: AvoinApotti   File: R01VoMapper.java   Source Code and License 4 votes vote down vote up
private NTE getNTEFromAbstract(AbstractGroup nte_group, int i) throws HL7Exception
{
	return ((NTE) nte_group.get("NTE", i));
}
 
Example 26
Project: AvoinApotti   File: O01VoMapper.java   Source Code and License 4 votes vote down vote up
private NTE getNextNTE(ORM_O01 order,int i) throws HL7Exception
{
	return order.getORM_O01_ORCOBRRQDRQ1RXOODSODTNTECTDDG1OBXNTEFT1CTIBLG(0).getORM_O01_OBRRQDRQ1RXOODSODTNTECTDDG1OBXNTE().getORM_O01_OBXNTE(i-1).getNTE();
}
 
Example 27
Project: AvoinApotti   File: O01VoMapper.java   Source Code and License 4 votes vote down vote up
private void renderNTE(NTE nte, String additClinNotes) throws HL7Exception
{
	renderNTE(nte,  additClinNotes,null);
}
 
Example 28
Project: openMAXIMS   File: R01VoMapper.java   Source Code and License 4 votes vote down vote up
private String getReportTextFromOBXGroup(ORU_R01_ORCOBRNTECTDOBXNTEFT1CTI orc_group) throws HL7Exception
	{
		int componentCount = orc_group.getORU_R01_OBXNTEReps();
		StringBuffer ret = new StringBuffer();
		for (int i = 0; i < componentCount; i++)
		{
			ORU_R01_OBXNTE obx_nte = orc_group.getORU_R01_OBXNTE(i);
			OBX obx = obx_nte.getOBX();
//			String obValue=HL7Utils.fromHL7Text(HL7Utils.getValueFromVariant(obx.getObservationValue(0), 0)); //WDEV-6358
			
			
			Varies[] varies = obx.getObservationValue();
			String obValue="";
			if (null!=varies)
			{	
				 for (Varies varies2 : varies)
				 {
					 if(!"".equals(obValue)) // Add a new line if it is not the first
					 {
						 obValue+="\n"; // Newline: result is always displayed as html
					 }
					 String value = HL7Utils.fromHL7Text(HL7Utils.getValueFromVariant(varies2, 0));
					 if(null!=value)
						 obValue +=value; 
				}
			}

			
			
			if(null!=obValue)
				ret.append(obValue);
			ret.append("\r");
			int nteCount = obx_nte.getNTEReps();
			for (int j = 0; j < nteCount; j++)
			{
				NTE nte = obx_nte.getNTE(j);
				int commCount = nte.getComment().length;
				for (int k = 0; k < commCount; k++)
				{
					ret.append(HL7Utils.fromHL7Text(nte.getComment(k).getValue()));	
					ret.append("\r");
				}
			}			
		}
		String returnString = ret.toString();
		//http://jira/browse/WDEV-14838
		if(ConfigFlag.HL7.REMOVE_HL7_INDENT_FORMATTING.getValue())
		{
			if(null!=returnString) 
			{ 
				returnString = returnString.replaceAll("\\\\\\.in[\\+\\-](\\d)*\\\\", " "); 
			} 
		}
		return returnString;
	}
 
Example 29
Project: openMAXIMS   File: R01VoMapper.java   Source Code and License 4 votes vote down vote up
private NTE getNTEFromAbstract(AbstractGroup nte_group, int i) throws HL7Exception
{
	return ((NTE) nte_group.get("NTE", i));
}
 
Example 30
Project: openMAXIMS   File: O01VoMapper.java   Source Code and License 4 votes vote down vote up
private NTE getNextNTE(ORM_O01 order,int i) throws HL7Exception
{
	return order.getORM_O01_ORCOBRRQDRQ1RXOODSODTNTECTDDG1OBXNTEFT1CTIBLG(0).getORM_O01_OBRRQDRQ1RXOODSODTNTECTDDG1OBXNTE().getORM_O01_OBXNTE(i-1).getNTE();
}
 
Example 31
Project: openMAXIMS   File: O01VoMapper.java   Source Code and License 4 votes vote down vote up
private void renderNTE(NTE nte, String additClinNotes) throws HL7Exception
{
	renderNTE(nte,  additClinNotes,null);
}
 
Example 32
Project: openMAXIMS   File: R01VoMapper.java   Source Code and License 4 votes vote down vote up
private String getReportTextFromOBXGroup(ORU_R01_ORCOBRNTECTDOBXNTEFT1CTI orc_group) throws HL7Exception
	{
		int componentCount = orc_group.getORU_R01_OBXNTEReps();
		StringBuffer ret = new StringBuffer();
		for (int i = 0; i < componentCount; i++)
		{
			ORU_R01_OBXNTE obx_nte = orc_group.getORU_R01_OBXNTE(i);
			OBX obx = obx_nte.getOBX();
//			String obValue=HL7Utils.fromHL7Text(HL7Utils.getValueFromVariant(obx.getObservationValue(0), 0)); //WDEV-6358
			
			
			Varies[] varies = obx.getObservationValue();
			String obValue="";
			if (null!=varies)
			{	
				 for (Varies varies2 : varies)
				 {
					 if(!"".equals(obValue)) // Add a new line if it is not the first
					 {
						 obValue+="\n"; // Newline: result is always displayed as html
					 }
					 String value = HL7Utils.fromHL7Text(HL7Utils.getValueFromVariant(varies2, 0));
					 if(null!=value)
						 obValue +=value; 
				}
			}

			
			
			if(null!=obValue)
				ret.append(obValue);
			ret.append("\r");
			int nteCount = obx_nte.getNTEReps();
			for (int j = 0; j < nteCount; j++)
			{
				NTE nte = obx_nte.getNTE(j);
				int commCount = nte.getComment().length;
				for (int k = 0; k < commCount; k++)
				{
					ret.append(HL7Utils.fromHL7Text(nte.getComment(k).getValue()));	
					ret.append("\r");
				}
			}			
		}
		String returnString = ret.toString();
		//http://jira/browse/WDEV-14838
		if(ConfigFlag.HL7.REMOVE_HL7_INDENT_FORMATTING.getValue())
		{
			if(null!=returnString) 
			{ 
				returnString = returnString.replaceAll("\\\\\\.in[\\+\\-](\\d)*\\\\", " "); 
			} 
		}
		return returnString;
	}
 
Example 33
Project: openMAXIMS   File: R01VoMapper.java   Source Code and License 4 votes vote down vote up
private NTE getNTEFromAbstract(AbstractGroup nte_group, int i) throws HL7Exception
{
	return ((NTE) nte_group.get("NTE", i));
}
 
Example 34
Project: openMAXIMS   File: O01VoMapper.java   Source Code and License 4 votes vote down vote up
private NTE getNextNTE(ORM_O01 order,int i) throws HL7Exception
{
	return order.getORM_O01_ORCOBRRQDRQ1RXOODSODTNTECTDDG1OBXNTEFT1CTIBLG(0).getORM_O01_OBRRQDRQ1RXOODSODTNTECTDDG1OBXNTE().getORM_O01_OBXNTE(i-1).getNTE();
}
 
Example 35
Project: openMAXIMS   File: O01VoMapper.java   Source Code and License 4 votes vote down vote up
private void renderNTE(NTE nte, String additClinNotes) throws HL7Exception
{
	renderNTE(nte,  additClinNotes,null);
}
 
Example 36
Project: openmaxims-linux   File: R01VoMapper.java   Source Code and License 4 votes vote down vote up
private String getReportTextFromOBXGroup(ORU_R01_ORCOBRNTECTDOBXNTEFT1CTI orc_group) throws HL7Exception
	{
		int componentCount = orc_group.getORU_R01_OBXNTEReps();
		StringBuffer ret = new StringBuffer();
		for (int i = 0; i < componentCount; i++)
		{
			ORU_R01_OBXNTE obx_nte = orc_group.getORU_R01_OBXNTE(i);
			OBX obx = obx_nte.getOBX();
//			String obValue=HL7Utils.fromHL7Text(HL7Utils.getValueFromVariant(obx.getObservationValue(0), 0)); //WDEV-6358
			
			
			Varies[] varies = obx.getObservationValue();
			String obValue="";
			if (null!=varies)
			{	
				 for (Varies varies2 : varies)
				 {
					 if(!"".equals(obValue)) // Add a new line if it is not the first
					 {
						 obValue+="\n"; // Newline: result is always displayed as html
					 }
					 String value = HL7Utils.fromHL7Text(HL7Utils.getValueFromVariant(varies2, 0));
					 if(null!=value)
						 obValue +=value; 
				}
			}

			
			
			if(null!=obValue)
				ret.append(obValue);
			ret.append("\r");
			int nteCount = obx_nte.getNTEReps();
			for (int j = 0; j < nteCount; j++)
			{
				NTE nte = obx_nte.getNTE(j);
				int commCount = nte.getComment().length;
				for (int k = 0; k < commCount; k++)
				{
					ret.append(HL7Utils.fromHL7Text(nte.getComment(k).getValue()));	
					ret.append("\r");
				}
			}			
		}
		String returnString = ret.toString();
		//http://jira/browse/WDEV-14838
		if(ConfigFlag.HL7.REMOVE_HL7_INDENT_FORMATTING.getValue())
		{
			if(null!=returnString) 
			{ 
				returnString = returnString.replaceAll("\\\\\\.in[\\+\\-](\\d)*\\\\", " "); 
			} 
		}
		return returnString;
	}
 
Example 37
Project: openmaxims-linux   File: R01VoMapper.java   Source Code and License 4 votes vote down vote up
private NTE getNTEFromAbstract(AbstractGroup nte_group, int i) throws HL7Exception
{
	return ((NTE) nte_group.get("NTE", i));
}
 
Example 38
Project: openmaxims-linux   File: O01VoMapper.java   Source Code and License 4 votes vote down vote up
private NTE getNextNTE(ORM_O01 order,int i) throws HL7Exception
{
	return order.getORM_O01_ORCOBRRQDRQ1RXOODSODTNTECTDDG1OBXNTEFT1CTIBLG(0).getORM_O01_OBRRQDRQ1RXOODSODTNTECTDDG1OBXNTE().getORM_O01_OBXNTE(i-1).getNTE();
}
 
Example 39
Project: openmaxims-linux   File: O01VoMapper.java   Source Code and License 4 votes vote down vote up
private void renderNTE(NTE nte, String additClinNotes) throws HL7Exception
{
	renderNTE(nte,  additClinNotes,null);
}
 
Example 40
Project: rassyeyanie   File: AbstractO01Processor.java   Source Code and License 2 votes vote down vote up
public void transformNtes(List<NTE> ntes) throws HL7Exception {

    }