• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Structure类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getOBRCommentCount

import ca.uhn.hl7v2.model.Structure; //导入依赖的package包/类
/**
 *  Methods to get information from observation notes
 */
public int getOBRCommentCount(int i){

    try{
        String[] segments = terser.getFinder().getRoot().getNames();
        int k = getNTELocation(i, -1);
        int count = 0;

        // make sure to count all the nte segments in the group
        if (k < segments.length && segments[k].substring(0, 3).equals("NTE")){
            Structure[] nteSegs = terser.getFinder().getRoot().getAll(segments[k]);
            for (int l=0; l < nteSegs.length; l++){
                count++;
            }
        }

        return(count);
    }catch(Exception e){
        logger.error("OBR Comment count error", e);

        return(0);
    }

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


示例2: getOBRComment

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

        try{
            String[] segments = terser.getFinder().getRoot().getNames();
            int k = getNTELocation(i, -1);

            Structure[] nteSegs = terser.getFinder().getRoot().getAll(segments[k]);
            Segment nteSeg = (Segment) nteSegs[j];
            return(getString(Terser.get(nteSeg,3,0,1,1)));

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

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


示例3: getOBXCommentCount

import ca.uhn.hl7v2.model.Structure; //导入依赖的package包/类
/**
 *  Methods to get information from observation notes
 */
public int getOBXCommentCount(int i, int j){
    // jth obx of the ith obr

    try{

        String[] segments = terser.getFinder().getRoot().getNames();
        int k = getNTELocation(i, j);

        int count = 0;
        if (k < segments.length && segments[k].substring(0, 3).equals("NTE")){
            Structure[] nteSegs = terser.getFinder().getRoot().getAll(segments[k]);
            for (int l=0; l < nteSegs.length; l++){
                count++;
            }
        }

        return(count);
    }catch(Exception e){
        logger.error("OBR Comment count error", e);

        return(0);
    }

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


示例4: getNTELocation

import ca.uhn.hl7v2.model.Structure; //导入依赖的package包/类
private int getNTELocation(int i, int j) throws HL7Exception{
    int k = 0;
    int obrCount = 0;
    int obxCount = 0;
    String[] segments = terser.getFinder().getRoot().getNames();

    while (k != segments.length && obrCount != i+1){
        if (segments[k].substring(0, 3).equals("OBR"))
            obrCount++;
        k++;
    }

    Structure[] obxSegs;
    while (k != segments.length && obxCount != j+1){


        if (segments[k].substring(0, 3).equals(("OBX"))){
            obxSegs = terser.getFinder().getRoot().getAll(segments[k]);
            obxCount = obxCount + obxSegs.length;
        }
        k++;
    }

    return(k);
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:26,代码来源:DefaultGenericHandler.java


示例5: getOBRComment

import ca.uhn.hl7v2.model.Structure; //导入依赖的package包/类
@Override
public String getOBRComment(int i, int j){
    
    try{
        String[] segments = terser.getFinder().getRoot().getNames();
        int k = getNTELocation(i, -1);
        
        Structure[] nteSegs = terser.getFinder().getRoot().getAll(segments[k]);
        Segment nteSeg = (Segment) nteSegs[j];
        return(getString(Terser.get(nteSeg,3,0,1,1)));
        
    }catch(Exception e){
        logger.error("Could not retrieve OBX comments", e);
        
        return("");
    }
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:18,代码来源:IHAHandler.java


示例6: getOBXCommentCount

import ca.uhn.hl7v2.model.Structure; //导入依赖的package包/类
@Override
public int getOBXCommentCount(int i, int j){
    // jth obx of the ith obr
    
    try{
        
        String[] segments = terser.getFinder().getRoot().getNames();
        int k = getNTELocation(i, j);
        
        int count = 0;
        if (k < segments.length && segments[k].substring(0, 3).equals("NTE")){
            Structure[] nteSegs = terser.getFinder().getRoot().getAll(segments[k]);
            for (int l=0; l < nteSegs.length; l++){
                count++;
            }
        }
        
        return(count);
    }catch(Exception e){
        logger.error("OBR Comment count error", e);
        
        return(0);
    }
    
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:26,代码来源:IHAHandler.java


示例7: getOBXComment

import ca.uhn.hl7v2.model.Structure; //导入依赖的package包/类
@Override
public String getOBXComment(int i, int j, int nteNum){
    
    
    try{
        
        String[] segments = terser.getFinder().getRoot().getNames();
        int k = getNTELocation(i, j);
        Structure[] nteSegs = terser.getFinder().getRoot().getAll(segments[k]);
        Segment nteSeg = (Segment) nteSegs[nteNum];
        return(getString(Terser.get(nteSeg,3,0,1,1)));
        
    }catch(Exception e){
        logger.error("Could not retrieve OBX comments", e);
        
        return("");
    }
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:19,代码来源:IHAHandler.java


示例8: getNTELocation

import ca.uhn.hl7v2.model.Structure; //导入依赖的package包/类
private int getNTELocation(int i, int j) throws HL7Exception{
    int k = 0;
    int obrCount = 0;
    int obxCount = 0;
    String[] segments = terser.getFinder().getRoot().getNames();
    
    while (k != segments.length && obrCount != i+1){
        if (segments[k].substring(0, 3).equals("OBR"))
            obrCount++;
        k++;
    }
    
    Structure[] obxSegs;
    while (k != segments.length && obxCount != j+1){
        
        
        if (segments[k].substring(0, 3).equals(("OBX"))){
            obxSegs = terser.getFinder().getRoot().getAll(segments[k]);
            obxCount = obxCount + obxSegs.length;
        }
        k++;
    }
    
    return(k);
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:26,代码来源:IHAHandler.java


示例9: mapOBXSortKey

import ca.uhn.hl7v2.model.Structure; //导入依赖的package包/类
private void mapOBXSortKey(int obr) {
	HashMap<String, Integer> obxMap = null;
	int k;
	String tempKey;
	obxMap = new HashMap<String, Integer>();
	for (int i = 0; i < getOBXCount(obr); i++) {

		try {
			k = getZBXLocation(obr, i);
			String[] segments = terser.getFinder().getRoot().getNames();
			if (!segments[k].startsWith("ZBX")) {
				continue;
			}
			Structure[] zbxSegs = terser.getFinder().getRoot().getAll(segments[k]);
			Segment zbxSeg = (Segment) zbxSegs[0];
			tempKey = getString(Terser.get(zbxSeg, 2, 0, 1, 1));
			obxMap.put(tempKey.equals("") ? String.valueOf(i) : tempKey, i);

		} catch (Exception e) {
			MiscUtils.getLogger().error("OLIS HL7 Error", e);
		}
	}
	obxSortMap.put(obr, obxMap);
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:25,代码来源:OLISHL7Handler.java


示例10: getOBRComment

import ca.uhn.hl7v2.model.Structure; //导入依赖的package包/类
@Override
public String getOBRComment(int i, int j) {

	try {
		String[] segments = terser.getFinder().getRoot().getNames();
		int k = getNTELocation(i, -1);
		if (j > 0) {
			k = indexOfNextNTE(segments, k + 1, j);
		}
		Structure[] nteSegs = terser.getFinder().getRoot().getAll(segments[k]);
		Segment nteSeg = (Segment) nteSegs[0];
		return formatString(getString(Terser.get(nteSeg, 3, 0, 1, 1)));

	} catch (Exception e) {
		logger.error("Could not retrieve OBR comments", e);

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


示例11: getOBRSourceOrganization

import ca.uhn.hl7v2.model.Structure; //导入依赖的package包/类
public String getOBRSourceOrganization(int i, int j) {
	try {
		String[] segments = terser.getFinder().getRoot().getNames();
		int k = getNTELocation(i, -1);
		if (j > 0) {
			k = indexOfNextNTE(segments, k + 1, j);
		}
		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 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


示例12: getReportComment

import ca.uhn.hl7v2.model.Structure; //导入依赖的package包/类
public String getReportComment(int j) {

		try {
			String[] segments = terser.getFinder().getRoot().getNames();
			int k = getNTELocation(-1, -1);
			if (j > 0) {
				k = indexOfNextNTE(segments, k + 1, j);
			}
			Structure[] nteSegs = terser.getFinder().getRoot().getAll(segments[k]);
			Segment nteSeg = (Segment) nteSegs[0];
			return formatString(getString(Terser.get(nteSeg, 3, 0, 1, 1)));

		} catch (Exception e) {
			logger.error("Could not retrieve OBR comments", e);

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


示例13: getReportSourceOrganization

import ca.uhn.hl7v2.model.Structure; //导入依赖的package包/类
public String getReportSourceOrganization(int j) {
	try {
		String[] segments = terser.getFinder().getRoot().getNames();
		int k = getNTELocation(-1, -1);
		if (j > 0) {
			k = indexOfNextNTE(segments, k + 1, j);
		}
		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,代码行数:25,代码来源:OLISHL7Handler.java


示例14: getOBXComment

import ca.uhn.hl7v2.model.Structure; //导入依赖的package包/类
@Override
public String getOBXComment(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);
		}
		Structure[] nteSegs = terser.getFinder().getRoot().getAll(segments[k]);
		Segment nteSeg = (Segment) nteSegs[0];
		return formatString(getString(Terser.get(nteSeg, 3, 0, 1, 1))).replace(" ", "&nbsp;");

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

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


示例15: getOBXSourceOrganization

import ca.uhn.hl7v2.model.Structure; //导入依赖的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


示例16: extractValues

import ca.uhn.hl7v2.model.Structure; //导入依赖的package包/类
public static List<HL7Value> extractValues(Message message) throws Exception {
  Terser terser = new Terser(message);
  SegmentFinder finder = terser.getFinder();
  
  List<HL7Value> values = new ArrayList<HL7Value>();
  
  int childNr = 1;
  
  while (finder.hasNextChild()) {

    // next group in the message (MSH, PID, EVN and so on)
    //
    finder.nextChild(); 
    Structure[] structures = finder.getCurrentChildReps();
    for (int i=0;i<structures.length;i++) {
      Structure structure = structures[i];
      parseStructure(values, message, terser, structure, Integer.toString(childNr));
    }
    
    childNr++;
  }    

  return values;
}
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:25,代码来源:HL7KettleParser.java


示例17: testStructureByIndex

import ca.uhn.hl7v2.model.Structure; //导入依赖的package包/类
protected <T extends Structure> void testStructureByIndex(int index,
                                                          Class<T> clazz)
    throws HL7Exception
{
    
    List<T> exepectedSegments =
        HapiUtil.getAll(this.expectedMessage, clazz);
    // re-eval to remove cleared segments
    List<T> actualSegments =
        HapiUtil.getAll((AbstractMessage) this.pipeParser
            .parse(this.actualMessage.encode()), clazz);
    
    if (exepectedSegments.size() < index + 1 ||
        actualSegments.size() < index + 1)
        return;
    
    assertEquals(
        ((AbstractSegment) exepectedSegments.get(index)).encode(),
        ((AbstractSegment) actualSegments.get(index)).encode());
}
 
开发者ID:KingsCollegeHospital,项目名称:rassyeyanie,代码行数:21,代码来源:AbstractHl7Test.java


示例18: extractValues

import ca.uhn.hl7v2.model.Structure; //导入依赖的package包/类
public static List<HL7Value> extractValues( Message message ) throws Exception {
  Terser terser = new Terser( message );
  SegmentFinder finder = terser.getFinder();

  List<HL7Value> values = new ArrayList<HL7Value>();

  int childNr = 1;

  while ( finder.hasNextChild() ) {

    // next group in the message (MSH, PID, EVN and so on)
    //
    finder.nextChild();
    Structure[] structures = finder.getCurrentChildReps();
    for ( int i = 0; i < structures.length; i++ ) {
      Structure structure = structures[i];
      parseStructure( values, message, terser, structure, Integer.toString( childNr ) );
    }

    childNr++;
  }

  return values;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:25,代码来源:HL7KettleParser.java


示例19: getZDSList

import ca.uhn.hl7v2.model.Structure; //导入依赖的package包/类
public ZDS[] getZDSList() throws HL7Exception {
      Structure[] list = getAll("ZDS");
      ZDS[] zdsSegments = new ZDS[list.length];
      
      for (int i=0; i < list.length; i++)
	zdsSegments[i] = (ZDS) list[i];
	
return zdsSegments;
  }
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:10,代码来源:ORU_R01.java


示例20: getHeaders

import ca.uhn.hl7v2.model.Structure; //导入依赖的package包/类
@Override
public ArrayList<String> getHeaders(){
   headerList = new ArrayList<String>();

   String[] noms = msg.getNames();
   for(String s:noms){
       logger.debug(s);
   }


   for (int i = 0; i < getOBRCount();i++){
        headerList.add(getOBRName(i));
        logger.debug("ADDING to header "+getOBRName(i));
   }
   logger.debug("AFTER");
   try{

   logger.debug("Current Group "+terser.getFinder().getCurrentGroup().getName());

   Structure[] strs =   terser.getFinder().getCurrentChildReps(); //((Group) terser.getFinder().getCurrentGroup().get("RESPONSE")).getAll("ORDER_OBSERVATION");
    for(Structure str:strs){
        logger.debug(str.getClass().getName()+"  "+str.getName());
        Group obrseg = (Group) str;

        Structure[] structChilds = obrseg.getAll("OBX");
        for(Structure ss:structChilds){
            logger.debug(ss.getClass().getName()+" "+str.getName());
        }
    }
   }catch(Exception e){
       logger.debug("debug", e);

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ZkHosts类代码示例发布时间:2022-05-22
下一篇:
Java DesktopAssetManager类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap