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


Java OBR类代码示例

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


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

示例1: getOrderingProvider

import ca.uhn.hl7v2.model.v22.segment.OBR; //导入依赖的package包/类
public String getOrderingProvider() {
	ORU_R01_PATIENT_RESULT patientResult = message.getPATIENT_RESULT();
	if (patientResult == null) {
		return null;
	}
	ORU_R01_ORDER_OBSERVATION orderObservation = patientResult.getORDER_OBSERVATION();
	if (orderObservation == null) {
		return null;
	}
	OBR obr = orderObservation.getOBR();
	if (obr == null) {
		return null;
	}
	CN orderingProvider = obr.getOrderingProvider();
	if (orderingProvider == null) {
		return null;
	}
	if (orderingProvider.getIDNumber() != null) {
		return orderingProvider.getIDNumber().getValue();
	}
	return null;
}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:23,代码来源:EaapsMessageSupport.java

示例2: getOBXFinalResultCount

import ca.uhn.hl7v2.model.v22.segment.OBR; //导入依赖的package包/类
public int getOBXFinalResultCount() {
	// not applicable to alpha labs
	int count = 0;
	for (int i = 0; i < obrSegKeySet.size(); i++) {
		OBR obr = obrSegKeySet.get(i);
		for (int j = 0; j < obrSegMap.get(obr).size(); j++){
			if ("F".equalsIgnoreCase(obrSegMap.get(obr).get(j).getObservationResultStatus().getValue())) {
				count++;
			}
		}
	}
	return count;
}
 
开发者ID:oscarservice,项目名称:oscar-old,代码行数:14,代码来源:AlphaHL7Handler.java

示例3: init

import ca.uhn.hl7v2.model.v22.segment.OBR; //导入依赖的package包/类
public void init(String hl7Body) throws HL7Exception {

		Parser p = new PipeParser();
		p.setValidationContext(new NoValidation());
		msg = (ORU_R01) p.parse(hl7Body.replaceAll("\n", "\r\n"));

		ArrayList<String> labs = getMatchingAlphaLabs(hl7Body);
		headers = new ArrayList<String>();
		obrSegMap = new LinkedHashMap<OBR, ArrayList<OBX>>();
		obrSegKeySet = new ArrayList<OBR>();

		for (int i = 0; i < labs.size(); i++) {
			msg = (ORU_R01) p.parse((labs.get(i)).replaceAll("\n", "\r\n"));
			int obrCount = msg.getPATIENT_RESULT().getORDER_OBSERVATIONReps();

			for (int j = 0; j < obrCount; j++) {

				// ADD OBR SEGMENTS AND THEIR OBX SEGMENTS TO THE OBRSEGMAP
				OBR obrSeg = msg.getPATIENT_RESULT().getORDER_OBSERVATION(j)
						.getOBR();
				ArrayList<OBX> obxSegs = obrSegMap.get(obrSeg);

				// if the obrsegment has not yet been created it will be now
				if (obxSegs == null)
					obxSegs = new ArrayList<OBX>();

				int obxCount = msg.getPATIENT_RESULT().getORDER_OBSERVATION(j)
						.getOBSERVATIONReps();
				for (int k = 0; k < obxCount; k++) {
					obxSegs.add(msg.getPATIENT_RESULT().getORDER_OBSERVATION(j)
							.getOBSERVATION(k).getOBX());
				}

				obrSegMap.put(obrSeg, obxSegs);
				obrSegKeySet.add(obrSeg);

				// ADD THE HEADER TO THE HEADERS ARRAYLIST
				String header = getString(Terser.get(obrSeg, 4, 0, 2, 1));
				if (!headers.contains(header)) {
					headers.add(header);
				}
			}
		}
	}
 
开发者ID:oscarservice,项目名称:oscar-old,代码行数:45,代码来源:AlphaHL7Handler.java

示例4: readObservation

import ca.uhn.hl7v2.model.v22.segment.OBR; //导入依赖的package包/类
@Override
public ObservationMessage readObservation(HL7PatientResolver patientResolver,
	boolean createIfNotFound) throws ElexisException{
	observation = null;
	ORU_R01 oru = (ORU_R01) message;
	try {
		this.patientResolver = patientResolver;
		setPatient(oru, createIfNotFound);
		
		int obsCount = oru.getPATIENT_RESULT().getORDER_OBSERVATIONReps();
		for (int idx = 0; idx < obsCount; idx++) {
			OBR obr = oru.getPATIENT_RESULT().getORDER_OBSERVATION(idx).getOBR();
			String obrObservationDateTime =
				obr.getObr7_ObservationDateTime().getTs1_TimeOfAnEvent().getValue();
				
			setOrderComment(oru, idx, obrObservationDateTime);
			
			for (int i = 0; i < oru.getPATIENT_RESULT().getORDER_OBSERVATION(idx)
				.getOBSERVATIONReps(); i++) {
				ORU_R01_ORDER_OBSERVATION obs =
					oru.getPATIENT_RESULT().getORDER_OBSERVATION(idx);
				// get notes and comments
				String commentNTE = getComments(obs, i);
				
				// groupe and sequence
				String group = "";
				String sequence = "";
				
				for (int k = 0; k < 2; k++) {
					CE ce = obr.getUniversalServiceID();
					if (ce != null) {
						String code = "";
						if (ce.getCe3_NameOfCodingSystem() != null)
							code = ce.getCe3_NameOfCodingSystem().getValue();
							
						group = getGroup(code, ce);
						sequence = getSequence(code, ce);
						
					}
				}
				
				// result
				readOBXResults(obs.getOBSERVATION(i), commentNTE, group, sequence,
					obrObservationDateTime);
			}
		}
	} catch (HL7Exception | ParseException e) {
		throw new ElexisException(e.getMessage(), e);
	}
	return observation;
}
 
开发者ID:elexis,项目名称:elexis-3-core,代码行数:52,代码来源:HL7ReaderV22.java


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