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


Java Terser.get方法代码示例

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


在下文中一共展示了Terser.get方法的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: getOBXSourceOrganization

import ca.uhn.hl7v2.util.Terser; //导入方法依赖的package包/类
public String getOBXSourceOrganization(int i, int j, int nteNum) {
	try {
		String[] segments = terser.getFinder().getRoot().getNames();
		int k = getNTELocation(i, j);
		if (nteNum > 0) {
			k = indexOfNextNTE(segments, k, nteNum + 1);
		}
		k++;
		Structure[] ZNTSegs = terser.getFinder().getRoot().getAll(segments[k]);
		Segment ZNTSeg = (Segment) ZNTSegs[0];
		String key = Terser.get(ZNTSeg, 1, 0, 2, 1);
		if (key == null || key.indexOf(":") == -1) {
			return "";
		}
		String ident = key.substring(0, key.indexOf(":"));
		ident = getOrganizationType(ident);
		key = key.substring(key.indexOf(":") + 1);
		return String.format("%s (%s %s)", sourceOrganizations.get(key), ident, key);

	} catch (Exception e) {
		logger.error("Could not retrieve OBX comment ZNT", e);

		return ("");
	}
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:26,代码来源:OLISHL7Handler.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: 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

示例6: 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

示例7: 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

示例8: 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

示例9: getOBXIdentifier

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

        try{ // no value for TRUENORTH
            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.debug("returning obx identifier: "+ident);
            return(ident);
        }catch(Exception e){
            logger.error("error returning obx identifier", e);
            return("");
        }
    }
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:18,代码来源:TRUENORTHHandler.java

示例10: parseERRSegment

import ca.uhn.hl7v2.util.Terser; //导入方法依赖的package包/类
private void parseERRSegment() throws HL7Exception {
	Segment err = terser.getSegment("/.ERR");
	errors = new ArrayList<OLISError>();
	String segment, sequence, field, identifier, text;
	int rep = -1;
	while ((identifier = Terser.get(err, 1, ++rep, 4, 1)) != null) {
		if (identifier.trim().equals("320")) {
			reportBlocked = true;
		}
		segment = Terser.get(err, 1, rep, 1, 1);
		sequence = Terser.get(err, 1, rep, 1, 2);
		field = Terser.get(err, 1, rep, 1, 3);
		text = Terser.get(err, 1, rep, 4, 2);
		errors.add(new OLISError(segment, sequence, field, identifier, text));
	}
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:17,代码来源:OLISHL7Handler.java

示例11: 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{

        Terser terser = new Terser(msg);
        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:oscarservice,项目名称:oscar-old,代码行数:25,代码来源:GDMLHandler.java

示例12: 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:oscarservice,项目名称:oscar-old,代码行数:23,代码来源:AlphaHL7Handler.java

示例13: getOBXComment

import ca.uhn.hl7v2.util.Terser; //导入方法依赖的package包/类
public String getOBXComment(int i, int j, int k)
{
  String comment = ""; String newComment = "";
  int len = 80; String concatComment = "";
  try
  {
    Terser terser = new Terser(this.msg);
    comment = Terser.get(this.obxseg, 5, 0, 1, 1);

    this.logger.info("Modified comment =" + newComment);
    return comment;
  }
  catch (Exception e) {
    this.logger.error("getOBRComment error", e);
  }return "";
}
 
开发者ID:oscarservice,项目名称:oscar-old,代码行数:17,代码来源:TRUENORTHHandler.java

示例14: getOBXIdentifier

import ca.uhn.hl7v2.util.Terser; //导入方法依赖的package包/类
public String getOBXIdentifier(int i, int j)
{
  try
  {
    Segment obxSeg = (Segment)((ArrayList)this.obrSegMap.get(this.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 = new StringBuilder().append(ident).append("&").append(subIdent).toString();
    }
    this.logger.info(new StringBuilder().append("returning obx identifier: ").append(ident).toString());
    return ident;
  } catch (Exception e) {
    this.logger.error("error returning obx identifier", e);
  }return "";
}
 
开发者ID:oscarservice,项目名称:oscar-old,代码行数:18,代码来源:HRSRHHandler.java

示例15: getCCDocs

import ca.uhn.hl7v2.util.Terser; //导入方法依赖的package包/类
public String getCCDocs(){

        String docNames = "";

        try {
            Terser terser = new Terser(msg);

            String givenName = terser.get("/.ZDR(0)-4-1");
            String middleName = terser.get("/.ZDR(0)-4-3");
            String familyName = terser.get("/.ZDR(0)-4-2");

            int i=1;
            while (givenName != null){

                if (i==1)
                    docNames = givenName;
                else
                    docNames = docNames+", "+givenName;

                if (middleName != null)
                    docNames = docNames+" "+middleName;
                if (familyName != null)
                    docNames = docNames+" "+familyName;

                givenName = terser.get("/.ZDR("+i+")-4-1");
                middleName = terser.get("/.ZDR("+i+")-4-3");
                familyName = terser.get("/.ZDR("+i+")-4-2");

                i++;
            }

            return(docNames);

        } catch (Exception e) {
            //ignore error... it will occur when the zdr segment is not present
            //logger.error("Could not retrieve cc'd docs", e);
            return("");
        }

    }
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:41,代码来源:BioTestHandler.java


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