当前位置: 首页>>代码示例>>Java>>正文


Java Terser类代码示例

本文整理汇总了Java中ca.uhn.hl7v2.util.Terser的典型用法代码示例。如果您正苦于以下问题:Java Terser类的具体用法?Java Terser怎么用?Java Terser使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Terser类属于ca.uhn.hl7v2.util包,在下文中一共展示了Terser类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: next

import ca.uhn.hl7v2.util.Terser; //导入依赖的package包/类
@Override
public Message next() throws IOException, HL7Exception {
    Message ret = null;

    while (psqlReaderNextmsg != null && ret == null) {
        Message nextMsg = psqlReaderNextmsg;
        readNextPsqlMessage();

        if (skipMessages) {
            Terser nextMsgTerser = new Terser(nextMsg);
            String currMSH10 = nextMsgTerser.get("/MSH-10");
            if (lastSuccessSendMsgId.compareTo(currMSH10) == 0) {
                LOG.info("Skip message (for the last time):" + currMSH10);
                skipMessages = false;
            } else {
                LOG.info("Skip message:" + currMSH10);
            }
        } else {
            ret = nextMsg;
        }
    }

    return ret;
}
 
开发者ID:endeavourhealth,项目名称:HL7Receiver,代码行数:25,代码来源:PSQLReader.java

示例2: next

import ca.uhn.hl7v2.util.Terser; //导入依赖的package包/类
@Override
public Message next() throws HL7Exception {
    Message ret = null;

    while (hapiIter.hasNext() && ret == null) {
        Message nextMsg = hapiIter.next();
        if (skipMessages) {
            Terser nextMsgTerser = new Terser(nextMsg);
            String currMSH10 = nextMsgTerser.get("/MSH-10");
            if (lastSuccessSendMsgId.compareTo(currMSH10) == 0) {
                LOG.info("Skip message (for the last time):" + currMSH10);
                skipMessages = false;
            } else {
                LOG.info("Skip message:" + currMSH10);
            }
        } else {
            ret = nextMsg;
        }
    }

    return ret;
}
 
开发者ID:endeavourhealth,项目名称:HL7Receiver,代码行数:23,代码来源:HAPIReader.java

示例3: getOBXCommentCount

import ca.uhn.hl7v2.util.Terser; //导入依赖的package包/类
/**
 *  Methods to get information from observation notes
 */
public int getOBXCommentCount(int i, int j){
    int count = 0;
    try{
        String comment = "";
        OBX obxSeg = ( obrSegMap.get(obrSegKeySet.get(i))).get(j);
        while(comment != null){
            count++;
            comment = Terser.get(obxSeg,7,count,1,1);
            if (comment == null)
                comment = Terser.get(obxSeg,7,count,2,1);
        }
        count--;

    }catch(Exception e){
        logger.error("Exception retrieving obx comment count", e);
        count = 0;
    }
    return count;
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:23,代码来源:GDMLHandler.java

示例4: getOBXIdentifier

import ca.uhn.hl7v2.util.Terser; //导入依赖的package包/类
public String getOBXIdentifier(int i, int j) {

		try {

			Terser t = new Terser(msg);
			Segment obxSeg = ((ca.uhn.hl7v2.model.v25.segment.OBX) ((ArrayList) obrSegMap.get(obrSegKeySet.get(i)))
					.get(j));
			String ident = getString(Terser.get(obxSeg, 3, 0, 1, 1));
			String subIdent = Terser.get(obxSeg, 3, 0, 1, 2);

			if (subIdent != null)
				ident = ident + "&" + subIdent;

			//logger.info("returning obx identifier: " + ident);
			return (ident);
		} catch (Exception e) {
			logger.error("error returning obx identifier", e);

		}
		return "";
	}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:22,代码来源:TDISHandler.java

示例5: getOBXUnits

import ca.uhn.hl7v2.util.Terser; //导入依赖的package包/类
public String getOBXUnits(int i, int j) {
	String ret = "";
	try {
		ca.uhn.hl7v2.model.v25.segment.OBX obxSeg = (obrSegMap.get(obrSegKeySet.get(i))).get(j);
		ret = getString(obxSeg.getUnits().getIdentifier().getValue());

		// if there are no units specified check the formatted reference
		// range for the units
		if (ret.equals("")) {
			Terser terser = new Terser(msg);
			ret = getString(Terser.get(obxSeg, 7, 0, 2, 1));

			// only display units from the formatted reference range if they
			// have not already been displayed as the reference range
			if (ret.contains("-") || ret.contains("<") || ret.contains(">") || ret.contains("NEGATIVE"))
				ret = "";
		}
	} catch (Exception e) {
		logger.error("Exception retrieving units", e);
	}
	return ret.replaceAll("\\\\\\.br\\\\", "");
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:23,代码来源:TDISHandler.java

示例6: getOBXCommentCount

import ca.uhn.hl7v2.util.Terser; //导入依赖的package包/类
/**
 * Methods to get information from observation notes
 */
public int getOBXCommentCount(int i, int j) {
	int count = 0;
	try {
		//for ITS^REPORT return the fields of the ITS REPORT as comments
		if (isReport(i, j))
			return 1; //1 line of report per OBX line as comment

		Terser terser = new Terser(msg);
		String comment = "";
		OBX obxSeg = getOBX(i, j);
		while (comment != null) {
			count++;
			comment = Terser.get(obxSeg, 7, count, 1, 1);
			if (comment == null)
				comment = Terser.get(obxSeg, 7, count, 2, 1);
		}
		count--;

	} catch (Exception e) {
		logger.error("Exception retrieving obx comment count", e);
		count = 0;
	}
	return count;
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:28,代码来源:TDISHandler.java

示例7: getOBXComment

import ca.uhn.hl7v2.util.Terser; //导入依赖的package包/类
public String getOBXComment(int i, int j, int k) {
	String comment = "";
	
	try {
		if (isReport(i, j)) {
			return getOBXResult(i, j, true);
		}
		k++;

		Terser terser = new Terser(msg);
		ca.uhn.hl7v2.model.v25.segment.OBX obxSeg = (ca.uhn.hl7v2.model.v25.segment.OBX) ((ArrayList) obrSegMap
				.get(obrSegKeySet.get(i))).get(j);
		comment = Terser.get(obxSeg, 7, k, 1, 1);
		if (comment == null)
			comment = Terser.get(obxSeg, 7, k, 2, 1);
		
		

	} catch (Exception e) {
		logger.error("Cannot return comment", e);
	}
	
	return comment.replaceAll("\\\\\\.br\\\\", "<br />");
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:25,代码来源:TDISHandler.java

示例8: getOBXResult

import ca.uhn.hl7v2.util.Terser; //导入依赖的package包/类
public String getOBXResult(int i, int j){
    
    String result = "";
    try{
        
        Terser terser = new Terser(msg);
        result = getString(Terser.get(msg.getRESPONSE().getORDER_OBSERVATION(i).getOBSERVATION(j).getOBX(),5,0,1,1));
        
        // format the result
        if (result.endsWith("."))
            result = result.substring(0, result.length()-1);
        
    }catch(Exception e){
        logger.error("Exception returning result", e);
    }
    return result;
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:18,代码来源:EpsilonHandler.java

示例9: getOBXComment

import ca.uhn.hl7v2.util.Terser; //导入依赖的package包/类
public String getOBXComment(int i, int j, int k){
    String comment = "";
    try{
        k++;
        
        Terser terser = new Terser(msg);
        OBX obxSeg = msg.getRESPONSE().getORDER_OBSERVATION(i).getOBSERVATION(j).getOBX();
        comment = Terser.get(obxSeg,7,k,1,1);
        if (comment == null)
            comment = Terser.get(obxSeg,7,k,2,1);
        
    }catch(Exception e){
        logger.error("Cannot return comment", e);
    }
    return comment.replaceAll("\\\\\\.br\\\\", "<br />");
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:17,代码来源:EpsilonHandler.java

示例10: getOBXIdentifier

import ca.uhn.hl7v2.util.Terser; //导入依赖的package包/类
public String getOBXIdentifier(int i, int j){

	        try{

	            Segment obxSeg = ((obrSegMap.get(obrSegKeySet.get(i))).get(j));
	            String ident = getString(Terser.get(obxSeg, 3, 0, 1, 1 ));
	            String subIdent = Terser.get(obxSeg, 3, 0, 1, 2);

	            if (subIdent != null)
	                ident = ident+"&"+subIdent;

	            logger.info("returning obx identifier: "+ident);
	            return(ident);
	        }catch(Exception e){
	            logger.error("error returning obx identifier", e);
	            return("");
	        }
	    }
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:19,代码来源:PFHTHandler.java

示例11: getOBXResult

import ca.uhn.hl7v2.util.Terser; //导入依赖的package包/类
public String getOBXResult(int i, int j){

	        String result = "";
	        try{

	            result = getString(Terser.get(((OBX) ((ArrayList) obrSegMap.get(obrSegKeySet.get(i))).get(j)),5,0,1,1));

	            // format the result
	            if (result.endsWith("."))
	                result = result.substring(0, result.length()-1);

	        }catch(Exception e){
	            logger.error("Exception returning result", e);
	        }
	        logger.info("OBX Result = "+result);
	        return result.replaceAll("\\\\\\.br\\\\", "<br />");
	    }
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:18,代码来源:PFHTHandler.java

示例12: getOBXUnits

import ca.uhn.hl7v2.util.Terser; //导入依赖的package包/类
public String getOBXUnits(int i, int j){
    String ret = "";
    try{
        OBX obxSeg = (obrSegMap.get(obrSegKeySet.get(i))).get(j);
        ret = getString(obxSeg.getUnits().getIdentifier().getValue());

        // if there are no units specified check the formatted reference
        // range for the units
        if (ret.equals("")){
             ret = getString(Terser.get(obxSeg,7,0,2,1));

            // only display units from the formatted reference range if they
            // have not already been displayed as the reference range
            if (ret.contains("-") || ret.contains("<") || ret.contains(">") || ret.contains("NEGATIVE"))
                ret = "";
        }
    }catch(Exception e){
        logger.error("Exception retrieving units", e);
    }
    return ret.replaceAll("\\\\\\.br\\\\", "");
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:22,代码来源:PFHTHandler.java

示例13: getOBXCommentCount

import ca.uhn.hl7v2.util.Terser; //导入依赖的package包/类
/**
 *  Methods to get information from observation notes
 */
public int getOBXCommentCount(int i, int j){
    int count = 0;
    try{

        int obxcount;
        OBX obxSeg = (obrSegMap.get(obrSegKeySet.get(i))).get(j);

        obxcount = (obrSegMap.get(obrSegKeySet.get(i))).size();
        for (int k=0;k<obxcount;k++) {
        	if (Terser.get(obxSeg,7,k,1,1)!=null && !Terser.get(obxSeg,7,k,1,1).equals("") && (Terser.get(obxSeg,7,count,2,1)!=null && !Terser.get(obxSeg,7,count,2,1).equals(""))) {
        		count++;
        	}
        }


    }catch(Exception e){
        logger.error("Exception retrieving obx comment count", e);
        count = 0;
    }
    return count;
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:25,代码来源:PFHTHandler.java

示例14: getOBXIdentifier

import ca.uhn.hl7v2.util.Terser; //导入依赖的package包/类
public String getOBXIdentifier(int i, int j) {

		try {

			Terser t = new Terser(msg);
			
			String ident = getString(Terser.get(obxseg, 3, 0, 1, 1));
			String subIdent = Terser.get(obxseg, 3, 0, 1, 2);

			if (subIdent != null)
				ident = ident + "&" + subIdent;

			//logger.info("returning obx identifier: " + ident);
			return (ident);
		} catch (Exception e) {
			logger.error("error returning obx identifier", e);

		}
		return "";
	}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:21,代码来源:MEDVUEHandler.java

示例15: getOBXIdentifier

import ca.uhn.hl7v2.util.Terser; //导入依赖的package包/类
public String getOBXIdentifier(int i, int j){

        try{

            Segment obxSeg = (( obrSegMap.get(obrSegKeySet.get(i))).get(j));
            String ident = getString(Terser.get(obxSeg, 3, 0, 1, 1 ));
            String subIdent = Terser.get(obxSeg, 3, 0, 1, 2);

            if (subIdent != null)
                ident = ident+"&"+subIdent;

            logger.info("returning obx identifier: "+ident);
            return(ident);
        }catch(Exception e){
            logger.error("error returning obx identifier", e);
            return("");
        }
    }
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:19,代码来源:BioTestHandler.java


注:本文中的ca.uhn.hl7v2.util.Terser类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。